From 03d8e5abc686c5c4a9f96ca14db07e2aed880174 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Wed, 30 Dec 2020 20:00:19 -0800 Subject: [PATCH] Repackage as io.trino (step 4 of 5): import statements --- .../io/trino/cli/AbstractWarningsPrinter.java | 4 +- .../io/trino/cli/AlignedTablePrinter.java | 18 +- .../main/java/io/trino/cli/ClientOptions.java | 4 +- .../src/main/java/io/trino/cli/Console.java | 30 +- .../java/io/trino/cli/ConsolePrinter.java | 2 +- .../main/java/io/trino/cli/CsvPrinter.java | 10 +- .../java/io/trino/cli/InputHighlighter.java | 8 +- .../main/java/io/trino/cli/InputParser.java | 4 +- .../main/java/io/trino/cli/JsonPrinter.java | 2 +- .../main/java/io/trino/cli/OutputHandler.java | 2 +- .../src/main/java/io/trino/cli/Presto.java | 6 +- .../src/main/java/io/trino/cli/Query.java | 26 +- .../java/io/trino/cli/QueryPreprocessor.java | 2 +- .../main/java/io/trino/cli/QueryRunner.java | 28 +- .../main/java/io/trino/cli/StatusPrinter.java | 28 +- .../java/io/trino/cli/TableNameCompleter.java | 4 +- .../main/java/io/trino/cli/TsvPrinter.java | 2 +- .../io/trino/cli/VerticalRecordPrinter.java | 6 +- .../java/io/trino/cli/WarningsPrinter.java | 2 +- .../io/trino/cli/TestAlignedTablePrinter.java | 14 +- .../java/io/trino/cli/TestClientOptions.java | 10 +- .../java/io/trino/cli/TestCsvPrinter.java | 18 +- .../io/trino/cli/TestInsecureQueryRunner.java | 12 +- .../java/io/trino/cli/TestJsonPrinter.java | 4 +- .../java/io/trino/cli/TestQueryRunner.java | 16 +- .../java/io/trino/cli/TestTsvPrinter.java | 4 +- .../trino/cli/TestVerticalRecordPrinter.java | 6 +- .../io/trino/client/ClientTypeSignature.java | 6 +- .../io/trino/client/FixJsonDataUtils.java | 54 +- .../java/io/trino/client/QueryResults.java | 2 +- .../io/trino/client/StatementClientV1.java | 52 +- .../trino/client/TestClientTypeSignature.java | 2 +- .../io/trino/client/TestFixJsonDataUtils.java | 54 +- .../io/trino/client/TestIntervalDayTime.java | 6 +- .../trino/client/TestIntervalYearMonth.java | 6 +- .../java/io/trino/client/TestServerInfo.java | 2 +- .../trino/jdbc/AbstractPrestoResultSet.java | 20 +- .../main/java/io/trino/jdbc/ColumnInfo.java | 4 +- .../io/trino/jdbc/ConnectionProperties.java | 8 +- .../trino/jdbc/InMemoryPrestoResultSet.java | 2 +- .../java/io/trino/jdbc/PrestoConnection.java | 16 +- .../io/trino/jdbc/PrestoDatabaseMetaData.java | 8 +- .../main/java/io/trino/jdbc/PrestoDriver.java | 4 +- .../java/io/trino/jdbc/PrestoDriverUri.java | 88 +-- .../io/trino/jdbc/PrestoIntervalDayTime.java | 4 +- .../trino/jdbc/PrestoIntervalYearMonth.java | 4 +- .../trino/jdbc/PrestoPreparedStatement.java | 34 +- .../java/io/trino/jdbc/PrestoResultSet.java | 6 +- .../java/io/trino/jdbc/PrestoSqlWarning.java | 2 +- .../java/io/trino/jdbc/PrestoStatement.java | 8 +- .../java/io/trino/jdbc/QueryExecutor.java | 12 +- .../main/java/io/trino/jdbc/QueryStats.java | 2 +- .../java/io/trino/jdbc/TypeConversions.java | 2 +- .../java/io/trino/jdbc/WarningsManager.java | 2 +- .../io/trino/jdbc/BaseTestJdbcResultSet.java | 2 +- .../jdbc/TestAbstractPrestoResultSet.java | 4 +- .../io/trino/jdbc/TestJdbcConnection.java | 28 +- .../trino/jdbc/TestJdbcPreparedStatement.java | 18 +- .../java/io/trino/jdbc/TestJdbcResultSet.java | 2 +- .../jdbc/TestJdbcVendorCompatibility.java | 2 +- .../java/io/trino/jdbc/TestJdbcWarnings.java | 16 +- .../jdbc/TestPrestoDatabaseMetaData.java | 74 +- .../java/io/trino/jdbc/TestPrestoDriver.java | 16 +- .../io/trino/jdbc/TestPrestoDriverAuth.java | 4 +- .../io/trino/jdbc/TestPrestoDriverUri.java | 22 +- .../io/trino/jdbc/TestProgressMonitor.java | 10 +- .../java/io/trino/jdbc/TestQueryExecutor.java | 4 +- .../io/trino/ExceededCpuLimitException.java | 4 +- .../trino/ExceededMemoryLimitException.java | 8 +- .../io/trino/ExceededScanLimitException.java | 4 +- .../io/trino/ExceededSpillLimitException.java | 4 +- .../java/io/trino/FullConnectorSession.java | 14 +- .../java/io/trino/GroupByHashPageIndexer.java | 18 +- .../trino/GroupByHashPageIndexerFactory.java | 12 +- .../io/trino/NotInTransactionException.java | 6 +- .../java/io/trino/PagesIndexPageSorter.java | 14 +- .../src/main/java/io/trino/Session.java | 38 +- .../java/io/trino/SessionRepresentation.java | 20 +- .../io/trino/SystemSessionProperties.java | 36 +- .../java/io/trino/block/BlockJsonSerde.java | 8 +- .../java/io/trino/block/BlockSerdeUtil.java | 8 +- .../connector/ConnectorAwareNodeManager.java | 6 +- .../connector/ConnectorContextInstance.java | 12 +- .../io/trino/connector/ConnectorManager.java | 86 +-- .../InformationSchemaColumnHandle.java | 2 +- .../InformationSchemaConnector.java | 20 +- .../InformationSchemaHandleResolver.java | 10 +- .../InformationSchemaMetadata.java | 62 +- .../InformationSchemaPageSource.java | 58 +- .../InformationSchemaPageSourceProvider.java | 22 +- .../InformationSchemaSplit.java | 4 +- .../InformationSchemaSplitManager.java | 20 +- .../InformationSchemaTable.java | 12 +- .../InformationSchemaTableHandle.java | 4 +- .../InformationSchemaTransactionHandle.java | 4 +- .../system/AbstractPropertiesSystemTable.java | 30 +- .../system/AnalyzePropertiesSystemTable.java | 4 +- .../connector/system/CatalogSystemTable.java | 36 +- .../system/ColumnPropertiesSystemTable.java | 4 +- .../CoordinatorSystemTablesProvider.java | 22 +- .../system/GlobalSystemConnector.java | 14 +- .../system/GlobalSystemConnectorFactory.java | 12 +- .../system/GlobalSystemHandleResolver.java | 2 +- .../system/GlobalSystemTransactionHandle.java | 4 +- .../connector/system/KillQueryProcedure.java | 36 +- .../connector/system/NodeSystemTable.java | 40 +- .../connector/system/QuerySystemTable.java | 56 +- .../system/RuleStatsSystemTable.java | 42 +- .../system/SchemaPropertiesSystemTable.java | 4 +- .../system/StaticSystemTablesProvider.java | 6 +- .../connector/system/SystemColumnHandle.java | 6 +- .../connector/system/SystemConnector.java | 18 +- .../system/SystemConnectorModule.java | 32 +- .../system/SystemHandleResolver.java | 10 +- .../system/SystemPageSourceProvider.java | 42 +- .../trino/connector/system/SystemSplit.java | 8 +- .../connector/system/SystemSplitManager.java | 40 +- .../connector/system/SystemTableHandle.java | 12 +- .../system/SystemTablesMetadata.java | 36 +- .../system/SystemTablesProvider.java | 6 +- .../system/SystemTransactionHandle.java | 4 +- .../system/TableCommentSystemTable.java | 46 +- .../system/TablePropertiesSystemTable.java | 4 +- .../connector/system/TaskSystemTable.java | 40 +- .../system/TransactionsSystemTable.java | 52 +- .../system/jdbc/AttributeJdbcTable.java | 20 +- .../system/jdbc/CatalogJdbcTable.java | 30 +- .../system/jdbc/ColumnJdbcTable.java | 98 +-- .../connector/system/jdbc/FilterUtil.java | 6 +- .../connector/system/jdbc/JdbcTable.java | 12 +- .../system/jdbc/ProcedureColumnJdbcTable.java | 20 +- .../system/jdbc/ProcedureJdbcTable.java | 20 +- .../system/jdbc/PseudoColumnJdbcTable.java | 20 +- .../system/jdbc/SchemaJdbcTable.java | 34 +- .../system/jdbc/SuperTableJdbcTable.java | 18 +- .../system/jdbc/SuperTypeJdbcTable.java | 18 +- .../connector/system/jdbc/TableJdbcTable.java | 42 +- .../system/jdbc/TableTypeJdbcTable.java | 18 +- .../connector/system/jdbc/TypesJdbcTable.java | 36 +- .../connector/system/jdbc/UdtJdbcTable.java | 18 +- .../io/trino/cost/AggregationStatsRule.java | 18 +- .../trino/cost/AssignUniqueIdStatsRule.java | 14 +- .../io/trino/cost/CachingCostProvider.java | 14 +- .../io/trino/cost/CachingStatsProvider.java | 18 +- .../trino/cost/ComparisonStatsCalculator.java | 12 +- .../trino/cost/ComposableStatsCalculator.java | 12 +- .../java/io/trino/cost/CostCalculator.java | 6 +- .../cost/CostCalculatorUsingExchanges.java | 58 +- .../CostCalculatorWithEstimatedExchanges.java | 26 +- .../java/io/trino/cost/CostComparator.java | 4 +- .../main/java/io/trino/cost/CostProvider.java | 2 +- .../trino/cost/EnforceSingleRowStatsRule.java | 12 +- .../java/io/trino/cost/ExchangeStatsRule.java | 18 +- .../io/trino/cost/FilterStatsCalculator.java | 82 +-- .../java/io/trino/cost/FilterStatsRule.java | 16 +- .../java/io/trino/cost/JoinStatsRule.java | 30 +- .../java/io/trino/cost/LimitStatsRule.java | 12 +- .../java/io/trino/cost/LocalCostEstimate.java | 2 +- .../java/io/trino/cost/OutputStatsRule.java | 14 +- .../io/trino/cost/PlanNodeStatsEstimate.java | 10 +- .../java/io/trino/cost/ProjectStatsRule.java | 16 +- .../io/trino/cost/RowNumberStatsRule.java | 16 +- .../io/trino/cost/ScalarStatsCalculator.java | 68 +- .../trino/cost/SemiJoinStatsCalculator.java | 2 +- .../java/io/trino/cost/SemiJoinStatsRule.java | 14 +- .../SimpleFilterProjectSemiJoinStatsRule.java | 38 +- .../java/io/trino/cost/SimpleStatsRule.java | 10 +- .../java/io/trino/cost/SortStatsRule.java | 14 +- .../io/trino/cost/SpatialJoinStatsRule.java | 12 +- .../java/io/trino/cost/StatsAndCosts.java | 8 +- .../java/io/trino/cost/StatsCalculator.java | 10 +- .../io/trino/cost/StatsCalculatorModule.java | 4 +- .../java/io/trino/cost/StatsNormalizer.java | 20 +- .../java/io/trino/cost/StatsProvider.java | 2 +- .../main/java/io/trino/cost/StatsUtil.java | 30 +- .../io/trino/cost/TableScanStatsRule.java | 28 +- .../io/trino/cost/TaskCountEstimator.java | 12 +- .../java/io/trino/cost/TopNStatsRule.java | 16 +- .../java/io/trino/cost/UnionStatsRule.java | 18 +- .../java/io/trino/cost/ValuesStatsRule.java | 34 +- .../io/trino/dispatcher/DispatchExecutor.java | 4 +- .../io/trino/dispatcher/DispatchInfo.java | 2 +- .../io/trino/dispatcher/DispatchManager.java | 52 +- .../io/trino/dispatcher/DispatchQuery.java | 4 +- .../dispatcher/DispatchQueryFactory.java | 8 +- .../trino/dispatcher/FailedDispatchQuery.java | 26 +- .../FailedDispatchQueryFactory.java | 12 +- .../trino/dispatcher/LocalDispatchQuery.java | 34 +- .../dispatcher/LocalDispatchQueryFactory.java | 42 +- .../dispatcher/QueuedStatementResource.java | 44 +- .../java/io/trino/event/QueryMonitor.java | 84 +-- .../java/io/trino/event/SplitMonitor.java | 16 +- .../eventlistener/EventListenerManager.java | 12 +- .../io/trino/execution/AddColumnTask.java | 56 +- .../io/trino/execution/BasicStageStats.java | 2 +- .../java/io/trino/execution/CallTask.java | 64 +- .../trino/execution/ClusterSizeMonitor.java | 10 +- .../java/io/trino/execution/CommentTask.java | 32 +- .../java/io/trino/execution/CommitTask.java | 18 +- .../execution/CreateMaterializedViewTask.java | 44 +- .../io/trino/execution/CreateRoleTask.java | 26 +- .../io/trino/execution/CreateSchemaTask.java | 42 +- .../io/trino/execution/CreateTableTask.java | 80 +-- .../io/trino/execution/CreateViewTask.java | 36 +- .../execution/DataDefinitionExecution.java | 28 +- .../trino/execution/DataDefinitionTask.java | 12 +- .../io/trino/execution/DeallocateTask.java | 10 +- .../io/trino/execution/DropColumnTask.java | 28 +- .../execution/DropMaterializedViewTask.java | 22 +- .../java/io/trino/execution/DropRoleTask.java | 18 +- .../io/trino/execution/DropSchemaTask.java | 24 +- .../io/trino/execution/DropTableTask.java | 22 +- .../java/io/trino/execution/DropViewTask.java | 22 +- .../execution/DynamicFiltersCollector.java | 4 +- .../trino/execution/ExecutionFailureInfo.java | 8 +- .../main/java/io/trino/execution/Failure.java | 2 +- .../io/trino/execution/GrantRolesTask.java | 26 +- .../java/io/trino/execution/GrantTask.java | 36 +- .../main/java/io/trino/execution/Input.java | 4 +- .../io/trino/execution/LocationFactory.java | 4 +- .../execution/ManagedQueryExecution.java | 8 +- .../execution/MemoryRevokingScheduler.java | 16 +- .../MemoryTrackingRemoteTaskFactory.java | 16 +- .../java/io/trino/execution/NodeTaskMap.java | 4 +- .../trino/execution/ParameterExtractor.java | 6 +- .../java/io/trino/execution/PrepareTask.java | 24 +- .../io/trino/execution/QueryExecution.java | 18 +- .../io/trino/execution/QueryIdGenerator.java | 2 +- .../java/io/trino/execution/QueryInfo.java | 28 +- .../java/io/trino/execution/QueryManager.java | 10 +- .../io/trino/execution/QueryManagerStats.java | 12 +- .../execution/QueryPerformanceFetcher.java | 2 +- .../io/trino/execution/QueryPreparer.java | 32 +- .../io/trino/execution/QueryStateMachine.java | 86 +-- .../java/io/trino/execution/QueryStats.java | 10 +- .../java/io/trino/execution/QueryTracker.java | 18 +- .../java/io/trino/execution/RemoteTask.java | 8 +- .../io/trino/execution/RemoteTaskFactory.java | 14 +- .../io/trino/execution/RenameColumnTask.java | 30 +- .../io/trino/execution/RenameSchemaTask.java | 22 +- .../io/trino/execution/RenameTableTask.java | 28 +- .../io/trino/execution/RenameViewTask.java | 28 +- .../io/trino/execution/ResetSessionTask.java | 18 +- .../io/trino/execution/RevokeRolesTask.java | 26 +- .../java/io/trino/execution/RevokeTask.java | 36 +- .../java/io/trino/execution/RollbackTask.java | 18 +- .../io/trino/execution/ScheduledSplit.java | 4 +- .../java/io/trino/execution/SetPathTask.java | 28 +- .../java/io/trino/execution/SetRoleTask.java | 18 +- .../execution/SetSchemaAuthorizationTask.java | 30 +- .../io/trino/execution/SetSessionTask.java | 36 +- .../execution/SetTableAuthorizationTask.java | 34 +- .../execution/SetViewAuthorizationTask.java | 34 +- .../io/trino/execution/SqlQueryExecution.java | 112 +-- .../io/trino/execution/SqlQueryManager.java | 30 +- .../io/trino/execution/SqlStageExecution.java | 36 +- .../main/java/io/trino/execution/SqlTask.java | 42 +- .../io/trino/execution/SqlTaskExecution.java | 46 +- .../execution/SqlTaskExecutionFactory.java | 22 +- .../io/trino/execution/SqlTaskManager.java | 56 +- .../main/java/io/trino/execution/StageId.java | 2 +- .../java/io/trino/execution/StageInfo.java | 6 +- .../io/trino/execution/StageStateMachine.java | 46 +- .../java/io/trino/execution/StageStats.java | 10 +- .../trino/execution/StartTransactionTask.java | 28 +- .../java/io/trino/execution/StateMachine.java | 4 +- .../java/io/trino/execution/TableInfo.java | 6 +- .../main/java/io/trino/execution/TaskId.java | 2 +- .../java/io/trino/execution/TaskInfo.java | 12 +- .../java/io/trino/execution/TaskManager.java | 16 +- .../io/trino/execution/TaskManagerConfig.java | 2 +- .../java/io/trino/execution/TaskSource.java | 2 +- .../io/trino/execution/TaskStateMachine.java | 8 +- .../java/io/trino/execution/TaskStatus.java | 4 +- .../main/java/io/trino/execution/UseTask.java | 22 +- .../buffer/ArbitraryOutputBuffer.java | 30 +- .../buffer/BroadcastOutputBuffer.java | 26 +- .../io/trino/execution/buffer/BufferInfo.java | 2 +- .../trino/execution/buffer/ClientBuffer.java | 8 +- .../execution/buffer/LazyOutputBuffer.java | 20 +- .../trino/execution/buffer/OutputBuffer.java | 4 +- .../buffer/OutputBufferMemoryManager.java | 2 +- .../trino/execution/buffer/OutputBuffers.java | 12 +- .../execution/buffer/PageSplitterUtil.java | 2 +- .../io/trino/execution/buffer/PagesSerde.java | 18 +- .../execution/buffer/PagesSerdeFactory.java | 4 +- .../execution/buffer/PagesSerdeUtil.java | 10 +- .../buffer/PartitionedOutputBuffer.java | 26 +- .../execution/buffer/SerializedPage.java | 4 +- .../executor/MultilevelSplitQueue.java | 2 +- .../executor/PrioritizedSplitRunner.java | 4 +- .../execution/executor/TaskExecutor.java | 16 +- .../trino/execution/executor/TaskHandle.java | 4 +- .../resourcegroups/InternalResourceGroup.java | 38 +- .../InternalResourceGroupManager.java | 22 +- ...gacyResourceGroupConfigurationManager.java | 14 +- .../NoOpResourceGroupManager.java | 12 +- .../QueryQueueFullException.java | 6 +- ...upConfigurationManagerContextInstance.java | 4 +- .../resourcegroups/ResourceGroupManager.java | 12 +- .../scheduler/AllAtOnceExecutionPolicy.java | 2 +- .../scheduler/AllAtOnceExecutionSchedule.java | 32 +- .../BroadcastOutputBufferManager.java | 10 +- .../execution/scheduler/BucketNodeMap.java | 4 +- .../DynamicSplitPlacementPolicy.java | 6 +- .../execution/scheduler/ExecutionPolicy.java | 2 +- .../scheduler/ExecutionSchedule.java | 2 +- .../scheduler/FileBasedNetworkTopology.java | 4 +- .../scheduler/FixedBucketNodeMap.java | 4 +- .../scheduler/FixedCountScheduler.java | 6 +- .../FixedSourcePartitionedScheduler.java | 32 +- .../scheduler/FlatNetworkTopology.java | 2 +- .../execution/scheduler/NetworkTopology.java | 2 +- .../scheduler/NodeAssignmentStats.java | 6 +- .../io/trino/execution/scheduler/NodeMap.java | 4 +- .../execution/scheduler/NodeScheduler.java | 12 +- .../execution/scheduler/NodeSelector.java | 6 +- .../scheduler/NodeSelectorFactory.java | 2 +- .../scheduler/OutputBufferManager.java | 2 +- .../PartitionedOutputBufferManager.java | 8 +- .../scheduler/PhasedExecutionPolicy.java | 2 +- .../scheduler/PhasedExecutionSchedule.java | 34 +- .../scheduler/ScaledOutputBufferManager.java | 8 +- .../scheduler/ScaledWriterScheduler.java | 14 +- .../execution/scheduler/ScheduleResult.java | 2 +- .../scheduler/SourcePartitionedScheduler.java | 34 +- .../execution/scheduler/SourceScheduler.java | 6 +- .../scheduler/SplitPlacementPolicy.java | 4 +- .../scheduler/SplitPlacementResult.java | 4 +- .../scheduler/SqlQueryScheduler.java | 96 +-- .../scheduler/SubnetBasedTopology.java | 4 +- .../scheduler/SubnetTopologyConfig.java | 2 +- .../scheduler/TopologyAwareNodeSelector.java | 32 +- .../TopologyAwareNodeSelectorFactory.java | 12 +- .../TopologyAwareNodeSelectorModule.java | 6 +- .../scheduler/UniformNodeSelector.java | 32 +- .../scheduler/UniformNodeSelectorFactory.java | 12 +- .../scheduler/group/DynamicBucketNodeMap.java | 6 +- .../group/DynamicLifespanScheduler.java | 10 +- .../group/FixedLifespanScheduler.java | 12 +- .../scheduler/group/LifespanScheduler.java | 4 +- .../warnings/DefaultWarningCollector.java | 4 +- .../execution/warnings/WarningCollector.java | 2 +- .../failuredetector/FailureDetector.java | 2 +- .../HeartbeatFailureDetector.java | 18 +- .../failuredetector/NoOpFailureDetector.java | 2 +- .../java/io/trino/index/IndexManager.java | 14 +- .../memory/ClusterMemoryLeakDetector.java | 6 +- .../io/trino/memory/ClusterMemoryManager.java | 50 +- .../io/trino/memory/ClusterMemoryPool.java | 8 +- .../io/trino/memory/LocalMemoryManager.java | 8 +- .../java/io/trino/memory/LowMemoryKiller.java | 4 +- .../main/java/io/trino/memory/MemoryInfo.java | 4 +- .../main/java/io/trino/memory/MemoryPool.java | 10 +- .../io/trino/memory/MemoryPoolAssignment.java | 4 +- .../java/io/trino/memory/MemoryResource.java | 14 +- .../io/trino/memory/NoneLowMemoryKiller.java | 2 +- .../java/io/trino/memory/QueryContext.java | 26 +- .../io/trino/memory/QueryContextVisitor.java | 8 +- .../io/trino/memory/RemoteNodeMemory.java | 2 +- .../TotalReservationLowMemoryKiller.java | 4 +- ...ervationOnBlockedNodesLowMemoryKiller.java | 6 +- .../memory/TraversingQueryContextVisitor.java | 8 +- .../trino/memory/VersionedMemoryPoolId.java | 2 +- .../metadata/AbstractPropertyManager.java | 32 +- .../metadata/AggregationFunctionMetadata.java | 2 +- .../io/trino/metadata/AnalyzeMetadata.java | 2 +- .../metadata/AnalyzePropertyManager.java | 2 +- .../io/trino/metadata/AnalyzeTableHandle.java | 6 +- .../io/trino/metadata/BoundSignature.java | 2 +- .../io/trino/metadata/BoundVariables.java | 2 +- .../main/java/io/trino/metadata/Catalog.java | 6 +- .../io/trino/metadata/CatalogManager.java | 2 +- .../io/trino/metadata/CatalogMetadata.java | 10 +- .../trino/metadata/ColumnPropertyManager.java | 2 +- .../trino/metadata/DiscoveryNodeManager.java | 16 +- .../io/trino/metadata/FunctionBinding.java | 2 +- .../trino/metadata/FunctionDependencies.java | 16 +- .../FunctionDependencyDeclaration.java | 8 +- .../io/trino/metadata/FunctionExtractor.java | 12 +- .../trino/metadata/FunctionListBuilder.java | 6 +- .../io/trino/metadata/FunctionRegistry.java | 656 +++++++++--------- .../io/trino/metadata/FunctionResolver.java | 20 +- .../io/trino/metadata/HandleJsonModule.java | 18 +- .../io/trino/metadata/HandleResolver.java | 28 +- .../trino/metadata/InMemoryNodeManager.java | 4 +- .../java/io/trino/metadata/IndexHandle.java | 6 +- .../io/trino/metadata/InsertTableHandle.java | 6 +- .../metadata/InternalBlockEncodingSerde.java | 10 +- .../java/io/trino/metadata/InternalNode.java | 6 +- .../trino/metadata/InternalNodeManager.java | 2 +- .../java/io/trino/metadata/InternalTable.java | 10 +- .../io/trino/metadata/LiteralFunction.java | 34 +- .../main/java/io/trino/metadata/Metadata.java | 94 +-- .../io/trino/metadata/MetadataListing.java | 16 +- .../io/trino/metadata/MetadataManager.java | 232 +++---- .../java/io/trino/metadata/MetadataUtil.java | 42 +- .../io/trino/metadata/NewTableLayout.java | 8 +- .../metadata/OperatorNotFoundException.java | 10 +- .../io/trino/metadata/OutputTableHandle.java | 6 +- .../metadata/PolymorphicScalarFunction.java | 20 +- .../PolymorphicScalarFunctionBuilder.java | 20 +- .../io/trino/metadata/ProcedureRegistry.java | 30 +- .../trino/metadata/QualifiedObjectName.java | 10 +- .../trino/metadata/QualifiedTablePrefix.java | 8 +- .../trino/metadata/RemoteHandleResolver.java | 18 +- .../metadata/RemoteTransactionHandle.java | 2 +- .../io/trino/metadata/ResolvedFunction.java | 14 +- .../java/io/trino/metadata/ResolvedIndex.java | 10 +- .../trino/metadata/SchemaPropertyManager.java | 2 +- .../metadata/SessionPropertyManager.java | 46 +- .../java/io/trino/metadata/Signature.java | 4 +- .../io/trino/metadata/SignatureBinder.java | 40 +- .../io/trino/metadata/SignatureBuilder.java | 6 +- .../main/java/io/trino/metadata/Split.java | 8 +- .../metadata/SqlAggregationFunction.java | 10 +- .../java/io/trino/metadata/SqlFunction.java | 2 +- .../java/io/trino/metadata/SqlOperator.java | 16 +- .../io/trino/metadata/SqlScalarFunction.java | 2 +- .../io/trino/metadata/StaticCatalogStore.java | 2 +- .../java/io/trino/metadata/TableHandle.java | 8 +- .../io/trino/metadata/TableLayoutResult.java | 6 +- .../java/io/trino/metadata/TableMetadata.java | 8 +- .../io/trino/metadata/TableProperties.java | 16 +- .../trino/metadata/TablePropertyManager.java | 2 +- .../java/io/trino/metadata/TypeRegistry.java | 96 +-- .../metadata/TypeVariableConstraint.java | 2 +- .../java/io/trino/metadata/TypeVariables.java | 2 +- .../UndeclaredDependencyException.java | 4 +- .../trino/operator/AggregationOperator.java | 16 +- .../java/io/trino/operator/Aggregator.java | 12 +- .../io/trino/operator/ArrayPositionLinks.java | 2 +- .../operator/AssignUniqueIdOperator.java | 22 +- .../BasicWorkProcessorOperatorAdapter.java | 10 +- .../io/trino/operator/BigintGroupByHash.java | 28 +- .../operator/BucketPartitionFunction.java | 4 +- .../java/io/trino/operator/ChannelSet.java | 16 +- .../io/trino/operator/DeleteOperator.java | 18 +- .../io/trino/operator/DevNullOperator.java | 4 +- .../trino/operator/DistinctLimitOperator.java | 18 +- .../main/java/io/trino/operator/Driver.java | 18 +- .../java/io/trino/operator/DriverContext.java | 14 +- .../java/io/trino/operator/DriverFactory.java | 4 +- .../java/io/trino/operator/DriverStats.java | 2 +- .../operator/DynamicFilterSourceOperator.java | 36 +- .../io/trino/operator/EmptyLookupSource.java | 4 +- .../operator/EnforceSingleRowOperator.java | 10 +- .../io/trino/operator/ExchangeClient.java | 12 +- .../trino/operator/ExchangeClientFactory.java | 6 +- .../trino/operator/ExchangeClientStatus.java | 2 +- .../operator/ExchangeClientSupplier.java | 2 +- .../io/trino/operator/ExchangeOperator.java | 18 +- .../operator/ExplainAnalyzeOperator.java | 20 +- .../operator/FilterAndProjectOperator.java | 24 +- .../io/trino/operator/FinishedOperator.java | 2 +- .../java/io/trino/operator/GroupByHash.java | 18 +- .../io/trino/operator/GroupByIdBlock.java | 6 +- .../io/trino/operator/GroupIdOperator.java | 14 +- .../io/trino/operator/GroupedTopNBuilder.java | 12 +- .../GroupedTopNRowNumberAccumulator.java | 6 +- .../operator/HashAggregationOperator.java | 38 +- .../trino/operator/HashBuilderOperator.java | 14 +- .../trino/operator/HashCollisionsCounter.java | 2 +- .../io/trino/operator/HashCollisionsInfo.java | 2 +- .../java/io/trino/operator/HashGenerator.java | 2 +- .../trino/operator/HashSemiJoinOperator.java | 34 +- .../trino/operator/HttpPageBufferClient.java | 44 +- .../operator/InternalJoinFilterFunction.java | 2 +- .../operator/InterpretedHashGenerator.java | 14 +- .../io/trino/operator/JoinBridgeManager.java | 6 +- .../io/trino/operator/JoinFilterFunction.java | 2 +- .../main/java/io/trino/operator/JoinHash.java | 4 +- .../io/trino/operator/JoinHashSupplier.java | 10 +- .../io/trino/operator/JoinOperatorInfo.java | 6 +- .../java/io/trino/operator/JoinProbe.java | 6 +- .../trino/operator/JoinStatisticsCounter.java | 4 +- .../java/io/trino/operator/JoinUtils.java | 32 +- .../java/io/trino/operator/LimitOperator.java | 4 +- .../io/trino/operator/LookupJoinOperator.java | 50 +- .../operator/LookupJoinOperatorFactory.java | 26 +- .../trino/operator/LookupJoinOperators.java | 10 +- .../trino/operator/LookupJoinPageBuilder.java | 12 +- .../trino/operator/LookupOuterOperator.java | 10 +- .../java/io/trino/operator/LookupSource.java | 4 +- .../trino/operator/LookupSourceFactory.java | 2 +- .../io/trino/operator/MarkDistinctHash.java | 20 +- .../trino/operator/MarkDistinctOperator.java | 16 +- .../java/io/trino/operator/MergeHashSort.java | 14 +- .../java/io/trino/operator/MergeOperator.java | 24 +- .../operator/MultiChannelGroupByHash.java | 36 +- .../operator/NestedLoopBuildOperator.java | 6 +- .../operator/NestedLoopJoinOperator.java | 12 +- .../trino/operator/NestedLoopJoinPages.java | 2 +- .../operator/NestedLoopJoinPagesBuilder.java | 4 +- .../trino/operator/NoChannelGroupByHash.java | 10 +- .../main/java/io/trino/operator/Operator.java | 2 +- .../io/trino/operator/OperatorContext.java | 24 +- .../io/trino/operator/OperatorFactory.java | 2 +- .../java/io/trino/operator/OperatorInfo.java | 6 +- .../java/io/trino/operator/OperatorStats.java | 4 +- .../io/trino/operator/OrderByOperator.java | 20 +- .../io/trino/operator/OuterLookupSource.java | 4 +- .../trino/operator/OuterPositionIterator.java | 2 +- .../java/io/trino/operator/OutputFactory.java | 8 +- .../java/io/trino/operator/PageBuffer.java | 14 +- .../io/trino/operator/PageSourceOperator.java | 4 +- .../trino/operator/PageTooLargeException.java | 4 +- .../operator/PageTransportErrorException.java | 6 +- .../PageTransportTimeoutException.java | 6 +- .../java/io/trino/operator/PageUtils.java | 6 +- .../operator/PageWithPositionComparator.java | 2 +- .../java/io/trino/operator/PagesHash.java | 10 +- .../io/trino/operator/PagesHashStrategy.java | 4 +- .../java/io/trino/operator/PagesIndex.java | 42 +- .../io/trino/operator/PagesRTreeIndex.java | 28 +- .../io/trino/operator/PagesSpatialIndex.java | 4 +- .../operator/PagesSpatialIndexFactory.java | 2 +- .../operator/PagesSpatialIndexSupplier.java | 26 +- .../operator/ParametricFunctionHelpers.java | 6 +- .../operator/ParametricImplementation.java | 4 +- .../ParametricImplementationsGroup.java | 8 +- .../io/trino/operator/PartitionFunction.java | 2 +- .../operator/PartitionedLookupSource.java | 10 +- .../PartitionedLookupSourceFactory.java | 14 +- .../operator/PartitionedOutputOperator.java | 30 +- .../io/trino/operator/PipelineContext.java | 12 +- .../java/io/trino/operator/PositionLinks.java | 2 +- .../operator/PrecomputedHashGenerator.java | 4 +- .../io/trino/operator/ProcessorContext.java | 8 +- .../io/trino/operator/RowNumberOperator.java | 26 +- .../operator/RowReferencePageManager.java | 6 +- .../ScanFilterAndProjectOperator.java | 60 +- .../io/trino/operator/SetBuilderOperator.java | 12 +- .../operator/SimpleChannelComparator.java | 12 +- .../SimplePageWithPositionComparator.java | 20 +- .../operator/SimplePagesHashStrategy.java | 20 +- .../operator/SimplePagesIndexComparator.java | 22 +- .../trino/operator/SortedPositionLinks.java | 6 +- .../io/trino/operator/SourceOperator.java | 6 +- .../trino/operator/SourceOperatorFactory.java | 2 +- .../operator/SpatialIndexBuilderOperator.java | 14 +- .../trino/operator/SpatialJoinOperator.java | 18 +- .../java/io/trino/operator/SpillContext.java | 2 +- .../io/trino/operator/SplitOperatorInfo.java | 2 +- .../operator/StageExecutionDescriptor.java | 8 +- .../operator/StandardJoinFilterFunction.java | 6 +- .../operator/StatisticsWriterOperator.java | 20 +- .../StreamingAggregationOperator.java | 32 +- .../trino/operator/TableDeleteOperator.java | 18 +- .../io/trino/operator/TableFinishInfo.java | 2 +- .../trino/operator/TableFinishOperator.java | 30 +- .../io/trino/operator/TableScanOperator.java | 28 +- .../TableScanWorkProcessorOperator.java | 34 +- .../trino/operator/TableWriterOperator.java | 46 +- .../java/io/trino/operator/TaskContext.java | 28 +- .../io/trino/operator/TaskOutputOperator.java | 18 +- .../java/io/trino/operator/TopNOperator.java | 20 +- .../java/io/trino/operator/TopNProcessor.java | 12 +- .../trino/operator/TopNRowNumberOperator.java | 22 +- .../io/trino/operator/ValuesOperator.java | 4 +- .../operator/WindowFunctionDefinition.java | 10 +- .../java/io/trino/operator/WindowInfo.java | 4 +- .../io/trino/operator/WindowOperator.java | 42 +- .../trino/operator/WorkProcessorOperator.java | 2 +- .../WorkProcessorOperatorAdapter.java | 8 +- .../WorkProcessorOperatorFactory.java | 6 +- .../WorkProcessorPipelineSourceOperator.java | 28 +- .../operator/WorkProcessorSourceOperator.java | 2 +- .../WorkProcessorSourceOperatorAdapter.java | 18 +- .../WorkProcessorSourceOperatorFactory.java | 8 +- .../io/trino/operator/WorkProcessorUtils.java | 6 +- ...stractGroupCollectionAggregationState.java | 10 +- .../AbstractMinMaxAggregationFunction.java | 78 +-- .../AbstractMinMaxNAggregationFunction.java | 56 +- .../operator/aggregation/Accumulator.java | 10 +- .../aggregation/AccumulatorCompiler.java | 42 +- .../aggregation/AccumulatorFactoryBinder.java | 12 +- .../AggregationFromAnnotationsParser.java | 24 +- .../AggregationImplementation.java | 64 +- .../aggregation/AggregationMetadata.java | 22 +- .../aggregation/AggregationUtils.java | 16 +- .../ApproximateCountDistinctAggregation.java | 46 +- ...proximateDoublePercentileAggregations.java | 34 +- ...mateDoublePercentileArrayAggregations.java | 28 +- ...ApproximateLongPercentileAggregations.java | 28 +- ...ximateLongPercentileArrayAggregations.java | 26 +- ...ApproximateRealPercentileAggregations.java | 32 +- ...ximateRealPercentileArrayAggregations.java | 24 +- .../ApproximateSetAggregation.java | 24 +- .../ArbitraryAggregationFunction.java | 52 +- .../aggregation/AverageAggregations.java | 22 +- .../BigintApproximateMostFrequent.java | 26 +- .../aggregation/BitwiseAndAggregation.java | 20 +- .../aggregation/BitwiseOrAggregation.java | 20 +- .../aggregation/BooleanAndAggregation.java | 26 +- .../aggregation/BooleanOrAggregation.java | 26 +- .../CentralMomentsAggregation.java | 26 +- .../ChecksumAggregationFunction.java | 48 +- .../aggregation/CountAggregation.java | 20 +- .../operator/aggregation/CountColumn.java | 46 +- .../aggregation/CountIfAggregation.java | 22 +- .../DecimalAverageAggregation.java | 58 +- .../aggregation/DecimalSumAggregation.java | 60 +- ...ltApproximateCountDistinctAggregation.java | 38 +- .../DoubleCorrelationAggregation.java | 26 +- .../DoubleCovarianceAggregation.java | 28 +- .../DoubleHistogramAggregation.java | 30 +- .../DoubleRegressionAggregation.java | 28 +- .../aggregation/DoubleSumAggregation.java | 22 +- .../GenericAccumulatorFactory.java | 34 +- .../GenericAccumulatorFactoryBinder.java | 14 +- .../GeometricMeanAggregations.java | 20 +- .../aggregation/GroupedAccumulator.java | 10 +- .../InternalAggregationFunction.java | 14 +- ...IntervalDayToSecondAverageAggregation.java | 18 +- .../IntervalDayToSecondSumAggregation.java | 20 +- ...IntervalYearToMonthAverageAggregation.java | 18 +- .../IntervalYearToMonthSumAggregation.java | 20 +- .../operator/aggregation/KeyValuePairs.java | 16 +- .../LazyAccumulatorFactoryBinder.java | 12 +- ...ngApproximateMostFrequentStateFactory.java | 6 +- ...pproximateMostFrequentStateSerializer.java | 10 +- .../aggregation/LongSumAggregation.java | 24 +- .../aggregation/MapAggregationFunction.java | 56 +- .../aggregation/MapUnionAggregation.java | 52 +- .../aggregation/MaxDataSizeForStats.java | 28 +- .../aggregation/MaxNAggregationFunction.java | 4 +- .../MergeHyperLogLogAggregation.java | 22 +- .../MergeQuantileDigestFunction.java | 54 +- .../aggregation/MergeTDigestAggregation.java | 22 +- .../aggregation/MinNAggregationFunction.java | 2 +- .../NumericHistogramStateFactory.java | 6 +- .../aggregation/ParametricAggregation.java | 52 +- .../QuantileDigestAggregationFunction.java | 60 +- .../aggregation/RealAverageAggregation.java | 46 +- .../RealCorrelationAggregation.java | 22 +- .../RealCovarianceAggregation.java | 24 +- .../RealGeometricMeanAggregations.java | 20 +- .../aggregation/RealHistogramAggregation.java | 18 +- .../RealRegressionAggregation.java | 24 +- .../aggregation/RealSumAggregation.java | 20 +- .../ReduceAggregationFunction.java | 48 +- ...ngApproximateMostFrequentStateFactory.java | 6 +- ...pproximateMostFrequentStateSerializer.java | 10 +- .../aggregation/SumDataSizeForStats.java | 28 +- .../TDigestAggregationFunction.java | 24 +- .../trino/operator/aggregation/TypedHeap.java | 8 +- .../aggregation/TypedKeyValueHeap.java | 14 +- .../trino/operator/aggregation/TypedSet.java | 18 +- .../VarcharApproximateMostFrequent.java | 30 +- .../aggregation/VarianceAggregation.java | 26 +- .../arrayagg/ArrayAggregationFunction.java | 52 +- .../arrayagg/ArrayAggregationState.java | 4 +- .../ArrayAggregationStateConsumer.java | 2 +- .../ArrayAggregationStateFactory.java | 4 +- .../ArrayAggregationStateSerializer.java | 10 +- .../arrayagg/GroupArrayAggregationState.java | 8 +- .../arrayagg/SingleArrayAggregationState.java | 6 +- .../builder/HashAggregationBuilder.java | 8 +- .../InMemoryHashAggregationBuilder.java | 46 +- .../MergingHashAggregationBuilder.java | 24 +- .../SpillableHashAggregationBuilder.java | 30 +- .../histogram/GroupedHistogramState.java | 10 +- .../histogram/GroupedTypedHistogram.java | 26 +- .../aggregation/histogram/Histogram.java | 54 +- .../aggregation/histogram/HistogramState.java | 6 +- .../histogram/HistogramStateFactory.java | 8 +- .../histogram/HistogramStateSerializer.java | 10 +- .../histogram/HistogramValueReader.java | 2 +- .../histogram/SingleHistogramState.java | 8 +- .../histogram/SingleTypedHistogram.java | 20 +- .../aggregation/histogram/TypedHistogram.java | 6 +- .../aggregation/histogram/ValueStore.java | 24 +- .../minmaxby/AbstractMinMaxBy.java | 86 +-- .../AbstractMinMaxByNAggregationFunction.java | 64 +- ...ooleanAndBlockPositionStateSerializer.java | 6 +- ...DoubleAndBlockPositionStateSerializer.java | 6 +- .../KeyAndBlockPositionValueState.java | 2 +- ...yAndBlockPositionValueStateSerializer.java | 18 +- .../LongAndBlockPositionStateSerializer.java | 6 +- .../minmaxby/MaxByNAggregationFunction.java | 4 +- .../minmaxby/MinByNAggregationFunction.java | 2 +- .../aggregation/minmaxby/MinMaxByNState.java | 4 +- .../minmaxby/MinMaxByNStateFactory.java | 8 +- .../minmaxby/MinMaxByNStateSerializer.java | 12 +- ...ObjectAndBlockPositionStateSerializer.java | 6 +- .../minmaxby/TwoNullableValueState.java | 4 +- .../TwoNullableValueStateMapping.java | 6 +- .../GroupedMultimapAggregationState.java | 8 +- .../MultimapAggregationFunction.java | 68 +- .../multimapagg/MultimapAggregationState.java | 6 +- .../MultimapAggregationStateConsumer.java | 2 +- .../MultimapAggregationStateFactory.java | 4 +- .../MultimapAggregationStateSerializer.java | 20 +- .../SingleMultimapAggregationState.java | 8 +- .../AbstractGroupedAccumulatorState.java | 2 +- .../aggregation/state/BlockPositionState.java | 10 +- .../state/BlockPositionStateSerializer.java | 8 +- .../aggregation/state/BlockState.java | 10 +- .../state/BlockStateSerializer.java | 8 +- .../state/BooleanDistinctState.java | 2 +- .../state/CentralMomentsState.java | 2 +- .../aggregation/state/CovarianceState.java | 2 +- .../state/DoubleHistogramStateSerializer.java | 14 +- .../aggregation/state/DoubleState.java | 2 +- .../aggregation/state/HyperLogLogState.java | 4 +- .../state/HyperLogLogStateFactory.java | 4 +- .../state/HyperLogLogStateSerializer.java | 10 +- .../state/KeyValuePairStateSerializer.java | 16 +- .../aggregation/state/KeyValuePairsState.java | 8 +- .../state/KeyValuePairsStateFactory.java | 8 +- .../aggregation/state/LongAndDoubleState.java | 2 +- .../LongDecimalWithOverflowAndLongState.java | 2 +- ...ecimalWithOverflowAndLongStateFactory.java | 6 +- ...malWithOverflowAndLongStateSerializer.java | 12 +- .../state/LongDecimalWithOverflowState.java | 4 +- .../LongDecimalWithOverflowStateFactory.java | 8 +- ...ongDecimalWithOverflowStateSerializer.java | 12 +- .../operator/aggregation/state/LongState.java | 2 +- .../aggregation/state/MinMaxNState.java | 4 +- .../state/MinMaxNStateFactory.java | 6 +- .../state/MinMaxNStateSerializer.java | 18 +- .../state/NullableBooleanState.java | 8 +- .../state/NullableBooleanStateSerializer.java | 10 +- .../state/NullableDoubleState.java | 8 +- .../state/NullableDoubleStateSerializer.java | 10 +- .../aggregation/state/NullableLongState.java | 8 +- .../state/NullableLongStateSerializer.java | 10 +- .../QuantileDigestAndPercentileState.java | 4 +- ...antileDigestAndPercentileStateFactory.java | 6 +- ...ileDigestAndPercentileStateSerializer.java | 10 +- .../state/QuantileDigestState.java | 2 +- .../state/QuantileDigestStateFactory.java | 4 +- .../state/QuantileDigestStateSerializer.java | 10 +- .../aggregation/state/SliceState.java | 6 +- .../aggregation/state/StateCompiler.java | 56 +- .../state/TDigestAndPercentileArrayState.java | 4 +- ...TDigestAndPercentileArrayStateFactory.java | 4 +- ...gestAndPercentileArrayStateSerializer.java | 10 +- .../state/TDigestAndPercentileState.java | 4 +- .../TDigestAndPercentileStateFactory.java | 6 +- .../TDigestAndPercentileStateSerializer.java | 10 +- .../aggregation/state/TDigestState.java | 4 +- .../state/TDigestStateFactory.java | 4 +- .../state/TDigestStateSerializer.java | 10 +- .../state/TriStateBooleanState.java | 8 +- .../state/TriStateBooleanStateSerializer.java | 16 +- .../aggregation/state/VarianceState.java | 2 +- .../CastImplementationDependency.java | 14 +- .../FunctionImplementationDependency.java | 16 +- .../annotations/FunctionsParserHelper.java | 48 +- .../annotations/ImplementationDependency.java | 32 +- .../LiteralImplementationDependency.java | 6 +- .../OperatorImplementationDependency.java | 20 +- .../ScalarImplementationDependency.java | 8 +- .../TypeImplementationDependency.java | 12 +- .../operator/exchange/BroadcastExchanger.java | 2 +- .../operator/exchange/LocalExchange.java | 24 +- .../exchange/LocalExchangeBufferInfo.java | 4 +- .../operator/exchange/LocalExchangeSink.java | 6 +- .../exchange/LocalExchangeSinkOperator.java | 22 +- .../exchange/LocalExchangeSource.java | 6 +- .../exchange/LocalExchangeSourceOperator.java | 14 +- .../operator/exchange/LocalExchanger.java | 4 +- .../exchange/LocalMergeSourceOperator.java | 26 +- .../exchange/LocalPartitionGenerator.java | 6 +- .../exchange/PageChannelSelector.java | 2 +- .../operator/exchange/PageReference.java | 2 +- .../exchange/PartitioningExchanger.java | 12 +- .../exchange/PassthroughExchanger.java | 2 +- .../operator/exchange/RandomExchanger.java | 2 +- .../index/DynamicTupleFilterFactory.java | 22 +- .../index/FieldSetFilteringRecordSet.java | 14 +- .../IndexBuildDriverFactoryProvider.java | 16 +- .../io/trino/operator/index/IndexLoader.java | 36 +- .../operator/index/IndexLookupSource.java | 8 +- .../index/IndexLookupSourceFactory.java | 18 +- .../trino/operator/index/IndexSnapshot.java | 6 +- .../operator/index/IndexSnapshotBuilder.java | 18 +- .../operator/index/IndexSourceOperator.java | 30 +- .../io/trino/operator/index/IndexSplit.java | 6 +- .../io/trino/operator/index/IndexedData.java | 4 +- .../io/trino/operator/index/PageBuffer.java | 2 +- .../operator/index/PageBufferOperator.java | 12 +- .../trino/operator/index/PageRecordSet.java | 8 +- .../index/PagesIndexBuilderOperator.java | 12 +- .../operator/index/StreamingIndexedData.java | 14 +- .../trino/operator/index/TuplePageFilter.java | 14 +- .../index/UnloadedIndexKeyRecordSet.java | 26 +- .../trino/operator/index/UpdateRequest.java | 2 +- .../project/ConstantPageProjection.java | 20 +- .../operator/project/CursorProcessor.java | 8 +- .../project/DictionaryAwarePageFilter.java | 10 +- .../DictionaryAwarePageProjection.java | 22 +- .../project/GeneratedPageProjection.java | 16 +- .../trino/operator/project/InputChannels.java | 2 +- .../operator/project/InputPageProjection.java | 14 +- .../io/trino/operator/project/MergePages.java | 24 +- .../PageFieldsToInputParametersRewriter.java | 18 +- .../io/trino/operator/project/PageFilter.java | 4 +- .../trino/operator/project/PageProcessor.java | 36 +- .../operator/project/PageProjection.java | 12 +- .../scalar/AbstractGreatestLeast.java | 50 +- .../trino/operator/scalar/ApplyFunction.java | 32 +- .../scalar/ArrayAllMatchFunction.java | 18 +- .../scalar/ArrayAnyMatchFunction.java | 18 +- .../scalar/ArrayCardinalityFunction.java | 12 +- .../scalar/ArrayCombinationsFunction.java | 28 +- .../operator/scalar/ArrayConcatFunction.java | 42 +- .../operator/scalar/ArrayConcatUtils.java | 8 +- .../operator/scalar/ArrayConstructor.java | 42 +- .../trino/operator/scalar/ArrayContains.java | 32 +- .../scalar/ArrayContainsSequence.java | 24 +- .../scalar/ArrayDistinctFunction.java | 38 +- .../scalar/ArrayElementAtFunction.java | 18 +- .../operator/scalar/ArrayExceptFunction.java | 36 +- .../operator/scalar/ArrayFilterFunction.java | 16 +- .../operator/scalar/ArrayFlattenFunction.java | 30 +- .../trino/operator/scalar/ArrayFunctions.java | 12 +- .../scalar/ArrayIntersectFunction.java | 36 +- .../io/trino/operator/scalar/ArrayJoin.java | 60 +- .../operator/scalar/ArrayMaxFunction.java | 30 +- .../operator/scalar/ArrayMinFunction.java | 26 +- .../operator/scalar/ArrayNgramsFunction.java | 18 +- .../scalar/ArrayNoneMatchFunction.java | 18 +- .../scalar/ArrayPositionFunction.java | 32 +- .../operator/scalar/ArrayReduceFunction.java | 40 +- .../operator/scalar/ArrayRemoveFunction.java | 34 +- .../operator/scalar/ArrayReverseFunction.java | 16 +- .../operator/scalar/ArrayShuffleFunction.java | 16 +- .../operator/scalar/ArraySliceFunction.java | 20 +- .../scalar/ArraySortComparatorFunction.java | 26 +- .../operator/scalar/ArraySortFunction.java | 28 +- .../scalar/ArraySubscriptOperator.java | 30 +- .../operator/scalar/ArrayToArrayCast.java | 48 +- .../scalar/ArrayToElementConcatFunction.java | 28 +- .../operator/scalar/ArrayToJsonCast.java | 36 +- .../scalar/ArrayTransformFunction.java | 50 +- .../operator/scalar/ArrayUnionFunction.java | 38 +- .../scalar/ArraysOverlapFunction.java | 32 +- .../operator/scalar/BitwiseFunctions.java | 12 +- .../scalar/BooleanToBooleanFunction.java | 2 +- .../scalar/CastFromUnknownOperator.java | 22 +- .../operator/scalar/CharacterStringCasts.java | 16 +- .../ChoicesScalarFunctionImplementation.java | 24 +- .../trino/operator/scalar/ColorFunctions.java | 22 +- .../operator/scalar/CombineHashFunction.java | 6 +- .../trino/operator/scalar/ConcatFunction.java | 32 +- .../operator/scalar/ConcatWsFunction.java | 40 +- .../operator/scalar/DataSizeFunctions.java | 16 +- .../operator/scalar/DateTimeFunctions.java | 58 +- .../scalar/DoubleToBooleanFunction.java | 2 +- .../scalar/ElementToArrayConcatFunction.java | 28 +- .../operator/scalar/EmptyMapConstructor.java | 16 +- .../operator/scalar/FailureFunction.java | 14 +- .../trino/operator/scalar/FormatFunction.java | 96 +-- .../scalar/GenericComparisonOperator.java | 18 +- .../scalar/GenericDistinctFromOperator.java | 18 +- .../operator/scalar/GenericEqualOperator.java | 18 +- .../scalar/GenericHashCodeOperator.java | 18 +- .../scalar/GenericIndeterminateOperator.java | 18 +- .../scalar/GenericLessThanOperator.java | 18 +- .../GenericLessThanOrEqualOperator.java | 18 +- .../scalar/GenericXxHash64Operator.java | 18 +- .../trino/operator/scalar/HmacFunctions.java | 8 +- .../operator/scalar/HyperLogLogFunctions.java | 10 +- .../trino/operator/scalar/IdentityCast.java | 16 +- .../trino/operator/scalar/InvokeFunction.java | 28 +- .../operator/scalar/JoniRegexpCasts.java | 20 +- .../operator/scalar/JoniRegexpFunctions.java | 28 +- .../JoniRegexpReplaceLambdaFunction.java | 24 +- .../io/trino/operator/scalar/JsonExtract.java | 8 +- .../trino/operator/scalar/JsonFunctions.java | 30 +- .../trino/operator/scalar/JsonOperators.java | 64 +- .../operator/scalar/JsonPathTokenizer.java | 4 +- .../scalar/JsonStringToArrayCast.java | 22 +- .../operator/scalar/JsonStringToMapCast.java | 24 +- .../operator/scalar/JsonStringToRowCast.java | 20 +- .../operator/scalar/JsonToArrayCast.java | 48 +- .../trino/operator/scalar/JsonToMapCast.java | 52 +- .../trino/operator/scalar/JsonToRowCast.java | 48 +- .../scalar/LongToBooleanFunction.java | 2 +- .../operator/scalar/LuhnCheckFunction.java | 12 +- .../scalar/MapCardinalityFunction.java | 12 +- .../operator/scalar/MapConcatFunction.java | 54 +- .../trino/operator/scalar/MapConstructor.java | 68 +- .../operator/scalar/MapElementAtFunction.java | 40 +- .../operator/scalar/MapEntriesFunction.java | 20 +- .../operator/scalar/MapFilterFunction.java | 56 +- .../scalar/MapFromEntriesFunction.java | 50 +- .../io/trino/operator/scalar/MapKeys.java | 14 +- .../operator/scalar/MapSubscriptOperator.java | 50 +- .../trino/operator/scalar/MapToJsonCast.java | 42 +- .../trino/operator/scalar/MapToMapCast.java | 62 +- .../scalar/MapTransformKeysFunction.java | 72 +- .../scalar/MapTransformValuesFunction.java | 60 +- .../io/trino/operator/scalar/MapValues.java | 14 +- .../operator/scalar/MapZipWithFunction.java | 46 +- .../trino/operator/scalar/MathFunctions.java | 86 +-- .../scalar/MultimapFromEntriesFunction.java | 50 +- .../scalar/ObjectToBooleanFunction.java | 2 +- .../operator/scalar/ParametricScalar.java | 34 +- .../scalar/QuantileDigestFunctions.java | 26 +- .../scalar/Re2JCastToRegexpFunction.java | 26 +- .../operator/scalar/Re2JRegexpFunctions.java | 26 +- .../Re2JRegexpReplaceLambdaFunction.java | 24 +- .../trino/operator/scalar/RepeatFunction.java | 24 +- .../trino/operator/scalar/RowToJsonCast.java | 38 +- .../trino/operator/scalar/RowToRowCast.java | 58 +- .../scalar/ScalarFunctionImplementation.java | 4 +- .../operator/scalar/SequenceFunction.java | 28 +- .../operator/scalar/SessionFunctions.java | 12 +- .../operator/scalar/SplitToMapFunction.java | 26 +- .../scalar/SplitToMultimapFunction.java | 26 +- .../operator/scalar/StringFunctions.java | 40 +- .../operator/scalar/TDigestFunctions.java | 18 +- .../operator/scalar/TryCastFunction.java | 30 +- .../io/trino/operator/scalar/TryFunction.java | 26 +- .../trino/operator/scalar/TypeOfFunction.java | 14 +- .../trino/operator/scalar/UrlFunctions.java | 18 +- .../operator/scalar/VarbinaryFunctions.java | 18 +- .../trino/operator/scalar/WilsonInterval.java | 12 +- .../operator/scalar/WordStemFunction.java | 12 +- .../io/trino/operator/scalar/ZipFunction.java | 36 +- .../operator/scalar/ZipWithFunction.java | 44 +- .../scalar/annotations/OperatorValidator.java | 8 +- .../ParametricScalarImplementation.java | 96 +-- .../ScalarFromAnnotationsParser.java | 24 +- .../ScalarImplementationHeader.java | 12 +- .../scalar/time/LocalTimeFunction.java | 20 +- .../operator/scalar/time/TimeFunctions.java | 42 +- .../operator/scalar/time/TimeOperators.java | 48 +- .../time/TimeToTimeWithTimeZoneCast.java | 26 +- .../scalar/time/TimeToTimestampCast.java | 24 +- .../time/TimeToTimestampWithTimeZoneCast.java | 30 +- .../operator/scalar/timestamp/DateAdd.java | 24 +- .../operator/scalar/timestamp/DateDiff.java | 16 +- .../operator/scalar/timestamp/DateFormat.java | 20 +- .../scalar/timestamp/DateToTimestampCast.java | 12 +- .../operator/scalar/timestamp/DateTrunc.java | 16 +- .../operator/scalar/timestamp/ExtractDay.java | 14 +- .../scalar/timestamp/ExtractDayOfWeek.java | 14 +- .../scalar/timestamp/ExtractDayOfYear.java | 14 +- .../scalar/timestamp/ExtractHour.java | 14 +- .../scalar/timestamp/ExtractMillisecond.java | 14 +- .../scalar/timestamp/ExtractMinute.java | 14 +- .../scalar/timestamp/ExtractMonth.java | 14 +- .../scalar/timestamp/ExtractQuarter.java | 16 +- .../scalar/timestamp/ExtractSecond.java | 14 +- .../scalar/timestamp/ExtractWeekOfYear.java | 14 +- .../scalar/timestamp/ExtractYear.java | 14 +- .../scalar/timestamp/ExtractYearOfWeek.java | 14 +- .../scalar/timestamp/FormatDateTime.java | 24 +- .../timestamp/HumanReadableSeconds.java | 12 +- .../scalar/timestamp/LastDayOfMonth.java | 14 +- .../scalar/timestamp/LocalTimestamp.java | 24 +- .../SequenceIntervalDayToSecond.java | 28 +- .../SequenceIntervalYearToMonth.java | 28 +- .../TimeWithTimeZoneToTimestampCast.java | 30 +- .../scalar/timestamp/TimestampOperators.java | 32 +- .../scalar/timestamp/TimestampToDateCast.java | 18 +- .../scalar/timestamp/TimestampToJsonCast.java | 26 +- .../scalar/timestamp/TimestampToTimeCast.java | 26 +- .../TimestampToTimeWithTimeZoneCast.java | 34 +- .../timestamp/TimestampToTimestampCast.java | 22 +- .../TimestampToTimestampWithTimeZoneCast.java | 34 +- .../timestamp/TimestampToVarcharCast.java | 14 +- .../operator/scalar/timestamp/ToIso8601.java | 14 +- .../operator/scalar/timestamp/ToUnixTime.java | 14 +- .../timestamp/VarcharToTimestampCast.java | 32 +- .../scalar/timestamp/WithTimeZone.java | 32 +- .../scalar/timestamptz/AtTimeZone.java | 20 +- .../timestamptz/AtTimeZoneWithOffset.java | 20 +- .../scalar/timestamptz/CurrentTimestamp.java | 26 +- .../operator/scalar/timestamptz/DateAdd.java | 24 +- .../operator/scalar/timestamptz/DateDiff.java | 18 +- .../scalar/timestamptz/DateFormat.java | 26 +- .../DateToTimestampWithTimeZoneCast.java | 18 +- .../scalar/timestamptz/DateTrunc.java | 22 +- .../scalar/timestamptz/ExtractDay.java | 20 +- .../scalar/timestamptz/ExtractDayOfWeek.java | 20 +- .../scalar/timestamptz/ExtractDayOfYear.java | 20 +- .../scalar/timestamptz/ExtractHour.java | 20 +- .../timestamptz/ExtractMillisecond.java | 20 +- .../scalar/timestamptz/ExtractMinute.java | 20 +- .../scalar/timestamptz/ExtractMonth.java | 20 +- .../scalar/timestamptz/ExtractQuarter.java | 22 +- .../scalar/timestamptz/ExtractSecond.java | 20 +- .../scalar/timestamptz/ExtractWeekOfYear.java | 20 +- .../scalar/timestamptz/ExtractYear.java | 20 +- .../scalar/timestamptz/ExtractYearOfWeek.java | 20 +- .../scalar/timestamptz/FormatDateTime.java | 28 +- .../scalar/timestamptz/LastDayOfMonth.java | 20 +- .../scalar/timestamptz/TimeZoneHour.java | 14 +- .../scalar/timestamptz/TimeZoneMinute.java | 14 +- .../TimestampWithTimeZoneOperators.java | 28 +- .../TimestampWithTimeZoneToDateCast.java | 24 +- .../TimestampWithTimeZoneToTimeCast.java | 26 +- ...ampWithTimeZoneToTimeWithTimeZoneCast.java | 38 +- .../TimestampWithTimeZoneToTimestampCast.java | 32 +- ...thTimeZoneToTimestampWithTimeZoneCast.java | 28 +- .../TimestampWithTimeZoneToVarcharCast.java | 22 +- .../scalar/timestamptz/ToIso8601.java | 28 +- .../scalar/timestamptz/ToUnixTime.java | 20 +- .../VarcharToTimestampWithTimeZoneCast.java | 38 +- .../operator/scalar/timetz/AtTimeZone.java | 36 +- .../scalar/timetz/AtTimeZoneWithOffset.java | 28 +- .../operator/scalar/timetz/CurrentTime.java | 24 +- .../trino/operator/scalar/timetz/DateAdd.java | 48 +- .../operator/scalar/timetz/DateDiff.java | 34 +- .../operator/scalar/timetz/DateTrunc.java | 30 +- .../operator/scalar/timetz/ExtractHour.java | 18 +- .../scalar/timetz/ExtractMillisecond.java | 20 +- .../operator/scalar/timetz/ExtractMinute.java | 20 +- .../operator/scalar/timetz/ExtractSecond.java | 20 +- .../timetz/TimeWithTimeZoneOperators.java | 38 +- .../timetz/TimeWithTimeZoneToTimeCast.java | 22 +- ...imeWithTimeZoneToTimeWithTimeZoneCast.java | 30 +- ...thTimeZoneToTimestampWithTimeZoneCast.java | 36 +- .../timetz/TimeWithTimeZoneToVarcharCast.java | 32 +- .../operator/scalar/timetz/TimeZoneHour.java | 16 +- .../scalar/timetz/TimeZoneMinute.java | 16 +- .../timetz/VarcharToTimeWithTimeZoneCast.java | 46 +- .../operator/unnest/ArrayOfRowsUnnester.java | 14 +- .../trino/operator/unnest/ArrayUnnester.java | 8 +- .../io/trino/operator/unnest/MapUnnester.java | 8 +- .../unnest/ReplicatedBlockBuilder.java | 6 +- .../operator/unnest/UnnestBlockBuilder.java | 12 +- .../trino/operator/unnest/UnnestOperator.java | 28 +- .../io/trino/operator/unnest/Unnester.java | 6 +- .../AbstractWindowFunctionSupplier.java | 8 +- .../window/AggregateWindowFunction.java | 16 +- .../CumulativeDistributionFunction.java | 8 +- .../operator/window/DenseRankFunction.java | 8 +- .../operator/window/FirstValueFunction.java | 6 +- .../io/trino/operator/window/FrameInfo.java | 6 +- .../operator/window/FramedWindowFunction.java | 2 +- .../io/trino/operator/window/LagFunction.java | 10 +- .../operator/window/LastValueFunction.java | 6 +- .../trino/operator/window/LeadFunction.java | 10 +- .../trino/operator/window/NTileFunction.java | 12 +- .../operator/window/NthValueFunction.java | 10 +- .../operator/window/PagesWindowIndex.java | 8 +- .../operator/window/PercentRankFunction.java | 8 +- .../trino/operator/window/RankFunction.java | 8 +- .../ReflectionWindowFunctionSupplier.java | 12 +- .../operator/window/RowNumberFunction.java | 8 +- .../operator/window/SqlWindowFunction.java | 14 +- .../window/WindowAnnotationsParser.java | 14 +- .../window/WindowFunctionSupplier.java | 6 +- .../operator/window/WindowPartition.java | 44 +- .../java/io/trino/security/AccessControl.java | 22 +- .../trino/security/AccessControlManager.java | 56 +- .../trino/security/AccessControlModule.java | 4 +- .../io/trino/security/AccessControlUtil.java | 6 +- .../trino/security/AllowAllAccessControl.java | 14 +- .../trino/security/DenyAllAccessControl.java | 116 ++-- .../security/ForwardingAccessControl.java | 18 +- .../trino/security/GroupProviderManager.java | 4 +- .../InjectedConnectorAccessControl.java | 26 +- .../io/trino/security/SecurityContext.java | 10 +- .../io/trino/security/ViewAccessControl.java | 10 +- .../java/io/trino/server/BasicQueryInfo.java | 18 +- .../java/io/trino/server/BasicQueryStats.java | 4 +- .../io/trino/server/CoordinatorModule.java | 128 ++-- .../io/trino/server/DynamicFilterService.java | 68 +- .../trino/server/ExchangeExecutionMBean.java | 2 +- .../trino/server/ExpressionSerialization.java | 10 +- .../trino/server/GracefulShutdownHandler.java | 4 +- .../trino/server/HttpRemoteTaskFactory.java | 38 +- .../server/HttpRequestSessionContext.java | 58 +- .../server/InternalAuthenticationManager.java | 6 +- .../io/trino/server/NoOpSessionSupplier.java | 4 +- .../java/io/trino/server/NodeResource.java | 6 +- .../main/java/io/trino/server/NodeStatus.java | 4 +- .../io/trino/server/PagesResponseWriter.java | 14 +- .../java/io/trino/server/PluginDiscovery.java | 2 +- .../java/io/trino/server/PluginManager.java | 48 +- .../server/QueryExecutionFactoryModule.java | 154 ++-- .../java/io/trino/server/QueryResource.java | 32 +- .../io/trino/server/QuerySessionSupplier.java | 22 +- .../java/io/trino/server/QueryStateInfo.java | 10 +- .../trino/server/QueryStateInfoResource.java | 30 +- .../java/io/trino/server/RangeJsonSerde.java | 10 +- .../io/trino/server/ResourceGroupInfo.java | 6 +- .../ResourceGroupStateInfoResource.java | 8 +- .../src/main/java/io/trino/server/Server.java | 34 +- .../io/trino/server/ServerInfoResource.java | 16 +- .../io/trino/server/ServerMainModule.java | 224 +++--- .../io/trino/server/ServletSecurityUtils.java | 6 +- .../java/io/trino/server/SessionContext.java | 6 +- ...tyConfigurationManagerContextInstance.java | 2 +- .../trino/server/SessionPropertyDefaults.java | 12 +- .../java/io/trino/server/SessionSupplier.java | 4 +- .../java/io/trino/server/StatusResource.java | 8 +- .../io/trino/server/TaskExecutorResource.java | 6 +- .../java/io/trino/server/TaskResource.java | 40 +- .../io/trino/server/TaskUpdateRequest.java | 8 +- .../java/io/trino/server/ThreadResource.java | 6 +- .../java/io/trino/server/WorkerModule.java | 18 +- .../protocol/ExecutingStatementResource.java | 48 +- .../java/io/trino/server/protocol/Query.java | 122 ++-- .../server/protocol/QueryResultRows.java | 42 +- .../ContinuousTaskStatusFetcher.java | 18 +- .../remotetask/DynamicFiltersFetcher.java | 12 +- .../remotetask/HttpLocationFactory.java | 12 +- .../server/remotetask/HttpRemoteTask.java | 58 +- .../remotetask/RequestErrorTracker.java | 14 +- .../remotetask/SimpleHttpResponseHandler.java | 4 +- .../server/remotetask/TaskInfoFetcher.java | 10 +- .../AnnotatedResourceAccessTypeLoader.java | 2 +- .../server/security/AuthenticationFilter.java | 8 +- .../trino/server/security/Authenticator.java | 2 +- .../security/CertificateAuthenticator.java | 4 +- .../CertificateAuthenticatorManager.java | 4 +- .../security/InsecureAuthenticator.java | 10 +- .../security/KerberosAuthenticator.java | 4 +- .../trino/server/security/KerberosConfig.java | 2 +- .../security/PasswordAuthenticator.java | 8 +- .../PasswordAuthenticatorManager.java | 4 +- .../server/security/ResourceAccessType.java | 6 +- .../security/ResourceAccessTypeLoader.java | 2 +- .../security/ResourceSecurityBinder.java | 2 +- .../ResourceSecurityDynamicFeature.java | 26 +- .../server/security/ServerSecurityModule.java | 6 +- .../io/trino/server/security/UserMapping.java | 4 +- .../trino/server/security/jwt/JwkService.java | 2 +- .../server/security/jwt/JwtAuthenticator.java | 14 +- .../oauth2/OAuth2CallbackResource.java | 12 +- .../server/security/oauth2/OAuth2Service.java | 2 +- .../security/oauth2/OAuth2ServiceModule.java | 4 +- .../server/testing/TestingPrestoServer.java | 86 +-- .../io/trino/server/ui/ClusterResource.java | 6 +- .../trino/server/ui/ClusterStatsResource.java | 20 +- .../ui/DisabledWebUiAuthenticationFilter.java | 2 +- .../FixedUserWebUiAuthenticationFilter.java | 8 +- .../server/ui/FormUiAuthenticatorModule.java | 4 +- .../ui/FormWebUiAuthenticationFilter.java | 10 +- .../server/ui/InsecureFormAuthenticator.java | 2 +- .../io/trino/server/ui/LoginResource.java | 18 +- .../ui/OAuth2WebUiAuthenticationFilter.java | 24 +- .../server/ui/OAuth2WebUiLogoutResource.java | 10 +- .../io/trino/server/ui/OAuth2WebUiModule.java | 2 +- .../io/trino/server/ui/OAuthWebUiCookie.java | 2 +- .../ui/PasswordManagerFormAuthenticator.java | 8 +- .../io/trino/server/ui/UiQueryResource.java | 34 +- .../server/ui/WebUiAuthenticationModule.java | 16 +- .../trino/server/ui/WebUiStaticResource.java | 6 +- .../io/trino/server/ui/WorkerResource.java | 30 +- .../java/io/trino/spiller/AesSpillCipher.java | 4 +- .../spiller/FileSingleStreamSpiller.java | 22 +- .../FileSingleStreamSpillerFactory.java | 22 +- .../spiller/GenericPartitioningSpiller.java | 12 +- .../GenericPartitioningSpillerFactory.java | 8 +- .../java/io/trino/spiller/GenericSpiller.java | 8 +- .../trino/spiller/GenericSpillerFactory.java | 6 +- .../io/trino/spiller/LocalSpillContext.java | 2 +- .../io/trino/spiller/PartitioningSpiller.java | 2 +- .../spiller/PartitioningSpillerFactory.java | 8 +- .../io/trino/spiller/SingleStreamSpiller.java | 2 +- .../spiller/SingleStreamSpillerFactory.java | 6 +- .../io/trino/spiller/SpillSpaceTracker.java | 6 +- .../main/java/io/trino/spiller/Spiller.java | 2 +- .../java/io/trino/spiller/SpillerFactory.java | 6 +- .../io/trino/split/BufferingSplitSource.java | 8 +- .../split/ConnectorAwareSplitSource.java | 14 +- .../main/java/io/trino/split/EmptySplit.java | 6 +- .../trino/split/EmptySplitHandleResolver.java | 10 +- .../java/io/trino/split/MappedPageSource.java | 4 +- .../java/io/trino/split/MappedRecordSet.java | 6 +- .../java/io/trino/split/PageSinkManager.java | 14 +- .../java/io/trino/split/PageSinkProvider.java | 8 +- .../io/trino/split/PageSourceManager.java | 20 +- .../io/trino/split/PageSourceProvider.java | 12 +- .../trino/split/RecordPageSourceProvider.java | 20 +- .../main/java/io/trino/split/RemoteSplit.java | 4 +- .../io/trino/split/SampledSplitSource.java | 6 +- .../java/io/trino/split/SplitManager.java | 24 +- .../main/java/io/trino/split/SplitSource.java | 8 +- .../java/io/trino/sql/DynamicFilters.java | 56 +- .../java/io/trino/sql/ExpressionUtils.java | 34 +- .../trino/sql/InterpretedFunctionInvoker.java | 28 +- .../src/main/java/io/trino/sql/NodeUtils.java | 8 +- .../java/io/trino/sql/ParameterUtils.java | 12 +- .../main/java/io/trino/sql/ParsingUtil.java | 10 +- .../io/trino/sql/SqlEnvironmentConfig.java | 2 +- .../java/io/trino/sql/SqlFormatterUtil.java | 14 +- .../src/main/java/io/trino/sql/SqlPath.java | 4 +- .../java/io/trino/sql/SqlPathElement.java | 2 +- .../sql/analyzer/AggregationAnalyzer.java | 128 ++-- .../java/io/trino/sql/analyzer/Analysis.java | 80 +-- .../java/io/trino/sql/analyzer/Analyzer.java | 38 +- .../sql/analyzer/CanonicalizationAware.java | 8 +- .../analyzer/ConstantExpressionVerifier.java | 16 +- .../sql/analyzer/ExpressionAnalysis.java | 16 +- .../sql/analyzer/ExpressionAnalyzer.java | 322 ++++----- .../sql/analyzer/ExpressionTreeUtils.java | 18 +- .../io/trino/sql/analyzer/FeaturesConfig.java | 2 +- .../java/io/trino/sql/analyzer/Field.java | 6 +- .../FreeLambdaReferenceExtractor.java | 14 +- .../io/trino/sql/analyzer/QueryExplainer.java | 56 +- .../io/trino/sql/analyzer/RelationId.java | 4 +- .../io/trino/sql/analyzer/RelationType.java | 2 +- .../io/trino/sql/analyzer/ResolvedField.java | 2 +- .../java/io/trino/sql/analyzer/Scope.java | 24 +- .../sql/analyzer/ScopeReferenceExtractor.java | 8 +- .../sql/analyzer/SemanticExceptions.java | 16 +- .../trino/sql/analyzer/StatementAnalyzer.java | 442 ++++++------ .../sql/analyzer/TypeSignatureProvider.java | 4 +- .../sql/analyzer/TypeSignatureTranslator.java | 60 +- .../sql/analyzer/WindowFunctionValidator.java | 14 +- .../io/trino/sql/gen/AndCodeGenerator.java | 4 +- .../io/trino/sql/gen/ArrayGeneratorUtils.java | 10 +- .../sql/gen/ArrayMapBytecodeExpression.java | 12 +- .../trino/sql/gen/BetweenCodeGenerator.java | 20 +- .../io/trino/sql/gen/BindCodeGenerator.java | 8 +- .../java/io/trino/sql/gen/BodyCompiler.java | 2 +- .../sql/gen/BytecodeGeneratorContext.java | 14 +- .../java/io/trino/sql/gen/BytecodeUtils.java | 40 +- .../trino/sql/gen/CachedInstanceBinder.java | 2 +- .../trino/sql/gen/CoalesceCodeGenerator.java | 6 +- .../io/trino/sql/gen/CompilerOperations.java | 4 +- .../sql/gen/CursorProcessorCompiler.java | 38 +- .../sql/gen/DereferenceCodeGenerator.java | 12 +- .../io/trino/sql/gen/ExpressionCompiler.java | 26 +- .../io/trino/sql/gen/ExpressionProfiler.java | 2 +- .../io/trino/sql/gen/IfCodeGenerator.java | 4 +- .../io/trino/sql/gen/InCodeGenerator.java | 40 +- .../trino/sql/gen/InputReferenceCompiler.java | 18 +- .../gen/InvokeFunctionBytecodeExpression.java | 10 +- .../io/trino/sql/gen/IsNullCodeGenerator.java | 6 +- .../java/io/trino/sql/gen/JoinCompiler.java | 44 +- .../sql/gen/JoinFilterFunctionCompiler.java | 30 +- .../sql/gen/LambdaBytecodeGenerator.java | 42 +- .../sql/gen/LambdaExpressionExtractor.java | 16 +- .../io/trino/sql/gen/NullIfCodeGenerator.java | 10 +- .../io/trino/sql/gen/OrCodeGenerator.java | 4 +- .../io/trino/sql/gen/OrderingCompiler.java | 36 +- .../trino/sql/gen/PageFunctionCompiler.java | 64 +- .../sql/gen/RowConstructorCodeGenerator.java | 14 +- .../trino/sql/gen/RowExpressionCompiler.java | 26 +- .../sql/gen/SqlTypeBytecodeExpression.java | 4 +- .../io/trino/sql/gen/SwitchCodeGenerator.java | 10 +- .../gen/VarArgsToArrayAdapterGenerator.java | 14 +- .../sql/gen/VarArgsToMapAdapterGenerator.java | 12 +- .../java/io/trino/sql/planner/Coercer.java | 16 +- .../io/trino/sql/planner/CompilerConfig.java | 2 +- .../ConnectorExpressionTranslator.java | 44 +- .../sql/planner/ConnectorExpressions.java | 4 +- .../DesugarArrayConstructorRewriter.java | 20 +- .../planner/DesugarAtTimeZoneRewriter.java | 36 +- .../sql/planner/DesugarLikeRewriter.java | 28 +- .../planner/DesugarRowSubscriptRewriter.java | 26 +- .../planner/DesugarTryExpressionRewriter.java | 26 +- .../sql/planner/DeterminismEvaluator.java | 10 +- .../planner/DistributedExecutionPlanner.java | 102 +-- .../io/trino/sql/planner/DomainCoercer.java | 42 +- .../trino/sql/planner/DomainTranslator.java | 120 ++-- .../planner/EffectivePredicateExtractor.java | 78 +-- .../trino/sql/planner/EqualityInference.java | 18 +- .../sql/planner/ExpressionExtractor.java | 26 +- .../sql/planner/ExpressionInterpreter.java | 210 +++--- .../sql/planner/ExpressionNodeInliner.java | 6 +- .../sql/planner/ExpressionSymbolInliner.java | 12 +- .../sql/planner/FragmentTableScanCounter.java | 8 +- .../sql/planner/FunctionCallBuilder.java | 20 +- .../planner/GroupingOperationRewriter.java | 24 +- .../io/trino/sql/planner/InputExtractor.java | 28 +- .../io/trino/sql/planner/LiteralEncoder.java | 90 +-- .../trino/sql/planner/LiteralInterpreter.java | 80 +-- .../planner/LocalDynamicFilterConsumer.java | 12 +- .../planner/LocalDynamicFiltersCollector.java | 24 +- .../sql/planner/LocalExecutionPlanner.java | 476 ++++++------- .../io/trino/sql/planner/LogicalPlanner.java | 174 ++--- .../sql/planner/LookupSymbolResolver.java | 4 +- .../io/trino/sql/planner/NodeAndMappings.java | 2 +- .../trino/sql/planner/NodePartitionMap.java | 8 +- .../sql/planner/NodePartitioningManager.java | 36 +- .../sql/planner/NullabilityAnalyzer.java | 24 +- .../sql/planner/OptimizerStatsRecorder.java | 4 +- .../io/trino/sql/planner/OrderingScheme.java | 10 +- .../trino/sql/planner/ParameterRewriter.java | 18 +- .../trino/sql/planner/PartialTranslator.java | 14 +- .../io/trino/sql/planner/Partitioning.java | 10 +- .../trino/sql/planner/PartitioningHandle.java | 6 +- .../main/java/io/trino/sql/planner/Plan.java | 4 +- .../io/trino/sql/planner/PlanBuilder.java | 18 +- .../java/io/trino/sql/planner/PlanCopier.java | 48 +- .../io/trino/sql/planner/PlanFragment.java | 14 +- .../io/trino/sql/planner/PlanFragmenter.java | 96 +-- .../sql/planner/PlanNodeIdAllocator.java | 2 +- .../io/trino/sql/planner/PlanOptimizers.java | 392 +++++------ .../io/trino/sql/planner/QueryPlanner.java | 170 ++--- .../ReferenceAwareExpressionNodeInliner.java | 8 +- .../io/trino/sql/planner/RelationPlan.java | 6 +- .../io/trino/sql/planner/RelationPlanner.java | 138 ++-- .../planner/ResolvedFunctionCallRewriter.java | 12 +- .../trino/sql/planner/RuleStatsRecorder.java | 6 +- .../sql/planner/SchedulingOrderVisitor.java | 14 +- .../java/io/trino/sql/planner/ScopeAware.java | 18 +- .../trino/sql/planner/SimplePlanVisitor.java | 4 +- .../sql/planner/SortExpressionContext.java | 2 +- .../sql/planner/SortExpressionExtractor.java | 20 +- .../trino/sql/planner/StageExecutionPlan.java | 8 +- .../planner/StatisticsAggregationPlanner.java | 40 +- .../sql/planner/SubExpressionExtractor.java | 4 +- .../java/io/trino/sql/planner/SubPlan.java | 4 +- .../io/trino/sql/planner/SubqueryPlanner.java | 56 +- .../java/io/trino/sql/planner/Symbol.java | 4 +- .../io/trino/sql/planner/SymbolAllocator.java | 18 +- .../trino/sql/planner/SymbolsExtractor.java | 36 +- .../sql/planner/SystemPartitioningHandle.java | 34 +- .../io/trino/sql/planner/TranslationMap.java | 40 +- .../io/trino/sql/planner/TypeAnalyzer.java | 18 +- .../io/trino/sql/planner/TypeProvider.java | 2 +- .../sql/planner/iterative/GroupReference.java | 8 +- .../planner/iterative/IterativeOptimizer.java | 42 +- .../trino/sql/planner/iterative/Lookup.java | 2 +- .../io/trino/sql/planner/iterative/Memo.java | 10 +- .../io/trino/sql/planner/iterative/Plans.java | 4 +- .../io/trino/sql/planner/iterative/Rule.java | 18 +- .../sql/planner/iterative/RuleIndex.java | 4 +- ...wPartialAggregationOverGroupIdRuleSet.java | 76 +- .../rule/AddIntermediateAggregations.java | 42 +- .../rule/AggregationDecorrelation.java | 8 +- .../rule/ApplyTableScanRedirection.java | 44 +- .../rule/CanonicalizeExpressionRewriter.java | 64 +- .../rule/CanonicalizeExpressions.java | 6 +- .../iterative/rule/CreatePartialTopN.java | 18 +- .../iterative/rule/DereferencePushdown.java | 14 +- .../rule/DesugarArrayConstructor.java | 8 +- .../iterative/rule/DesugarAtTimeZone.java | 6 +- .../iterative/rule/DesugarCurrentPath.java | 16 +- .../iterative/rule/DesugarCurrentUser.java | 14 +- .../rule/DesugarLambdaExpression.java | 4 +- .../planner/iterative/rule/DesugarLike.java | 8 +- .../iterative/rule/DesugarRowSubscript.java | 4 +- .../iterative/rule/DesugarTryExpression.java | 6 +- .../rule/DetermineJoinDistributionType.java | 60 +- .../DetermineSemiJoinDistributionType.java | 38 +- .../iterative/rule/EliminateCrossJoins.java | 38 +- .../iterative/rule/EvaluateZeroSample.java | 14 +- .../rule/ExpressionRewriteRuleSet.java | 56 +- ...actCommonPredicatesExpressionRewriter.java | 18 +- ...xtractDereferencesFromFilterAboveScan.java | 38 +- .../iterative/rule/ExtractSpatialJoins.java | 132 ++-- .../iterative/rule/GatherAndMergeWindows.java | 40 +- .../ImplementBernoulliSampleAsFilter.java | 26 +- .../iterative/rule/ImplementExceptAll.java | 42 +- .../rule/ImplementExceptDistinctAsUnion.java | 32 +- .../rule/ImplementFilteredAggregations.java | 32 +- .../iterative/rule/ImplementIntersectAll.java | 36 +- .../ImplementIntersectDistinctAsUnion.java | 30 +- .../rule/ImplementLimitWithTies.java | 44 +- .../iterative/rule/ImplementOffset.java | 26 +- .../iterative/rule/InlineProjections.java | 36 +- .../rule/LambdaCaptureDesugaringRewriter.java | 24 +- .../planner/iterative/rule/MergeExcept.java | 12 +- .../planner/iterative/rule/MergeFilters.java | 22 +- .../iterative/rule/MergeIntersect.java | 12 +- .../rule/MergeLimitOverProjectWithSort.java | 30 +- .../rule/MergeLimitWithDistinct.java | 22 +- .../iterative/rule/MergeLimitWithSort.java | 22 +- .../iterative/rule/MergeLimitWithTopN.java | 20 +- .../planner/iterative/rule/MergeLimits.java | 16 +- .../planner/iterative/rule/MergeUnion.java | 12 +- ...ipleDistinctAggregationToMarkDistinct.java | 22 +- .../iterative/rule/PlanNodeWithCost.java | 4 +- .../rule/ProjectOffPushDownRule.java | 22 +- .../rule/PruneAggregationColumns.java | 8 +- .../rule/PruneAggregationSourceColumns.java | 16 +- .../iterative/rule/PruneApplyColumns.java | 16 +- .../iterative/rule/PruneApplyCorrelation.java | 14 +- .../rule/PruneApplySourceColumns.java | 18 +- .../rule/PruneAssignUniqueIdColumns.java | 10 +- .../rule/PruneCorrelatedJoinColumns.java | 24 +- .../rule/PruneCorrelatedJoinCorrelation.java | 14 +- .../rule/PruneCountAggregationOverScalar.java | 28 +- .../rule/PruneDeleteSourceColumns.java | 12 +- .../rule/PruneDistinctAggregation.java | 24 +- .../rule/PruneDistinctLimitSourceColumns.java | 14 +- .../rule/PruneEnforceSingleRowColumns.java | 10 +- .../rule/PruneExceptSourceColumns.java | 14 +- .../iterative/rule/PruneExchangeColumns.java | 10 +- .../rule/PruneExchangeSourceColumns.java | 14 +- .../PruneExplainAnalyzeSourceColumns.java | 12 +- .../iterative/rule/PruneFilterColumns.java | 12 +- .../iterative/rule/PruneGroupIdColumns.java | 8 +- .../rule/PruneGroupIdSourceColumns.java | 12 +- .../iterative/rule/PruneIndexJoinColumns.java | 10 +- .../rule/PruneIndexSourceColumns.java | 10 +- .../rule/PruneIntersectSourceColumns.java | 14 +- .../rule/PruneJoinChildrenColumns.java | 16 +- .../iterative/rule/PruneJoinColumns.java | 10 +- .../iterative/rule/PruneLimitColumns.java | 12 +- .../rule/PruneMarkDistinctColumns.java | 10 +- .../iterative/rule/PruneOffsetColumns.java | 10 +- .../rule/PruneOrderByInAggregation.java | 16 +- .../rule/PruneOutputSourceColumns.java | 12 +- .../iterative/rule/PruneProjectColumns.java | 8 +- .../iterative/rule/PruneRowNumberColumns.java | 12 +- .../iterative/rule/PruneSampleColumns.java | 10 +- .../iterative/rule/PruneSemiJoinColumns.java | 10 +- .../PruneSemiJoinFilteringSourceColumns.java | 14 +- .../iterative/rule/PruneSortColumns.java | 10 +- .../rule/PruneSpatialJoinChildrenColumns.java | 16 +- .../rule/PruneSpatialJoinColumns.java | 8 +- .../iterative/rule/PruneTableScanColumns.java | 28 +- .../rule/PruneTableWriterSourceColumns.java | 20 +- .../iterative/rule/PruneTopNColumns.java | 10 +- .../rule/PruneTopNRowNumberColumns.java | 10 +- .../iterative/rule/PruneUnionColumns.java | 8 +- .../rule/PruneUnionSourceColumns.java | 14 +- .../iterative/rule/PruneUnnestColumns.java | 10 +- .../rule/PruneUnnestSourceColumns.java | 14 +- .../iterative/rule/PruneValuesColumns.java | 14 +- .../iterative/rule/PruneWindowColumns.java | 12 +- .../rule/PushAggregationIntoTableScan.java | 64 +- .../rule/PushAggregationThroughOuterJoin.java | 66 +- .../rule/PushDeleteIntoConnector.java | 26 +- .../rule/PushDistinctLimitIntoTableScan.java | 34 +- .../PushDownDereferenceThroughFilter.java | 36 +- .../rule/PushDownDereferenceThroughJoin.java | 44 +- .../PushDownDereferenceThroughProject.java | 32 +- .../PushDownDereferenceThroughSemiJoin.java | 38 +- .../PushDownDereferenceThroughUnnest.java | 38 +- ...DownDereferencesThroughAssignUniqueId.java | 34 +- .../PushDownDereferencesThroughLimit.java | 36 +- ...shDownDereferencesThroughMarkDistinct.java | 36 +- .../PushDownDereferencesThroughRowNumber.java | 36 +- .../rule/PushDownDereferencesThroughSort.java | 36 +- .../rule/PushDownDereferencesThroughTopN.java | 36 +- ...hDownDereferencesThroughTopNRowNumber.java | 42 +- .../PushDownDereferencesThroughWindow.java | 40 +- .../PushDownNegationsExpressionRewriter.java | 38 +- .../rule/PushLimitIntoTableScan.java | 28 +- .../rule/PushLimitThroughMarkDistinct.java | 22 +- .../rule/PushLimitThroughOffset.java | 20 +- .../rule/PushLimitThroughOuterJoin.java | 30 +- .../rule/PushLimitThroughProject.java | 34 +- .../rule/PushLimitThroughSemiJoin.java | 22 +- .../iterative/rule/PushLimitThroughUnion.java | 24 +- .../rule/PushOffsetThroughProject.java | 22 +- ...PushPartialAggregationThroughExchange.java | 56 +- .../PushPartialAggregationThroughJoin.java | 36 +- .../rule/PushPredicateIntoTableScan.java | 78 +-- ...hPredicateThroughProjectIntoRowNumber.java | 56 +- ...PushPredicateThroughProjectIntoWindow.java | 64 +- .../rule/PushProjectionIntoTableScan.java | 54 +- .../rule/PushProjectionThroughExchange.java | 38 +- .../rule/PushProjectionThroughJoin.java | 26 +- .../rule/PushProjectionThroughUnion.java | 34 +- ...shRemoteExchangeThroughAssignUniqueId.java | 28 +- .../rule/PushSampleIntoTableScan.java | 34 +- .../rule/PushTableWriteThroughUnion.java | 32 +- .../iterative/rule/PushTopNIntoTableScan.java | 28 +- .../rule/PushTopNThroughOuterJoin.java | 36 +- .../rule/PushTopNThroughProject.java | 40 +- .../iterative/rule/PushTopNThroughUnion.java | 30 +- .../rule/RemoveAggregationInSemiJoin.java | 20 +- .../rule/RemoveDuplicateConditions.java | 12 +- .../iterative/rule/RemoveEmptyDelete.java | 26 +- .../iterative/rule/RemoveFullSample.java | 12 +- .../rule/RemoveRedundantCrossJoin.java | 12 +- .../rule/RemoveRedundantDistinctLimit.java | 22 +- .../RemoveRedundantEnforceSingleRowNode.java | 12 +- .../iterative/rule/RemoveRedundantExists.java | 26 +- .../RemoveRedundantIdentityProjections.java | 10 +- .../iterative/rule/RemoveRedundantJoin.java | 22 +- .../iterative/rule/RemoveRedundantLimit.java | 14 +- .../iterative/rule/RemoveRedundantOffset.java | 14 +- .../iterative/rule/RemoveRedundantSort.java | 16 +- .../RemoveRedundantTableScanPredicate.java | 54 +- .../iterative/rule/RemoveRedundantTopN.java | 18 +- .../iterative/rule/RemoveTrivialFilters.java | 20 +- .../RemoveUnreferencedScalarApplyNodes.java | 10 +- .../RemoveUnreferencedScalarSubqueries.java | 26 +- .../rule/RemoveUnsupportedDynamicFilters.java | 76 +- .../planner/iterative/rule/ReorderJoins.java | 94 +-- ...RewriteSpatialPartitioningAggregation.java | 40 +- .../iterative/rule/SetOperationMerge.java | 16 +- .../rule/SetOperationNodeTranslator.java | 56 +- .../rule/SimplifyCountOverConstant.java | 40 +- .../iterative/rule/SimplifyExpressions.java | 28 +- .../SingleDistinctAggregationToGroupBy.java | 20 +- ...atedDistinctAggregationWithProjection.java | 56 +- ...dDistinctAggregationWithoutProjection.java | 50 +- ...elatedGlobalAggregationWithProjection.java | 72 +- ...tedGlobalAggregationWithoutProjection.java | 72 +- ...latedGroupedAggregationWithProjection.java | 60 +- ...edGroupedAggregationWithoutProjection.java | 56 +- .../TransformCorrelatedInPredicateToJoin.java | 86 +-- .../rule/TransformCorrelatedJoinToJoin.java | 34 +- .../TransformCorrelatedScalarSubquery.java | 68 +- ...mCorrelatedSingleRowSubqueryToProject.java | 24 +- .../TransformExistsApplyToCorrelatedJoin.java | 64 +- ...TransformFilteringSemiJoinToInnerJoin.java | 58 +- ...rrelatedInPredicateSubqueryToSemiJoin.java | 22 +- .../TransformUncorrelatedSubqueryToJoin.java | 38 +- .../rule/UnwrapCastInComparison.java | 108 +-- .../sql/planner/iterative/rule/Util.java | 14 +- .../optimizations/ActualProperties.java | 26 +- .../planner/optimizations/AddExchanges.java | 154 ++-- .../optimizations/AddLocalExchanges.java | 132 ++-- .../optimizations/BeginTableWrite.java | 56 +- .../CheckSubqueryNodesAreRewritten.java | 28 +- .../DistinctOutputQueryUtil.java | 24 +- .../optimizations/ExpressionEquivalence.java | 50 +- .../HashGenerationOptimizer.java | 100 +-- .../optimizations/IndexJoinOptimizer.java | 70 +- .../planner/optimizations/LimitPushDown.java | 34 +- .../optimizations/LocalProperties.java | 6 +- .../optimizations/MetadataQueryOptimizer.java | 62 +- .../OptimizeMixedDistinctAggregations.java | 60 +- .../optimizations/PlanNodeDecorrelator.java | 58 +- .../optimizations/PlanNodeSearcher.java | 8 +- .../planner/optimizations/PlanOptimizer.java | 12 +- .../optimizations/PredicatePushDown.java | 144 ++-- .../optimizations/PreferredProperties.java | 6 +- .../optimizations/PropertyDerivations.java | 140 ++-- .../PruneUnreferencedOutputs.java | 120 ++-- .../optimizations/QueryCardinalityUtil.java | 28 +- .../ReplicateSemiJoinInDelete.java | 20 +- .../StatsRecordingPlanOptimizer.java | 14 +- .../StreamPreferredProperties.java | 18 +- .../StreamPropertyDerivations.java | 110 +-- .../planner/optimizations/SymbolMapper.java | 50 +- .../optimizations/TableDeleteOptimizer.java | 26 +- ...tifiedComparisonApplyToCorrelatedJoin.java | 88 +-- .../UnaliasSymbolReferences.java | 122 ++-- .../optimizations/WindowFilterPushDown.java | 66 +- .../planner/optimizations/WindowNodeUtil.java | 4 +- .../optimizations/joins/JoinGraph.java | 28 +- .../sql/planner/plan/AggregationNode.java | 20 +- .../io/trino/sql/planner/plan/ApplyNode.java | 12 +- .../sql/planner/plan/AssignUniqueId.java | 2 +- .../trino/sql/planner/plan/Assignments.java | 18 +- .../sql/planner/plan/CorrelatedJoinNode.java | 8 +- .../io/trino/sql/planner/plan/DeleteNode.java | 4 +- .../sql/planner/plan/DistinctLimitNode.java | 2 +- .../planner/plan/EnforceSingleRowNode.java | 2 +- .../io/trino/sql/planner/plan/ExceptNode.java | 2 +- .../trino/sql/planner/plan/ExchangeNode.java | 28 +- .../sql/planner/plan/ExplainAnalyzeNode.java | 2 +- .../io/trino/sql/planner/plan/FilterNode.java | 4 +- .../trino/sql/planner/plan/GroupIdNode.java | 4 +- .../trino/sql/planner/plan/IndexJoinNode.java | 2 +- .../sql/planner/plan/IndexSourceNode.java | 8 +- .../trino/sql/planner/plan/IntersectNode.java | 2 +- .../io/trino/sql/planner/plan/JoinNode.java | 20 +- .../io/trino/sql/planner/plan/LimitNode.java | 4 +- .../sql/planner/plan/MarkDistinctNode.java | 2 +- .../io/trino/sql/planner/plan/OffsetNode.java | 2 +- .../io/trino/sql/planner/plan/OutputNode.java | 2 +- .../io/trino/sql/planner/plan/Patterns.java | 18 +- .../io/trino/sql/planner/plan/PlanNode.java | 2 +- .../trino/sql/planner/plan/PlanVisitor.java | 2 +- .../trino/sql/planner/plan/ProjectNode.java | 2 +- .../sql/planner/plan/RemoteSourceNode.java | 4 +- .../trino/sql/planner/plan/RowNumberNode.java | 2 +- .../io/trino/sql/planner/plan/SampleNode.java | 4 +- .../trino/sql/planner/plan/SemiJoinNode.java | 2 +- .../sql/planner/plan/SetOperationNode.java | 4 +- .../sql/planner/plan/SimplePlanRewriter.java | 2 +- .../io/trino/sql/planner/plan/SortNode.java | 4 +- .../sql/planner/plan/SpatialJoinNode.java | 4 +- .../planner/plan/StatisticAggregations.java | 14 +- .../plan/StatisticAggregationsDescriptor.java | 6 +- .../planner/plan/StatisticsWriterNode.java | 6 +- .../sql/planner/plan/TableDeleteNode.java | 4 +- .../sql/planner/plan/TableFinishNode.java | 4 +- .../trino/sql/planner/plan/TableScanNode.java | 8 +- .../sql/planner/plan/TableWriterNode.java | 20 +- .../io/trino/sql/planner/plan/TopNNode.java | 8 +- .../sql/planner/plan/TopNRowNumberNode.java | 6 +- .../io/trino/sql/planner/plan/UnionNode.java | 2 +- .../io/trino/sql/planner/plan/UnnestNode.java | 8 +- .../io/trino/sql/planner/plan/ValuesNode.java | 6 +- .../io/trino/sql/planner/plan/WindowNode.java | 14 +- .../HashCollisionPlanNodeStats.java | 2 +- .../planner/planprinter/IoPlanPrinter.java | 64 +- .../sql/planner/planprinter/JsonRenderer.java | 2 +- .../planprinter/NodeRepresentation.java | 12 +- .../planner/planprinter/PlanNodeStats.java | 6 +- .../planprinter/PlanNodeStatsSummarizer.java | 18 +- .../sql/planner/planprinter/PlanPrinter.java | 196 +++--- .../planprinter/PlanRepresentation.java | 6 +- .../planprinter/TableInfoSupplier.java | 12 +- .../sql/planner/planprinter/TextRenderer.java | 10 +- .../sql/planner/planprinter/ValuePrinter.java | 14 +- .../planprinter/WindowOperatorStats.java | 6 +- .../planprinter/WindowPlanNodeStats.java | 2 +- .../planner/sanity/AllFunctionsResolved.java | 26 +- .../planner/sanity/DynamicFiltersChecker.java | 38 +- .../sanity/NoDuplicatePlanNodeIdsChecker.java | 18 +- .../sanity/NoIdentifierLeftChecker.java | 20 +- .../NoSubqueryExpressionLeftChecker.java | 22 +- .../sql/planner/sanity/PlanSanityChecker.java | 14 +- .../sql/planner/sanity/SugarFreeChecker.java | 38 +- .../planner/sanity/TableScanValidator.java | 18 +- .../sql/planner/sanity/TypeValidator.java | 42 +- ...ValidateAggregationsWithDefaultValues.java | 42 +- .../sanity/ValidateDependenciesChecker.java | 108 +-- .../sanity/ValidateStreamingAggregations.java | 32 +- .../sanity/VerifyNoFilteredAggregations.java | 18 +- .../sanity/VerifyOnlyOneOutputNode.java | 18 +- .../trino/sql/relational/CallExpression.java | 4 +- .../sql/relational/ConstantExpression.java | 2 +- .../sql/relational/DeterminismEvaluator.java | 6 +- .../io/trino/sql/relational/Expressions.java | 4 +- .../relational/InputReferenceExpression.java | 2 +- .../LambdaDefinitionExpression.java | 4 +- .../trino/sql/relational/RowExpression.java | 2 +- .../io/trino/sql/relational/SpecialForm.java | 12 +- .../SqlToRowExpressionTranslator.java | 196 +++--- .../StandardFunctionResolution.java | 30 +- .../VariableReferenceExpression.java | 2 +- .../optimizer/ExpressionOptimizer.java | 58 +- .../sql/rewrite/DescribeInputRewrite.java | 72 +- .../sql/rewrite/DescribeOutputRewrite.java | 70 +- .../io/trino/sql/rewrite/ExplainRewrite.java | 52 +- .../trino/sql/rewrite/ShowQueriesRewrite.java | 220 +++--- .../trino/sql/rewrite/ShowStatsRewrite.java | 100 +-- .../trino/sql/rewrite/StatementRewrite.java | 24 +- .../trino/testing/DateTimeTestingUtils.java | 20 +- .../io/trino/testing/LocalQueryRunner.java | 344 ++++----- .../io/trino/testing/MaterializedResult.java | 80 +-- .../io/trino/testing/MaterializedRow.java | 2 +- .../io/trino/testing/NullOutputOperator.java | 18 +- .../trino/testing/PageConsumerOperator.java | 18 +- .../java/io/trino/testing/QueryRunner.java | 24 +- .../testing/SqlVarbinaryTestingUtil.java | 2 +- .../testing/TestingAccessControlManager.java | 138 ++-- .../testing/TestingConnectorContext.java | 38 +- .../testing/TestingConnectorSession.java | 16 +- .../testing/TestingEventListenerManager.java | 14 +- .../trino/testing/TestingGroupProvider.java | 2 +- .../java/io/trino/testing/TestingHandle.java | 6 +- .../trino/testing/TestingHandleResolver.java | 20 +- .../java/io/trino/testing/TestingHandles.java | 6 +- .../io/trino/testing/TestingMetadata.java | 42 +- .../io/trino/testing/TestingNodeManager.java | 8 +- .../testing/TestingPageSinkProvider.java | 14 +- .../java/io/trino/testing/TestingSession.java | 36 +- .../java/io/trino/testing/TestingSplit.java | 4 +- .../io/trino/testing/TestingSplitManager.java | 16 +- .../io/trino/testing/TestingTaskContext.java | 18 +- .../testing/TestingTransactionHandle.java | 2 +- .../testing/TestingWarningCollector.java | 8 +- .../TestingWarningCollectorFactory.java | 6 +- .../TestingWarningCollectorModule.java | 4 +- .../assertions/PrestoExceptionAssert.java | 4 +- .../InMemoryTransactionManager.java | 30 +- .../trino/transaction/InternalConnector.java | 6 +- .../transaction/NoOpTransactionManager.java | 8 +- .../trino/transaction/TransactionBuilder.java | 6 +- .../io/trino/transaction/TransactionInfo.java | 4 +- .../trino/transaction/TransactionManager.java | 12 +- .../io/trino/type/ArrayParametricType.java | 14 +- .../java/io/trino/type/BigintOperators.java | 30 +- .../io/trino/type/BlockTypeOperators.java | 22 +- .../java/io/trino/type/BooleanOperators.java | 12 +- .../io/trino/type/CharParametricType.java | 12 +- .../java/io/trino/type/CodePointsType.java | 10 +- .../main/java/io/trino/type/ColorType.java | 10 +- .../java/io/trino/type/DateOperators.java | 20 +- .../java/io/trino/type/DateTimeOperators.java | 14 +- .../main/java/io/trino/type/DateTimes.java | 30 +- .../main/java/io/trino/type/DecimalCasts.java | 82 +-- .../java/io/trino/type/DecimalOperators.java | 70 +- .../io/trino/type/DecimalParametricType.java | 12 +- .../type/DecimalSaturatedFloorCasts.java | 30 +- .../io/trino/type/DecimalToDecimalCasts.java | 16 +- .../java/io/trino/type/DoubleOperators.java | 32 +- .../io/trino/type/FunctionParametricType.java | 12 +- .../main/java/io/trino/type/FunctionType.java | 14 +- .../io/trino/type/HyperLogLogOperators.java | 8 +- .../java/io/trino/type/IntegerOperators.java | 30 +- .../io/trino/type/InternalTypeManager.java | 12 +- .../trino/type/IntervalDayTimeOperators.java | 26 +- .../io/trino/type/IntervalDayTimeType.java | 10 +- .../type/IntervalYearMonthOperators.java | 26 +- .../io/trino/type/IntervalYearMonthType.java | 10 +- .../io/trino/type/IpAddressOperators.java | 16 +- .../java/io/trino/type/IpAddressType.java | 40 +- .../java/io/trino/type/JoniRegexpType.java | 12 +- .../main/java/io/trino/type/JsonPathType.java | 12 +- .../src/main/java/io/trino/type/JsonType.java | 30 +- .../java/io/trino/type/LikeFunctions.java | 18 +- .../java/io/trino/type/LikePatternType.java | 12 +- .../java/io/trino/type/MapParametricType.java | 14 +- .../trino/type/QuantileDigestOperators.java | 8 +- .../main/java/io/trino/type/Re2JRegexp.java | 10 +- .../java/io/trino/type/Re2JRegexpType.java | 14 +- .../java/io/trino/type/RealOperators.java | 32 +- .../java/io/trino/type/RowParametricType.java | 22 +- .../type/SingleAccessMethodCompiler.java | 8 +- .../java/io/trino/type/SmallintOperators.java | 30 +- .../io/trino/type/SqlIntervalDayTime.java | 4 +- .../io/trino/type/SqlIntervalYearMonth.java | 4 +- .../java/io/trino/type/TDigestOperators.java | 8 +- .../main/java/io/trino/type/TDigestType.java | 14 +- .../java/io/trino/type/TinyintOperators.java | 28 +- .../main/java/io/trino/type/TypeCoercion.java | 72 +- .../java/io/trino/type/TypeDeserializer.java | 6 +- .../trino/type/TypeSignatureDeserializer.java | 4 +- .../type/TypeSignatureKeyDeserializer.java | 2 +- .../main/java/io/trino/type/TypeUtils.java | 34 +- .../main/java/io/trino/type/UnknownType.java | 32 +- .../java/io/trino/type/UuidOperators.java | 18 +- .../src/main/java/io/trino/type/UuidType.java | 40 +- .../java/io/trino/type/VarcharOperators.java | 14 +- .../io/trino/type/VarcharParametricType.java | 14 +- .../setdigest/BuildSetDigestAggregation.java | 14 +- .../setdigest/MergeSetDigestAggregation.java | 14 +- .../type/setdigest/SetDigestFunctions.java | 20 +- .../type/setdigest/SetDigestOperators.java | 8 +- .../trino/type/setdigest/SetDigestState.java | 4 +- .../type/setdigest/SetDigestStateFactory.java | 6 +- .../setdigest/SetDigestStateSerializer.java | 10 +- .../trino/type/setdigest/SetDigestType.java | 12 +- .../java/io/trino/util/DateTimeUtils.java | 24 +- .../java/io/trino/util/DateTimeZoneIndex.java | 12 +- .../src/main/java/io/trino/util/Failures.java | 24 +- .../java/io/trino/util/FastutilSetHelper.java | 6 +- .../io/trino/util/GenerateTimeZoneIndex.java | 2 +- .../java/io/trino/util/GraphvizPrinter.java | 92 +-- .../src/main/java/io/trino/util/JsonUtil.java | 96 +-- .../trino/util/Long2LongOpenBigHashMap.java | 4 +- .../io/trino/util/LongBigArrayFIFOQueue.java | 4 +- .../LongLong2LongOpenCustomBigHashMap.java | 4 +- .../java/io/trino/util/MergeSortedPages.java | 24 +- .../java/io/trino/util/MinMaxCompare.java | 20 +- .../main/java/io/trino/util/Reflection.java | 6 +- .../java/io/trino/util/SpatialJoinUtils.java | 22 +- .../java/io/trino/util/StatementUtils.java | 114 +-- .../java/io/trino/version/EmbedVersion.java | 10 +- .../trino/BenchmarkPagesIndexPageSorter.java | 24 +- .../test/java/io/trino/RowPageBuilder.java | 10 +- .../test/java/io/trino/RowPagesBuilder.java | 12 +- .../java/io/trino/SequencePageBuilder.java | 30 +- .../test/java/io/trino/SessionTestUtils.java | 6 +- .../test/java/io/trino/TestHiddenColumns.java | 12 +- .../io/trino/TestPagesIndexPageSorter.java | 24 +- .../src/test/java/io/trino/TestSession.java | 4 +- .../io/trino/block/AbstractTestBlock.java | 20 +- .../java/io/trino/block/BenchmarkMapCopy.java | 14 +- .../java/io/trino/block/BlockAssertions.java | 48 +- .../io/trino/block/ColumnarTestUtils.java | 10 +- .../java/io/trino/block/TestArrayBlock.java | 14 +- .../java/io/trino/block/TestBlockBuilder.java | 16 +- .../io/trino/block/TestByteArrayBlock.java | 6 +- .../io/trino/block/TestColumnarArray.java | 30 +- .../java/io/trino/block/TestColumnarMap.java | 40 +- .../java/io/trino/block/TestColumnarRow.java | 32 +- .../io/trino/block/TestDictionaryBlock.java | 14 +- .../io/trino/block/TestInt128ArrayBlock.java | 10 +- .../io/trino/block/TestInt96ArrayBlock.java | 12 +- .../io/trino/block/TestIntArrayBlock.java | 6 +- .../io/trino/block/TestLongArrayBlock.java | 8 +- .../java/io/trino/block/TestMapBlock.java | 28 +- .../java/io/trino/block/TestRowBlock.java | 18 +- .../block/TestRunLengthEncodedBlock.java | 18 +- .../io/trino/block/TestShortArrayBlock.java | 6 +- .../trino/block/TestVariableWidthBlock.java | 12 +- .../io/trino/connector/AllowAllGrants.java | 8 +- .../test/java/io/trino/connector/Grants.java | 4 +- .../io/trino/connector/MockConnector.java | 62 +- .../connector/MockConnectorAccessControl.java | 20 +- .../connector/MockConnectorColumnHandle.java | 4 +- .../trino/connector/MockConnectorFactory.java | 50 +- .../MockConnectorHandleResolver.java | 8 +- .../MockConnectorInsertTableHandle.java | 2 +- .../MockConnectorOutputTableHandle.java | 2 +- .../trino/connector/MockConnectorPlugin.java | 4 +- .../connector/MockConnectorTableHandle.java | 8 +- .../MockConnectorTransactionHandle.java | 2 +- .../io/trino/connector/MutableGrants.java | 6 +- .../connector/system/TestSystemSplit.java | 4 +- .../java/io/trino/cost/EstimateAssertion.java | 2 +- .../io/trino/cost/PlanNodeStatsAssertion.java | 4 +- .../trino/cost/StatsCalculatorAssertion.java | 22 +- .../io/trino/cost/StatsCalculatorTester.java | 16 +- .../io/trino/cost/SymbolStatsAssertion.java | 2 +- .../trino/cost/TestAggregationStatsRule.java | 6 +- .../cost/TestComparisonStatsCalculator.java | 48 +- .../io/trino/cost/TestCostCalculator.java | 94 +-- .../io/trino/cost/TestCostComparator.java | 4 +- .../io/trino/cost/TestExchangeStatsRule.java | 4 +- .../trino/cost/TestFilterStatsCalculator.java | 34 +- .../io/trino/cost/TestFilterStatsRule.java | 20 +- .../java/io/trino/cost/TestJoinStatsRule.java | 38 +- .../io/trino/cost/TestOutputNodeStats.java | 6 +- .../cost/TestPlanNodeStatsEstimateMath.java | 12 +- .../io/trino/cost/TestRowNumberStatsRule.java | 4 +- .../trino/cost/TestScalarStatsCalculator.java | 58 +- .../cost/TestSemiJoinStatsCalculator.java | 8 +- .../io/trino/cost/TestSemiJoinStatsRule.java | 6 +- ...tSimpleFilterProjectSemiJoinStatsRule.java | 12 +- .../java/io/trino/cost/TestSortStatsRule.java | 6 +- .../io/trino/cost/TestStatisticRange.java | 2 +- .../io/trino/cost/TestStatsCalculator.java | 24 +- .../io/trino/cost/TestStatsNormalizer.java | 30 +- .../java/io/trino/cost/TestTopNStatsRule.java | 6 +- .../io/trino/cost/TestUnionStatsRule.java | 4 +- .../io/trino/cost/TestValuesNodeStats.java | 12 +- ...estDecoratingListeningExecutorService.java | 2 +- .../TestConnectorEventListener.java | 8 +- .../execution/BenchmarkNodeScheduler.java | 38 +- .../execution/MockManagedQueryExecution.java | 28 +- .../execution/MockRemoteTaskFactory.java | 72 +- .../io/trino/execution/TaskTestUtils.java | 98 +-- .../java/io/trino/execution/TestCallTask.java | 54 +- .../io/trino/execution/TestCommitTask.java | 38 +- .../trino/execution/TestCreateSchemaTask.java | 34 +- .../trino/execution/TestCreateTableTask.java | 106 +-- .../trino/execution/TestDeallocateTask.java | 36 +- .../TestDynamicFiltersCollector.java | 14 +- .../java/io/trino/execution/TestInput.java | 4 +- .../TestMemoryRevokingScheduler.java | 38 +- .../io/trino/execution/TestNodeScheduler.java | 42 +- .../execution/TestNodeSchedulerConfig.java | 4 +- .../trino/execution/TestPageSplitterUtil.java | 26 +- .../execution/TestParameterExtractor.java | 10 +- .../trino/execution/TestPlannerWarnings.java | 42 +- .../io/trino/execution/TestPrepareTask.java | 54 +- .../trino/execution/TestQueryIdGenerator.java | 2 +- .../io/trino/execution/TestQueryPreparer.java | 26 +- .../execution/TestQueryStateMachine.java | 66 +- .../io/trino/execution/TestQueryStats.java | 12 +- .../trino/execution/TestResetSessionTask.java | 34 +- .../TestResettableRandomizedIterator.java | 2 +- .../io/trino/execution/TestRollbackTask.java | 30 +- .../io/trino/execution/TestSetPathTask.java | 32 +- .../io/trino/execution/TestSetRoleTask.java | 36 +- .../trino/execution/TestSetSessionTask.java | 56 +- .../execution/TestSqlStageExecution.java | 58 +- .../java/io/trino/execution/TestSqlTask.java | 58 +- .../trino/execution/TestSqlTaskExecution.java | 104 +-- .../trino/execution/TestSqlTaskManager.java | 52 +- .../execution/TestStageStateMachine.java | 32 +- .../io/trino/execution/TestStageStats.java | 2 +- .../execution/TestStartTransactionTask.java | 54 +- .../execution/TestingPageSourceProvider.java | 24 +- .../execution/buffer/BenchmarkBlockSerde.java | 44 +- .../buffer/BenchmarkDataGenerator.java | 6 +- .../execution/buffer/BenchmarkPagesSerde.java | 16 +- .../execution/buffer/BufferTestUtils.java | 12 +- .../buffer/TestArbitraryOutputBuffer.java | 48 +- .../buffer/TestBroadcastOutputBuffer.java | 64 +- .../execution/buffer/TestClientBuffer.java | 30 +- .../execution/buffer/TestPageCodecMarker.java | 4 +- .../execution/buffer/TestPagesSerde.java | 18 +- .../buffer/TestPartitionedOutputBuffer.java | 56 +- .../buffer/TestingPagesSerdeFactory.java | 8 +- .../executor/SimulationController.java | 10 +- .../execution/executor/SimulationSplit.java | 4 +- .../execution/executor/SimulationTask.java | 4 +- .../execution/executor/SplitGenerators.java | 6 +- .../executor/SplitSpecification.java | 4 +- .../executor/TaskExecutorSimulator.java | 24 +- .../execution/executor/TestTaskExecutor.java | 8 +- .../BenchmarkResourceGroup.java | 4 +- .../resourcegroups/TestResourceGroups.java | 26 +- .../TestUpdateablePriorityQueue.java | 2 +- .../resourcegroups/TestWeightedFairQueue.java | 2 +- .../TestBroadcastOutputBufferManager.java | 10 +- .../TestFileBasedNetworkTopology.java | 2 +- .../scheduler/TestFixedCountScheduler.java | 12 +- .../TestPartitionedOutputBufferManager.java | 6 +- .../TestPhasedExecutionSchedule.java | 48 +- .../TestSourcePartitionedScheduler.java | 128 ++-- .../scheduler/TestSubnetTopology.java | 8 +- .../scheduler/TestSubnetTopologyConfig.java | 4 +- .../TestTopologyAwareNodeSelectorConfig.java | 2 +- .../warnings/TestDefaultWarningCollector.java | 4 +- .../warnings/TestTestingWarningCollector.java | 8 +- .../TestHeartbeatFailureDetector.java | 6 +- .../memory/LowMemoryKillerTestingUtils.java | 14 +- .../trino/memory/TestMemoryManagerConfig.java | 4 +- .../java/io/trino/memory/TestMemoryPools.java | 40 +- .../io/trino/memory/TestMemoryTracking.java | 36 +- .../io/trino/memory/TestNodeMemoryConfig.java | 2 +- .../io/trino/memory/TestQueryContext.java | 26 +- .../memory/TestSystemMemoryBlocking.java | 46 +- .../TestTotalReservationLowMemoryKiller.java | 8 +- ...ervationOnBlockedNodesLowMemoryKiller.java | 8 +- .../trino/metadata/AbstractMockMetadata.java | 100 +-- .../metadata/TestDiscoveryNodeManager.java | 10 +- .../trino/metadata/TestFunctionRegistry.java | 48 +- .../TestInformationSchemaMetadata.java | 60 +- .../TestInformationSchemaTableHandle.java | 8 +- .../TestInternalBlockEncodingSerde.java | 18 +- .../TestPolymorphicScalarFunction.java | 44 +- .../trino/metadata/TestResolvedFunction.java | 10 +- .../java/io/trino/metadata/TestSignature.java | 18 +- .../trino/metadata/TestSignatureBinder.java | 72 +- .../trino/metadata/TestSystemTableHandle.java | 8 +- .../trino/metadata/TestTableLayoutResult.java | 14 +- .../BenchmarkDynamicFilterSourceOperator.java | 18 +- .../trino/operator/BenchmarkGroupByHash.java | 24 +- .../operator/BenchmarkGroupedTopNBuilder.java | 18 +- ...kHashAndStreamingAggregationOperators.java | 44 +- .../BenchmarkHashBuildAndJoinOperators.java | 32 +- .../BenchmarkPartitionedOutputOperator.java | 50 +- ...BenchmarkScanFilterAndProjectOperator.java | 64 +- .../trino/operator/BenchmarkTopNOperator.java | 24 +- .../operator/BenchmarkUnnestOperator.java | 34 +- .../operator/BenchmarkWindowOperator.java | 26 +- .../io/trino/operator/CyclingGroupByHash.java | 10 +- .../trino/operator/DummySpillerFactory.java | 10 +- .../trino/operator/GenericLongFunction.java | 24 +- .../operator/GroupByHashYieldAssertion.java | 28 +- .../MockExchangeRequestProcessor.java | 28 +- .../io/trino/operator/OperatorAssertion.java | 22 +- .../io/trino/operator/PageAssertions.java | 6 +- .../operator/TestAggregationOperator.java | 44 +- .../trino/operator/TestAnnotationEngine.java | 4 +- .../TestAnnotationEngineForAggregates.java | 110 +-- .../TestAnnotationEngineForScalars.java | 68 +- .../operator/TestColumnarPageProcessor.java | 32 +- .../operator/TestCyclingGroupByHash.java | 8 +- .../operator/TestDistinctLimitOperator.java | 34 +- .../java/io/trino/operator/TestDriver.java | 52 +- .../io/trino/operator/TestDriverStats.java | 4 +- .../TestDynamicFilterSourceOperator.java | 78 +-- .../io/trino/operator/TestExchangeClient.java | 18 +- .../trino/operator/TestExchangeOperator.java | 32 +- .../TestFilterAndProjectOperator.java | 42 +- .../io/trino/operator/TestGroupByHash.java | 44 +- .../trino/operator/TestGroupIdOperator.java | 26 +- .../operator/TestGroupedTopNBuilder.java | 22 +- .../TestGroupedTopNRowNumberAccumulator.java | 4 +- .../operator/TestHashAggregationOperator.java | 80 +-- .../trino/operator/TestHashJoinOperator.java | 84 +-- .../operator/TestHashSemiJoinOperator.java | 38 +- .../operator/TestHttpPageBufferClient.java | 32 +- .../trino/operator/TestJoinOperatorInfo.java | 2 +- .../operator/TestJoinStatisticsCounter.java | 2 +- .../io/trino/operator/TestLimitOperator.java | 20 +- .../operator/TestLookupJoinPageBuilder.java | 16 +- .../operator/TestMarkDistinctOperator.java | 36 +- .../io/trino/operator/TestMergeHashSort.java | 14 +- .../io/trino/operator/TestMergeOperator.java | 44 +- .../operator/TestNestedLoopBuildOperator.java | 20 +- .../operator/TestNestedLoopJoinOperator.java | 32 +- .../io/trino/operator/TestOperationTimer.java | 2 +- .../trino/operator/TestOperatorAssertion.java | 4 +- .../TestOperatorMemoryRevocation.java | 2 +- .../io/trino/operator/TestOperatorStats.java | 6 +- .../trino/operator/TestOrderByOperator.java | 40 +- .../java/io/trino/operator/TestPageUtils.java | 10 +- .../io/trino/operator/TestPagesIndex.java | 10 +- .../TestPartitionedOutputOperator.java | 48 +- .../io/trino/operator/TestPipelineStats.java | 4 +- .../io/trino/operator/TestPositionLinks.java | 12 +- .../operator/TestRealAverageAggregation.java | 22 +- .../trino/operator/TestRowNumberOperator.java | 42 +- .../operator/TestRowReferencePageManager.java | 8 +- .../TestScanFilterAndProjectOperator.java | 88 +-- .../TestStreamingAggregationOperator.java | 38 +- .../operator/TestTableFinishOperator.java | 50 +- .../operator/TestTableWriterOperator.java | 68 +- .../java/io/trino/operator/TestTaskStats.java | 2 +- .../io/trino/operator/TestTopNOperator.java | 34 +- .../operator/TestTopNRowNumberOperator.java | 38 +- .../io/trino/operator/TestTypeSignature.java | 36 +- .../io/trino/operator/TestWindowOperator.java | 70 +- .../io/trino/operator/TestWorkProcessor.java | 28 +- ...stWorkProcessorPipelineSourceOperator.java | 30 +- .../TestingExchangeHttpClientHandler.java | 24 +- .../operator/TestingOperatorContext.java | 12 +- .../io/trino/operator/TestingTaskBuffer.java | 8 +- .../operator/WorkProcessorAssertion.java | 4 +- .../AbstractTestAggregationFunction.java | 40 +- .../AbstractTestApproximateCountDistinct.java | 18 +- ...AbstractTestDecimalAverageAggregation.java | 8 +- .../AbstractTestDecimalSumAggregation.java | 8 +- .../aggregation/AggregationTestUtils.java | 16 +- .../BenchmarkArrayAggregation.java | 26 +- .../BenchmarkGroupedTypedHistogram.java | 22 +- .../aggregation/TestAccumulatorCompiler.java | 22 +- ...tApproximateCountDistinctAggregations.java | 6 +- .../TestApproximateCountDistinctBoolean.java | 4 +- .../TestApproximateCountDistinctDouble.java | 4 +- .../TestApproximateCountDistinctInteger.java | 4 +- ...TestApproximateCountDistinctIpAddress.java | 4 +- .../TestApproximateCountDistinctLong.java | 4 +- ...stApproximateCountDistinctLongDecimal.java | 6 +- .../TestApproximateCountDistinctSmallint.java | 4 +- .../TestApproximateCountDistinctTinyint.java | 4 +- .../TestApproximateCountDistinctVarchar.java | 4 +- .../TestApproximatePercentileAggregation.java | 36 +- .../aggregation/TestArbitraryAggregation.java | 36 +- .../aggregation/TestArrayAggregation.java | 44 +- .../aggregation/TestArrayMaxNAggregation.java | 12 +- .../aggregation/TestArrayMinAggregation.java | 12 +- .../TestBitwiseAndAggregation.java | 10 +- .../aggregation/TestBitwiseOrAggregation.java | 10 +- .../TestBooleanAndAggregation.java | 8 +- .../aggregation/TestBooleanOrAggregation.java | 8 +- .../aggregation/TestChecksumAggregation.java | 50 +- .../aggregation/TestCountAggregation.java | 8 +- .../TestCountColumnAggregation.java | 8 +- .../aggregation/TestCountIfAggregation.java | 8 +- .../aggregation/TestCountNullAggregation.java | 30 +- .../aggregation/TestDateMaxAggregation.java | 10 +- .../TestDecimalAverageAggregation.java | 16 +- .../TestDecimalSumAggregation.java | 16 +- .../TestDoubleAverageAggregation.java | 8 +- .../TestDoubleCorrelationAggregation.java | 12 +- .../TestDoubleCovariancePopAggregation.java | 10 +- .../TestDoubleCovarianceSampAggregation.java | 10 +- .../TestDoubleGeometricMeanAggregation.java | 8 +- .../TestDoubleHistogramAggregation.java | 28 +- .../TestDoubleKurtosisAggregation.java | 8 +- .../aggregation/TestDoubleMaxAggregation.java | 8 +- .../aggregation/TestDoubleMinAggregation.java | 8 +- .../TestDoubleMinNAggregation.java | 14 +- .../TestDoubleRegrInterceptAggregation.java | 10 +- .../TestDoubleRegrSlopeAggregation.java | 10 +- .../TestDoubleSkewnessAggregation.java | 8 +- .../TestDoubleStdDevAggregation.java | 8 +- .../TestDoubleStdDevPopAggregation.java | 8 +- .../aggregation/TestDoubleSumAggregation.java | 8 +- .../TestDoubleVarianceAggregation.java | 8 +- .../TestDoubleVariancePopAggregation.java | 8 +- .../operator/aggregation/TestHistogram.java | 72 +- ...IntervalDayToSecondAverageAggregation.java | 10 +- ...TestIntervalDayToSecondSumAggregation.java | 10 +- ...IntervalYearToMonthAverageAggregation.java | 10 +- ...TestIntervalYearToMonthSumAggregation.java | 10 +- .../TestLongAverageAggregation.java | 8 +- .../TestLongDecimalAverageAggregation.java | 10 +- .../TestLongDecimalMaxAggregation.java | 12 +- .../TestLongDecimalMinAggregation.java | 12 +- .../TestLongDecimalSumAggregation.java | 10 +- ...tLongGeometricMeanAggregationFunction.java | 8 +- .../TestLongKurtosisAggregation.java | 8 +- .../aggregation/TestLongMaxAggregation.java | 8 +- .../aggregation/TestLongMaxNAggregation.java | 12 +- .../aggregation/TestLongMinAggregation.java | 8 +- .../TestLongSkewnessAggregation.java | 8 +- .../TestLongStdDevAggregation.java | 8 +- .../TestLongStdDevPopAggregation.java | 8 +- .../aggregation/TestLongSumAggregation.java | 8 +- .../TestLongVarianceAggregation.java | 8 +- .../TestLongVariancePopAggregation.java | 8 +- .../aggregation/TestMapAggAggregation.java | 44 +- .../aggregation/TestMapUnionAggregation.java | 30 +- .../TestMergeHyperLogLogAggregation.java | 10 +- .../TestMergeQuantileDigestFunction.java | 22 +- .../TestMergeTDigestAggregation.java | 10 +- .../TestMultimapAggAggregation.java | 42 +- ...TestQuantileDigestAggregationFunction.java | 52 +- .../TestRealCorrelationAggregation.java | 10 +- .../TestRealCovariancePopAggregation.java | 10 +- .../TestRealCovarianceSampAggregation.java | 10 +- .../TestRealGeometricMeanAggregation.java | 8 +- .../TestRealHistogramAggregation.java | 30 +- .../TestRealRegrInterceptAggregation.java | 10 +- .../TestRealRegrSlopeAggregation.java | 10 +- .../aggregation/TestRealSumAggregation.java | 8 +- .../TestShortDecimalAverageAggregation.java | 10 +- .../TestShortDecimalMaxAggregation.java | 10 +- .../TestShortDecimalMinAggregation.java | 10 +- .../TestShortDecimalSumAggregation.java | 10 +- .../aggregation/TestStateCompiler.java | 64 +- .../TestTDigestAggregationFunction.java | 28 +- .../operator/aggregation/TestTypedHeap.java | 12 +- .../aggregation/TestTypedHistogram.java | 18 +- .../aggregation/TestTypedKeyValueHeap.java | 14 +- .../operator/aggregation/TestTypedSet.java | 26 +- .../TestUnknownMaxAggregation.java | 8 +- .../TestUnknownMinAggregation.java | 8 +- .../TestVarBinaryMaxAggregation.java | 10 +- .../TestVarBinaryMinAggregation.java | 10 +- .../groupby/AggregationTestInput.java | 10 +- .../groupby/AggregationTestInputBuilder.java | 6 +- .../groupby/AggregationTestOutput.java | 6 +- .../groupby/GroupByAggregationTestUtils.java | 6 +- .../aggregation/histogram/TestValueStore.java | 16 +- .../minmaxby/TestMinMaxByAggregation.java | 54 +- .../minmaxby/TestMinMaxByNAggregation.java | 40 +- .../operator/exchange/TestLocalExchange.java | 40 +- .../index/TestFieldSetFilteringRecordSet.java | 18 +- .../index/TestTupleFilterProcessor.java | 36 +- ...enchmarkDictionaryBlockGetSizeInBytes.java | 18 +- .../TestDictionaryAwarePageFilter.java | 18 +- .../TestDictionaryAwarePageProjection.java | 30 +- .../project/TestInputPageProjection.java | 14 +- .../operator/project/TestMergePages.java | 30 +- .../operator/project/TestPageProcessor.java | 66 +- .../operator/scalar/AbstractTestExtract.java | 6 +- .../scalar/AbstractTestFunctions.java | 40 +- .../scalar/AbstractTestRegexpFunctions.java | 24 +- .../scalar/BenchmarkArrayDistinct.java | 56 +- .../scalar/BenchmarkArrayEqualOperator.java | 12 +- .../operator/scalar/BenchmarkArrayFilter.java | 84 +-- .../BenchmarkArrayHashCodeOperator.java | 12 +- .../scalar/BenchmarkArrayIntersect.java | 44 +- .../operator/scalar/BenchmarkArrayJoin.java | 40 +- .../operator/scalar/BenchmarkArraySort.java | 50 +- .../scalar/BenchmarkArraySubscript.java | 50 +- .../scalar/BenchmarkArrayTransform.java | 52 +- .../scalar/BenchmarkEqualOperator.java | 12 +- .../BenchmarkEqualsConjunctsOperator.java | 42 +- .../scalar/BenchmarkHashCodeOperator.java | 12 +- .../scalar/BenchmarkJsonToArrayCast.java | 40 +- .../scalar/BenchmarkJsonToMapCast.java | 42 +- .../operator/scalar/BenchmarkMapConcat.java | 44 +- .../scalar/BenchmarkMapSubscript.java | 48 +- .../scalar/BenchmarkMapToMapCast.java | 36 +- .../scalar/BenchmarkRegexpFunctions.java | 6 +- .../scalar/BenchmarkRoundFunction.java | 8 +- .../scalar/BenchmarkRowEqualOperator.java | 14 +- .../scalar/BenchmarkRowHashCodeOperator.java | 14 +- .../scalar/BenchmarkRowToRowCast.java | 40 +- .../scalar/BenchmarkStringFunctions.java | 16 +- .../scalar/BenchmarkTransformKey.java | 56 +- .../scalar/BenchmarkTransformValue.java | 58 +- .../ConstructorWithInvalidTypeParameters.java | 10 +- .../ConstructorWithValidTypeParameters.java | 10 +- .../operator/scalar/CustomFunctions.java | 10 +- .../operator/scalar/FunctionAssertions.java | 170 ++--- .../scalar/TestArrayCombinationsFunction.java | 18 +- .../scalar/TestArrayContainsSequence.java | 2 +- .../scalar/TestArrayExceptFunction.java | 14 +- .../scalar/TestArrayFilterFunction.java | 14 +- .../operator/scalar/TestArrayFunctions.java | 8 +- .../scalar/TestArrayMatchFunctions.java | 2 +- .../scalar/TestArrayNgramsFunction.java | 12 +- .../scalar/TestArrayReduceFunction.java | 14 +- .../scalar/TestArrayTransformFunction.java | 24 +- .../operator/scalar/TestBitwiseFunctions.java | 8 +- .../TestBlockAndPositionNullConvention.java | 30 +- .../operator/scalar/TestColorFunctions.java | 20 +- .../operator/scalar/TestConcatWsFunction.java | 4 +- .../trino/operator/scalar/TestConditions.java | 14 +- .../operator/scalar/TestCustomFunctions.java | 4 +- .../scalar/TestDataSizeFunctions.java | 8 +- .../scalar/TestDateTimeFunctions.java | 68 +- .../operator/scalar/TestFailureFunction.java | 12 +- .../operator/scalar/TestFormatFunction.java | 6 +- .../operator/scalar/TestIsNullAnnotation.java | 18 +- .../scalar/TestJoniRegexpFunctions.java | 2 +- .../operator/scalar/TestJsonExtract.java | 16 +- .../operator/scalar/TestJsonFunctions.java | 10 +- .../operator/scalar/TestLambdaExpression.java | 28 +- .../scalar/TestLuhnCheckFunction.java | 4 +- .../scalar/TestMapFilterFunction.java | 20 +- .../scalar/TestMapTransformKeysFunction.java | 20 +- .../TestMapTransformValuesFunction.java | 20 +- .../scalar/TestMapZipWithFunction.java | 16 +- .../operator/scalar/TestMathFunctions.java | 32 +- .../scalar/TestOperatorValidation.java | 10 +- .../scalar/TestPageProcessorCompiler.java | 54 +- ...ametricScalarImplementationValidation.java | 16 +- .../scalar/TestRe2jRegexpFunctions.java | 2 +- .../operator/scalar/TestScalarParser.java | 22 +- .../operator/scalar/TestScalarValidation.java | 20 +- .../operator/scalar/TestStringFunctions.java | 46 +- .../operator/scalar/TestTryFunction.java | 30 +- .../operator/scalar/TestTypeOfFunction.java | 2 +- .../operator/scalar/TestUrlFunctions.java | 4 +- .../scalar/TestVarbinaryFunctions.java | 22 +- .../operator/scalar/TestWordStemFunction.java | 2 +- .../operator/scalar/TestZipFunction.java | 18 +- .../operator/scalar/TestZipWithFunction.java | 18 +- .../scalar/TypeOperatorBenchmarkUtil.java | 24 +- .../operator/scalar/date/TestExtract.java | 2 +- .../operator/scalar/time/TestExtract.java | 4 +- .../operator/scalar/time/TestOperators.java | 2 +- .../trino/operator/scalar/time/TestTime.java | 14 +- .../scalar/timestamp/TestDateTrunc.java | 8 +- .../scalar/timestamp/TestExtract.java | 4 +- .../timestamp/TestHumanReadableSeconds.java | 4 +- .../scalar/timestamp/TestOperators.java | 8 +- .../scalar/timestamp/TestTimestamp.java | 24 +- .../scalar/timestamptz/TestAtTimeZone.java | 8 +- .../scalar/timestamptz/TestDateTrunc.java | 2 +- .../scalar/timestamptz/TestExtract.java | 4 +- .../scalar/timestamptz/TestOperators.java | 2 +- .../TestTimestampWithTimeZone.java | 20 +- .../operator/scalar/timetz/TestExtract.java | 4 +- .../operator/scalar/timetz/TestOperators.java | 2 +- .../scalar/timetz/TestTimeWithTimeZone.java | 14 +- .../spiller/BenchmarkBinaryFileSpiller.java | 30 +- .../unnest/TestArrayOfRowsUnnester.java | 28 +- .../operator/unnest/TestArrayUnnester.java | 26 +- .../operator/unnest/TestMapUnnester.java | 26 +- .../unnest/TestReplicatedBlockBuilder.java | 14 +- .../unnest/TestUnnestBlockBuilder.java | 14 +- .../operator/unnest/TestUnnestOperator.java | 42 +- .../operator/unnest/TestingUnnesterUtil.java | 10 +- .../window/AbstractTestWindowFunction.java | 6 +- .../window/TestAggregateWindowFunction.java | 14 +- .../window/TestApproxPercentileWindow.java | 14 +- .../TestCumulativeDistributionFunction.java | 12 +- .../window/TestDenseRankFunction.java | 10 +- .../window/TestFirstValueFunction.java | 10 +- .../operator/window/TestLagFunction.java | 10 +- .../window/TestLastValueFunction.java | 10 +- .../operator/window/TestLeadFunction.java | 10 +- .../operator/window/TestMapAggFunction.java | 10 +- .../TestMultipleWindowSpecifications.java | 8 +- .../operator/window/TestNTileFunction.java | 8 +- .../operator/window/TestNthValueFunction.java | 10 +- .../window/TestPercentRankFunction.java | 12 +- .../operator/window/TestRankFunction.java | 10 +- .../window/TestRowNumberFunction.java | 12 +- .../operator/window/WindowAssertions.java | 4 +- .../security/TestAccessControlManager.java | 84 +-- .../TestFileBasedSystemAccessControl.java | 32 +- .../security/TestForwardingAccessControl.java | 4 +- .../security/TestGroupProviderManager.java | 4 +- .../TestInjectedConnectorAccessControl.java | 4 +- .../io/trino/server/TestBasicQueryInfo.java | 22 +- .../server/TestDynamicFilterService.java | 106 +-- .../server/TestFailureDetectorConfig.java | 2 +- .../trino/server/TestGenerateTokenFilter.java | 6 +- .../server/TestHttpRequestSessionContext.java | 34 +- .../io/trino/server/TestNodeResource.java | 6 +- .../server/TestPrestoSystemRequirements.java | 4 +- .../io/trino/server/TestQueryResource.java | 34 +- .../server/TestQuerySessionSupplier.java | 52 +- .../io/trino/server/TestQueryStateInfo.java | 26 +- .../server/TestQueryStateInfoResource.java | 20 +- .../io/trino/server/TestRangeJsonSerde.java | 16 +- .../test/java/io/trino/server/TestServer.java | 40 +- .../server/TestSessionPropertyDefaults.java | 20 +- .../server/protocol/TestQueryResultRows.java | 58 +- .../server/remotetask/TestHttpRemoteTask.java | 118 ++-- .../server/security/TestKerberosConfig.java | 4 +- .../server/security/TestResourceSecurity.java | 20 +- .../server/security/TestUserMapping.java | 6 +- .../server/security/jwt/TestJwkDecoder.java | 6 +- .../TestOAuth2WebUiAuthenticationFilter.java | 16 +- .../security/oauth2/TestingHydraService.java | 6 +- .../java/io/trino/server/ui/TestWebUi.java | 24 +- .../io/trino/spiller/TestAesSpillCipher.java | 4 +- .../trino/spiller/TestBinaryFileSpiller.java | 32 +- .../spiller/TestFileSingleStreamSpiller.java | 26 +- .../TestFileSingleStreamSpillerFactory.java | 18 +- .../TestGenericPartitioningSpiller.java | 30 +- .../spiller/TestSpillCipherPagesSerde.java | 20 +- .../trino/spiller/TestSpillSpaceTracker.java | 2 +- .../java/io/trino/split/MockSplitSource.java | 18 +- .../trino/split/TestBufferingSplitSource.java | 10 +- .../io/trino/sql/ExpressionTestUtils.java | 60 +- .../trino/sql/TestExpressionInterpreter.java | 102 +-- .../io/trino/sql/TestExpressionOptimizer.java | 62 +- .../io/trino/sql/TestExpressionUtils.java | 10 +- .../java/io/trino/sql/TestLikeFunctions.java | 22 +- .../trino/sql/TestSqlEnvironmentConfig.java | 2 +- .../sql/TestSqlToRowExpressionTranslator.java | 48 +- .../io/trino/sql/analyzer/TestAnalyzer.java | 224 +++--- .../sql/analyzer/TestFeaturesConfig.java | 14 +- .../java/io/trino/sql/analyzer/TestScope.java | 8 +- .../analyzer/TestTypeSignatureTranslator.java | 10 +- .../sql/gen/BenchmarkInCodeGenerator.java | 38 +- .../trino/sql/gen/BenchmarkPageProcessor.java | 42 +- .../sql/gen/BenchmarkPageProcessor2.java | 50 +- .../trino/sql/gen/TestExpressionCompiler.java | 98 +-- .../io/trino/sql/gen/TestInCodeGenerator.java | 28 +- .../io/trino/sql/gen/TestJoinCompiler.java | 38 +- .../sql/gen/TestPageFunctionCompiler.java | 36 +- .../TestVarArgsToArrayAdapterGenerator.java | 32 +- .../AbstractPredicatePushdownTest.java | 52 +- .../trino/sql/planner/BenchmarkPlanner.java | 16 +- .../trino/sql/planner/TestCanonicalize.java | 32 +- .../TestConnectorExpressionTranslator.java | 38 +- .../sql/planner/TestDereferencePushDown.java | 34 +- .../TestDesugarTryExpressionRewriter.java | 26 +- .../sql/planner/TestDeterminismEvaluator.java | 22 +- .../trino/sql/planner/TestDomainCoercer.java | 38 +- .../sql/planner/TestDomainTranslator.java | 130 ++-- .../trino/sql/planner/TestDynamicFilter.java | 78 +-- .../TestEffectivePredicateExtractor.java | 154 ++-- .../sql/planner/TestEqualityInference.java | 64 +- .../TestGroupingOperationRewriter.java | 2 +- .../java/io/trino/sql/planner/TestHaving.java | 12 +- .../java/io/trino/sql/planner/TestInsert.java | 44 +- .../trino/sql/planner/TestLiteralEncoder.java | 94 +-- .../TestLocalDynamicFilterConsumer.java | 38 +- .../TestLocalDynamicFiltersCollector.java | 44 +- .../planner/TestLocalExecutionPlanner.java | 8 +- .../trino/sql/planner/TestLogicalPlanner.java | 234 +++---- .../io/trino/sql/planner/TestOrderBy.java | 18 +- .../sql/planner/TestPartialTranslator.java | 52 +- .../planner/TestPlanMatchingFramework.java | 48 +- .../sql/planner/TestPredicatePushdown.java | 14 +- ...PredicatePushdownWithoutDynamicFilter.java | 14 +- .../sql/planner/TestQuantifiedComparison.java | 28 +- .../trino/sql/planner/TestRecursiveCte.java | 28 +- .../TestRemoveDuplicatePredicates.java | 8 +- .../planner/TestSchedulingOrderVisitor.java | 16 +- .../io/trino/sql/planner/TestSimplifyIn.java | 8 +- .../planner/TestSortExpressionExtractor.java | 26 +- .../sql/planner/TestSymbolAllocator.java | 2 +- .../TestTableScanRedirectionWithPushdown.java | 70 +- .../trino/sql/planner/TestTypeValidator.java | 72 +- .../planner/TestUnwrapCastInComparison.java | 12 +- .../sql/planner/TestWindowFrameRange.java | 52 +- .../planner/TestingConnectorIndexHandle.java | 2 +- .../TestingConnectorTransactionHandle.java | 2 +- .../sql/planner/TestingWriterTarget.java | 2 +- .../AggregationFunctionMatcher.java | 18 +- .../assertions/AggregationMatcher.java | 18 +- .../assertions/AggregationStepMatcher.java | 16 +- .../sql/planner/assertions/AliasMatcher.java | 12 +- .../sql/planner/assertions/AliasPresent.java | 8 +- .../sql/planner/assertions/AnySymbol.java | 4 +- .../assertions/AnySymbolReference.java | 2 +- .../assertions/AssignUniqueIdMatcher.java | 10 +- .../sql/planner/assertions/BasePlanTest.java | 34 +- .../assertions/BasePushdownPlanTest.java | 8 +- .../assertions/BaseStrictSymbolsMatcher.java | 10 +- .../assertions/ColumnHandleMatcher.java | 12 +- .../planner/assertions/ColumnReference.java | 18 +- .../ConnectorAwareTableScanMatcher.java | 20 +- .../assertions/CorrelationMatcher.java | 18 +- .../assertions/DistinctLimitMatcher.java | 12 +- .../planner/assertions/DistinctMatcher.java | 16 +- .../assertions/EquiJoinClauseProvider.java | 2 +- .../planner/assertions/ExchangeMatcher.java | 18 +- .../planner/assertions/ExpressionMatcher.java | 24 +- .../assertions/ExpressionVerifier.java | 72 +- .../sql/planner/assertions/FilterMatcher.java | 18 +- .../assertions/FunctionCallProvider.java | 16 +- .../planner/assertions/GroupIdMatcher.java | 16 +- .../assertions/IdentityProjectionMatcher.java | 14 +- .../IndexJoinEquiClauseProvider.java | 2 +- .../planner/assertions/IndexJoinMatcher.java | 12 +- .../assertions/IndexSourceMatcher.java | 16 +- .../sql/planner/assertions/JoinMatcher.java | 38 +- .../sql/planner/assertions/LimitMatcher.java | 20 +- .../assertions/MarkDistinctMatcher.java | 14 +- .../sql/planner/assertions/MatchResult.java | 2 +- .../trino/sql/planner/assertions/Matcher.java | 8 +- .../assertions/NotPlanNodeMatcher.java | 10 +- .../sql/planner/assertions/OffsetMatcher.java | 10 +- .../assertions/OrdinalitySymbolMatcher.java | 10 +- .../sql/planner/assertions/OutputMatcher.java | 16 +- .../sql/planner/assertions/PlanAssert.java | 24 +- .../planner/assertions/PlanMatchPattern.java | 138 ++-- .../assertions/PlanMatchingVisitor.java | 26 +- .../planner/assertions/PlanNodeMatcher.java | 10 +- .../planner/assertions/PlanTestSymbol.java | 2 +- .../planner/assertions/PredicateMatcher.java | 10 +- .../planner/assertions/RowNumberMatcher.java | 18 +- .../assertions/RowNumberSymbolMatcher.java | 10 +- .../sql/planner/assertions/RvalueMatcher.java | 8 +- .../planner/assertions/SemiJoinMatcher.java | 28 +- .../assertions/SetOperationOutputMatcher.java | 10 +- .../sql/planner/assertions/SortMatcher.java | 16 +- .../assertions/SpatialJoinMatcher.java | 20 +- .../assertions/SpecificationProvider.java | 6 +- .../StatsOutputRowCountMatcher.java | 8 +- .../StrictAssignedSymbolsMatcher.java | 12 +- .../assertions/StrictSymbolsMatcher.java | 8 +- .../sql/planner/assertions/SymbolAlias.java | 2 +- .../sql/planner/assertions/SymbolAliases.java | 8 +- .../assertions/SymbolCardinalityMatcher.java | 8 +- .../planner/assertions/TableScanMatcher.java | 18 +- .../assertions/TableWriterMatcher.java | 16 +- .../assertions/TestExpressionVerifier.java | 10 +- .../sql/planner/assertions/TopNMatcher.java | 20 +- .../assertions/TopNRowNumberMatcher.java | 22 +- .../TopNRowNumberSymbolMatcher.java | 10 +- .../sql/planner/assertions/UnnestMatcher.java | 20 +- .../assertions/UnnestedSymbolMatcher.java | 12 +- .../io/trino/sql/planner/assertions/Util.java | 18 +- .../sql/planner/assertions/ValuesMatcher.java | 16 +- .../assertions/WindowFrameProvider.java | 8 +- .../assertions/WindowFunctionMatcher.java | 18 +- .../sql/planner/assertions/WindowMatcher.java | 22 +- .../iterative/TestIterativeOptimizer.java | 32 +- .../trino/sql/planner/iterative/TestMemo.java | 12 +- .../sql/planner/iterative/TestRuleIndex.java | 20 +- .../rule/BenchmarkReorderChainedJoins.java | 12 +- .../BenchmarkReorderInterconnectedJoins.java | 12 +- .../rule/TestAddIntermediateAggregations.java | 48 +- .../rule/TestApplyTableScanRedirection.java | 62 +- .../TestCanonicalizeExpressionRewriter.java | 28 +- .../rule/TestCanonicalizeExpressions.java | 6 +- .../TestDetermineJoinDistributionType.java | 78 +-- ...TestDetermineSemiJoinDistributionType.java | 44 +- .../rule/TestEliminateCrossJoins.java | 58 +- .../rule/TestEvaluateZeroSample.java | 10 +- .../rule/TestExpressionRewriteRuleSet.java | 40 +- .../rule/TestImplementExceptAll.java | 24 +- .../TestImplementExceptDistinctAsUnion.java | 18 +- .../TestImplementFilteredAggregations.java | 30 +- .../rule/TestImplementIntersectAll.java | 24 +- ...TestImplementIntersectDistinctAsUnion.java | 18 +- .../rule/TestImplementLimitWithTies.java | 20 +- .../iterative/rule/TestImplementOffset.java | 22 +- .../iterative/rule/TestInlineProjections.java | 18 +- .../iterative/rule/TestJoinEnumerator.java | 44 +- .../iterative/rule/TestJoinNodeFlattener.java | 78 +-- .../TestLambdaCaptureDesugaringRewriter.java | 20 +- .../rule/TestMergeAdjacentWindows.java | 46 +- .../iterative/rule/TestMergeExcept.java | 16 +- .../iterative/rule/TestMergeFilters.java | 12 +- .../iterative/rule/TestMergeIntersect.java | 14 +- .../TestMergeLimitOverProjectWithSort.java | 20 +- .../rule/TestMergeLimitWithDistinct.java | 14 +- .../rule/TestMergeLimitWithSort.java | 14 +- .../rule/TestMergeLimitWithTopN.java | 14 +- .../iterative/rule/TestMergeLimits.java | 14 +- .../iterative/rule/TestMergeUnion.java | 10 +- ...ipleDistinctAggregationToMarkDistinct.java | 8 +- .../rule/TestPruneAggregationColumns.java | 24 +- .../TestPruneAggregationSourceColumns.java | 24 +- .../iterative/rule/TestPruneApplyColumns.java | 28 +- .../rule/TestPruneApplyCorrelation.java | 20 +- .../rule/TestPruneApplySourceColumns.java | 20 +- .../rule/TestPruneAssignUniqueIdColumns.java | 14 +- .../rule/TestPruneCorrelatedJoinColumns.java | 30 +- .../TestPruneCorrelatedJoinCorrelation.java | 12 +- .../TestPruneCountAggregationOverScalar.java | 34 +- .../rule/TestPruneDeleteSourceColumns.java | 16 +- .../rule/TestPruneDistinctAggregation.java | 14 +- .../TestPruneDistinctLimitSourceColumns.java | 12 +- .../TestPruneEnforceSingleRowColumns.java | 14 +- .../rule/TestPruneExceptSourceColumns.java | 12 +- .../rule/TestPruneExchangeColumns.java | 22 +- .../rule/TestPruneExchangeSourceColumns.java | 12 +- .../TestPruneExplainAnalyzeSourceColumns.java | 16 +- .../rule/TestPruneFilterColumns.java | 18 +- .../rule/TestPruneGroupIdColumns.java | 14 +- .../rule/TestPruneGroupIdSourceColumns.java | 12 +- .../rule/TestPruneIndexJoinColumns.java | 20 +- .../rule/TestPruneIndexSourceColumns.java | 34 +- .../rule/TestPruneIntersectSourceColumns.java | 12 +- .../rule/TestPruneJoinChildrenColumns.java | 22 +- .../iterative/rule/TestPruneJoinColumns.java | 22 +- .../iterative/rule/TestPruneLimitColumns.java | 24 +- .../rule/TestPruneMarkDistinctColumns.java | 14 +- .../rule/TestPruneOffsetColumns.java | 18 +- .../rule/TestPruneOrderByInAggregation.java | 28 +- .../rule/TestPruneOutputSourceColumns.java | 12 +- .../rule/TestPruneProjectColumns.java | 12 +- .../rule/TestPruneRowNumberColumns.java | 18 +- .../rule/TestPruneSampleColumns.java | 16 +- .../rule/TestPruneSemiJoinColumns.java | 18 +- ...stPruneSemiJoinFilteringSourceColumns.java | 16 +- .../iterative/rule/TestPruneSortColumns.java | 18 +- .../TestPruneSpatialJoinChildrenColumns.java | 16 +- .../rule/TestPruneSpatialJoinColumns.java | 18 +- .../rule/TestPruneTableScanColumns.java | 32 +- .../TestPruneTableWriterSourceColumns.java | 18 +- .../iterative/rule/TestPruneTopNColumns.java | 24 +- .../rule/TestPruneTopNRowNumberColumns.java | 22 +- .../iterative/rule/TestPruneUnionColumns.java | 12 +- .../rule/TestPruneUnionSourceColumns.java | 12 +- .../rule/TestPruneUnnestColumns.java | 22 +- .../rule/TestPruneUnnestSourceColumns.java | 16 +- .../rule/TestPruneValuesColumns.java | 12 +- .../rule/TestPruneWindowColumns.java | 48 +- .../TestPushAggregationThroughOuterJoin.java | 44 +- .../TestPushDistinctLimitIntoTableScan.java | 40 +- .../rule/TestPushDownDereferencesRules.java | 102 +-- .../TestPushLimitThroughMarkDistinct.java | 10 +- .../rule/TestPushLimitThroughOffset.java | 16 +- .../rule/TestPushLimitThroughOuterJoin.java | 20 +- .../rule/TestPushLimitThroughProject.java | 40 +- .../rule/TestPushLimitThroughUnion.java | 10 +- .../rule/TestPushOffsetThroughProject.java | 16 +- ...TestPushPartialAggregationThroughJoin.java | 30 +- .../rule/TestPushPredicateIntoTableScan.java | 70 +- ...hPredicateThroughProjectIntoRowNumber.java | 20 +- ...PushPredicateThroughProjectIntoWindow.java | 40 +- .../rule/TestPushProjectionIntoTableScan.java | 82 +-- .../TestPushProjectionThroughExchange.java | 36 +- .../rule/TestPushProjectionThroughJoin.java | 56 +- .../rule/TestPushProjectionThroughUnion.java | 24 +- .../rule/TestPushSampleIntoTableScan.java | 16 +- .../rule/TestPushTableWriteThroughUnion.java | 12 +- .../rule/TestPushTopNIntoTableScan.java | 50 +- .../rule/TestPushTopNThroughOuterJoin.java | 30 +- .../rule/TestPushTopNThroughProject.java | 40 +- .../rule/TestRemoveAggregationInSemiJoin.java | 16 +- .../iterative/rule/TestRemoveEmptyDelete.java | 16 +- .../iterative/rule/TestRemoveFullSample.java | 12 +- .../rule/TestRemoveRedundantCrossJoin.java | 6 +- .../TestRemoveRedundantDistinctLimit.java | 8 +- ...stRemoveRedundantEnforceSingleRowNode.java | 12 +- .../rule/TestRemoveRedundantExists.java | 20 +- .../rule/TestRemoveRedundantJoin.java | 12 +- .../rule/TestRemoveRedundantLimit.java | 18 +- .../rule/TestRemoveRedundantOffset.java | 6 +- .../rule/TestRemoveRedundantSort.java | 12 +- ...TestRemoveRedundantTableScanPredicate.java | 58 +- .../rule/TestRemoveRedundantTopN.java | 20 +- .../rule/TestRemoveTrivialFilters.java | 4 +- ...estRemoveUnreferencedScalarApplyNodes.java | 6 +- ...estRemoveUnreferencedScalarSubqueries.java | 22 +- .../iterative/rule/TestReorderJoins.java | 74 +- .../rule/TestSimplifyExpressions.java | 48 +- ...estSingleDistinctAggregationToGroupBy.java | 26 +- ...stSwapAdjacentWindowsBySpecifications.java | 36 +- ...atedDistinctAggregationWithProjection.java | 28 +- ...dDistinctAggregationWithoutProjection.java | 26 +- ...elatedGlobalAggregationWithProjection.java | 32 +- ...tedGlobalAggregationWithoutProjection.java | 32 +- ...latedGroupedAggregationWithProjection.java | 32 +- ...edGroupedAggregationWithoutProjection.java | 30 +- .../TestTransformCorrelatedJoinToJoin.java | 26 +- ...TestTransformCorrelatedScalarSubquery.java | 56 +- ...mCorrelatedSingleRowSubqueryToProject.java | 26 +- ...tTransformExistsApplyToCorrelatedJoin.java | 26 +- ...TransformFilteringSemiJoinToInnerJoin.java | 26 +- ...rrelatedInPredicateSubqueryToSemiJoin.java | 18 +- ...stTransformUncorrelatedSubqueryToJoin.java | 28 +- .../rule/TestUnwrapCastInComparison.java | 2 +- .../iterative/rule/test/BaseRuleTest.java | 6 +- .../iterative/rule/test/PlanBuilder.java | 166 ++--- .../iterative/rule/test/RuleAssert.java | 60 +- .../iterative/rule/test/RuleTester.java | 26 +- .../iterative/rule/test/TestRuleTester.java | 30 +- .../optimizations/TestAddExchangesPlans.java | 104 +-- .../TestCardinalityExtractorPlanVisitor.java | 16 +- .../TestEliminateCrossJoins.java | 20 +- .../optimizations/TestEliminateSorts.java | 34 +- .../TestExpressionEquivalence.java | 40 +- .../TestForceSingleNodeOutput.java | 20 +- .../TestFullOuterJoinWithCoalesce.java | 30 +- .../optimizations/TestLocalProperties.java | 18 +- .../optimizations/TestMergeWindows.java | 48 +- ...TestOptimizeMixedDistinctAggregations.java | 40 +- .../TestRemoveUnsupportedDynamicFilters.java | 86 +-- .../optimizations/TestReorderWindows.java | 38 +- .../optimizations/TestSetFlattening.java | 28 +- .../sql/planner/optimizations/TestUnion.java | 24 +- .../TestUnionWithReplicatedJoin.java | 4 +- .../sql/planner/optimizations/TestWindow.java | 60 +- .../TestWindowFilterPushDown.java | 40 +- .../sql/planner/plan/TestAssingments.java | 4 +- .../TestStatisticAggregationsDescriptor.java | 18 +- .../sql/planner/plan/TestWindowNode.java | 46 +- .../planprinter/TestWindowOperatorStats.java | 2 +- .../sanity/TestDynamicFiltersChecker.java | 50 +- ...ValidateAggregationsWithDefaultValues.java | 50 +- .../TestValidateStreamingAggregations.java | 32 +- .../sanity/TestVerifyOnlyOneOutputNode.java | 20 +- .../io/trino/sql/query/QueryAssertions.java | 44 +- .../io/trino/sql/query/TestColumnMask.java | 32 +- ...estDistinctAggregationsNoMarkDistinct.java | 4 +- .../java/io/trino/sql/query/TestExecute.java | 2 +- .../sql/query/TestFilteredAggregations.java | 16 +- .../sql/query/TestPrecomputedHashes.java | 6 +- .../io/trino/sql/query/TestRecursiveCte.java | 2 +- .../io/trino/sql/query/TestRowFilter.java | 28 +- .../io/trino/sql/query/TestSelectAll.java | 2 +- .../trino/sql/query/TestSessionFunctions.java | 8 +- .../io/trino/sql/query/TestShowQueries.java | 12 +- .../io/trino/sql/query/TestSubqueries.java | 22 +- .../trino/sql/query/TestTDigestFunctions.java | 2 +- .../sql/query/TestUnwrapCastInComparison.java | 4 +- .../java/io/trino/sql/query/TestWith.java | 10 +- .../relational/TestDeterminismEvaluator.java | 18 +- .../test/java/io/trino/tests/BogusType.java | 8 +- .../transaction/TestTransactionManager.java | 40 +- .../TestingTransactionManager.java | 8 +- .../java/io/trino/type/AbstractTestType.java | 54 +- .../trino/type/BenchmarkDecimalOperators.java | 56 +- .../io/trino/type/TestArrayOperators.java | 74 +- .../io/trino/type/TestBigintArrayType.java | 16 +- .../io/trino/type/TestBigintOperators.java | 14 +- .../java/io/trino/type/TestBigintType.java | 6 +- .../trino/type/TestBigintVarcharMapType.java | 14 +- .../io/trino/type/TestBooleanOperators.java | 10 +- .../java/io/trino/type/TestBooleanType.java | 6 +- .../io/trino/type/TestCastDependencies.java | 34 +- .../java/io/trino/type/TestCharOperators.java | 6 +- .../io/trino/type/TestCharParametricType.java | 4 +- .../test/java/io/trino/type/TestCharType.java | 10 +- .../trino/type/TestCharacterStringCasts.java | 10 +- .../io/trino/type/TestColorArrayType.java | 16 +- .../java/io/trino/type/TestColorType.java | 8 +- .../type/TestConventionDependencies.java | 30 +- .../src/test/java/io/trino/type/TestDate.java | 28 +- .../io/trino/type/TestDateTimeOperators.java | 30 +- .../test/java/io/trino/type/TestDateType.java | 8 +- .../java/io/trino/type/TestDecimalCasts.java | 18 +- .../io/trino/type/TestDecimalOperators.java | 12 +- .../trino/type/TestDecimalParametricType.java | 2 +- .../trino/type/TestDecimalToDecimalCasts.java | 2 +- .../io/trino/type/TestDoubleOperators.java | 22 +- .../java/io/trino/type/TestDoubleType.java | 12 +- .../java/io/trino/type/TestFunctionType.java | 10 +- .../io/trino/type/TestInstanceFunction.java | 10 +- .../io/trino/type/TestIntegerArrayType.java | 16 +- .../io/trino/type/TestIntegerOperators.java | 24 +- .../java/io/trino/type/TestIntegerType.java | 6 +- .../trino/type/TestIntegerVarcharMapType.java | 14 +- .../io/trino/type/TestIntervalDayTime.java | 14 +- .../trino/type/TestIntervalDayTimeType.java | 6 +- .../io/trino/type/TestIntervalYearMonth.java | 14 +- .../trino/type/TestIntervalYearMonthType.java | 6 +- .../io/trino/type/TestIpAddressOperators.java | 22 +- .../java/io/trino/type/TestIpAddressType.java | 6 +- .../java/io/trino/type/TestJsonOperators.java | 46 +- .../test/java/io/trino/type/TestJsonType.java | 6 +- .../io/trino/type/TestLongDecimalType.java | 16 +- .../java/io/trino/type/TestMapOperators.java | 66 +- .../java/io/trino/type/TestRealOperators.java | 28 +- .../test/java/io/trino/type/TestRealType.java | 10 +- .../java/io/trino/type/TestRowOperators.java | 64 +- .../io/trino/type/TestRowParametricType.java | 26 +- .../io/trino/type/TestShortDecimalType.java | 10 +- .../java/io/trino/type/TestSimpleRowType.java | 16 +- .../type/TestSingleAccessMethodCompiler.java | 2 +- .../io/trino/type/TestSmallintArrayType.java | 16 +- .../io/trino/type/TestSmallintOperators.java | 24 +- .../java/io/trino/type/TestSmallintType.java | 6 +- .../type/TestSmallintVarcharMapType.java | 14 +- .../src/test/java/io/trino/type/TestTime.java | 18 +- .../test/java/io/trino/type/TestTimeType.java | 8 +- .../trino/type/TestTimeWithTimeZoneType.java | 14 +- .../java/io/trino/type/TestTimestamp.java | 40 +- .../java/io/trino/type/TestTimestampType.java | 8 +- .../trino/type/TestTimestampWithTimeZone.java | 40 +- .../type/TestTimestampWithTimeZoneType.java | 14 +- .../io/trino/type/TestTinyintArrayType.java | 16 +- .../io/trino/type/TestTinyintOperators.java | 24 +- .../java/io/trino/type/TestTinyintType.java | 6 +- .../trino/type/TestTinyintVarcharMapType.java | 14 +- .../java/io/trino/type/TestTypeCoercion.java | 58 +- .../java/io/trino/type/TestTypeRegistry.java | 20 +- .../io/trino/type/TestUnknownOperators.java | 20 +- .../java/io/trino/type/TestUnknownType.java | 2 +- .../java/io/trino/type/TestUuidOperators.java | 24 +- .../test/java/io/trino/type/TestUuidType.java | 8 +- .../java/io/trino/type/TestVarbinaryType.java | 8 +- .../io/trino/type/TestVarcharOperators.java | 10 +- .../java/io/trino/type/TestVarcharType.java | 12 +- .../java/io/trino/type/TypeTestUtils.java | 16 +- .../trino/type/setdigest/TestSetDigest.java | 8 +- .../io/trino/util/BenchmarkPagesSort.java | 28 +- .../io/trino/util/StructuralTestUtil.java | 26 +- .../test/java/io/trino/util/TestFailures.java | 10 +- .../util/TestHashCollisionsEstimator.java | 4 +- .../io/trino/util/TestMergeSortedPages.java | 46 +- .../java/io/trino/util/TestTimeZoneUtils.java | 16 +- .../io/trino/sql/ExpressionFormatter.java | 152 ++-- .../src/main/java/io/trino/sql/QueryUtil.java | 60 +- .../io/trino/sql/ReservedIdentifiers.java | 10 +- .../main/java/io/trino/sql/SqlFormatter.java | 208 +++--- .../main/java/io/trino/sql/TreePrinter.java | 72 +- .../java/io/trino/sql/parser/AstBuilder.java | 358 +++++----- .../io/trino/sql/parser/ParsingException.java | 2 +- .../java/io/trino/sql/parser/SqlParser.java | 10 +- .../io/trino/sql/testing/TreeAssertions.java | 16 +- .../java/io/trino/sql/tree/BinaryLiteral.java | 2 +- .../java/io/trino/sql/tree/Expression.java | 2 +- .../io/trino/sql/tree/GenericLiteral.java | 2 +- .../java/io/trino/sql/tree/LongLiteral.java | 2 +- .../main/java/io/trino/sql/util/AstUtils.java | 2 +- .../java/io/trino/type/TypeCalculation.java | 32 +- .../io/trino/sql/parser/ParserAssert.java | 12 +- .../sql/parser/TestParsingException.java | 2 +- .../io/trino/sql/parser/TestSqlParser.java | 348 +++++----- .../sql/parser/TestStatementBuilder.java | 10 +- .../sql/parser/TestStatementSplitter.java | 6 +- .../io/trino/sql/parser/TestTypeParser.java | 32 +- .../java/io/trino/sql/parser/TreeNodes.java | 28 +- .../io/trino/type/TestTypeCalculation.java | 2 +- .../java/io/trino/server/rpm/ServerIT.java | 2 +- .../main/java/io/trino/spi/NodeManager.java | 2 +- .../src/main/java/io/trino/spi/Page.java | 8 +- .../main/java/io/trino/spi/PageBuilder.java | 10 +- .../java/io/trino/spi/PageIndexerFactory.java | 2 +- .../main/java/io/trino/spi/PageSorter.java | 4 +- .../src/main/java/io/trino/spi/Plugin.java | 22 +- .../java/io/trino/spi/StandardErrorCode.java | 6 +- .../trino/spi/block/AbstractArrayBlock.java | 12 +- .../io/trino/spi/block/AbstractMapBlock.java | 16 +- .../io/trino/spi/block/AbstractRowBlock.java | 14 +- .../spi/block/AbstractVariableWidthBlock.java | 2 +- .../io/trino/spi/block/ArrayBlockBuilder.java | 6 +- .../trino/spi/block/ArrayBlockEncoding.java | 6 +- .../main/java/io/trino/spi/block/Block.java | 4 +- .../trino/spi/block/BlockEncodingSerde.java | 2 +- .../io/trino/spi/block/ByteArrayBlock.java | 8 +- .../spi/block/ByteArrayBlockBuilder.java | 8 +- .../spi/block/ByteArrayBlockEncoding.java | 6 +- .../io/trino/spi/block/DictionaryBlock.java | 12 +- .../spi/block/DuplicateMapKeyException.java | 8 +- .../io/trino/spi/block/Int128ArrayBlock.java | 8 +- .../spi/block/Int128ArrayBlockBuilder.java | 12 +- .../spi/block/Int128ArrayBlockEncoding.java | 4 +- .../io/trino/spi/block/Int96ArrayBlock.java | 8 +- .../spi/block/Int96ArrayBlockBuilder.java | 12 +- .../spi/block/Int96ArrayBlockEncoding.java | 6 +- .../io/trino/spi/block/IntArrayBlock.java | 8 +- .../trino/spi/block/IntArrayBlockBuilder.java | 8 +- .../spi/block/IntArrayBlockEncoding.java | 6 +- .../java/io/trino/spi/block/IntArrayList.java | 2 +- .../java/io/trino/spi/block/LazyBlock.java | 4 +- .../io/trino/spi/block/LongArrayBlock.java | 8 +- .../spi/block/LongArrayBlockBuilder.java | 8 +- .../spi/block/LongArrayBlockEncoding.java | 6 +- .../java/io/trino/spi/block/MapBlock.java | 4 +- .../io/trino/spi/block/MapBlockBuilder.java | 10 +- .../io/trino/spi/block/MapBlockEncoding.java | 6 +- .../io/trino/spi/block/MapHashTables.java | 6 +- .../io/trino/spi/block/MethodHandleUtil.java | 6 +- .../io/trino/spi/block/RowBlockBuilder.java | 6 +- .../io/trino/spi/block/RowBlockEncoding.java | 2 +- .../spi/block/RunLengthEncodedBlock.java | 10 +- .../io/trino/spi/block/ShortArrayBlock.java | 8 +- .../spi/block/ShortArrayBlockBuilder.java | 8 +- .../spi/block/ShortArrayBlockEncoding.java | 6 +- .../io/trino/spi/block/SingleMapBlock.java | 12 +- .../spi/block/SingleMapBlockEncoding.java | 4 +- .../trino/spi/block/VariableWidthBlock.java | 10 +- .../spi/block/VariableWidthBlockBuilder.java | 20 +- .../spi/block/VariableWidthBlockEncoding.java | 4 +- .../spi/connector/AggregateFunction.java | 4 +- .../AggregationApplicationResult.java | 2 +- .../io/trino/spi/connector/Assignment.java | 2 +- .../trino/spi/connector/BucketFunction.java | 2 +- .../spi/connector/CatalogSchemaTableName.java | 2 +- .../trino/spi/connector/ColumnMetadata.java | 4 +- .../io/trino/spi/connector/Connector.java | 8 +- .../spi/connector/ConnectorAccessControl.java | 90 +-- .../spi/connector/ConnectorBucketNodeMap.java | 2 +- .../trino/spi/connector/ConnectorContext.java | 10 +- .../ConnectorMaterializedViewDefinition.java | 2 +- .../spi/connector/ConnectorMetadata.java | 28 +- .../ConnectorNodePartitioningProvider.java | 4 +- .../spi/connector/ConnectorPageSink.java | 2 +- .../spi/connector/ConnectorPageSource.java | 2 +- .../ConnectorPageSourceProvider.java | 2 +- .../spi/connector/ConnectorResolvedIndex.java | 2 +- .../connector/ConnectorSecurityContext.java | 4 +- .../trino/spi/connector/ConnectorSession.java | 4 +- .../trino/spi/connector/ConnectorSplit.java | 2 +- .../spi/connector/ConnectorSplitManager.java | 2 +- .../spi/connector/ConnectorTableLayout.java | 2 +- .../connector/ConnectorTableLayoutResult.java | 2 +- .../connector/ConnectorTablePartitioning.java | 2 +- .../connector/ConnectorTableProperties.java | 2 +- .../connector/ConnectorViewDefinition.java | 2 +- .../io/trino/spi/connector/Constraint.java | 4 +- .../ConstraintApplicationResult.java | 2 +- .../spi/connector/DiscretePredicates.java | 2 +- .../io/trino/spi/connector/DynamicFilter.java | 2 +- .../trino/spi/connector/EmptyPageSource.java | 4 +- .../trino/spi/connector/FixedPageSource.java | 2 +- .../trino/spi/connector/FixedSplitSource.java | 2 +- .../spi/connector/InMemoryRecordSet.java | 30 +- .../spi/connector/NotFoundException.java | 4 +- .../ProjectionApplicationResult.java | 2 +- .../io/trino/spi/connector/RecordCursor.java | 2 +- .../trino/spi/connector/RecordPageSource.java | 8 +- .../io/trino/spi/connector/RecordSet.java | 2 +- .../trino/spi/connector/SchemaTableName.java | 2 +- .../spi/connector/SchemaTablePrefix.java | 2 +- .../spi/connector/StandardWarningCode.java | 4 +- .../io/trino/spi/connector/SystemTable.java | 2 +- .../TableScanRedirectApplicationResult.java | 2 +- .../spi/connector/UpdatablePageSource.java | 2 +- .../eventlistener/QueryCompletedEvent.java | 2 +- .../trino/spi/eventlistener/QueryContext.java | 6 +- .../spi/eventlistener/QueryFailureInfo.java | 2 +- .../spi/expression/ConnectorExpression.java | 2 +- .../io/trino/spi/expression/Constant.java | 2 +- .../spi/expression/FieldDereference.java | 2 +- .../io/trino/spi/expression/Variable.java | 2 +- .../function/AccumulatorStateSerializer.java | 6 +- .../trino/spi/function/CombineFunction.java | 2 +- .../io/trino/spi/function/Convention.java | 4 +- .../spi/function/RankingWindowFunction.java | 2 +- .../spi/function/ScalarFunctionAdapter.java | 36 +- .../spi/function/ValueWindowFunction.java | 2 +- .../io/trino/spi/function/WindowFunction.java | 2 +- .../io/trino/spi/function/WindowIndex.java | 4 +- .../io/trino/spi/memory/MemoryPoolInfo.java | 2 +- .../spi/predicate/AllOrNoneValueSet.java | 4 +- .../java/io/trino/spi/predicate/Domain.java | 4 +- .../spi/predicate/EquatableValueSet.java | 18 +- .../java/io/trino/spi/predicate/Marker.java | 28 +- .../io/trino/spi/predicate/NullableValue.java | 16 +- .../java/io/trino/spi/predicate/Range.java | 4 +- .../trino/spi/predicate/SortedRangeSet.java | 6 +- .../io/trino/spi/predicate/TupleDomain.java | 4 +- .../java/io/trino/spi/predicate/Utils.java | 12 +- .../java/io/trino/spi/predicate/ValueSet.java | 4 +- .../io/trino/spi/procedure/Procedure.java | 6 +- ...ourceGroupConfigurationManagerContext.java | 2 +- .../spi/resourcegroups/SelectionCriteria.java | 2 +- .../spi/security/AccessDeniedException.java | 4 +- .../java/io/trino/spi/security/GrantInfo.java | 2 +- .../spi/security/SystemAccessControl.java | 94 +-- .../spi/security/SystemSecurityContext.java | 2 +- .../trino/spi/session/PropertyMetadata.java | 14 +- .../session/SessionConfigurationContext.java | 2 +- ...onPropertyConfigurationManagerFactory.java | 2 +- .../spi/statistics/ComputedStatistics.java | 2 +- .../trino/spi/statistics/TableStatistics.java | 2 +- .../trino/spi/transaction/IsolationLevel.java | 4 +- .../io/trino/spi/type/AbstractIntType.java | 32 +- .../io/trino/spi/type/AbstractLongType.java | 28 +- .../java/io/trino/spi/type/AbstractType.java | 4 +- .../spi/type/AbstractVariableWidthType.java | 8 +- .../java/io/trino/spi/type/ArrayType.java | 36 +- .../java/io/trino/spi/type/BigintType.java | 4 +- .../java/io/trino/spi/type/BooleanType.java | 28 +- .../main/java/io/trino/spi/type/CharType.java | 32 +- .../main/java/io/trino/spi/type/Chars.java | 4 +- .../io/trino/spi/type/DateTimeEncoding.java | 4 +- .../main/java/io/trino/spi/type/DateType.java | 4 +- .../io/trino/spi/type/DecimalConversions.java | 16 +- .../java/io/trino/spi/type/DecimalType.java | 10 +- .../main/java/io/trino/spi/type/Decimals.java | 16 +- .../java/io/trino/spi/type/DoubleType.java | 32 +- .../io/trino/spi/type/FixedWidthType.java | 2 +- .../io/trino/spi/type/HyperLogLogType.java | 6 +- .../java/io/trino/spi/type/IntegerType.java | 4 +- .../io/trino/spi/type/LongDecimalType.java | 34 +- .../trino/spi/type/LongTimeWithTimeZone.java | 2 +- .../spi/type/LongTimeWithTimeZoneType.java | 34 +- .../java/io/trino/spi/type/LongTimestamp.java | 2 +- .../io/trino/spi/type/LongTimestampType.java | 30 +- .../spi/type/LongTimestampWithTimeZone.java | 2 +- .../type/LongTimestampWithTimeZoneType.java | 36 +- .../main/java/io/trino/spi/type/MapType.java | 36 +- .../io/trino/spi/type/P4HyperLogLogType.java | 8 +- .../io/trino/spi/type/QuantileDigestType.java | 6 +- .../main/java/io/trino/spi/type/RealType.java | 30 +- .../main/java/io/trino/spi/type/RowType.java | 34 +- .../io/trino/spi/type/ShortDecimalType.java | 28 +- .../spi/type/ShortTimeWithTimeZoneType.java | 38 +- .../io/trino/spi/type/ShortTimestampType.java | 30 +- .../type/ShortTimestampWithTimeZoneType.java | 34 +- .../java/io/trino/spi/type/SmallintType.java | 32 +- .../main/java/io/trino/spi/type/SqlTime.java | 20 +- .../trino/spi/type/SqlTimeWithTimeZone.java | 14 +- .../java/io/trino/spi/type/SqlTimestamp.java | 14 +- .../spi/type/SqlTimestampWithTimeZone.java | 10 +- .../main/java/io/trino/spi/type/TimeType.java | 26 +- .../trino/spi/type/TimeWithTimeZoneType.java | 4 +- .../trino/spi/type/TimeWithTimeZoneTypes.java | 12 +- .../java/io/trino/spi/type/TimeZoneKey.java | 4 +- .../type/TimeZoneNotSupportedException.java | 4 +- .../java/io/trino/spi/type/TimestampType.java | 4 +- .../io/trino/spi/type/TimestampTypes.java | 2 +- .../spi/type/TimestampWithTimeZoneType.java | 4 +- .../java/io/trino/spi/type/Timestamps.java | 2 +- .../java/io/trino/spi/type/TinyintType.java | 32 +- .../src/main/java/io/trino/spi/type/Type.java | 10 +- .../trino/spi/type/TypeNotFoundException.java | 4 +- .../spi/type/TypeOperatorDeclaration.java | 38 +- .../java/io/trino/spi/type/TypeOperators.java | 42 +- .../java/io/trino/spi/type/TypeSignature.java | 4 +- .../java/io/trino/spi/type/TypeUtils.java | 12 +- .../type/UnscaledDecimal128Arithmetic.java | 4 +- .../java/io/trino/spi/type/VarbinaryType.java | 24 +- .../java/io/trino/spi/type/VarcharType.java | 24 +- .../src/test/java/io/trino/spi/TestPage.java | 14 +- .../io/trino/spi/TestPrestoException.java | 2 +- .../io/trino/spi/TestStandardErrorCode.java | 4 +- .../spi/block/BaseBlockEncodingTest.java | 4 +- .../io/trino/spi/block/BlockTestUtils.java | 4 +- .../spi/block/TestArrayBlockBuilder.java | 2 +- .../block/TestBlockRetainedSizeBreakdown.java | 14 +- .../io/trino/spi/block/TestBlockUtil.java | 2 +- .../spi/block/TestByteArrayBlockEncoding.java | 4 +- .../block/TestDictionaryBlockEncoding.java | 4 +- .../block/TestInt128ArrayBlockEncoding.java | 4 +- .../block/TestInt96ArrayBlockEncoding.java | 8 +- .../block/TestIntegerArrayBlockEncoding.java | 4 +- .../spi/block/TestLongArrayBlockEncoding.java | 4 +- .../trino/spi/block/TestMethodHandleUtil.java | 4 +- .../block/TestShortArrayBlockEncoding.java | 4 +- .../block/TestVariableWidthBlockBuilder.java | 2 +- .../block/TestVariableWidthBlockEncoding.java | 4 +- .../spi/block/TestingBlockEncodingSerde.java | 8 +- .../io/trino/spi/block/TestingSession.java | 12 +- .../TestConnectorViewDefinition.java | 14 +- .../function/TestScalarFunctionAdapter.java | 58 +- .../predicate/BenchmarkSortedRangeSet.java | 2 +- .../spi/predicate/TestAllOrNoneValueSet.java | 10 +- .../io/trino/spi/predicate/TestDomain.java | 26 +- .../spi/predicate/TestEquatableValueSet.java | 14 +- .../io/trino/spi/predicate/TestMarker.java | 22 +- .../io/trino/spi/predicate/TestRange.java | 20 +- .../spi/predicate/TestSortedRangeSet.java | 22 +- .../trino/spi/predicate/TestTupleDomain.java | 26 +- ...onPropertyConfigurationManagerFactory.java | 2 +- .../trino/spi/statistics/TestDoubleRange.java | 2 +- .../spi/transaction/TestIsolationLevel.java | 8 +- .../java/io/trino/spi/type/TestArrayType.java | 2 +- .../java/io/trino/spi/type/TestChars.java | 8 +- .../java/io/trino/spi/type/TestDecimals.java | 6 +- .../trino/spi/type/TestLongDecimalType.java | 14 +- .../java/io/trino/spi/type/TestMapType.java | 6 +- .../java/io/trino/spi/type/TestRowType.java | 6 +- .../io/trino/spi/type/TestSqlTimestamp.java | 4 +- .../type/TestSqlTimestampWithTimeZone.java | 2 +- .../io/trino/spi/type/TestTimeZoneKey.java | 4 +- .../io/trino/spi/type/TestTimestamps.java | 2 +- .../TestUnscaledDecimal128Arithmetic.java | 44 +- .../java/io/trino/spi/type/TestVarchars.java | 6 +- .../java/io/trino/spi/type/TestingIdType.java | 4 +- .../io/trino/spi/type/TestingTypeManager.java | 22 +- .../java/io/trino/array/BlockBigArray.java | 2 +- .../java/io/trino/array/BooleanBigArray.java | 8 +- .../java/io/trino/array/ByteBigArray.java | 8 +- .../java/io/trino/array/DoubleBigArray.java | 8 +- .../main/java/io/trino/array/IntBigArray.java | 8 +- .../java/io/trino/array/IntBigArrays.java | 4 +- .../java/io/trino/array/LongBigArray.java | 8 +- .../java/io/trino/array/ObjectBigArray.java | 8 +- .../io/trino/array/ReferenceCountMap.java | 4 +- .../java/io/trino/array/ShortBigArray.java | 8 +- .../io/trino/array/TestBlockBigArray.java | 6 +- .../java/io/trino/geospatial/KdbTree.java | 4 +- .../trino/geospatial/serde/GeometrySerde.java | 4 +- .../serde/GeometrySerializationType.java | 2 +- .../geospatial/serde/JtsGeometrySerde.java | 2 +- .../java/io/trino/geospatial/TestKdbTree.java | 2 +- .../serde/BenchmarkGeometrySerde.java | 22 +- .../serde/BenchmarkJtsGeometrySerde.java | 20 +- .../serde/TestGeometrySerialization.java | 24 +- .../io/trino/matching/DefaultPrinter.java | 10 +- .../main/java/io/trino/matching/Pattern.java | 8 +- .../io/trino/matching/PatternVisitor.java | 10 +- .../main/java/io/trino/matching/Property.java | 4 +- .../matching/pattern/CapturePattern.java | 10 +- .../trino/matching/pattern/EqualsPattern.java | 8 +- .../trino/matching/pattern/FilterPattern.java | 8 +- .../trino/matching/pattern/TypeOfPattern.java | 8 +- .../trino/matching/pattern/WithPattern.java | 12 +- .../java/io/trino/matching/TestMatcher.java | 28 +- .../trino/matching/example/rel/Patterns.java | 8 +- .../memory/context/TestMemoryContexts.java | 4 +- .../io/trino/orc/AbstractOrcDataSource.java | 10 +- .../io/trino/orc/CachingOrcDataSource.java | 4 +- .../io/trino/orc/MemoryOrcDataSource.java | 4 +- .../java/io/trino/orc/OrcBlockFactory.java | 6 +- .../src/main/java/io/trino/orc/OrcColumn.java | 4 +- .../main/java/io/trino/orc/OrcDataSink.java | 2 +- .../main/java/io/trino/orc/OrcDataSource.java | 2 +- .../java/io/trino/orc/OrcDecompressor.java | 4 +- .../java/io/trino/orc/OrcOutputBuffer.java | 4 +- .../main/java/io/trino/orc/OrcPredicate.java | 4 +- .../src/main/java/io/trino/orc/OrcReader.java | 40 +- .../java/io/trino/orc/OrcRecordReader.java | 50 +- .../java/io/trino/orc/OrcWriteValidation.java | 126 ++-- .../src/main/java/io/trino/orc/OrcWriter.java | 72 +- .../java/io/trino/orc/OrcWriterStats.java | 8 +- .../io/trino/orc/OutputStreamOrcDataSink.java | 2 +- .../src/main/java/io/trino/orc/RowGroup.java | 2 +- .../src/main/java/io/trino/orc/StreamId.java | 6 +- .../src/main/java/io/trino/orc/Stripe.java | 6 +- .../main/java/io/trino/orc/StripeReader.java | 72 +- .../io/trino/orc/TupleDomainOrcPredicate.java | 84 +-- .../java/io/trino/orc/ValidationHash.java | 24 +- .../checkpoint/BooleanStreamCheckpoint.java | 2 +- .../checkpoint/ByteArrayStreamCheckpoint.java | 8 +- .../orc/checkpoint/ByteStreamCheckpoint.java | 8 +- .../io/trino/orc/checkpoint/Checkpoints.java | 40 +- .../checkpoint/DecimalStreamCheckpoint.java | 8 +- .../checkpoint/DoubleStreamCheckpoint.java | 8 +- .../orc/checkpoint/FloatStreamCheckpoint.java | 8 +- .../orc/checkpoint/InputStreamCheckpoint.java | 2 +- .../checkpoint/LongStreamV1Checkpoint.java | 8 +- .../checkpoint/LongStreamV2Checkpoint.java | 8 +- .../metadata/CompressedMetadataWriter.java | 4 +- .../ExceptionWrappingMetadataReader.java | 10 +- .../java/io/trino/orc/metadata/Footer.java | 2 +- .../java/io/trino/orc/metadata/Metadata.java | 2 +- .../io/trino/orc/metadata/MetadataReader.java | 4 +- .../io/trino/orc/metadata/MetadataWriter.java | 2 +- .../trino/orc/metadata/OrcMetadataReader.java | 62 +- .../trino/orc/metadata/OrcMetadataWriter.java | 14 +- .../java/io/trino/orc/metadata/OrcType.java | 50 +- .../io/trino/orc/metadata/RowGroupIndex.java | 2 +- .../metadata/statistics/BinaryStatistics.java | 2 +- .../statistics/BinaryStatisticsBuilder.java | 2 +- .../statistics/BooleanStatistics.java | 2 +- .../statistics/BooleanStatisticsBuilder.java | 6 +- .../metadata/statistics/ColumnStatistics.java | 18 +- .../metadata/statistics/DateStatistics.java | 2 +- .../statistics/DateStatisticsBuilder.java | 2 +- .../statistics/DecimalStatistics.java | 2 +- .../metadata/statistics/DoubleStatistics.java | 2 +- .../statistics/DoubleStatisticsBuilder.java | 8 +- .../statistics/IntegerStatistics.java | 2 +- .../statistics/IntegerStatisticsBuilder.java | 2 +- .../LongDecimalStatisticsBuilder.java | 10 +- .../LongValueStatisticsBuilder.java | 4 +- .../ShortDecimalStatisticsBuilder.java | 2 +- .../SliceColumnStatisticsBuilder.java | 4 +- .../statistics/StatisticsBuilder.java | 4 +- .../metadata/statistics/StringStatistics.java | 2 +- .../statistics/StringStatisticsBuilder.java | 2 +- .../metadata/statistics/StripeStatistics.java | 2 +- .../statistics/TimestampStatistics.java | 2 +- .../TimestampStatisticsBuilder.java | 6 +- .../trino/orc/reader/BooleanColumnReader.java | 40 +- .../io/trino/orc/reader/ByteColumnReader.java | 40 +- .../io/trino/orc/reader/ColumnReader.java | 8 +- .../io/trino/orc/reader/ColumnReaders.java | 20 +- .../trino/orc/reader/DecimalColumnReader.java | 54 +- .../trino/orc/reader/DoubleColumnReader.java | 42 +- .../trino/orc/reader/FloatColumnReader.java | 40 +- .../io/trino/orc/reader/ListColumnReader.java | 44 +- .../io/trino/orc/reader/LongColumnReader.java | 56 +- .../io/trino/orc/reader/MapColumnReader.java | 42 +- .../java/io/trino/orc/reader/ReaderUtils.java | 6 +- .../trino/orc/reader/SliceColumnReader.java | 38 +- .../reader/SliceDictionaryColumnReader.java | 42 +- .../orc/reader/SliceDirectColumnReader.java | 42 +- .../trino/orc/reader/StructColumnReader.java | 40 +- .../io/trino/orc/reader/TimeColumnReader.java | 10 +- .../orc/reader/TimestampColumnReader.java | 70 +- .../trino/orc/reader/UnionColumnReader.java | 52 +- .../orc/stream/AbstractDiskOrcDataReader.java | 2 +- .../trino/orc/stream/BooleanInputStream.java | 2 +- .../trino/orc/stream/BooleanOutputStream.java | 10 +- .../orc/stream/ByteArrayInputStream.java | 2 +- .../orc/stream/ByteArrayOutputStream.java | 14 +- .../io/trino/orc/stream/ByteInputStream.java | 4 +- .../io/trino/orc/stream/ByteOutputStream.java | 12 +- .../stream/CheckpointInputStreamSource.java | 2 +- .../orc/stream/CompressedOrcChunkLoader.java | 18 +- .../trino/orc/stream/DecimalInputStream.java | 8 +- .../trino/orc/stream/DecimalOutputStream.java | 16 +- .../trino/orc/stream/DoubleInputStream.java | 2 +- .../trino/orc/stream/DoubleOutputStream.java | 12 +- .../io/trino/orc/stream/FloatInputStream.java | 2 +- .../trino/orc/stream/FloatOutputStream.java | 12 +- .../trino/orc/stream/InputStreamSources.java | 8 +- .../java/io/trino/orc/stream/LongDecode.java | 20 +- .../io/trino/orc/stream/LongInputStream.java | 2 +- .../trino/orc/stream/LongInputStreamV1.java | 6 +- .../trino/orc/stream/LongInputStreamV2.java | 6 +- .../io/trino/orc/stream/LongOutputStream.java | 6 +- .../trino/orc/stream/LongOutputStreamV1.java | 16 +- .../trino/orc/stream/LongOutputStreamV2.java | 32 +- .../trino/orc/stream/MemoryOrcDataReader.java | 2 +- .../io/trino/orc/stream/OrcChunkLoader.java | 6 +- .../io/trino/orc/stream/OrcDataReader.java | 2 +- .../io/trino/orc/stream/OrcInputStream.java | 10 +- .../trino/orc/stream/PresentOutputStream.java | 12 +- .../io/trino/orc/stream/StreamDataOutput.java | 2 +- .../stream/UncompressedOrcChunkLoader.java | 14 +- .../io/trino/orc/stream/ValueInputStream.java | 2 +- .../trino/orc/stream/ValueOutputStream.java | 4 +- .../io/trino/orc/stream/ValueStreams.java | 30 +- .../trino/orc/writer/BooleanColumnWriter.java | 34 +- .../io/trino/orc/writer/ByteColumnWriter.java | 36 +- .../io/trino/orc/writer/ColumnWriter.java | 12 +- .../io/trino/orc/writer/ColumnWriters.java | 28 +- .../trino/orc/writer/DecimalColumnWriter.java | 50 +- .../trino/orc/writer/DictionaryBuilder.java | 10 +- .../trino/orc/writer/DoubleColumnWriter.java | 38 +- .../trino/orc/writer/FloatColumnWriter.java | 38 +- .../io/trino/orc/writer/ListColumnWriter.java | 38 +- .../io/trino/orc/writer/LongColumnWriter.java | 42 +- .../io/trino/orc/writer/MapColumnWriter.java | 38 +- .../writer/SliceDictionaryColumnWriter.java | 54 +- .../orc/writer/SliceDirectColumnWriter.java | 44 +- .../trino/orc/writer/StructColumnWriter.java | 32 +- .../io/trino/orc/writer/TimeColumnWriter.java | 10 +- .../orc/writer/TimestampColumnWriter.java | 74 +- .../io/trino/orc/AbstractTestOrcReader.java | 56 +- .../io/trino/orc/BenchmarkColumnReaders.java | 48 +- .../trino/orc/BenchmarkOrcDecimalReader.java | 22 +- .../src/test/java/io/trino/orc/OrcTester.java | 134 ++-- .../trino/orc/TestCachingOrcDataSource.java | 34 +- .../io/trino/orc/TestDictionaryBuilder.java | 4 +- .../TestDictionaryCompressionOptimizer.java | 6 +- .../io/trino/orc/TestOrcBloomFilters.java | 48 +- .../io/trino/orc/TestOrcDataSourceUtils.java | 2 +- .../test/java/io/trino/orc/TestOrcLz4.java | 14 +- .../io/trino/orc/TestOrcOutputBuffer.java | 2 +- .../test/java/io/trino/orc/TestOrcReader.java | 4 +- .../trino/orc/TestOrcReaderMemoryUsage.java | 32 +- .../io/trino/orc/TestOrcReaderPositions.java | 32 +- .../trino/orc/TestOrcWithoutRowGroupInfo.java | 20 +- .../test/java/io/trino/orc/TestOrcWriter.java | 40 +- .../io/trino/orc/TestReadBloomFilter.java | 46 +- .../orc/TestSliceDictionaryColumnWriter.java | 20 +- .../io/trino/orc/TestStructColumnReader.java | 40 +- .../orc/TestTupleDomainOrcPredicate.java | 86 +-- .../io/trino/orc/TestingOrcDataSource.java | 2 +- .../io/trino/orc/TestingOrcPredicate.java | 68 +- .../orc/metadata/TestOrcMetadataReader.java | 14 +- .../AbstractStatisticsBuilderTest.java | 2 +- .../TestBinaryStatisticsBuilder.java | 6 +- .../TestBooleanStatisticsBuilder.java | 6 +- .../statistics/TestDateStatisticsBuilder.java | 4 +- .../statistics/TestDecimalStatistics.java | 2 +- .../TestDoubleStatisticsBuilder.java | 4 +- .../TestIntegerStatisticsBuilder.java | 6 +- .../TestLongDecimalStatisticsBuilder.java | 6 +- .../TestShortDecimalStatisticsBuilder.java | 6 +- .../TestStringStatisticsBuilder.java | 6 +- .../TestTimestampStatisticsBuilder.java | 4 +- .../orc/stream/AbstractTestValueStream.java | 12 +- .../orc/stream/BenchmarkLongBitPacker.java | 2 +- .../orc/stream/TestBooleanOutputStream.java | 8 +- .../trino/orc/stream/TestBooleanStream.java | 18 +- .../trino/orc/stream/TestByteArrayStream.java | 12 +- .../io/trino/orc/stream/TestByteStream.java | 12 +- .../trino/orc/stream/TestDecimalStream.java | 12 +- .../io/trino/orc/stream/TestDoubleStream.java | 12 +- .../io/trino/orc/stream/TestFloatStream.java | 12 +- .../trino/orc/stream/TestLongBitPacker.java | 2 +- .../orc/stream/TestLongDecimalStream.java | 14 +- .../io/trino/orc/stream/TestLongDecode.java | 8 +- .../io/trino/orc/stream/TestLongStreamV1.java | 14 +- .../io/trino/orc/stream/TestLongStreamV2.java | 14 +- .../orc/stream/TestShortDecimalStream.java | 14 +- .../src/main/java/io/trino/parquet/Field.java | 2 +- .../java/io/trino/parquet/GroupField.java | 2 +- .../io/trino/parquet/ParquetEncoding.java | 14 +- .../trino/parquet/ParquetTimestampUtils.java | 12 +- .../io/trino/parquet/ParquetTypeUtils.java | 2 +- .../java/io/trino/parquet/PrimitiveField.java | 2 +- .../parquet/dictionary/BinaryDictionary.java | 2 +- .../trino/parquet/dictionary/Dictionary.java | 2 +- .../parquet/dictionary/DoubleDictionary.java | 4 +- .../parquet/dictionary/FloatDictionary.java | 4 +- .../parquet/dictionary/IntegerDictionary.java | 4 +- .../parquet/dictionary/LongDictionary.java | 4 +- .../predicate/DictionaryDescriptor.java | 2 +- .../io/trino/parquet/predicate/Predicate.java | 4 +- .../parquet/predicate/PredicateUtils.java | 28 +- .../TupleDomainParquetPredicate.java | 50 +- .../parquet/reader/BinaryColumnReader.java | 14 +- .../parquet/reader/BooleanColumnReader.java | 6 +- .../io/trino/parquet/reader/ColumnChunk.java | 2 +- .../reader/DecimalColumnReaderFactory.java | 4 +- .../parquet/reader/DoubleColumnReader.java | 6 +- .../parquet/reader/FloatColumnReader.java | 6 +- .../Int64TimestampMillisColumnReader.java | 14 +- .../trino/parquet/reader/IntColumnReader.java | 6 +- .../parquet/reader/ListColumnReader.java | 4 +- .../parquet/reader/LongColumnReader.java | 6 +- .../reader/LongDecimalColumnReader.java | 14 +- .../trino/parquet/reader/MetadataReader.java | 4 +- .../io/trino/parquet/reader/PageReader.java | 10 +- .../parquet/reader/ParquetColumnChunk.java | 12 +- .../trino/parquet/reader/ParquetReader.java | 44 +- .../parquet/reader/PrimitiveColumnReader.java | 36 +- .../reader/ShortDecimalColumnReader.java | 32 +- .../parquet/reader/StructColumnReader.java | 4 +- .../reader/TimeMicrosColumnReader.java | 8 +- .../parquet/reader/TimestampColumnReader.java | 26 +- .../reader/TimestampMicrosColumnReader.java | 32 +- .../parquet/writer/ArrayColumnWriter.java | 10 +- .../io/trino/parquet/writer/ColumnChunk.java | 6 +- .../trino/parquet/writer/MapColumnWriter.java | 10 +- .../parquet/writer/ParquetCompressor.java | 2 +- .../writer/ParquetSchemaConverter.java | 44 +- .../trino/parquet/writer/ParquetWriter.java | 8 +- .../trino/parquet/writer/ParquetWriters.java | 66 +- .../parquet/writer/PrimitiveColumnWriter.java | 16 +- .../parquet/writer/StructColumnWriter.java | 14 +- .../writer/repdef/DefLevelIterables.java | 10 +- .../writer/repdef/RepLevelIterables.java | 10 +- .../writer/valuewriter/BigintValueWriter.java | 4 +- .../valuewriter/BooleanValueWriter.java | 4 +- .../writer/valuewriter/CharValueWriter.java | 4 +- .../writer/valuewriter/DateValueWriter.java | 4 +- .../valuewriter/DecimalValueWriter.java | 8 +- .../writer/valuewriter/DoubleValueWriter.java | 4 +- .../valuewriter/IntegerValueWriter.java | 4 +- .../valuewriter/PrimitiveValueWriter.java | 2 +- .../writer/valuewriter/RealValueWriter.java | 4 +- .../valuewriter/TimeMicrosValueWriter.java | 6 +- .../TimestampMillisValueWriter.java | 6 +- .../TimestampTzMicrosValueWriter.java | 12 +- .../TimestampTzMillisValueWriter.java | 6 +- .../parquet/TestParquetTimestampUtils.java | 8 +- .../TestTupleDomainParquetPredicate.java | 76 +- .../parquet/predicate/TestPredicateUtils.java | 12 +- .../parquet/reader/TestMetadataReader.java | 2 +- .../CachingKerberosAuthentication.java | 2 +- ...ClassLoaderSafeConnectorAccessControl.java | 18 +- .../ClassLoaderSafeConnectorMetadata.java | 86 +-- .../ClassLoaderSafeConnectorPageSink.java | 6 +- ...ssLoaderSafeConnectorPageSinkProvider.java | 14 +- ...LoaderSafeConnectorPageSourceProvider.java | 20 +- ...sLoaderSafeConnectorRecordSetProvider.java | 16 +- .../ClassLoaderSafeConnectorSplitManager.java | 20 +- .../ClassLoaderSafeConnectorSplitSource.java | 6 +- .../ClassLoaderSafeEventListener.java | 10 +- ...assLoaderSafeNodePartitioningProvider.java | 20 +- .../classloader/ClassLoaderSafeRecordSet.java | 8 +- .../ClassLoaderSafeSystemTable.java | 16 +- .../base/security/AllowAllAccessControl.java | 16 +- .../security/AllowAllAccessControlModule.java | 2 +- .../security/AllowAllSystemAccessControl.java | 24 +- .../security/CatalogAccessControlRule.java | 2 +- .../CatalogSchemaAccessControlRule.java | 2 +- .../CatalogTableAccessControlRule.java | 6 +- .../security/DefaultSystemAccessControl.java | 8 +- .../base/security/FileBasedAccessControl.java | 102 +-- .../FileBasedAccessControlModule.java | 2 +- .../FileBasedSystemAccessControl.java | 128 ++-- .../ForwardingConnectorAccessControl.java | 16 +- .../ForwardingSystemAccessControl.java | 22 +- .../base/security/ReadOnlyAccessControl.java | 40 +- .../base/security/ReadOnlySecurityModule.java | 2 +- .../security/ReadOnlySystemAccessControl.java | 14 +- .../base/security/TableAccessControlRule.java | 8 +- .../base/session/PropertyMetadataUtil.java | 4 +- .../type/AbstractPrestoTimestampEncoder.java | 2 +- .../base/type/LongTimestampEncoder.java | 14 +- .../base/type/PrestoTimestampEncoder.java | 4 +- .../type/PrestoTimestampEncoderFactory.java | 8 +- .../base/type/ShortTimestampEncoder.java | 14 +- .../trino/plugin/base/util/JsonTypeUtil.java | 4 +- .../TestClassLoaderSafeWrappers.java | 26 +- .../security/TestAllowAllAccessControl.java | 4 +- .../TestAllowAllSystemAccessControl.java | 4 +- .../security/TestFileBasedAccessControl.java | 22 +- .../TestFileBasedAccessControlConfig.java | 4 +- .../TestFileBasedSystemAccessControl.java | 32 +- .../TestForwardingConnectorAccessControl.java | 6 +- .../TestForwardingSystemAccessControl.java | 4 +- .../trino/plugin/base/util/TestJsonUtils.java | 4 +- .../util/TestLoggingInvocationHandler.java | 2 +- .../java/io/trino/rcfile/ColumnEncoding.java | 2 +- .../io/trino/rcfile/PageSplitterUtil.java | 2 +- .../io/trino/rcfile/RcFileDecoderUtils.java | 6 +- .../java/io/trino/rcfile/RcFileEncoding.java | 38 +- .../java/io/trino/rcfile/RcFileReader.java | 18 +- .../trino/rcfile/RcFileWriteValidation.java | 6 +- .../java/io/trino/rcfile/RcFileWriter.java | 18 +- .../java/io/trino/rcfile/TimestampHolder.java | 12 +- .../java/io/trino/rcfile/ValidationHash.java | 18 +- .../rcfile/binary/BinaryColumnEncoding.java | 6 +- .../trino/rcfile/binary/BinaryEncoding.java | 16 +- .../rcfile/binary/BinaryRcFileEncoding.java | 8 +- .../io/trino/rcfile/binary/BlockEncoding.java | 10 +- .../trino/rcfile/binary/BooleanEncoding.java | 10 +- .../io/trino/rcfile/binary/ByteEncoding.java | 10 +- .../io/trino/rcfile/binary/DateEncoding.java | 16 +- .../trino/rcfile/binary/DecimalEncoding.java | 24 +- .../trino/rcfile/binary/DoubleEncoding.java | 10 +- .../io/trino/rcfile/binary/FloatEncoding.java | 10 +- .../io/trino/rcfile/binary/ListEncoding.java | 12 +- .../io/trino/rcfile/binary/LongEncoding.java | 16 +- .../io/trino/rcfile/binary/MapEncoding.java | 18 +- .../io/trino/rcfile/binary/ShortEncoding.java | 10 +- .../trino/rcfile/binary/StringEncoding.java | 18 +- .../trino/rcfile/binary/StructEncoding.java | 6 +- .../rcfile/binary/TimestampEncoding.java | 28 +- .../io/trino/rcfile/text/BinaryEncoding.java | 10 +- .../io/trino/rcfile/text/BlockEncoding.java | 12 +- .../io/trino/rcfile/text/BooleanEncoding.java | 10 +- .../io/trino/rcfile/text/DateEncoding.java | 10 +- .../io/trino/rcfile/text/DecimalEncoding.java | 18 +- .../io/trino/rcfile/text/DoubleEncoding.java | 12 +- .../io/trino/rcfile/text/FloatEncoding.java | 12 +- .../io/trino/rcfile/text/ListEncoding.java | 8 +- .../io/trino/rcfile/text/LongEncoding.java | 10 +- .../io/trino/rcfile/text/MapEncoding.java | 12 +- .../io/trino/rcfile/text/StringEncoding.java | 12 +- .../io/trino/rcfile/text/StructEncoding.java | 8 +- .../trino/rcfile/text/TextColumnEncoding.java | 8 +- .../trino/rcfile/text/TextRcFileEncoding.java | 8 +- .../trino/rcfile/text/TimestampEncoding.java | 18 +- .../rcfile/AbstractTestRcFileReader.java | 34 +- .../java/io/trino/rcfile/RcFileTester.java | 86 +-- .../trino/rcfile/TestRcFileReaderManual.java | 6 +- .../io/trino/decoder/DecoderColumnHandle.java | 4 +- .../io/trino/decoder/DecoderErrorCode.java | 8 +- .../java/io/trino/decoder/DecoderModule.java | 18 +- .../io/trino/decoder/FieldValueProvider.java | 4 +- .../decoder/avro/AvroBytesDeserializer.java | 4 +- .../trino/decoder/avro/AvroColumnDecoder.java | 44 +- .../trino/decoder/avro/AvroDecoderModule.java | 2 +- .../decoder/avro/AvroFileDeserializer.java | 4 +- .../decoder/avro/AvroRowDecoderFactory.java | 8 +- .../decoder/avro/GenericRecordRowDecoder.java | 6 +- .../decoder/avro/SingleValueRowDecoder.java | 6 +- .../trino/decoder/csv/CsvColumnDecoder.java | 30 +- .../io/trino/decoder/csv/CsvRowDecoder.java | 6 +- .../decoder/csv/CsvRowDecoderFactory.java | 6 +- .../trino/decoder/dummy/DummyRowDecoder.java | 6 +- .../decoder/dummy/DummyRowDecoderFactory.java | 6 +- .../AbstractDateTimeJsonValueProvider.java | 34 +- .../json/CustomDateTimeJsonFieldDecoder.java | 28 +- .../decoder/json/DefaultJsonFieldDecoder.java | 26 +- .../decoder/json/ISO8601JsonFieldDecoder.java | 32 +- .../trino/decoder/json/JsonFieldDecoder.java | 2 +- .../io/trino/decoder/json/JsonRowDecoder.java | 6 +- .../decoder/json/JsonRowDecoderFactory.java | 10 +- ...illisecondsSinceEpochJsonFieldDecoder.java | 22 +- .../decoder/json/RFC2822JsonFieldDecoder.java | 20 +- .../SecondsSinceEpochJsonFieldDecoder.java | 24 +- .../trino/decoder/raw/RawColumnDecoder.java | 28 +- .../io/trino/decoder/raw/RawRowDecoder.java | 6 +- .../decoder/raw/RawRowDecoderFactory.java | 6 +- .../decoder/DecoderTestColumnHandle.java | 2 +- .../decoder/avro/AvroDecoderTestUtil.java | 18 +- .../trino/decoder/avro/TestAvroDecoder.java | 66 +- .../io/trino/decoder/csv/TestCsvDecoder.java | 38 +- .../decoder/json/JsonFieldDecoderTester.java | 12 +- .../TestCustomDateTimeJsonFieldDecoder.java | 22 +- .../json/TestDefaultJsonFieldDecoder.java | 14 +- .../json/TestISO8601JsonFieldDecoder.java | 18 +- .../trino/decoder/json/TestJsonDecoder.java | 48 +- ...illisecondsSinceEpochJsonFieldDecoder.java | 16 +- .../json/TestRFC2822JsonFieldDecoder.java | 12 +- ...TestSecondsSinceEpochJsonFieldDecoder.java | 16 +- .../io/trino/decoder/raw/TestRawDecoder.java | 42 +- .../trino/decoder/util/DecoderTestUtil.java | 4 +- .../trino/plugin/accumulo/AccumuloClient.java | 60 +- .../plugin/accumulo/AccumuloConnector.java | 28 +- .../accumulo/AccumuloConnectorFactory.java | 8 +- .../plugin/accumulo/AccumuloErrorCode.java | 8 +- .../accumulo/AccumuloHandleResolver.java | 20 +- .../plugin/accumulo/AccumuloMetadata.java | 50 +- .../trino/plugin/accumulo/AccumuloModule.java | 28 +- .../trino/plugin/accumulo/AccumuloPlugin.java | 4 +- .../plugin/accumulo/AccumuloSplitManager.java | 36 +- .../plugin/accumulo/AccumuloTableManager.java | 8 +- .../accumulo/AccumuloTransactionHandle.java | 2 +- .../java/io/trino/plugin/accumulo/Types.java | 6 +- .../conf/AccumuloSessionProperties.java | 14 +- .../conf/AccumuloTableProperties.java | 18 +- .../index/ColumnCardinalityCache.java | 16 +- .../plugin/accumulo/index/IndexLookup.java | 40 +- .../trino/plugin/accumulo/index/Indexer.java | 24 +- .../plugin/accumulo/io/AccumuloPageSink.java | 56 +- .../accumulo/io/AccumuloPageSinkProvider.java | 18 +- .../accumulo/io/AccumuloRecordCursor.java | 44 +- .../plugin/accumulo/io/AccumuloRecordSet.java | 22 +- .../io/AccumuloRecordSetProvider.java | 22 +- .../accumulo/metadata/AccumuloTable.java | 14 +- .../accumulo/metadata/AccumuloView.java | 2 +- .../metadata/ZooKeeperMetadataManager.java | 14 +- .../model/AccumuloColumnConstraint.java | 2 +- .../accumulo/model/AccumuloColumnHandle.java | 6 +- .../plugin/accumulo/model/AccumuloSplit.java | 4 +- .../accumulo/model/AccumuloTableHandle.java | 20 +- .../io/trino/plugin/accumulo/model/Field.java | 40 +- .../io/trino/plugin/accumulo/model/Row.java | 2 +- .../plugin/accumulo/model/RowSchema.java | 6 +- .../serializers/AccumuloRowSerializer.java | 12 +- .../serializers/LexicoderRowSerializer.java | 38 +- .../serializers/StringRowSerializer.java | 36 +- .../plugin/accumulo/AccumuloQueryRunner.java | 20 +- .../plugin/accumulo/TestAccumuloClient.java | 26 +- .../TestAccumuloDistributedQueries.java | 10 +- .../TestAccumuloIntegrationSmokeTest.java | 14 +- .../plugin/accumulo/index/TestIndexer.java | 16 +- .../plugin/accumulo/model/TestField.java | 38 +- .../trino/plugin/accumulo/model/TestRow.java | 28 +- .../AbstractTestAccumuloRowSerializer.java | 34 +- .../trino/plugin/atop/AtopColumnHandle.java | 2 +- .../io/trino/plugin/atop/AtopConnector.java | 14 +- .../plugin/atop/AtopConnectorFactory.java | 16 +- .../io/trino/plugin/atop/AtopErrorCode.java | 8 +- .../trino/plugin/atop/AtopHandleResolver.java | 10 +- .../io/trino/plugin/atop/AtopMetadata.java | 34 +- .../java/io/trino/plugin/atop/AtopModule.java | 6 +- .../io/trino/plugin/atop/AtopPageSource.java | 12 +- .../plugin/atop/AtopPageSourceProvider.java | 22 +- .../java/io/trino/plugin/atop/AtopPlugin.java | 4 +- .../trino/plugin/atop/AtopProcessFactory.java | 8 +- .../java/io/trino/plugin/atop/AtopSplit.java | 4 +- .../trino/plugin/atop/AtopSplitManager.java | 32 +- .../java/io/trino/plugin/atop/AtopTable.java | 30 +- .../io/trino/plugin/atop/AtopTableHandle.java | 6 +- .../plugin/atop/AtopTransactionHandle.java | 2 +- .../plugin/atop/LocalAtopQueryRunner.java | 8 +- .../plugin/atop/TestAtopConnectorConfig.java | 2 +- .../io/trino/plugin/atop/TestAtopHang.java | 8 +- .../trino/plugin/atop/TestAtopSecurity.java | 12 +- .../io/trino/plugin/atop/TestAtopSmoke.java | 8 +- .../io/trino/plugin/atop/TestAtopSplit.java | 2 +- .../io/trino/plugin/jdbc/BaseJdbcClient.java | 94 +-- .../trino/plugin/jdbc/CachingJdbcClient.java | 28 +- .../io/trino/plugin/jdbc/ColumnMapping.java | 4 +- .../trino/plugin/jdbc/ConnectionFactory.java | 2 +- .../io/trino/plugin/jdbc/DecimalConfig.java | 2 +- .../io/trino/plugin/jdbc/DecimalModule.java | 2 +- .../jdbc/DecimalSessionSessionProperties.java | 10 +- .../plugin/jdbc/DriverConnectionFactory.java | 8 +- .../plugin/jdbc/ForwardingJdbcClient.java | 24 +- .../java/io/trino/plugin/jdbc/JdbcClient.java | 28 +- .../trino/plugin/jdbc/JdbcColumnHandle.java | 6 +- .../io/trino/plugin/jdbc/JdbcConnector.java | 28 +- .../plugin/jdbc/JdbcConnectorFactory.java | 14 +- .../plugin/jdbc/JdbcDiagnosticModule.java | 12 +- .../io/trino/plugin/jdbc/JdbcErrorCode.java | 8 +- .../trino/plugin/jdbc/JdbcHandleResolver.java | 14 +- .../io/trino/plugin/jdbc/JdbcIdentity.java | 2 +- .../io/trino/plugin/jdbc/JdbcMetadata.java | 68 +- .../jdbc/JdbcMetadataSessionProperties.java | 12 +- .../java/io/trino/plugin/jdbc/JdbcModule.java | 12 +- .../plugin/jdbc/JdbcOutputTableHandle.java | 6 +- .../io/trino/plugin/jdbc/JdbcPageSink.java | 18 +- .../plugin/jdbc/JdbcPageSinkProvider.java | 12 +- .../java/io/trino/plugin/jdbc/JdbcPlugin.java | 6 +- .../trino/plugin/jdbc/JdbcRecordCursor.java | 10 +- .../io/trino/plugin/jdbc/JdbcRecordSet.java | 8 +- .../plugin/jdbc/JdbcRecordSetProvider.java | 14 +- .../java/io/trino/plugin/jdbc/JdbcSplit.java | 4 +- .../trino/plugin/jdbc/JdbcSplitManager.java | 12 +- .../io/trino/plugin/jdbc/JdbcTableHandle.java | 8 +- .../plugin/jdbc/JdbcTransactionHandle.java | 2 +- .../jdbc/PredicatePushdownController.java | 10 +- .../io/trino/plugin/jdbc/QueryBuilder.java | 12 +- .../jdbc/RetryingConnectionFactory.java | 4 +- .../jdbc/SessionPropertiesProvider.java | 2 +- .../plugin/jdbc/StandardColumnMappings.java | 68 +- .../plugin/jdbc/TablePropertiesProvider.java | 2 +- .../jdbc/TransactionCachingJdbcClient.java | 8 +- .../TypeHandlingJdbcSessionProperties.java | 6 +- .../CredentialPropertiesProvider.java | 2 +- .../jdbc/credential/CredentialProvider.java | 2 +- .../credential/CredentialProviderModule.java | 14 +- .../CredentialProviderTypeConfig.java | 2 +- .../DefaultCredentialPropertiesProvider.java | 2 +- .../credential/EmptyCredentialProvider.java | 2 +- .../credential/ExtraCredentialProvider.java | 2 +- .../credential/StaticCredentialProvider.java | 2 +- .../expression/AggregateFunctionPatterns.java | 12 +- .../expression/AggregateFunctionRewriter.java | 12 +- .../expression/AggregateFunctionRule.java | 12 +- .../jdbc/expression/ImplementAvgDecimal.java | 28 +- .../expression/ImplementAvgFloatingPoint.java | 30 +- .../jdbc/expression/ImplementCount.java | 32 +- .../jdbc/expression/ImplementCountAll.java | 22 +- .../jdbc/expression/ImplementMinMax.java | 24 +- .../plugin/jdbc/expression/ImplementSum.java | 28 +- .../jmx/StatisticsAwareConnectionFactory.java | 4 +- .../jdbc/jmx/StatisticsAwareJdbcClient.java | 46 +- .../io/trino/plugin/jdbc/H2QueryRunner.java | 12 +- .../io/trino/plugin/jdbc/MetadataUtil.java | 8 +- .../plugin/jdbc/TestCachingJdbcClient.java | 22 +- .../TestCredentialProviderTypeConfig.java | 6 +- .../trino/plugin/jdbc/TestDecimalConfig.java | 4 +- .../plugin/jdbc/TestForwardingJdbcClient.java | 4 +- .../io/trino/plugin/jdbc/TestJdbcClient.java | 24 +- .../plugin/jdbc/TestJdbcColumnHandle.java | 12 +- .../plugin/jdbc/TestJdbcConnectorFactory.java | 6 +- .../jdbc/TestJdbcDistributedQueries.java | 6 +- .../jdbc/TestJdbcIntegrationSmokeTest.java | 18 +- .../trino/plugin/jdbc/TestJdbcMetadata.java | 46 +- .../jdbc/TestJdbcOutputTableHandle.java | 8 +- .../plugin/jdbc/TestJdbcQueryBuilder.java | 72 +- .../trino/plugin/jdbc/TestJdbcRecordSet.java | 18 +- .../jdbc/TestJdbcRecordSetProvider.java | 34 +- .../plugin/jdbc/TestJdbcTableHandle.java | 6 +- .../io/trino/plugin/jdbc/TestJmxStats.java | 6 +- .../jdbc/TestRetryingConnectionFactory.java | 22 +- .../jdbc/TestStatisticsAwareJdbcClient.java | 6 +- .../io/trino/plugin/jdbc/TestingDatabase.java | 10 +- .../plugin/jdbc/TestingH2JdbcClient.java | 80 +-- .../plugin/jdbc/TestingH2JdbcModule.java | 2 +- .../TestExtraCredentialProvider.java | 2 +- .../TestStatisticsAwareConnectionFactory.java | 4 +- .../plugin/bigquery/BigQueryColumnHandle.java | 4 +- .../plugin/bigquery/BigQueryConnector.java | 16 +- .../bigquery/BigQueryConnectorFactory.java | 12 +- .../bigquery/BigQueryConnectorModule.java | 2 +- .../BigQueryEmptyProjectionPageSource.java | 6 +- .../plugin/bigquery/BigQueryErrorCode.java | 8 +- .../bigquery/BigQueryFilterQueryBuilder.java | 8 +- .../bigquery/BigQueryHandleResolver.java | 10 +- .../plugin/bigquery/BigQueryMetadata.java | 36 +- .../bigquery/BigQueryPageSourceProvider.java | 16 +- .../trino/plugin/bigquery/BigQueryPlugin.java | 4 +- .../bigquery/BigQueryResultPageSource.java | 52 +- .../trino/plugin/bigquery/BigQuerySplit.java | 6 +- .../plugin/bigquery/BigQuerySplitManager.java | 26 +- .../plugin/bigquery/BigQueryTableHandle.java | 6 +- .../bigquery/BigQueryTransactionHandle.java | 2 +- .../trino/plugin/bigquery/BigQueryType.java | 38 +- .../io/trino/plugin/bigquery/Conversions.java | 2 +- .../plugin/bigquery/ReadSessionCreator.java | 8 +- .../plugin/bigquery/BigQueryQueryRunner.java | 8 +- .../TestBigQueryIntegrationSmokeTest.java | 14 +- .../plugin/bigquery/TestBigQueryPlugin.java | 2 +- .../plugin/bigquery/TestBigQueryType.java | 2 +- .../plugin/bigquery/TestTypeConversions.java | 30 +- .../blackhole/BlackHoleColumnHandle.java | 6 +- .../plugin/blackhole/BlackHoleConnector.java | 30 +- .../blackhole/BlackHoleConnectorFactory.java | 8 +- .../blackhole/BlackHoleHandleResolver.java | 16 +- .../blackhole/BlackHoleInsertTableHandle.java | 2 +- .../plugin/blackhole/BlackHoleMetadata.java | 70 +- .../BlackHoleNodePartitioningProvider.java | 32 +- .../blackhole/BlackHoleOutputTableHandle.java | 2 +- .../plugin/blackhole/BlackHolePageSink.java | 4 +- .../blackhole/BlackHolePageSinkProvider.java | 12 +- .../plugin/blackhole/BlackHolePageSource.java | 4 +- .../BlackHolePageSourceProvider.java | 54 +- .../BlackHolePartitioningHandle.java | 2 +- .../plugin/blackhole/BlackHolePlugin.java | 4 +- .../plugin/blackhole/BlackHoleSplit.java | 4 +- .../blackhole/BlackHoleSplitManager.java | 14 +- .../blackhole/BlackHoleTableHandle.java | 6 +- .../blackhole/BlackHoleTransactionHandle.java | 2 +- .../blackhole/BlackHoleQueryRunner.java | 8 +- .../blackhole/TestBlackHoleMetadata.java | 16 +- .../plugin/blackhole/TestBlackHoleSmoke.java | 24 +- .../cassandra/CassandraClientModule.java | 4 +- ...assandraClusteringPredicatesExtractor.java | 10 +- .../cassandra/CassandraColumnHandle.java | 8 +- .../plugin/cassandra/CassandraConnector.java | 20 +- .../cassandra/CassandraConnectorFactory.java | 10 +- .../plugin/cassandra/CassandraErrorCode.java | 8 +- .../cassandra/CassandraHandleResolver.java | 14 +- .../cassandra/CassandraInsertTableHandle.java | 4 +- .../plugin/cassandra/CassandraMetadata.java | 60 +- .../cassandra/CassandraOutputTableHandle.java | 4 +- .../plugin/cassandra/CassandraPageSink.java | 44 +- .../cassandra/CassandraPageSinkProvider.java | 12 +- .../plugin/cassandra/CassandraPartition.java | 4 +- .../cassandra/CassandraPartitionManager.java | 10 +- .../cassandra/CassandraPartitionResult.java | 4 +- .../plugin/cassandra/CassandraPlugin.java | 4 +- .../cassandra/CassandraRecordCursor.java | 12 +- .../plugin/cassandra/CassandraRecordSet.java | 6 +- .../cassandra/CassandraRecordSetProvider.java | 16 +- .../plugin/cassandra/CassandraSession.java | 30 +- .../cassandra/CassandraSessionProperties.java | 6 +- .../plugin/cassandra/CassandraSplit.java | 4 +- .../cassandra/CassandraSplitManager.java | 24 +- .../plugin/cassandra/CassandraTable.java | 2 +- .../cassandra/CassandraTableHandle.java | 4 +- .../cassandra/CassandraTokenSplitManager.java | 6 +- .../cassandra/CassandraTransactionHandle.java | 2 +- .../trino/plugin/cassandra/CassandraType.java | 40 +- .../cassandra/util/CassandraCqlUtils.java | 8 +- .../cassandra/util/HostAddressFactory.java | 2 +- .../BaseCassandraDistributedQueries.java | 12 +- .../cassandra/CassandraQueryRunner.java | 14 +- .../cassandra/CassandraTestingUtils.java | 2 +- .../cassandra/TestCassandraConnector.java | 76 +- .../TestCassandraDistributedQueries.java | 4 +- ...TestCassandraDistributedQueriesLatest.java | 4 +- .../TestCassandraIntegrationSmokeTest.java | 64 +- .../plugin/cassandra/TestCassandraSplit.java | 2 +- .../TestCassandraTokenSplitManager.java | 4 +- .../cassandra/TestJsonCassandraHandles.java | 6 +- ...assandraClusteringPredicatesExtractor.java | 18 +- .../util/TestHostAddressFactory.java | 2 +- .../io/trino/plugin/druid/DruidErrorCode.java | 8 +- .../trino/plugin/druid/DruidJdbcClient.java | 44 +- .../plugin/druid/DruidJdbcClientModule.java | 12 +- .../trino/plugin/druid/DruidJdbcPlugin.java | 2 +- .../druid/BaseDruidIntegrationSmokeTest.java | 18 +- .../trino/plugin/druid/DruidQueryRunner.java | 12 +- .../plugin/druid/TestDruidErrorCode.java | 10 +- .../druid/TestDruidIntegrationSmokeTest.java | 4 +- .../TestDruidIntegrationSmokeTestLatest.java | 4 +- .../plugin/druid/TestDruidJdbcPlugin.java | 6 +- .../plugin/druid/TestingDruidServer.java | 2 +- .../plugin/elasticsearch/BuiltinColumns.java | 10 +- .../elasticsearch/CountQueryPageSource.java | 8 +- .../ElasticsearchColumnHandle.java | 4 +- .../elasticsearch/ElasticsearchConnector.java | 18 +- .../ElasticsearchConnectorFactory.java | 16 +- .../ElasticsearchConnectorModule.java | 12 +- .../elasticsearch/ElasticsearchErrorCode.java | 10 +- .../ElasticsearchHandleResolver.java | 10 +- .../elasticsearch/ElasticsearchMetadata.java | 78 +-- .../ElasticsearchPageSourceProvider.java | 20 +- .../elasticsearch/ElasticsearchPlugin.java | 4 +- .../ElasticsearchQueryBuilder.java | 28 +- .../elasticsearch/ElasticsearchSplit.java | 4 +- .../ElasticsearchSplitManager.java | 18 +- .../ElasticsearchTableHandle.java | 6 +- .../ElasticsearchTransactionHandle.java | 2 +- .../elasticsearch/NodesSystemTable.java | 34 +- .../PassthroughQueryPageSource.java | 12 +- .../elasticsearch/ScanQueryPageSource.java | 82 +-- .../client/ElasticsearchClient.java | 16 +- .../elasticsearch/decoders/ArrayDecoder.java | 6 +- .../elasticsearch/decoders/BigintDecoder.java | 8 +- .../decoders/BooleanDecoder.java | 8 +- .../elasticsearch/decoders/Decoder.java | 2 +- .../elasticsearch/decoders/DoubleDecoder.java | 8 +- .../decoders/IdColumnDecoder.java | 4 +- .../decoders/IntegerDecoder.java | 8 +- .../decoders/IpAddressDecoder.java | 12 +- .../elasticsearch/decoders/RealDecoder.java | 8 +- .../elasticsearch/decoders/RowDecoder.java | 8 +- .../decoders/ScoreColumnDecoder.java | 4 +- .../decoders/SmallintDecoder.java | 8 +- .../decoders/SourceColumnDecoder.java | 4 +- .../decoders/TimestampDecoder.java | 12 +- .../decoders/TinyintDecoder.java | 8 +- .../decoders/VarbinaryDecoder.java | 8 +- .../decoders/VarcharDecoder.java | 8 +- .../BaseElasticsearchSmokeTest.java | 16 +- .../elasticsearch/ElasticsearchLoader.java | 28 +- .../ElasticsearchQueryRunner.java | 16 +- .../TestElasticsearchConfig.java | 2 +- .../TestPasswordAuthentication.java | 6 +- .../TestingElasticsearchConnectorFactory.java | 10 +- .../client/TestExtractAddress.java | 2 +- .../trino/plugin/example/ExampleColumn.java | 2 +- .../plugin/example/ExampleColumnHandle.java | 6 +- .../plugin/example/ExampleConnector.java | 14 +- .../example/ExampleConnectorFactory.java | 8 +- .../plugin/example/ExampleHandleResolver.java | 10 +- .../trino/plugin/example/ExampleMetadata.java | 20 +- .../trino/plugin/example/ExampleModule.java | 6 +- .../trino/plugin/example/ExamplePlugin.java | 4 +- .../plugin/example/ExampleRecordCursor.java | 12 +- .../plugin/example/ExampleRecordSet.java | 6 +- .../example/ExampleRecordSetProvider.java | 14 +- .../io/trino/plugin/example/ExampleSplit.java | 4 +- .../plugin/example/ExampleSplitManager.java | 18 +- .../io/trino/plugin/example/ExampleTable.java | 2 +- .../plugin/example/ExampleTableHandle.java | 4 +- .../example/ExampleTransactionHandle.java | 2 +- .../io/trino/plugin/example/MetadataUtil.java | 14 +- .../plugin/example/TestExampleClient.java | 6 +- .../example/TestExampleColumnHandle.java | 6 +- .../plugin/example/TestExampleMetadata.java | 18 +- .../plugin/example/TestExampleRecordSet.java | 8 +- .../example/TestExampleRecordSetProvider.java | 12 +- .../plugin/example/TestExampleSplit.java | 2 +- .../plugin/example/TestExampleTable.java | 8 +- .../io/trino/plugin/geospatial/BingTile.java | 4 +- .../plugin/geospatial/BingTileFunctions.java | 42 +- .../trino/plugin/geospatial/BingTileType.java | 8 +- .../geospatial/EncodedPolylineFunctions.java | 24 +- .../trino/plugin/geospatial/GeoFunctions.java | 76 +- .../io/trino/plugin/geospatial/GeoPlugin.java | 18 +- .../trino/plugin/geospatial/GeometryType.java | 12 +- .../trino/plugin/geospatial/KdbTreeCasts.java | 14 +- .../trino/plugin/geospatial/KdbTreeType.java | 14 +- .../SpatialPartitioningAggregateFunction.java | 18 +- ...PartitioningInternalAggregateFunction.java | 30 +- .../geospatial/SpatialPartitioningState.java | 6 +- .../SpatialPartitioningStateFactory.java | 12 +- .../SpatialPartitioningStateSerializer.java | 10 +- .../geospatial/SphericalGeographyType.java | 12 +- .../aggregation/ConvexHullAggregation.java | 28 +- .../geospatial/aggregation/GeometryState.java | 4 +- .../aggregation/GeometryStateFactory.java | 6 +- .../aggregation/GeometryStateSerializer.java | 12 +- .../aggregation/GeometryUnionAgg.java | 22 +- .../BenchmarkEnvelopeIntersection.java | 8 +- .../BenchmarkGeometryAggregations.java | 8 +- .../plugin/geospatial/BenchmarkSTArea.java | 6 +- .../geospatial/BenchmarkSTContains.java | 6 +- .../geospatial/BenchmarkSTEnvelope.java | 2 +- .../geospatial/BenchmarkSTIntersects.java | 10 +- .../plugin/geospatial/BenchmarkSTXMin.java | 6 +- .../geospatial/BenchmarkSpatialJoin.java | 14 +- .../plugin/geospatial/GeoQueryRunner.java | 4 +- .../geospatial/TestBingTileFunctions.java | 20 +- .../TestEncodedPolylineFunctions.java | 6 +- .../TestExtractSpatialInnerJoin.java | 26 +- .../TestExtractSpatialLeftJoin.java | 26 +- .../plugin/geospatial/TestGeoFunctions.java | 30 +- .../geospatial/TestGeoSpatialQueries.java | 16 +- .../plugin/geospatial/TestKdbTreeCasts.java | 10 +- .../plugin/geospatial/TestKdbTreeType.java | 14 +- ...RewriteSpatialPartitioningAggregation.java | 24 +- .../geospatial/TestSpatialJoinOperator.java | 82 +-- .../geospatial/TestSpatialJoinPlanning.java | 68 +- .../plugin/geospatial/TestSpatialJoins.java | 24 +- ...patialPartitioningInternalAggregation.java | 42 +- .../geospatial/TestSphericalGeoFunctions.java | 12 +- .../AbstractTestGeoAggregationFunctions.java | 22 +- .../TestGeometryStateSerializer.java | 14 +- .../TestGeometryUnionGeoAggregation.java | 2 +- .../plugin/google/sheets/SheetsClient.java | 12 +- .../plugin/google/sheets/SheetsColumn.java | 2 +- .../google/sheets/SheetsColumnHandle.java | 6 +- .../plugin/google/sheets/SheetsConnector.java | 14 +- .../google/sheets/SheetsConnectorFactory.java | 8 +- .../plugin/google/sheets/SheetsErrorCode.java | 12 +- .../google/sheets/SheetsHandleResolver.java | 10 +- .../plugin/google/sheets/SheetsMetadata.java | 24 +- .../plugin/google/sheets/SheetsModule.java | 6 +- .../plugin/google/sheets/SheetsPlugin.java | 4 +- .../google/sheets/SheetsRecordCursor.java | 12 +- .../plugin/google/sheets/SheetsRecordSet.java | 6 +- .../sheets/SheetsRecordSetProvider.java | 14 +- .../plugin/google/sheets/SheetsSplit.java | 4 +- .../google/sheets/SheetsSplitManager.java | 18 +- .../plugin/google/sheets/SheetsTable.java | 2 +- .../google/sheets/SheetsTableHandle.java | 4 +- .../sheets/SheetsTransactionHandle.java | 2 +- .../google/sheets/TestGoogleSheets.java | 14 +- .../google/sheets/TestSheetsPlugin.java | 10 +- .../trino/plugin/hive/HiveHadoop2Plugin.java | 4 +- .../hive/AbstractTestHiveFileSystemAbfs.java | 28 +- .../hive/AbstractTestHiveFileSystemS3.java | 4 +- .../plugin/hive/TestHiveAlluxioMetastore.java | 10 +- .../hive/TestHiveFileSystemAbfsAccessKey.java | 2 +- .../hive/TestHiveFileSystemAbfsOAuth.java | 2 +- .../plugin/hive/TestHiveFileSystemAdl.java | 4 +- .../plugin/hive/TestHiveFileSystemWasb.java | 4 +- .../plugin/hive/TestHiveHadoop2Plugin.java | 12 +- ...stCachingHiveMetastoreWithQueryRunner.java | 14 +- .../TestHiveFileSystemS3SelectPushdown.java | 2 +- .../hive/BackgroundHiveSplitLoader.java | 84 +-- .../plugin/hive/CachingDirectoryLister.java | 4 +- .../io/trino/plugin/hive/DirectoryLister.java | 2 +- .../hive/DynamicConfigurationProvider.java | 2 +- .../java/io/trino/plugin/hive/FileWriter.java | 2 +- .../plugin/hive/GenericHiveRecordCursor.java | 66 +- .../hive/GenericHiveRecordCursorProvider.java | 16 +- .../trino/plugin/hive/HdfsConfiguration.java | 2 +- .../hive/HdfsConfigurationInitializer.java | 4 +- .../io/trino/plugin/hive/HdfsEnvironment.java | 8 +- .../plugin/hive/HiveAnalyzeProperties.java | 12 +- .../plugin/hive/HiveApplyProjectionUtil.java | 8 +- .../hive/HiveBucketAdapterRecordCursor.java | 20 +- .../trino/plugin/hive/HiveBucketFunction.java | 8 +- .../trino/plugin/hive/HiveBucketHandle.java | 2 +- .../trino/plugin/hive/HiveBucketProperty.java | 10 +- .../HiveBucketValidationRecordCursor.java | 20 +- .../plugin/hive/HiveCoercionRecordCursor.java | 42 +- .../trino/plugin/hive/HiveColumnHandle.java | 30 +- .../plugin/hive/HiveColumnProjectionInfo.java | 2 +- .../plugin/hive/HiveCompressionCodec.java | 2 +- .../java/io/trino/plugin/hive/HiveConfig.java | 6 +- .../io/trino/plugin/hive/HiveConnector.java | 36 +- .../plugin/hive/HiveConnectorFactory.java | 6 +- .../trino/plugin/hive/HiveDecimalParser.java | 4 +- .../io/trino/plugin/hive/HiveErrorCode.java | 12 +- .../plugin/hive/HiveFileWriterFactory.java | 6 +- .../trino/plugin/hive/HiveHandleResolver.java | 16 +- .../plugin/hive/HiveHdfsConfiguration.java | 6 +- .../plugin/hive/HiveInsertTableHandle.java | 6 +- .../plugin/hive/HiveLocationService.java | 36 +- .../io/trino/plugin/hive/HiveMetadata.java | 382 +++++----- .../plugin/hive/HiveMetadataFactory.java | 16 +- .../plugin/hive/HiveMetastoreClosure.java | 36 +- .../java/io/trino/plugin/hive/HiveModule.java | 44 +- .../hive/HiveNodePartitioningProvider.java | 20 +- .../plugin/hive/HiveNotReadableException.java | 8 +- .../plugin/hive/HiveOutputTableHandle.java | 6 +- .../io/trino/plugin/hive/HivePageSink.java | 26 +- .../plugin/hive/HivePageSinkProvider.java | 30 +- .../io/trino/plugin/hive/HivePageSource.java | 164 ++--- .../plugin/hive/HivePageSourceFactory.java | 6 +- .../plugin/hive/HivePageSourceProvider.java | 74 +- .../io/trino/plugin/hive/HivePartition.java | 6 +- .../plugin/hive/HivePartitionHandle.java | 2 +- .../plugin/hive/HivePartitionManager.java | 40 +- .../plugin/hive/HivePartitionMetadata.java | 2 +- .../plugin/hive/HivePartitionResult.java | 6 +- .../plugin/hive/HivePartitioningHandle.java | 4 +- .../plugin/hive/HiveQlToPrestoTranslator.java | 4 +- .../plugin/hive/HiveReadOnlyException.java | 8 +- ...ReaderProjectionsAdaptingRecordCursor.java | 10 +- .../trino/plugin/hive/HiveRecordCursor.java | 78 +-- .../plugin/hive/HiveRecordCursorProvider.java | 8 +- .../plugin/hive/HiveSchemaProperties.java | 6 +- .../plugin/hive/HiveSessionProperties.java | 34 +- .../java/io/trino/plugin/hive/HiveSplit.java | 8 +- .../trino/plugin/hive/HiveSplitManager.java | 70 +- .../io/trino/plugin/hive/HiveSplitSource.java | 38 +- .../trino/plugin/hive/HiveStorageFormat.java | 4 +- .../io/trino/plugin/hive/HiveTableHandle.java | 14 +- .../plugin/hive/HiveTableProperties.java | 34 +- .../plugin/hive/HiveTransactionHandle.java | 2 +- .../plugin/hive/HiveTransactionManager.java | 4 +- .../java/io/trino/plugin/hive/HiveType.java | 20 +- .../plugin/hive/HiveUpdatablePageSource.java | 42 +- .../hive/HiveViewNotSupportedException.java | 4 +- .../plugin/hive/HiveWritableTableHandle.java | 6 +- .../java/io/trino/plugin/hive/HiveWriter.java | 4 +- .../trino/plugin/hive/HiveWriterFactory.java | 86 +-- .../plugin/hive/HiveWrittenPartitions.java | 2 +- .../hive/InternalHiveConnectorFactory.java | 72 +- .../trino/plugin/hive/InternalHiveSplit.java | 6 +- .../trino/plugin/hive/IonSqlQueryBuilder.java | 28 +- .../plugin/hive/LegacyHiveViewReader.java | 16 +- .../io/trino/plugin/hive/LocationService.java | 8 +- .../hive/PartitionNotFoundException.java | 4 +- .../hive/PartitionOfflineException.java | 6 +- .../plugin/hive/PartitionStatistics.java | 2 +- .../io/trino/plugin/hive/PartitionUpdate.java | 4 +- .../trino/plugin/hive/RcFileFileWriter.java | 28 +- .../plugin/hive/RcFileFileWriterFactory.java | 38 +- .../io/trino/plugin/hive/ReaderColumns.java | 2 +- .../trino/plugin/hive/ReaderPageSource.java | 2 +- .../plugin/hive/ReaderProjectionsAdapter.java | 18 +- .../trino/plugin/hive/RecordFileWriter.java | 36 +- .../hive/RoleAlreadyExistsException.java | 4 +- .../hive/SchemaAlreadyExistsException.java | 4 +- .../trino/plugin/hive/SortingFileWriter.java | 34 +- .../hive/TableAlreadyExistsException.java | 6 +- .../plugin/hive/TableOfflineException.java | 6 +- .../plugin/hive/TransactionalMetadata.java | 2 +- .../hive/ViewAlreadyExistsException.java | 6 +- .../io/trino/plugin/hive/ViewReaderUtil.java | 32 +- .../trino/plugin/hive/acid/AcidOperation.java | 2 +- .../io/trino/plugin/hive/acid/AcidSchema.java | 18 +- .../plugin/hive/acid/AcidTransaction.java | 10 +- .../authentication/AuthenticationModules.java | 8 +- .../CachingKerberosHadoopAuthentication.java | 4 +- .../DirectHdfsAuthentication.java | 4 +- .../HiveAuthenticationModule.java | 10 +- .../hive/authentication/HiveIdentity.java | 4 +- .../ImpersonatingHdfsAuthentication.java | 4 +- .../KerberosHadoopAuthentication.java | 6 +- .../plugin/hive/avro/AvroRecordWriter.java | 2 +- .../plugin/hive/azure/HiveAzureModule.java | 2 +- .../PrestoAzureConfigurationInitializer.java | 2 +- .../hive/coercions/DecimalCoercers.java | 40 +- .../hive/coercions/DoubleToFloatCoercer.java | 12 +- .../hive/coercions/FloatToDoubleCoercer.java | 12 +- .../IntegerNumberToVarcharCoercer.java | 8 +- .../IntegerNumberUpscaleCoercer.java | 6 +- .../plugin/hive/coercions/TypeCoercer.java | 6 +- .../plugin/hive/coercions/VarcharCoercer.java | 10 +- .../VarcharToIntegerNumberCoercer.java | 20 +- .../hive/gcs/GcsConfigurationProvider.java | 8 +- .../GoogleGcsConfigurationInitializer.java | 2 +- .../trino/plugin/hive/gcs/HiveGcsModule.java | 6 +- .../trino/plugin/hive/metastore/Column.java | 2 +- .../CoralSemiTransactionalHiveMSCAdapter.java | 4 +- .../trino/plugin/hive/metastore/Database.java | 2 +- .../plugin/hive/metastore/HiveMetastore.java | 22 +- .../hive/metastore/HiveMetastoreModule.java | 12 +- .../hive/metastore/HivePageSinkMetadata.java | 2 +- .../HivePageSinkMetadataProvider.java | 6 +- .../hive/metastore/HivePartitionName.java | 2 +- .../plugin/hive/metastore/HivePrincipal.java | 8 +- .../hive/metastore/HivePrivilegeInfo.java | 12 +- .../hive/metastore/HiveTransaction.java | 10 +- .../plugin/hive/metastore/MetastoreUtil.java | 62 +- .../plugin/hive/metastore/Partition.java | 4 +- .../hive/metastore/PartitionFilter.java | 4 +- .../metastore/PartitionWithStatistics.java | 4 +- .../hive/metastore/PrincipalPrivileges.java | 4 +- .../metastore/RecordingHiveMetastore.java | 30 +- .../RecordingHiveMetastoreModule.java | 14 +- .../SemiTransactionalHiveMetastore.java | 90 +-- .../plugin/hive/metastore/SortingColumn.java | 10 +- .../trino/plugin/hive/metastore/Storage.java | 2 +- .../plugin/hive/metastore/StorageFormat.java | 8 +- .../io/trino/plugin/hive/metastore/Table.java | 2 +- .../WriteHiveMetastoreRecordingProcedure.java | 4 +- .../alluxio/AlluxioHiveMetastore.java | 50 +- .../alluxio/AlluxioMetastoreModule.java | 2 +- .../hive/metastore/alluxio/ProtoUtils.java | 46 +- .../metastore/cache/CachingHiveMetastore.java | 64 +- .../cache/CachingHiveMetastoreModule.java | 8 +- .../hive/metastore/file/DatabaseMetadata.java | 4 +- .../metastore/file/FileHiveMetastore.java | 114 +-- .../file/FileHiveMetastoreConfig.java | 2 +- .../metastore/file/FileMetastoreModule.java | 6 +- .../metastore/file/PartitionMetadata.java | 24 +- .../metastore/file/PermissionMetadata.java | 8 +- .../hive/metastore/file/TableMetadata.java | 16 +- ...faultGlueMetastoreTableFilterProvider.java | 6 +- .../DisabledGlueColumnStatisticsProvider.java | 14 +- .../glue/GlueColumnStatisticsProvider.java | 10 +- .../metastore/glue/GlueExpressionUtil.java | 22 +- .../metastore/glue/GlueHiveMetastore.java | 92 +-- .../metastore/glue/GlueMetastoreModule.java | 10 +- .../metastore/glue/GlueMetastoreStats.java | 2 +- .../glue/converter/GlueInputConverter.java | 20 +- .../glue/converter/GlueToPrestoConverter.java | 32 +- .../thrift/BridgingHiveMetastore.java | 70 +- .../DefaultThriftMetastoreClientFactory.java | 4 +- .../FailureAwareThriftMetastoreClient.java | 2 +- .../KerberosHiveMetastoreAuthentication.java | 8 +- .../thrift/NoHiveMetastoreAuthentication.java | 2 +- .../thrift/StaticMetastoreLocator.java | 6 +- .../metastore/thrift/ThriftHiveMetastore.java | 100 +-- .../thrift/ThriftHiveMetastoreClient.java | 10 +- .../metastore/thrift/ThriftMetastore.java | 32 +- .../ThriftMetastoreAuthenticationConfig.java | 2 +- .../ThriftMetastoreAuthenticationModule.java | 14 +- .../thrift/ThriftMetastoreClient.java | 2 +- .../thrift/ThriftMetastoreConfig.java | 2 +- .../thrift/ThriftMetastoreModule.java | 8 +- .../metastore/thrift/ThriftMetastoreUtil.java | 130 ++-- .../hive/metastore/thrift/Transport.java | 2 +- .../plugin/hive/orc/HdfsOrcDataSource.java | 18 +- .../hive/orc/OrcDeleteDeltaPageSource.java | 48 +- .../orc/OrcDeleteDeltaPageSourceFactory.java | 10 +- .../trino/plugin/hive/orc/OrcDeletedRows.java | 26 +- .../trino/plugin/hive/orc/OrcFileWriter.java | 48 +- .../plugin/hive/orc/OrcFileWriterFactory.java | 78 +-- .../trino/plugin/hive/orc/OrcPageSource.java | 56 +- .../plugin/hive/orc/OrcPageSourceFactory.java | 112 +-- .../plugin/hive/orc/OrcReaderConfig.java | 2 +- .../hive/orc/OrcTypeToHiveTypeTranslator.java | 30 +- .../plugin/hive/orc/OrcWriterConfig.java | 4 +- .../plugin/hive/orc/OriginalFilesUtils.java | 20 +- .../hive/parquet/HdfsParquetDataSource.java | 18 +- .../parquet/ParquetColumnIOConverter.java | 26 +- .../hive/parquet/ParquetFileWriter.java | 22 +- .../parquet/ParquetFileWriterFactory.java | 32 +- .../hive/parquet/ParquetPageSource.java | 26 +- .../parquet/ParquetPageSourceFactory.java | 84 +-- .../hive/parquet/ParquetReaderConfig.java | 2 +- .../hive/parquet/ParquetRecordWriter.java | 8 +- .../hive/parquet/ParquetWriterConfig.java | 2 +- .../CreateEmptyPartitionProcedure.java | 48 +- .../hive/procedure/DropStatsProcedure.java | 44 +- .../hive/procedure/HiveProcedureModule.java | 2 +- .../plugin/hive/procedure/Procedures.java | 8 +- .../procedure/RegisterPartitionProcedure.java | 58 +- .../SyncPartitionMetadataProcedure.java | 50 +- .../UnregisterPartitionProcedure.java | 42 +- .../hive/rcfile/HdfsRcFileDataSource.java | 6 +- .../plugin/hive/rcfile/RcFilePageSource.java | 30 +- .../hive/rcfile/RcFilePageSourceFactory.java | 74 +- .../hive/rubix/CachingPrestoS3FileSystem.java | 2 +- .../hive/rubix/PrestoClusterManager.java | 6 +- .../rubix/RubixConfigurationInitializer.java | 4 +- .../hive/rubix/RubixHdfsInitializer.java | 2 +- .../plugin/hive/rubix/RubixInitializer.java | 28 +- .../trino/plugin/hive/rubix/RubixModule.java | 4 +- .../io/trino/plugin/hive/s3/HiveS3Module.java | 10 +- .../s3/PrestoS3ConfigurationInitializer.java | 66 +- .../plugin/hive/s3/PrestoS3FileSystem.java | 6 +- .../s3/PrestoS3FileSystemMetricCollector.java | 2 +- .../plugin/hive/s3/S3SecurityMapping.java | 4 +- ...3SecurityMappingConfigurationProvider.java | 18 +- .../plugin/hive/s3/S3SecurityMappings.java | 2 +- .../hive/s3select/PrestoS3ClientFactory.java | 30 +- .../s3select/S3SelectCsvRecordReader.java | 2 +- .../s3select/S3SelectLineRecordReader.java | 14 +- .../hive/s3select/S3SelectPushdown.java | 22 +- .../hive/s3select/S3SelectRecordCursor.java | 4 +- .../S3SelectRecordCursorProvider.java | 26 +- .../hive/security/AccessControlMetadata.java | 16 +- .../AccessControlMetadataFactory.java | 2 +- .../hive/security/AllowAllSecurityModule.java | 4 +- .../hive/security/HiveSecurityModule.java | 4 +- .../hive/security/LegacyAccessControl.java | 38 +- .../hive/security/LegacySecurityModule.java | 2 +- .../security/SqlStandardAccessControl.java | 136 ++-- .../SqlStandardAccessControlMetadata.java | 42 +- .../security/SqlStandardSecurityModule.java | 4 +- .../SystemTableAwareAccessControl.java | 16 +- .../statistics/HiveStatisticsProvider.java | 12 +- .../MetastoreHiveStatisticsProvider.java | 78 +-- .../testing/TestingHiveConnectorFactory.java | 14 +- .../hive/testing/TestingHivePlugin.java | 6 +- .../plugin/hive/util/BlockJsonSerde.java | 4 +- .../hive/util/CompressionConfigUtil.java | 2 +- .../trino/plugin/hive/util/DecimalUtils.java | 4 +- .../plugin/hive/util/FieldSetterFactory.java | 48 +- .../hive/util/ForwardingRecordCursor.java | 4 +- .../hive/util/HiveBlockEncodingSerde.java | 54 +- .../trino/plugin/hive/util/HiveBucketing.java | 48 +- .../plugin/hive/util/HiveBucketingV1.java | 6 +- .../plugin/hive/util/HiveBucketingV2.java | 6 +- .../plugin/hive/util/HiveCoercionPolicy.java | 24 +- .../plugin/hive/util/HiveFileIterator.java | 12 +- .../plugin/hive/util/HiveTypeTranslator.java | 88 +-- .../io/trino/plugin/hive/util/HiveUtil.java | 130 ++-- .../plugin/hive/util/HiveWriteUtils.java | 106 +-- .../hive/util/InternalHiveSplitFactory.java | 30 +- .../plugin/hive/util/MergingPageIterator.java | 24 +- .../hive/util/SequenceFileRecordWriter.java | 2 +- .../io/trino/plugin/hive/util/SerDeUtils.java | 16 +- .../io/trino/plugin/hive/util/SortBuffer.java | 14 +- .../io/trino/plugin/hive/util/Statistics.java | 74 +- .../trino/plugin/hive/util/SystemTables.java | 12 +- .../plugin/hive/util/TempFileReader.java | 22 +- .../plugin/hive/util/TempFileWriter.java | 18 +- .../plugin/hive/util/TextRecordWriter.java | 2 +- .../trino/plugin/hive/AbstractTestHive.java | 386 +++++------ .../hive/AbstractTestHiveFileFormats.java | 112 +-- .../hive/AbstractTestHiveFileSystem.java | 126 ++-- .../plugin/hive/AbstractTestHiveLocal.java | 18 +- .../plugin/hive/HiveBenchmarkQueryRunner.java | 24 +- .../io/trino/plugin/hive/HiveQueryRunner.java | 42 +- .../io/trino/plugin/hive/HiveTestUtils.java | 82 +-- .../hive/TestBackgroundHiveSplitLoader.java | 76 +- .../plugin/hive/TestFileSystemCache.java | 4 +- .../hive/TestHiveApplyProjectionUtil.java | 18 +- .../plugin/hive/TestHiveBooleanParser.java | 2 +- .../plugin/hive/TestHiveColumnHandle.java | 28 +- .../io/trino/plugin/hive/TestHiveConfig.java | 6 +- .../plugin/hive/TestHiveConnectorFactory.java | 14 +- .../hive/TestHiveCreateExternalTable.java | 8 +- .../TestHiveCreateExternalTableDisabled.java | 4 +- .../plugin/hive/TestHiveDecimalParser.java | 2 +- .../hive/TestHiveDistributedAggregations.java | 4 +- .../hive/TestHiveDistributedJoinQueries.java | 18 +- ...tedJoinQueriesWithoutDynamicFiltering.java | 4 +- .../TestHiveDistributedOrderByQueries.java | 4 +- .../hive/TestHiveDistributedQueries.java | 10 +- .../TestHiveDistributedWindowQueries.java | 4 +- .../hive/TestHiveDynamicPartitionPruning.java | 40 +- .../hive/TestHiveFileBasedSecurity.java | 8 +- .../plugin/hive/TestHiveFileFormats.java | 72 +- .../plugin/hive/TestHiveFileMetastore.java | 10 +- .../hive/TestHiveInMemoryMetastore.java | 8 +- .../hive/TestHiveIntegrationSmokeTest.java | 172 ++--- .../plugin/hive/TestHiveLocationService.java | 12 +- .../trino/plugin/hive/TestHiveMetadata.java | 16 +- .../trino/plugin/hive/TestHivePageSink.java | 88 +-- .../plugin/hive/TestHiveQlTranslation.java | 12 +- .../hive/TestHiveReaderProjectionsUtil.java | 26 +- .../io/trino/plugin/hive/TestHiveRoles.java | 20 +- .../io/trino/plugin/hive/TestHiveSplit.java | 16 +- .../plugin/hive/TestHiveSplitSource.java | 12 +- .../plugin/hive/TestHiveWriterFactory.java | 2 +- .../plugin/hive/TestIonSqlQueryBuilder.java | 54 +- .../TestNodeLocalDynamicSplitPruning.java | 44 +- .../hive/TestOrcPageSourceMemoryTracking.java | 92 +-- .../plugin/hive/TestOrcWriterConfig.java | 4 +- .../plugin/hive/TestOriginalFilesUtils.java | 10 +- .../hive/TestPartitionOfflineException.java | 2 +- .../plugin/hive/TestPartitionUpdate.java | 2 +- .../trino/plugin/hive/TestReaderColumns.java | 16 +- .../hive/TestReaderProjectionsAdapter.java | 36 +- .../io/trino/plugin/hive/TestShowStats.java | 4 +- .../hive/TestTableOfflineException.java | 2 +- .../hive/TestTableToPartitionMapping.java | 2 +- .../TestHiveAuthenticationConfig.java | 2 +- .../benchmark/BenchmarkHiveFileFormat.java | 30 +- .../BenchmarkProjectionPushdownHive.java | 42 +- .../plugin/hive/benchmark/FileFormat.java | 110 +-- .../plugin/hive/benchmark/FormatWriter.java | 2 +- .../trino/plugin/hive/benchmark/TestData.java | 4 +- .../TestHiveFileFormatBenchmark.java | 6 +- .../hive/metastore/TestMetastoreUtil.java | 24 +- .../metastore/TestPrincipalPrivileges.java | 4 +- .../metastore/TestRecordingHiveMetastore.java | 54 +- .../TestSemiTransactionalHiveMetastore.java | 20 +- .../metastore/UnimplementedHiveMetastore.java | 16 +- .../metastore/alluxio/TestProtoUtils.java | 22 +- .../cache/TestCachingHiveMetastore.java | 84 +-- .../file/TestFileHiveMetastoreConfig.java | 4 +- .../glue/PartitionFilterBuilder.java | 22 +- .../glue/TestGlueExpressionUtil.java | 18 +- .../glue/TestGlueInputConverter.java | 20 +- .../glue/TestGlueToPrestoConverter.java | 20 +- .../metastore/glue/TestHiveGlueMetastore.java | 54 +- .../glue/TestingMetastoreObjects.java | 8 +- .../thrift/InMemoryThriftMetastore.java | 42 +- .../thrift/MockThriftMetastoreClient.java | 2 +- ...TestFailureAwareThriftMetastoreClient.java | 4 +- ...stThriftMetastoreAuthenticationConfig.java | 2 +- .../thrift/TestThriftMetastoreUtil.java | 32 +- .../thrift/TestingMetastoreLocator.java | 2 +- .../TestConnectorPushdownRulesWithHive.java | 98 +-- ...stHiveProjectionPushdownIntoTableScan.java | 74 +- .../orc/TestOrcDeleteDeltaPageSource.java | 16 +- .../plugin/hive/orc/TestOrcDeletedRows.java | 22 +- .../hive/orc/TestOrcPageSourceFactory.java | 42 +- .../plugin/hive/orc/TestOrcPredicates.java | 46 +- .../parquet/AbstractTestParquetReader.java | 58 +- .../plugin/hive/parquet/ParquetTester.java | 108 +-- .../parquet/TestParquetDecimalScaling.java | 14 +- .../plugin/hive/parquet/TestTimestamp.java | 20 +- .../hive/parquet/TestTimestampMicros.java | 44 +- .../predicate/TestParquetPredicateUtils.java | 34 +- .../plugin/hive/rubix/TestRubixCaching.java | 46 +- .../hive/s3/TestPrestoS3FileSystem.java | 46 +- .../plugin/hive/s3/TestS3SecurityMapping.java | 36 +- .../s3select/TestS3SelectRecordCursor.java | 20 +- ...TestUnrecoverableS3OperationException.java | 2 +- .../security/TestLegacyAccessControl.java | 4 +- .../TestSqlStandardAccessControl.java | 4 +- .../BenchmarkGetPartitionsSample.java | 6 +- .../TestMetastoreHiveStatisticsProvider.java | 114 +-- .../plugin/hive/util/TestAsyncQueue.java | 2 +- .../hive/util/TestFSDataInputStreamTail.java | 4 +- .../hive/util/TestForwardingRecordCursor.java | 4 +- .../plugin/hive/util/TestHiveBucketing.java | 52 +- .../hive/util/TestHiveTypeTranslator.java | 46 +- .../trino/plugin/hive/util/TestHiveUtil.java | 14 +- .../plugin/hive/util/TestHiveWriteUtils.java | 10 +- ...ingInvocationHandlerWithHiveMetastore.java | 4 +- .../hive/util/TestMergingPageIterator.java | 12 +- .../plugin/hive/util/TestSerDeUtils.java | 52 +- .../plugin/hive/util/TestStatistics.java | 48 +- .../plugin/iceberg/ExpressionConverter.java | 50 +- .../io/trino/plugin/iceberg/FilesTable.java | 36 +- .../io/trino/plugin/iceberg/HdfsFileIo.java | 8 +- .../trino/plugin/iceberg/HdfsInputFile.java | 8 +- .../trino/plugin/iceberg/HdfsOutputFile.java | 8 +- .../io/trino/plugin/iceberg/HistoryTable.java | 28 +- .../plugin/iceberg/HiveTableOperations.java | 34 +- .../plugin/iceberg/IcebergColumnHandle.java | 4 +- .../trino/plugin/iceberg/IcebergConfig.java | 6 +- .../plugin/iceberg/IcebergConnector.java | 40 +- .../iceberg/IcebergConnectorFactory.java | 6 +- .../plugin/iceberg/IcebergErrorCode.java | 12 +- .../plugin/iceberg/IcebergFileWriter.java | 2 +- .../iceberg/IcebergFileWriterFactory.java | 72 +- .../plugin/iceberg/IcebergHandleResolver.java | 16 +- .../trino/plugin/iceberg/IcebergMetadata.java | 154 ++-- .../iceberg/IcebergMetadataFactory.java | 6 +- .../iceberg/IcebergMetastoreModule.java | 4 +- .../trino/plugin/iceberg/IcebergModule.java | 28 +- .../plugin/iceberg/IcebergOrcFileWriter.java | 40 +- .../trino/plugin/iceberg/IcebergPageSink.java | 64 +- .../iceberg/IcebergPageSinkProvider.java | 18 +- .../plugin/iceberg/IcebergPageSource.java | 56 +- .../iceberg/IcebergPageSourceProvider.java | 128 ++-- .../iceberg/IcebergParquetFileWriter.java | 10 +- .../trino/plugin/iceberg/IcebergPlugin.java | 4 +- .../iceberg/IcebergSchemaProperties.java | 4 +- .../iceberg/IcebergSessionProperties.java | 30 +- .../io/trino/plugin/iceberg/IcebergSplit.java | 4 +- .../plugin/iceberg/IcebergSplitManager.java | 24 +- .../plugin/iceberg/IcebergSplitSource.java | 8 +- .../plugin/iceberg/IcebergTableHandle.java | 6 +- .../plugin/iceberg/IcebergTableName.java | 4 +- .../iceberg/IcebergTableProperties.java | 10 +- .../iceberg/IcebergTransactionManager.java | 4 +- .../io/trino/plugin/iceberg/IcebergUtil.java | 22 +- .../iceberg/IcebergWritableTableHandle.java | 4 +- .../InternalIcebergConnectorFactory.java | 50 +- .../trino/plugin/iceberg/ManifestsTable.java | 40 +- .../trino/plugin/iceberg/PartitionTable.java | 40 +- .../plugin/iceberg/PartitionTransforms.java | 48 +- .../iceberg/RollbackToSnapshotProcedure.java | 18 +- .../trino/plugin/iceberg/SnapshotsTable.java | 34 +- .../plugin/iceberg/TableStatisticsMaker.java | 30 +- .../trino/plugin/iceberg/TypeConverter.java | 58 +- .../iceberg/UnknownTableTypeException.java | 6 +- .../plugin/iceberg/util/PageListBuilder.java | 26 +- .../iceberg/util/PrimitiveTypeMapBuilder.java | 14 +- .../trino/plugin/iceberg/util/Timestamps.java | 14 +- .../iceberg/AbstractTestIcebergSmoke.java | 60 +- .../plugin/iceberg/IcebergQueryRunner.java | 12 +- .../plugin/iceberg/TestIcebergConfig.java | 8 +- .../iceberg/TestIcebergConnectorFactory.java | 4 +- .../iceberg/TestIcebergDistributed.java | 8 +- .../iceberg/TestIcebergMaterializedViews.java | 18 +- .../iceberg/TestIcebergMetadataListing.java | 38 +- .../TestIcebergOrcMetricsCollection.java | 46 +- .../iceberg/TestIcebergSystemTables.java | 36 +- .../plugin/iceberg/TestIcebergTableName.java | 4 +- .../plugin/iceberg/TestPartitionFields.java | 6 +- .../iceberg/TestPartitionTransforms.java | 8 +- .../TestingIcebergConnectorFactory.java | 12 +- .../plugin/iceberg/TestingIcebergPlugin.java | 6 +- .../io/trino/plugin/jmx/JmxColumnHandle.java | 6 +- .../io/trino/plugin/jmx/JmxConnector.java | 10 +- .../trino/plugin/jmx/JmxConnectorFactory.java | 12 +- .../io/trino/plugin/jmx/JmxErrorCode.java | 8 +- .../trino/plugin/jmx/JmxHandleResolver.java | 10 +- .../trino/plugin/jmx/JmxHistoricalData.java | 2 +- .../java/io/trino/plugin/jmx/JmxMetadata.java | 42 +- .../trino/plugin/jmx/JmxPeriodicSampler.java | 2 +- .../java/io/trino/plugin/jmx/JmxPlugin.java | 4 +- .../plugin/jmx/JmxRecordSetProvider.java | 24 +- .../java/io/trino/plugin/jmx/JmxSplit.java | 4 +- .../io/trino/plugin/jmx/JmxSplitManager.java | 30 +- .../io/trino/plugin/jmx/JmxTableHandle.java | 10 +- .../plugin/jmx/JmxTransactionHandle.java | 2 +- .../io/trino/plugin/jmx/JmxQueryRunner.java | 8 +- .../io/trino/plugin/jmx/MetadataUtil.java | 8 +- .../trino/plugin/jmx/TestJmxColumnHandle.java | 6 +- .../io/trino/plugin/jmx/TestJmxMetadata.java | 32 +- .../io/trino/plugin/jmx/TestJmxQueries.java | 14 +- .../io/trino/plugin/jmx/TestJmxSplit.java | 4 +- .../trino/plugin/jmx/TestJmxSplitManager.java | 48 +- .../trino/plugin/jmx/TestJmxTableHandle.java | 14 +- .../trino/plugin/kafka/KafkaColumnHandle.java | 8 +- .../io/trino/plugin/kafka/KafkaConfig.java | 4 +- .../io/trino/plugin/kafka/KafkaConnector.java | 20 +- .../plugin/kafka/KafkaConnectorFactory.java | 12 +- .../plugin/kafka/KafkaConnectorModule.java | 30 +- .../io/trino/plugin/kafka/KafkaErrorCode.java | 10 +- .../plugin/kafka/KafkaFilterManager.java | 28 +- .../plugin/kafka/KafkaHandleResolver.java | 12 +- .../kafka/KafkaInternalFieldManager.java | 22 +- .../io/trino/plugin/kafka/KafkaMetadata.java | 40 +- .../io/trino/plugin/kafka/KafkaPageSink.java | 10 +- .../plugin/kafka/KafkaPageSinkProvider.java | 22 +- .../io/trino/plugin/kafka/KafkaPlugin.java | 4 +- .../io/trino/plugin/kafka/KafkaRecordSet.java | 50 +- .../plugin/kafka/KafkaRecordSetProvider.java | 20 +- .../plugin/kafka/KafkaSessionProperties.java | 4 +- .../io/trino/plugin/kafka/KafkaSplit.java | 4 +- .../trino/plugin/kafka/KafkaSplitManager.java | 22 +- .../trino/plugin/kafka/KafkaTableHandle.java | 10 +- .../kafka/KafkaTopicFieldDescription.java | 4 +- .../plugin/kafka/KafkaTransactionHandle.java | 2 +- .../kafka/PlainTextKafkaAdminFactory.java | 2 +- .../kafka/PlainTextKafkaConsumerFactory.java | 2 +- .../kafka/PlainTextKafkaProducerFactory.java | 2 +- .../kafka/SessionPropertiesProvider.java | 2 +- .../kafka/encoder/AbstractRowEncoder.java | 50 +- .../encoder/DispatchingRowEncoderFactory.java | 2 +- .../kafka/encoder/EncoderColumnHandle.java | 4 +- .../plugin/kafka/encoder/EncoderModule.java | 14 +- .../plugin/kafka/encoder/RowEncoder.java | 2 +- .../kafka/encoder/RowEncoderFactory.java | 2 +- .../kafka/encoder/avro/AvroEncoderModule.java | 4 +- .../kafka/encoder/avro/AvroRowEncoder.java | 20 +- .../encoder/avro/AvroRowEncoderFactory.java | 8 +- .../kafka/encoder/csv/CsvRowEncoder.java | 24 +- .../encoder/csv/CsvRowEncoderFactory.java | 8 +- .../kafka/encoder/json/JsonRowEncoder.java | 50 +- .../encoder/json/JsonRowEncoderFactory.java | 8 +- .../json/format/CustomDateTimeFormatter.java | 30 +- .../encoder/json/format/DateTimeFormat.java | 2 +- .../json/format/ISO8601DateTimeFormatter.java | 40 +- .../json/format/JsonDateTimeFormatter.java | 10 +- .../MillisecondsSinceEpochFormatter.java | 16 +- .../json/format/RFC2822DateTimeFormatter.java | 10 +- .../format/SecondsSinceEpochFormatter.java | 18 +- .../json/format/util/TimeConversions.java | 2 +- .../kafka/encoder/raw/RawRowEncoder.java | 24 +- .../encoder/raw/RawRowEncoderFactory.java | 8 +- .../schema/AbstractContentSchemaReader.java | 2 +- .../kafka/schema/ContentSchemaReader.java | 2 +- .../MapBasedTableDescriptionSupplier.java | 6 +- .../schema/TableDescriptionSupplier.java | 6 +- .../AvroConfluentContentSchemaReader.java | 6 +- .../schema/confluent/AvroSchemaConverter.java | 26 +- .../schema/confluent/AvroSchemaParser.java | 14 +- .../ConfluentAvroReaderSupplier.java | 6 +- .../schema/confluent/ConfluentModule.java | 32 +- .../ConfluentSchemaRegistryConfig.java | 6 +- ...chemaRegistryTableDescriptionSupplier.java | 16 +- .../confluent/ConfluentSessionProperties.java | 10 +- .../kafka/schema/confluent/SchemaParser.java | 4 +- .../schema/file/FileContentSchemaReader.java | 6 +- .../file/FileTableDescriptionSupplier.java | 14 +- .../FileTableDescriptionSupplierModule.java | 8 +- .../trino/plugin/kafka/KafkaQueryRunner.java | 28 +- .../plugin/kafka/KafkaQueryRunnerBuilder.java | 8 +- .../trino/plugin/kafka/TestKafkaConfig.java | 2 +- .../plugin/kafka/TestKafkaDistributed.java | 6 +- .../kafka/TestKafkaDistributedLatest.java | 6 +- .../plugin/kafka/TestKafkaFilterManager.java | 10 +- .../kafka/TestKafkaIntegrationPushDown.java | 22 +- .../kafka/TestKafkaIntegrationSmokeTest.java | 42 +- .../kafka/TestKafkaInternalFieldManager.java | 6 +- .../trino/plugin/kafka/TestKafkaPlugin.java | 6 +- .../kafka/TestMinimalFunctionality.java | 12 +- .../json/TestCustomJsonDateTimeFormatter.java | 30 +- .../TestISO8601JsonDateTimeFormatter.java | 30 +- .../kafka/encoder/json/TestJsonEncoder.java | 52 +- ...TestMillisecondsJsonDateTimeFormatter.java | 18 +- .../TestRFC2822JsonDateTimeFormatter.java | 18 +- .../TestSecondsJsonDateTimeFormatter.java | 16 +- .../encoder/raw/TestRawEncoderMapping.java | 20 +- ...ithConfluentSchemaRegistryQueryRunner.java | 6 +- .../TestAvroConfluentContentSchemaReader.java | 8 +- .../TestAvroConfluentRowDecoder.java | 22 +- .../confluent/TestAvroSchemaConverter.java | 34 +- .../TestConfluentSchemaRegistryConfig.java | 4 +- ...entSchemaRegistryMinimalFunctionality.java | 8 +- .../plugin/kafka/util/CodecSupplier.java | 6 +- .../io/trino/plugin/kafka/util/TestUtils.java | 4 +- .../plugin/kinesis/KinesisColumnHandle.java | 6 +- .../plugin/kinesis/KinesisConnector.java | 18 +- .../kinesis/KinesisConnectorFactory.java | 14 +- .../plugin/kinesis/KinesisErrorCode.java | 10 +- .../plugin/kinesis/KinesisHandleResolver.java | 10 +- .../KinesisInternalFieldDescription.java | 12 +- .../trino/plugin/kinesis/KinesisMetadata.java | 22 +- .../trino/plugin/kinesis/KinesisModule.java | 10 +- .../trino/plugin/kinesis/KinesisPlugin.java | 4 +- .../plugin/kinesis/KinesisRecordSet.java | 40 +- .../kinesis/KinesisRecordSetProvider.java | 16 +- .../kinesis/KinesisSessionProperties.java | 10 +- .../io/trino/plugin/kinesis/KinesisSplit.java | 4 +- .../plugin/kinesis/KinesisSplitManager.java | 16 +- .../KinesisStreamFieldDescription.java | 4 +- .../KinesisTableDescriptionSupplier.java | 6 +- .../plugin/kinesis/KinesisTableHandle.java | 4 +- .../kinesis/KinesisTransactionHandle.java | 2 +- .../kinesis/s3config/S3TableConfigClient.java | 8 +- .../plugin/kinesis/TestKinesisPlugin.java | 14 +- .../TestKinesisTableDescriptionSupplier.java | 18 +- .../kinesis/TestMinimalFunctionality.java | 30 +- .../plugin/kinesis/TestRecordAccess.java | 26 +- .../TestingKinesisConnectorFactory.java | 10 +- .../s3config/TestS3TableConfigClient.java | 18 +- .../util/KinesisTestClientManager.java | 2 +- .../trino/plugin/kinesis/util/TestUtils.java | 16 +- .../trino/plugin/kudu/KuduBucketFunction.java | 22 +- .../plugin/kudu/KuduBucketedSplitSource.java | 4 +- .../trino/plugin/kudu/KuduClientSession.java | 58 +- .../trino/plugin/kudu/KuduColumnHandle.java | 8 +- .../io/trino/plugin/kudu/KuduConnector.java | 26 +- .../plugin/kudu/KuduConnectorFactory.java | 8 +- .../trino/plugin/kudu/KuduHandleResolver.java | 16 +- .../plugin/kudu/KuduInsertTableHandle.java | 6 +- .../io/trino/plugin/kudu/KuduMetadata.java | 68 +- .../java/io/trino/plugin/kudu/KuduModule.java | 26 +- .../kudu/KuduNodePartitioningProvider.java | 22 +- .../plugin/kudu/KuduOutputTableHandle.java | 6 +- .../io/trino/plugin/kudu/KuduPageSink.java | 40 +- .../plugin/kudu/KuduPageSinkProvider.java | 12 +- .../plugin/kudu/KuduPageSourceProvider.java | 18 +- .../plugin/kudu/KuduPartitionHandle.java | 2 +- .../plugin/kudu/KuduPartitioningHandle.java | 6 +- .../java/io/trino/plugin/kudu/KuduPlugin.java | 4 +- .../trino/plugin/kudu/KuduRecordCursor.java | 10 +- .../io/trino/plugin/kudu/KuduRecordSet.java | 10 +- .../plugin/kudu/KuduRecordSetProvider.java | 14 +- .../plugin/kudu/KuduSessionProperties.java | 8 +- .../java/io/trino/plugin/kudu/KuduSplit.java | 4 +- .../trino/plugin/kudu/KuduSplitManager.java | 20 +- .../io/trino/plugin/kudu/KuduTableHandle.java | 8 +- .../trino/plugin/kudu/KuduTableMapping.java | 2 +- .../plugin/kudu/KuduTransactionHandle.java | 2 +- .../plugin/kudu/KuduUpdatablePageSource.java | 8 +- .../java/io/trino/plugin/kudu/TypeHelper.java | 38 +- .../procedures/RangePartitionProcedures.java | 16 +- .../kudu/properties/KuduTableProperties.java | 16 +- .../plugin/kudu/schema/NoSchemaEmulation.java | 10 +- .../schema/SchemaAlreadyExistsException.java | 4 +- .../plugin/kudu/schema/SchemaEmulation.java | 2 +- .../SchemaEmulationByTableNameConvention.java | 12 +- .../AbstractKuduIntegrationSmokeTest.java | 16 +- .../plugin/kudu/KuduQueryRunnerFactory.java | 16 +- .../kudu/TestKuduDistributedQueries.java | 16 +- .../TestKuduIntegrationDecimalColumns.java | 8 +- .../TestKuduIntegrationDynamicFilter.java | 54 +- .../TestKuduIntegrationGroupedExecution.java | 32 +- .../TestKuduIntegrationHashPartitioning.java | 8 +- .../TestKuduIntegrationIntegerColumns.java | 8 +- .../TestKuduIntegrationRangePartitioning.java | 8 +- .../TestKuduIntegrationSchemaNotExisting.java | 6 +- .../io/trino/plugin/kudu/TestKuduPlugin.java | 6 +- .../kudu/schema/TestSchemaEmulation.java | 2 +- .../trino/plugin/localfile/DataLocation.java | 6 +- .../localfile/LocalFileColumnHandle.java | 6 +- .../plugin/localfile/LocalFileConnector.java | 16 +- .../localfile/LocalFileConnectorFactory.java | 10 +- .../plugin/localfile/LocalFileErrorCode.java | 8 +- .../localfile/LocalFileHandleResolver.java | 10 +- .../plugin/localfile/LocalFileMetadata.java | 30 +- .../plugin/localfile/LocalFilePlugin.java | 4 +- .../localfile/LocalFileRecordCursor.java | 32 +- .../plugin/localfile/LocalFileRecordSet.java | 12 +- .../localfile/LocalFileRecordSetProvider.java | 14 +- .../plugin/localfile/LocalFileSplit.java | 4 +- .../localfile/LocalFileSplitManager.java | 18 +- .../localfile/LocalFileTableHandle.java | 8 +- .../plugin/localfile/LocalFileTables.java | 22 +- .../localfile/LocalFileTransactionHandle.java | 2 +- .../trino/plugin/localfile/MetadataUtil.java | 18 +- .../localfile/TestLocalFileColumnHandle.java | 14 +- .../localfile/TestLocalFileRecordSet.java | 10 +- .../plugin/localfile/TestLocalFileSplit.java | 2 +- .../io/trino/plugin/memory/ColumnInfo.java | 6 +- .../plugin/memory/MemoryColumnHandle.java | 2 +- .../trino/plugin/memory/MemoryConnector.java | 14 +- .../plugin/memory/MemoryConnectorFactory.java | 8 +- .../plugin/memory/MemoryDataFragment.java | 2 +- .../trino/plugin/memory/MemoryErrorCode.java | 8 +- .../plugin/memory/MemoryHandleResolver.java | 14 +- .../memory/MemoryInsertTableHandle.java | 2 +- .../trino/plugin/memory/MemoryMetadata.java | 58 +- .../io/trino/plugin/memory/MemoryModule.java | 4 +- .../memory/MemoryOutputTableHandle.java | 2 +- .../plugin/memory/MemoryPageSinkProvider.java | 18 +- .../memory/MemoryPageSourceProvider.java | 26 +- .../trino/plugin/memory/MemoryPagesStore.java | 10 +- .../io/trino/plugin/memory/MemoryPlugin.java | 4 +- .../io/trino/plugin/memory/MemorySplit.java | 4 +- .../plugin/memory/MemorySplitManager.java | 16 +- .../plugin/memory/MemoryTableHandle.java | 2 +- .../memory/MemoryTransactionHandle.java | 2 +- .../io/trino/plugin/memory/TableInfo.java | 8 +- .../plugin/memory/MemoryQueryRunner.java | 12 +- .../plugin/memory/TestMemoryMetadata.java | 32 +- .../plugin/memory/TestMemoryPagesStore.java | 18 +- .../trino/plugin/memory/TestMemorySmoke.java | 40 +- .../plugin/memory/TestMemoryWorkerCrash.java | 6 +- .../io/trino/plugin/memsql/MemSqlClient.java | 86 +-- .../plugin/memsql/MemSqlClientModule.java | 14 +- .../io/trino/plugin/memsql/MemSqlPlugin.java | 2 +- .../plugin/memsql/MemSqlQueryRunner.java | 14 +- .../TestMemSqlCaseInsensitiveMapping.java | 8 +- .../memsql/TestMemSqlDistributedQueries.java | 10 +- .../TestMemSqlIntegrationSmokeTest.java | 18 +- .../trino/plugin/memsql/TestMemSqlPlugin.java | 6 +- .../plugin/memsql/TestMemSqlTypeMapping.java | 94 +-- .../ml/ClassifierFeatureTransformer.java | 4 +- ...luateClassifierPredictionsAggregation.java | 20 +- .../EvaluateClassifierPredictionsState.java | 4 +- ...uateClassifierPredictionsStateFactory.java | 6 +- ...eClassifierPredictionsStateSerializer.java | 10 +- .../plugin/ml/FeatureUnitNormalizer.java | 2 +- .../ml/FeatureVectorUnitNormalizer.java | 2 +- .../plugin/ml/LearnClassifierAggregation.java | 20 +- .../ml/LearnLibSvmClassifierAggregation.java | 26 +- .../ml/LearnLibSvmRegressorAggregation.java | 24 +- ...arnLibSvmVarcharClassifierAggregation.java | 20 +- .../plugin/ml/LearnRegressorAggregation.java | 22 +- .../java/io/trino/plugin/ml/LearnState.java | 4 +- .../io/trino/plugin/ml/LearnStateFactory.java | 8 +- .../trino/plugin/ml/LearnStateSerializer.java | 10 +- .../ml/LearnVarcharClassifierAggregation.java | 18 +- .../java/io/trino/plugin/ml/LibSvmUtils.java | 4 +- .../trino/plugin/ml/MLFeaturesFunctions.java | 20 +- .../java/io/trino/plugin/ml/MLFunctions.java | 16 +- .../java/io/trino/plugin/ml/MLPlugin.java | 14 +- .../main/java/io/trino/plugin/ml/Model.java | 2 +- .../java/io/trino/plugin/ml/ModelUtils.java | 6 +- .../ml/RegressorFeatureTransformer.java | 4 +- .../plugin/ml/StringClassifierAdapter.java | 6 +- .../io/trino/plugin/ml/SvmClassifier.java | 4 +- .../java/io/trino/plugin/ml/SvmRegressor.java | 4 +- .../ml/type/ClassifierParametricType.java | 10 +- .../trino/plugin/ml/type/ClassifierType.java | 10 +- .../io/trino/plugin/ml/type/ModelType.java | 10 +- .../trino/plugin/ml/type/RegressorType.java | 2 +- .../plugin/ml/AbstractTestMLFunctions.java | 4 +- .../ml/TestEvaluateClassifierPredictions.java | 26 +- .../plugin/ml/TestFeatureTransformations.java | 2 +- .../plugin/ml/TestLearnAggregations.java | 50 +- .../io/trino/plugin/ml/TestMLQueries.java | 14 +- .../plugin/ml/TestModelSerialization.java | 2 +- .../plugin/mongodb/MongoClientModule.java | 2 +- .../plugin/mongodb/MongoColumnHandle.java | 6 +- .../trino/plugin/mongodb/MongoConnector.java | 18 +- .../plugin/mongodb/MongoConnectorFactory.java | 10 +- .../plugin/mongodb/MongoHandleResolver.java | 14 +- .../io/trino/plugin/mongodb/MongoIndex.java | 2 +- .../mongodb/MongoInsertTableHandle.java | 4 +- .../trino/plugin/mongodb/MongoMetadata.java | 46 +- .../mongodb/MongoOutputTableHandle.java | 4 +- .../trino/plugin/mongodb/MongoPageSink.java | 70 +- .../plugin/mongodb/MongoPageSinkProvider.java | 12 +- .../trino/plugin/mongodb/MongoPageSource.java | 66 +- .../mongodb/MongoPageSourceProvider.java | 16 +- .../io/trino/plugin/mongodb/MongoPlugin.java | 8 +- .../io/trino/plugin/mongodb/MongoSession.java | 52 +- .../io/trino/plugin/mongodb/MongoSplit.java | 4 +- .../plugin/mongodb/MongoSplitManager.java | 18 +- .../plugin/mongodb/MongoTableHandle.java | 8 +- .../mongodb/MongoTransactionHandle.java | 2 +- .../plugin/mongodb/ObjectIdFunctions.java | 20 +- .../io/trino/plugin/mongodb/ObjectIdType.java | 30 +- .../io/trino/plugin/mongodb/TypeUtils.java | 8 +- .../mongodb/BaseMongoDistributedQueries.java | 4 +- .../plugin/mongodb/MongoQueryRunner.java | 12 +- .../TestMongo3DistributedQueriesLatest.java | 4 +- .../TestMongo4DistributedQueriesLatest.java | 4 +- .../mongodb/TestMongoDistributedQueries.java | 4 +- .../TestMongoIntegrationSmokeTest.java | 14 +- .../trino/plugin/mongodb/TestMongoPlugin.java | 10 +- .../plugin/mongodb/TestMongoSession.java | 22 +- .../plugin/mongodb/TestMongoTableHandle.java | 2 +- .../plugin/mongodb/TestObjectIdFunctions.java | 8 +- .../plugin/mysql/ImplementAvgBigint.java | 34 +- .../io/trino/plugin/mysql/MySqlClient.java | 162 ++--- .../trino/plugin/mysql/MySqlClientModule.java | 14 +- .../trino/plugin/mysql/MySqlJdbcConfig.java | 2 +- .../io/trino/plugin/mysql/MySqlPlugin.java | 2 +- .../mysql/BaseMySqlIntegrationSmokeTest.java | 20 +- .../trino/plugin/mysql/MySqlQueryRunner.java | 14 +- .../mysql/TestCredentialPassthrough.java | 10 +- ...lTransactionMySqlIntegrationSmokeTest.java | 4 +- .../TestMySqlCaseInsensitiveMapping.java | 8 +- .../trino/plugin/mysql/TestMySqlClient.java | 38 +- .../mysql/TestMySqlDistributedQueries.java | 16 +- .../mysql/TestMySqlIntegrationSmokeTest.java | 4 +- .../trino/plugin/mysql/TestMySqlPlugin.java | 6 +- .../plugin/mysql/TestMySqlTypeMapping.java | 94 +-- .../io/trino/plugin/oracle/OracleClient.java | 120 ++-- .../plugin/oracle/OracleClientModule.java | 20 +- .../io/trino/plugin/oracle/OraclePlugin.java | 2 +- .../oracle/OraclePoolConnectionFactory.java | 6 +- .../oracle/OracleSessionProperties.java | 10 +- .../oracle/AbstractTestOracleTypeMapping.java | 104 +-- .../BaseOracleIntegrationSmokeTest.java | 20 +- .../BaseTestOracleDistributedQueries.java | 20 +- .../trino/plugin/oracle/OracleDataTypes.java | 24 +- .../plugin/oracle/OracleQueryRunner.java | 18 +- .../oracle/TestOracleDistributedQueries.java | 6 +- .../TestOracleIntegrationSmokeTest.java | 4 +- .../trino/plugin/oracle/TestOraclePlugin.java | 6 +- .../TestOraclePoolIntegrationSmokeTest.java | 4 +- .../plugin/oracle/TestOracleTypeMapping.java | 4 +- ...arksReportingOracleDistributedQueries.java | 4 +- ...portingOraclePoolIntegrationSmokeTest.java | 4 +- .../io/trino/plugin/oracle/TestSynonym.java | 4 +- .../java/io/trino/plugin/oracle/TestView.java | 4 +- .../plugin/oracle/TestingOracleServer.java | 12 +- .../password/PasswordAuthenticatorPlugin.java | 14 +- .../password/file/FileAuthenticator.java | 6 +- .../file/FileAuthenticatorFactory.java | 4 +- .../password/file/FileGroupProvider.java | 8 +- .../file/FileGroupProviderFactory.java | 4 +- .../file/HashedPasswordException.java | 4 +- .../plugin/password/file/PasswordStore.java | 14 +- .../ldap/JdkLdapAuthenticatorClient.java | 4 +- .../password/ldap/LdapAuthenticator.java | 10 +- .../ldap/LdapAuthenticatorFactory.java | 4 +- .../SalesforceAuthenticatorFactory.java | 4 +- .../SalesforceBasicAuthenticator.java | 8 +- .../password/file/TestEncryptionUtil.java | 6 +- .../password/file/TestFileGroupProvider.java | 2 +- .../password/ldap/TestLdapAuthenticator.java | 6 +- .../TestSalesforceBasicAuthenticator.java | 2 +- .../io/trino/plugin/phoenix/MetadataUtil.java | 2 +- .../trino/plugin/phoenix/PhoenixClient.java | 164 ++--- .../plugin/phoenix/PhoenixClientModule.java | 54 +- .../phoenix/PhoenixColumnProperties.java | 8 +- .../plugin/phoenix/PhoenixConnector.java | 22 +- .../phoenix/PhoenixConnectorFactory.java | 14 +- .../plugin/phoenix/PhoenixErrorCode.java | 10 +- .../plugin/phoenix/PhoenixHandleResolver.java | 20 +- .../trino/plugin/phoenix/PhoenixMetadata.java | 46 +- .../phoenix/PhoenixOutputTableHandle.java | 6 +- .../trino/plugin/phoenix/PhoenixPlugin.java | 4 +- .../io/trino/plugin/phoenix/PhoenixSplit.java | 8 +- .../plugin/phoenix/PhoenixSplitManager.java | 30 +- .../phoenix/PhoenixTableProperties.java | 12 +- .../io/trino/plugin/phoenix/TypeUtils.java | 46 +- .../plugin/phoenix/PhoenixQueryRunner.java | 14 +- .../plugin/phoenix/PhoenixSqlExecutor.java | 2 +- .../TestPhoenixDistributedQueries.java | 8 +- .../TestPhoenixIntegrationSmokeTest.java | 14 +- .../plugin/phoenix/TestPhoenixSplit.java | 4 +- .../phoenix/TestPhoenixTypeMapping.java | 56 +- .../plugin/pinot/PinotBrokerPageSource.java | 22 +- .../io/trino/plugin/pinot/PinotColumn.java | 20 +- .../trino/plugin/pinot/PinotColumnHandle.java | 6 +- .../io/trino/plugin/pinot/PinotConnector.java | 16 +- .../plugin/pinot/PinotConnectorFactory.java | 8 +- .../io/trino/plugin/pinot/PinotErrorCode.java | 10 +- .../io/trino/plugin/pinot/PinotException.java | 2 +- .../plugin/pinot/PinotHandleResolver.java | 10 +- ...otInsufficientServerResponseException.java | 4 +- .../io/trino/plugin/pinot/PinotMetadata.java | 48 +- .../io/trino/plugin/pinot/PinotModule.java | 20 +- .../pinot/PinotNodePartitioningProvider.java | 16 +- .../plugin/pinot/PinotPageSourceProvider.java | 28 +- .../io/trino/plugin/pinot/PinotPlugin.java | 4 +- .../plugin/pinot/PinotSegmentPageSource.java | 28 +- .../plugin/pinot/PinotSessionProperties.java | 10 +- .../io/trino/plugin/pinot/PinotSplit.java | 4 +- .../trino/plugin/pinot/PinotSplitManager.java | 36 +- .../trino/plugin/pinot/PinotTableHandle.java | 10 +- .../plugin/pinot/PinotTransactionHandle.java | 2 +- .../plugin/pinot/client/PinotClient.java | 24 +- .../plugin/pinot/client/PinotQueryClient.java | 6 +- .../plugin/pinot/decoders/ArrayDecoder.java | 8 +- .../plugin/pinot/decoders/BigintDecoder.java | 4 +- .../plugin/pinot/decoders/BooleanDecoder.java | 4 +- .../trino/plugin/pinot/decoders/Decoder.java | 2 +- .../plugin/pinot/decoders/DecoderFactory.java | 22 +- .../plugin/pinot/decoders/DoubleDecoder.java | 4 +- .../plugin/pinot/decoders/IntegerDecoder.java | 2 +- .../plugin/pinot/decoders/RealDecoder.java | 2 +- .../plugin/pinot/decoders/VarcharDecoder.java | 2 +- .../pinot/query/DynamicTableBuilder.java | 10 +- .../pinot/query/DynamicTablePqlExtractor.java | 10 +- .../pinot/query/FilterToPqlConverter.java | 4 +- .../plugin/pinot/query/PinotQueryBuilder.java | 12 +- .../io/trino/plugin/pinot/MetadataUtil.java | 16 +- .../trino/plugin/pinot/MockPinotClient.java | 14 +- .../trino/plugin/pinot/PinotQueryRunner.java | 8 +- .../trino/plugin/pinot/TestBrokerQueries.java | 20 +- .../trino/plugin/pinot/TestDynamicTable.java | 28 +- .../pinot/TestMinimalFunctionality.java | 18 +- .../trino/plugin/pinot/TestPinotClient.java | 6 +- .../plugin/pinot/TestPinotColumnHandle.java | 6 +- .../trino/plugin/pinot/TestPinotMetadata.java | 6 +- .../plugin/pinot/TestPinotQueryBase.java | 2 +- .../pinot/TestPinotSessionProperties.java | 4 +- .../plugin/pinot/TestPinotSplitManager.java | 26 +- .../plugin/pinot/TestingPinotHostMapper.java | 2 +- .../plugin/postgresql/ImplementAvgBigint.java | 34 +- .../plugin/postgresql/PostgreSqlClient.java | 254 +++---- .../postgresql/PostgreSqlClientModule.java | 16 +- .../plugin/postgresql/PostgreSqlPlugin.java | 2 +- .../PostgreSqlSessionProperties.java | 10 +- .../io/trino/plugin/postgresql/TypeUtils.java | 56 +- .../postgresql/PostgreSqlQueryRunner.java | 12 +- .../TestPostgreSqlCaseInsensitiveMapping.java | 6 +- .../postgresql/TestPostgreSqlClient.java | 38 +- .../TestPostgreSqlDistributedQueries.java | 10 +- .../TestPostgreSqlIntegrationSmokeTest.java | 14 +- .../postgresql/TestPostgreSqlPlugin.java | 6 +- .../postgresql/TestPostgreSqlTypeMapping.java | 126 ++-- .../plugin/prometheus/PrometheusClient.java | 18 +- .../plugin/prometheus/PrometheusColumn.java | 2 +- .../prometheus/PrometheusColumnHandle.java | 6 +- .../prometheus/PrometheusConnector.java | 14 +- .../PrometheusConnectorFactory.java | 8 +- .../prometheus/PrometheusErrorCode.java | 10 +- .../prometheus/PrometheusHandleResolver.java | 10 +- .../plugin/prometheus/PrometheusMetadata.java | 24 +- .../plugin/prometheus/PrometheusModule.java | 6 +- .../plugin/prometheus/PrometheusPlugin.java | 4 +- .../PrometheusQueryResponseParse.java | 4 +- .../prometheus/PrometheusRecordCursor.java | 38 +- .../prometheus/PrometheusRecordSet.java | 6 +- .../PrometheusRecordSetProvider.java | 14 +- .../plugin/prometheus/PrometheusSplit.java | 4 +- .../prometheus/PrometheusSplitManager.java | 34 +- .../prometheus/PrometheusStandardizedRow.java | 2 +- .../plugin/prometheus/PrometheusTable.java | 2 +- .../prometheus/PrometheusTableHandle.java | 8 +- .../PrometheusTimestampDeserializer.java | 4 +- .../PrometheusTransactionHandle.java | 2 +- .../trino/plugin/prometheus/MetadataUtil.java | 28 +- .../prometheus/PrometheusHttpServer.java | 2 +- .../prometheus/PrometheusQueryRunner.java | 18 +- .../TestPrometheusColumnHandle.java | 6 +- .../TestPrometheusIntegrationMetrics.java | 22 +- .../TestPrometheusIntegrationSchema.java | 28 +- .../TestPrometheusIntegrationStatus.java | 10 +- ...estPrometheusQueryMatrixResponseParse.java | 2 +- .../prometheus/TestPrometheusRecordSet.java | 26 +- .../TestPrometheusRecordSetProvider.java | 28 +- .../prometheus/TestPrometheusSplit.java | 44 +- .../prometheus/TestPrometheusTable.java | 10 +- .../plugin/raptor/legacy/NodeSupplier.java | 2 +- .../raptor/legacy/RaptorBucketFunction.java | 18 +- .../raptor/legacy/RaptorColumnHandle.java | 10 +- .../plugin/raptor/legacy/RaptorConnector.java | 34 +- .../raptor/legacy/RaptorConnectorFactory.java | 24 +- .../plugin/raptor/legacy/RaptorErrorCode.java | 8 +- .../raptor/legacy/RaptorHandleResolver.java | 16 +- .../legacy/RaptorInsertTableHandle.java | 6 +- .../plugin/raptor/legacy/RaptorMetadata.java | 144 ++-- .../raptor/legacy/RaptorMetadataFactory.java | 4 +- .../plugin/raptor/legacy/RaptorModule.java | 20 +- .../RaptorNodePartitioningProvider.java | 24 +- .../legacy/RaptorOutputTableHandle.java | 10 +- .../plugin/raptor/legacy/RaptorPageSink.java | 30 +- .../raptor/legacy/RaptorPageSinkProvider.java | 18 +- .../legacy/RaptorPageSourceProvider.java | 34 +- .../legacy/RaptorPartitioningHandle.java | 2 +- .../plugin/raptor/legacy/RaptorPlugin.java | 6 +- .../legacy/RaptorSessionProperties.java | 14 +- .../plugin/raptor/legacy/RaptorSplit.java | 4 +- .../raptor/legacy/RaptorSplitManager.java | 40 +- .../raptor/legacy/RaptorTableHandle.java | 8 +- .../raptor/legacy/RaptorTableProperties.java | 14 +- .../legacy/RaptorTransactionHandle.java | 2 +- .../raptor/legacy/backup/BackupManager.java | 8 +- .../raptor/legacy/backup/BackupModule.java | 2 +- .../legacy/backup/BackupOperationStats.java | 6 +- .../raptor/legacy/backup/FileBackupStore.java | 8 +- .../raptor/legacy/backup/HttpBackupStore.java | 6 +- .../legacy/backup/TimeoutBackupStore.java | 4 +- .../legacy/metadata/AssignmentLimiter.java | 10 +- .../raptor/legacy/metadata/ColumnInfo.java | 4 +- .../legacy/metadata/ColumnMetadataRow.java | 2 +- .../metadata/DatabaseMetadataModule.java | 2 +- .../legacy/metadata/DatabaseShardManager.java | 52 +- .../metadata/DatabaseShardRecorder.java | 8 +- .../raptor/legacy/metadata/Distribution.java | 6 +- .../raptor/legacy/metadata/H2ShardDao.java | 4 +- .../raptor/legacy/metadata/IndexInserter.java | 16 +- .../raptor/legacy/metadata/MetadataDao.java | 4 +- .../raptor/legacy/metadata/MySqlShardDao.java | 4 +- .../metadata/SchemaTableNameMapper.java | 2 +- .../raptor/legacy/metadata/ShardCleaner.java | 12 +- .../raptor/legacy/metadata/ShardDao.java | 4 +- .../raptor/legacy/metadata/ShardIterator.java | 20 +- .../raptor/legacy/metadata/ShardManager.java | 4 +- .../raptor/legacy/metadata/ShardMetadata.java | 6 +- .../raptor/legacy/metadata/ShardNodeId.java | 2 +- .../legacy/metadata/ShardPredicate.java | 26 +- .../plugin/raptor/legacy/metadata/Table.java | 6 +- .../raptor/legacy/metadata/TableColumn.java | 12 +- .../legacy/metadata/TableMetadataRow.java | 4 +- .../raptor/legacy/metadata/ViewResult.java | 2 +- .../legacy/security/RaptorSecurityModule.java | 6 +- .../raptor/legacy/storage/BackupStats.java | 2 +- .../raptor/legacy/storage/BucketBalancer.java | 16 +- .../legacy/storage/ColumnIndexStatsUtils.java | 16 +- .../legacy/storage/FileStorageService.java | 4 +- .../legacy/storage/OrcFileMetadata.java | 2 +- .../legacy/storage/OrcFileRewriter.java | 6 +- .../raptor/legacy/storage/OrcFileWriter.java | 34 +- .../raptor/legacy/storage/OrcPageSource.java | 28 +- .../legacy/storage/OrcStorageManager.java | 122 ++-- .../plugin/raptor/legacy/storage/Row.java | 20 +- .../raptor/legacy/storage/ShardEjector.java | 14 +- .../legacy/storage/ShardRecoveryManager.java | 20 +- .../raptor/legacy/storage/ShardStats.java | 40 +- .../raptor/legacy/storage/StorageManager.java | 10 +- .../legacy/storage/StorageManagerConfig.java | 2 +- .../raptor/legacy/storage/StorageModule.java | 30 +- .../legacy/storage/StoragePageSink.java | 4 +- .../organization/CompactionSetCreator.java | 6 +- .../storage/organization/OrganizationJob.java | 14 +- .../organization/OrganizationJobFactory.java | 8 +- .../organization/ShardCompactionManager.java | 26 +- .../storage/organization/ShardCompactor.java | 42 +- .../ShardOrganizationManager.java | 22 +- .../storage/organization/ShardOrganizer.java | 2 +- .../organization/ShardOrganizerUtil.java | 18 +- .../organization/TableOrganizationInfo.java | 2 +- .../organization/TemporalFunction.java | 10 +- .../legacy/storage/organization/Tuple.java | 2 +- .../systemtables/ColumnRangesSystemTable.java | 48 +- .../legacy/systemtables/PageListBuilder.java | 8 +- .../PreparedStatementBuilder.java | 22 +- .../legacy/systemtables/ResultSetValues.java | 4 +- .../ShardMetadataRecordCursor.java | 42 +- .../ShardMetadataSystemTable.java | 18 +- .../TableMetadataSystemTable.java | 52 +- .../systemtables/TableStatsSystemTable.java | 48 +- .../legacy/systemtables/ValueBuffer.java | 2 +- .../raptor/legacy/util/ConcatPageSource.java | 4 +- .../raptor/legacy/util/DaoSupplier.java | 2 +- .../raptor/legacy/util/DatabaseUtil.java | 4 +- .../plugin/raptor/legacy/util/PageBuffer.java | 10 +- .../plugin/raptor/legacy/util/Types.java | 6 +- .../legacy/RaptorBenchmarkQueryRunner.java | 12 +- .../raptor/legacy/RaptorQueryRunner.java | 22 +- .../legacy/TestRaptorBucketFunction.java | 20 +- .../raptor/legacy/TestRaptorConnector.java | 80 +-- .../legacy/TestRaptorDistributedQueries.java | 8 +- .../TestRaptorDistributedQueriesBucketed.java | 4 +- .../TestRaptorIntegrationSmokeTest.java | 26 +- ...estRaptorIntegrationSmokeTestBucketed.java | 4 +- .../TestRaptorIntegrationSmokeTestMySql.java | 10 +- .../raptor/legacy/TestRaptorPlugin.java | 6 +- .../legacy/backup/TestBackupManager.java | 10 +- .../legacy/backup/TestHttpBackupStore.java | 4 +- .../backup/TestingHttpBackupResource.java | 6 +- .../raptor/legacy/metadata/ShardNode.java | 2 +- .../metadata/TestAssignmentLimiter.java | 8 +- .../metadata/TestDatabaseShardManager.java | 58 +- .../legacy/metadata/TestMetadataDao.java | 2 +- .../legacy/metadata/TestRaptorMetadata.java | 84 +-- .../metadata/TestRaptorSplitManager.java | 62 +- .../legacy/metadata/TestShardCleaner.java | 18 +- .../raptor/legacy/metadata/TestShardDao.java | 2 +- .../legacy/metadata/TestShardPredicate.java | 26 +- .../legacy/metadata/TestingShardDao.java | 4 +- .../security/TestRaptorFileBasedSecurity.java | 10 +- .../security/TestRaptorReadOnlySecurity.java | 4 +- .../legacy/storage/InMemoryShardRecorder.java | 2 +- .../raptor/legacy/storage/OrcTestingUtil.java | 18 +- .../legacy/storage/TestBucketBalancer.java | 38 +- .../storage/TestFileStorageService.java | 2 +- .../storage/TestMissingShardComparator.java | 4 +- .../legacy/storage/TestOrcFileRewriter.java | 48 +- .../legacy/storage/TestOrcStorageManager.java | 92 +-- .../legacy/storage/TestShardEjector.java | 30 +- .../legacy/storage/TestShardRecovery.java | 18 +- .../legacy/storage/TestShardWriter.java | 48 +- .../TestCompactionSetCreator.java | 8 +- .../organization/TestShardCompactor.java | 60 +- .../TestShardOrganizationManager.java | 24 +- .../organization/TestShardOrganizerUtil.java | 52 +- .../storage/organization/TestShardRange.java | 10 +- .../organization/TestTemporalFunction.java | 10 +- .../storage/organization/TestTuple.java | 16 +- .../TestShardMetadataRecordCursor.java | 60 +- .../trino/plugin/redis/RedisColumnHandle.java | 6 +- .../io/trino/plugin/redis/RedisConnector.java | 16 +- .../plugin/redis/RedisConnectorConfig.java | 2 +- .../plugin/redis/RedisConnectorFactory.java | 14 +- .../plugin/redis/RedisConnectorModule.java | 6 +- .../plugin/redis/RedisDecoderModule.java | 30 +- .../trino/plugin/redis/RedisFieldDecoder.java | 4 +- .../plugin/redis/RedisHandleResolver.java | 10 +- .../redis/RedisInternalFieldDescription.java | 10 +- .../trino/plugin/redis/RedisJedisManager.java | 4 +- .../io/trino/plugin/redis/RedisMetadata.java | 26 +- .../io/trino/plugin/redis/RedisPlugin.java | 4 +- .../trino/plugin/redis/RedisRecordCursor.java | 18 +- .../io/trino/plugin/redis/RedisRecordSet.java | 10 +- .../plugin/redis/RedisRecordSetProvider.java | 20 +- .../io/trino/plugin/redis/RedisSplit.java | 4 +- .../trino/plugin/redis/RedisSplitManager.java | 18 +- .../redis/RedisTableDescriptionSupplier.java | 4 +- .../redis/RedisTableFieldDescription.java | 4 +- .../trino/plugin/redis/RedisTableHandle.java | 4 +- .../plugin/redis/RedisTransactionHandle.java | 2 +- .../decoder/hash/HashRedisFieldDecoder.java | 6 +- .../decoder/hash/HashRedisRowDecoder.java | 8 +- .../hash/HashRedisRowDecoderFactory.java | 8 +- .../decoder/hash/HashRedisValueProvider.java | 4 +- .../hash/ISO8601HashRedisFieldDecoder.java | 24 +- .../decoder/zset/ZsetRedisRowDecoder.java | 6 +- .../zset/ZsetRedisRowDecoderFactory.java | 6 +- .../trino/plugin/redis/RedisQueryRunner.java | 28 +- .../redis/TestMinimalFunctionality.java | 30 +- .../plugin/redis/TestRedisDistributed.java | 6 +- .../redis/TestRedisDistributedHash.java | 8 +- .../redis/TestRedisIntegrationSmokeTest.java | 8 +- .../trino/plugin/redis/TestRedisPlugin.java | 6 +- .../plugin/redis/TestingRedisPlugin.java | 4 +- .../plugin/redis/util/CodecSupplier.java | 6 +- .../trino/plugin/redis/util/RedisLoader.java | 46 +- .../plugin/redis/util/RedisTestUtils.java | 12 +- .../trino/plugin/redshift/RedshiftClient.java | 26 +- .../plugin/redshift/RedshiftClientModule.java | 12 +- .../trino/plugin/redshift/RedshiftPlugin.java | 2 +- .../plugin/redshift/TestRedshiftPlugin.java | 6 +- .../AbstractResourceConfigurationManager.java | 18 +- ...FileResourceGroupConfigurationManager.java | 8 +- ...ourceGroupConfigurationManagerFactory.java | 8 +- .../ResourceGroupIdTemplate.java | 2 +- .../ResourceGroupManagerPlugin.java | 6 +- .../resourcegroups/ResourceGroupSelector.java | 4 +- .../resourcegroups/ResourceGroupSpec.java | 2 +- .../SelectorResourceEstimate.java | 2 +- .../plugin/resourcegroups/StaticSelector.java | 6 +- .../DbResourceGroupConfigurationManager.java | 28 +- ...ourceGroupConfigurationManagerFactory.java | 12 +- .../db/DbResourceGroupsModule.java | 2 +- .../db/DbSourceExactMatchSelector.java | 10 +- .../db/ResourceGroupSpecBuilder.java | 4 +- .../resourcegroups/db/SelectorRecord.java | 2 +- ...FileResourceGroupConfigurationManager.java | 24 +- .../TestResourceGroupIdTemplate.java | 8 +- .../resourcegroups/TestStaticSelector.java | 10 +- .../resourcegroups/TestingResourceGroup.java | 6 +- ...stDbResourceGroupConfigurationManager.java | 28 +- .../db/TestDbSourceExactMatchSelector.java | 14 +- .../db/TestResourceGroupsDao.java | 16 +- .../AbstractSessionPropertyManager.java | 4 +- .../plugin/session/SessionMatchSpec.java | 2 +- ...ionPropertyConfigurationManagerPlugin.java | 8 +- .../session/db/DbSessionPropertyManager.java | 8 +- .../db/DbSessionPropertyManagerFactory.java | 8 +- .../plugin/session/db/DbSpecsProvider.java | 2 +- .../session/db/RefreshingDbSpecsProvider.java | 2 +- .../session/db/SessionPropertiesDao.java | 8 +- .../file/FileSessionPropertyManager.java | 4 +- .../FileSessionPropertyManagerFactory.java | 6 +- .../AbstractTestSessionPropertyManager.java | 6 +- .../db/TestDbSessionPropertyManager.java | 8 +- ...stDbSessionPropertyManagerIntegration.java | 28 +- .../session/db/TestingDbSpecsProvider.java | 2 +- .../file/TestFileSessionPropertyManager.java | 8 +- .../plugin/sqlserver/ImplementAvgBigint.java | 34 +- .../ImplementSqlServerStddevPop.java | 32 +- .../sqlserver/ImplementSqlServerStdev.java | 32 +- .../sqlserver/ImplementSqlServerVariance.java | 32 +- .../ImplementSqlServerVariancePop.java | 32 +- .../plugin/sqlserver/SqlServerClient.java | 140 ++-- .../sqlserver/SqlServerClientModule.java | 18 +- .../plugin/sqlserver/SqlServerPlugin.java | 2 +- .../sqlserver/SqlServerTableProperties.java | 6 +- .../sqlserver/SqlServerQueryRunner.java | 18 +- .../plugin/sqlserver/TestSqlServerClient.java | 30 +- .../TestSqlServerDistributedQueries.java | 8 +- .../TestSqlServerIntegrationSmokeTest.java | 22 +- .../plugin/sqlserver/TestSqlServerPlugin.java | 6 +- .../sqlserver/TestSqlServerTypeMapping.java | 18 +- .../functions/TeradataDateFunctions.java | 34 +- .../functions/TeradataFunctionsPlugin.java | 2 +- .../functions/TeradataStringFunctions.java | 20 +- .../dateformat/DateFormatParser.java | 7 +- .../functions/TestTeradataDateFunctions.java | 16 +- .../functions/TestTeradataFunctions.java | 6 +- .../dateformat/TestDateFormatParser.java | 3 +- .../plugin/thrift/api/PrestoThriftBlock.java | 52 +- .../api/PrestoThriftColumnMetadata.java | 6 +- .../plugin/thrift/api/PrestoThriftDomain.java | 6 +- .../thrift/api/PrestoThriftHostAddress.java | 2 +- .../thrift/api/PrestoThriftPageResult.java | 12 +- .../api/PrestoThriftSchemaTableName.java | 4 +- .../thrift/api/PrestoThriftTupleDomain.java | 2 +- .../api/datatypes/PrestoThriftBigint.java | 18 +- .../datatypes/PrestoThriftBigintArray.java | 22 +- .../api/datatypes/PrestoThriftBoolean.java | 12 +- .../api/datatypes/PrestoThriftColumnData.java | 4 +- .../api/datatypes/PrestoThriftDate.java | 18 +- .../api/datatypes/PrestoThriftDouble.java | 14 +- .../datatypes/PrestoThriftHyperLogLog.java | 12 +- .../api/datatypes/PrestoThriftInteger.java | 18 +- .../api/datatypes/PrestoThriftJson.java | 10 +- .../api/datatypes/PrestoThriftTimestamp.java | 20 +- .../api/datatypes/PrestoThriftTypeUtils.java | 10 +- .../api/datatypes/PrestoThriftVarchar.java | 12 +- .../thrift/api/datatypes/SliceData.java | 14 +- .../PrestoThriftAllOrNoneValueSet.java | 2 +- .../PrestoThriftEquatableValueSet.java | 10 +- .../valuesets/PrestoThriftRangeValueSet.java | 16 +- .../api/valuesets/PrestoThriftValueSet.java | 14 +- .../thrift/api/TestNameValidationUtils.java | 2 +- .../plugin/thrift/api/TestPrestoThriftId.java | 2 +- .../plugin/thrift/api/TestReadWrite.java | 40 +- .../api/datatypes/TestPrestoThriftBigint.java | 16 +- .../TestPrestoThriftAllOrNoneValueSet.java | 6 +- .../TestPrestoThriftEquatableValueSet.java | 10 +- .../TestPrestoThriftRangeValueSet.java | 26 +- .../thrift/server/ListBasedRecordSet.java | 6 +- .../server/ThriftIndexedTpchService.java | 36 +- .../thrift/server/ThriftTpchService.java | 50 +- .../thrift/server/TestListBasedRecordSet.java | 8 +- .../thrift/DefaultThriftHeaderProvider.java | 2 +- .../plugin/thrift/ThriftClientModule.java | 4 +- .../plugin/thrift/ThriftColumnHandle.java | 6 +- .../trino/plugin/thrift/ThriftConnector.java | 16 +- .../plugin/thrift/ThriftConnectorFactory.java | 14 +- .../plugin/thrift/ThriftConnectorIndex.java | 10 +- .../plugin/thrift/ThriftConnectorSplit.java | 6 +- .../trino/plugin/thrift/ThriftErrorCode.java | 8 +- .../plugin/thrift/ThriftHandleResolver.java | 12 +- .../plugin/thrift/ThriftHeaderProvider.java | 2 +- .../plugin/thrift/ThriftIndexHandle.java | 10 +- .../plugin/thrift/ThriftIndexPageSource.java | 32 +- .../plugin/thrift/ThriftIndexProvider.java | 14 +- .../trino/plugin/thrift/ThriftMetadata.java | 54 +- .../io/trino/plugin/thrift/ThriftModule.java | 6 +- .../trino/plugin/thrift/ThriftPageSource.java | 20 +- .../thrift/ThriftPageSourceProvider.java | 18 +- .../io/trino/plugin/thrift/ThriftPlugin.java | 4 +- .../thrift/ThriftSessionProperties.java | 2 +- .../plugin/thrift/ThriftSplitManager.java | 42 +- .../plugin/thrift/ThriftTableHandle.java | 8 +- .../plugin/thrift/ThriftTableMetadata.java | 14 +- .../thrift/ThriftTransactionHandle.java | 2 +- .../plugin/thrift/util/ThriftExceptions.java | 12 +- .../thrift/util/TupleDomainConversion.java | 10 +- .../thrift/TestThriftIndexPageSource.java | 40 +- .../trino/plugin/thrift/TestThriftPlugin.java | 8 +- .../TestThriftDistributedQueries.java | 6 +- .../TestThriftDistributedQueriesIndexed.java | 6 +- .../TestThriftIntegrationSmokeTest.java | 12 +- .../TestThriftProjectionPushdown.java | 54 +- .../thrift/integration/ThriftQueryRunner.java | 40 +- .../trino/plugin/tpcds/TpcdsColumnHandle.java | 4 +- .../plugin/tpcds/TpcdsConnectorFactory.java | 22 +- .../plugin/tpcds/TpcdsHandleResolver.java | 14 +- .../io/trino/plugin/tpcds/TpcdsMetadata.java | 46 +- .../tpcds/TpcdsNodePartitioningProvider.java | 22 +- .../plugin/tpcds/TpcdsPartitioningHandle.java | 2 +- .../io/trino/plugin/tpcds/TpcdsPlugin.java | 4 +- .../io/trino/plugin/tpcds/TpcdsRecordSet.java | 18 +- .../plugin/tpcds/TpcdsRecordSetProvider.java | 14 +- .../io/trino/plugin/tpcds/TpcdsSplit.java | 4 +- .../trino/plugin/tpcds/TpcdsSplitManager.java | 18 +- .../trino/plugin/tpcds/TpcdsTableHandle.java | 2 +- .../plugin/tpcds/TpcdsTableLayoutHandle.java | 2 +- .../plugin/tpcds/TpcdsTransactionHandle.java | 2 +- .../TpcdsTableStatisticsFactory.java | 36 +- .../trino/plugin/tpcds/EstimateAssertion.java | 2 +- .../java/io/trino/plugin/tpcds/TestTpcds.java | 14 +- .../trino/plugin/tpcds/TestTpcdsMetadata.java | 2 +- .../tpcds/TestTpcdsMetadataStatistics.java | 18 +- .../trino/plugin/tpcds/TpcdsQueryRunner.java | 6 +- .../statistics/TableStatisticsRecorder.java | 4 +- .../tpcds/statistics/TestTpcdsLocalStats.java | 24 +- .../statistics/TpcdsStatisticsRecorder.java | 2 +- .../plugin/tpch/LazyRecordPageSource.java | 18 +- .../trino/plugin/tpch/TpchBucketFunction.java | 8 +- .../trino/plugin/tpch/TpchColumnHandle.java | 4 +- .../plugin/tpch/TpchConnectorFactory.java | 24 +- .../trino/plugin/tpch/TpchHandleResolver.java | 14 +- .../io/trino/plugin/tpch/TpchMetadata.java | 80 +-- .../tpch/TpchNodePartitioningProvider.java | 24 +- .../plugin/tpch/TpchPageSourceProvider.java | 16 +- .../plugin/tpch/TpchPartitioningHandle.java | 2 +- .../java/io/trino/plugin/tpch/TpchPlugin.java | 4 +- .../io/trino/plugin/tpch/TpchRecordSet.java | 18 +- .../plugin/tpch/TpchRecordSetProvider.java | 18 +- .../java/io/trino/plugin/tpch/TpchSplit.java | 4 +- .../trino/plugin/tpch/TpchSplitManager.java | 20 +- .../io/trino/plugin/tpch/TpchTableHandle.java | 6 +- .../plugin/tpch/TpchTableLayoutHandle.java | 6 +- .../java/io/trino/plugin/tpch/TpchTables.java | 12 +- .../plugin/tpch/TpchTransactionHandle.java | 2 +- .../tpch/statistics/StatisticsEstimator.java | 6 +- .../TableStatisticsDataRepository.java | 2 +- .../plugin/tpch/util/PredicateUtils.java | 8 +- .../trino/plugin/tpch/EstimateAssertion.java | 4 +- .../trino/plugin/tpch/TestTpchMetadata.java | 34 +- .../statistics/TpchStatisticsRecorder.java | 2 +- .../java/io/trino/proxy/ProxyResource.java | 2 +- .../io/trino/proxy/ProxyResponseHandler.java | 2 +- .../java/io/trino/proxy/TestProxyServer.java | 14 +- .../java/io/trino/verifier/QueryRewriter.java | 50 +- .../java/io/trino/verifier/Validator.java | 12 +- .../main/java/io/trino/verifier/Verifier.java | 12 +- .../io/trino/verifier/VerifierConfig.java | 10 +- .../java/io/trino/verifier/VerifyCommand.java | 64 +- .../java/io/trino/verifier/TestShadowing.java | 34 +- .../java/io/trino/verifier/TestValidator.java | 2 +- .../io/trino/verifier/TestVerifierConfig.java | 6 +- .../verifier/TestVerifierRewriteQueries.java | 4 +- .../benchmark/driver/BenchmarkDriver.java | 2 +- .../driver/BenchmarkDriverOptions.java | 2 +- .../driver/BenchmarkQueryRunner.java | 22 +- .../driver/PrestoBenchmarkDriver.java | 8 +- .../io/trino/benchmark/AbstractBenchmark.java | 8 +- .../benchmark/AbstractOperatorBenchmark.java | 102 +-- .../AbstractSimpleOperatorBenchmark.java | 18 +- .../trino/benchmark/AbstractSqlBenchmark.java | 8 +- .../benchmark/ArrayAggregationBenchmark.java | 4 +- .../benchmark/ArrayComparisonBenchmark.java | 4 +- .../trino/benchmark/BenchmarkQueryRunner.java | 12 +- .../io/trino/benchmark/BenchmarkSuite.java | 6 +- .../benchmark/CastJsonParseBenchmark.java | 4 +- .../benchmark/CountAggregationBenchmark.java | 18 +- .../CountAggregationSqlBenchmark.java | 4 +- .../CountWithFilterSqlBenchmark.java | 4 +- .../DoubleSumAggregationBenchmark.java | 24 +- .../GroupByAggregationSqlBenchmark.java | 4 +- .../GroupBySumWithArithmeticSqlBenchmark.java | 4 +- .../io/trino/benchmark/HandTpchQuery1.java | 48 +- .../io/trino/benchmark/HandTpchQuery6.java | 50 +- .../benchmark/HashAggregationBenchmark.java | 26 +- .../benchmark/HashBuildAndJoinBenchmark.java | 48 +- .../trino/benchmark/HashBuildBenchmark.java | 42 +- .../io/trino/benchmark/HashJoinBenchmark.java | 44 +- .../LongMaxAggregationSqlBenchmark.java | 4 +- .../io/trino/benchmark/OrderByBenchmark.java | 20 +- .../benchmark/PredicateFilterBenchmark.java | 28 +- .../PredicateFilterSqlBenchmark.java | 4 +- .../benchmark/RawStreamingBenchmark.java | 8 +- .../benchmark/RawStreamingSqlBenchmark.java | 4 +- ...proximateCountDistinctDoubleBenchmark.java | 4 +- ...ApproximateCountDistinctLongBenchmark.java | 4 +- ...ximateCountDistinctVarBinaryBenchmark.java | 4 +- .../SqlApproximatePercentileBenchmark.java | 4 +- .../trino/benchmark/SqlBetweenBenchmark.java | 4 +- .../SqlConsecutiveJoinBenchmark.java | 8 +- .../benchmark/SqlDistinctMultipleFields.java | 4 +- .../benchmark/SqlDistinctSingleField.java | 4 +- .../SqlDoubleSumAggregationBenchmark.java | 4 +- .../trino/benchmark/SqlHashJoinBenchmark.java | 4 +- .../io/trino/benchmark/SqlInBenchmark.java | 4 +- .../SqlJoinWithPredicateBenchmark.java | 4 +- .../io/trino/benchmark/SqlLikeBenchmark.java | 4 +- .../benchmark/SqlRegexpLikeBenchmark.java | 4 +- .../SqlSemiJoinInPredicateBenchmark.java | 4 +- .../io/trino/benchmark/SqlTopNBenchmark.java | 4 +- .../benchmark/SqlTopNRowNumberBenchmark.java | 4 +- .../io/trino/benchmark/SqlTpchQuery1.java | 4 +- .../io/trino/benchmark/SqlTpchQuery6.java | 4 +- .../trino/benchmark/StatisticsBenchmark.java | 4 +- .../benchmark/StructuredTypesBenchmark.java | 4 +- .../io/trino/benchmark/Top100Benchmark.java | 14 +- .../trino/benchmark/Top100SqlBenchmark.java | 4 +- .../VarBinaryMaxAggregationSqlBenchmark.java | 4 +- .../BenchmarkDecimalAggregation.java | 2 +- .../benchmark/BenchmarkInequalityJoin.java | 2 +- .../benchmark/MemoryLocalQueryRunner.java | 38 +- .../io/trino/benchmark/TestBenchmarks.java | 6 +- .../planner/AbstractCostBasedPlanTest.java | 28 +- .../sql/planner/TestTpcdsCostBasedPlan.java | 16 +- .../sql/planner/TestTpchCostBasedPlan.java | 20 +- .../product/launcher/LauncherModule.java | 2 +- .../product/launcher/cli/EnvironmentDown.java | 2 +- .../product/launcher/cli/EnvironmentList.java | 14 +- .../product/launcher/cli/EnvironmentUp.java | 26 +- .../tests/product/launcher/cli/Launcher.java | 10 +- .../product/launcher/cli/SuiteDescribe.java | 22 +- .../tests/product/launcher/cli/SuiteList.java | 16 +- .../tests/product/launcher/cli/SuiteRun.java | 28 +- .../tests/product/launcher/cli/TestRun.java | 30 +- .../launcher/docker/ContainerUtil.java | 4 +- .../product/launcher/env/Environment.java | 10 +- .../launcher/env/EnvironmentConfig.java | 4 +- .../env/EnvironmentConfigFactory.java | 2 +- .../launcher/env/EnvironmentFactory.java | 2 +- .../launcher/env/EnvironmentListener.java | 4 +- .../launcher/env/EnvironmentModule.java | 14 +- .../launcher/env/EnvironmentOptions.java | 2 +- .../launcher/env/EnvironmentProvider.java | 2 +- .../product/launcher/env/Environments.java | 12 +- .../launcher/env/StatisticsFetcher.java | 2 +- .../env/common/EnvironmentExtender.java | 2 +- .../product/launcher/env/common/Hadoop.java | 22 +- .../launcher/env/common/HadoopKerberos.java | 18 +- .../env/common/HadoopKerberosKms.java | 14 +- .../product/launcher/env/common/Kafka.java | 8 +- .../product/launcher/env/common/Standard.java | 24 +- .../launcher/env/configs/ConfigDefault.java | 6 +- .../launcher/env/configs/ConfigEnvBased.java | 10 +- .../launcher/env/configs/ConfigHdp3.java | 6 +- .../environment/AbstractSinglenodeLdap.java | 28 +- .../launcher/env/environment/Multinode.java | 34 +- .../env/environment/MultinodeHiveCaching.java | 32 +- .../env/environment/MultinodeTls.java | 38 +- .../env/environment/MultinodeTlsKerberos.java | 32 +- .../launcher/env/environment/Singlenode.java | 10 +- .../env/environment/SinglenodeCassandra.java | 20 +- .../SinglenodeHdfsImpersonation.java | 18 +- .../env/environment/SinglenodeHdp3.java | 22 +- .../SinglenodeHiveImpersonation.java | 18 +- .../env/environment/SinglenodeKafka.java | 16 +- .../SinglenodeKerberosHdfsImpersonation.java | 18 +- ...deKerberosHdfsImpersonationCrossRealm.java | 18 +- ...osHdfsImpersonationWithDataProtection.java | 20 +- ...osHdfsImpersonationWithWireEncryption.java | 20 +- ...SinglenodeKerberosHdfsNoImpersonation.java | 18 +- .../SinglenodeKerberosHiveImpersonation.java | 18 +- ...inglenodeKerberosKmsHdfsImpersonation.java | 20 +- ...glenodeKerberosKmsHdfsNoImpersonation.java | 18 +- .../env/environment/SinglenodeLdap.java | 12 +- .../env/environment/SinglenodeLdapBindDn.java | 12 +- .../environment/SinglenodeLdapInsecure.java | 14 +- .../environment/SinglenodeLdapReferrals.java | 12 +- .../env/environment/SinglenodeMysql.java | 20 +- .../env/environment/SinglenodePostgresql.java | 20 +- .../environment/SinglenodeSparkIceberg.java | 28 +- .../env/environment/SinglenodeSqlserver.java | 20 +- .../env/environment/TwoKerberosHives.java | 26 +- .../env/environment/TwoMixedHives.java | 24 +- .../tests/product/launcher/suite/Suite.java | 6 +- .../product/launcher/suite/SuiteModule.java | 2 +- .../product/launcher/suite/SuiteTestRun.java | 6 +- .../tests/product/launcher/suite/Suites.java | 2 +- .../product/launcher/suite/suites/Suite1.java | 10 +- .../product/launcher/suite/suites/Suite2.java | 16 +- .../product/launcher/suite/suites/Suite3.java | 16 +- .../product/launcher/suite/suites/Suite5.java | 14 +- .../suite/suites/Suite6NonGeneric.java | 24 +- .../suite/suites/Suite7NonGeneric.java | 26 +- .../suite/suites/Suite8NonGeneric.java | 12 +- .../launcher/suite/suites/SuiteTpcds.java | 10 +- .../launcher/testcontainers/PortBinder.java | 6 +- .../product/launcher/util/ConsoleTable.java | 2 +- .../launcher/env/TestEnvironments.java | 2 +- .../io/trino/tests/PrestoTemptoPlugin.java | 20 +- .../java/io/trino/tests/TestAlterTable.java | 4 +- .../io/trino/tests/TestCreateDropView.java | 4 +- .../java/io/trino/tests/TestCreateTable.java | 2 +- .../java/io/trino/tests/TestFunctions.java | 4 +- .../io/trino/tests/TestImpersonation.java | 8 +- .../java/io/trino/tests/TestJmxConnector.java | 4 +- .../java/io/trino/tests/TestSimpleQuery.java | 4 +- .../java/io/trino/tests/TestSqlCancel.java | 2 +- .../io/trino/tests/TestSystemConnector.java | 4 +- .../src/main/java/io/trino/tests/TestTls.java | 6 +- .../java/io/trino/tests/TestTwoHives.java | 4 +- .../blackhole/TestBlackHoleConnector.java | 2 +- .../CassandraTpchTableDefinitions.java | 4 +- .../cassandra/DataTypesTableDefinition.java | 4 +- .../MultiColumnKeyTableDefinition.java | 4 +- .../TestInsertIntoCassandraTable.java | 12 +- .../tests/cassandra/TestInvalidSelect.java | 10 +- .../io/trino/tests/cassandra/TestSelect.java | 20 +- .../cassandra/TestSelectMultiColumnKey.java | 12 +- .../io/trino/tests/cli/TestPrestoCli.java | 6 +- .../io/trino/tests/cli/TestPrestoLdapCli.java | 28 +- .../trino/tests/functions/TestFunctions.java | 2 +- .../functions/operators/TestComparison.java | 4 +- .../functions/operators/TestLogical.java | 4 +- .../hive/AllSimpleTypesTableDefinitions.java | 2 +- .../trino/tests/hive/HiveVersionProvider.java | 2 +- .../TestAllDatatypesFromHiveConnector.java | 20 +- .../tests/hive/TestAvroSchemaEvolution.java | 2 +- .../trino/tests/hive/TestAvroSchemaUrl.java | 8 +- .../hive/TestAvroSymlinkInputFormat.java | 8 +- .../io/trino/tests/hive/TestComments.java | 2 +- .../io/trino/tests/hive/TestCompression.java | 8 +- .../tests/hive/TestCreateDropSchema.java | 4 +- .../java/io/trino/tests/hive/TestCsv.java | 10 +- .../tests/hive/TestExternalHiveTable.java | 12 +- .../io/trino/tests/hive/TestGrantRevoke.java | 10 +- .../hive/TestHiveBasicTableStatistics.java | 14 +- .../tests/hive/TestHiveBucketedTables.java | 12 +- .../io/trino/tests/hive/TestHiveCaching.java | 10 +- .../io/trino/tests/hive/TestHiveCoercion.java | 12 +- .../trino/tests/hive/TestHiveCreateTable.java | 16 +- .../tests/hive/TestHiveDeltaLakeTable.java | 4 +- .../hive/TestHiveIgnoreAbsentPartitions.java | 4 +- .../tests/hive/TestHiveMaterializedView.java | 6 +- .../hive/TestHiveMetastoreClientFactory.java | 6 +- .../hive/TestHivePartitionProcedures.java | 12 +- .../TestHivePartitionSchemaEvolution.java | 12 +- .../tests/hive/TestHivePartitionsTable.java | 2 +- .../io/trino/tests/hive/TestHiveSchema.java | 4 +- .../tests/hive/TestHiveStorageFormats.java | 24 +- .../tests/hive/TestHiveTableStatistics.java | 8 +- .../hive/TestHiveTransactionalTable.java | 30 +- .../TestHiveTransactionalTableInsert.java | 4 +- .../io/trino/tests/hive/TestHiveViews.java | 8 +- .../trino/tests/hive/TestHiveViewsLegacy.java | 8 +- .../tests/hive/TestInsertIntoHiveTable.java | 2 +- .../hive/TestParquetSymlinkInputFormat.java | 8 +- .../trino/tests/hive/TestReadUniontype.java | 8 +- .../java/io/trino/tests/hive/TestRoles.java | 12 +- .../TestSqlStandardAccessControlChecks.java | 8 +- .../tests/hive/TestSyncPartitionMetadata.java | 12 +- .../tests/hive/TestTextFileHiveTable.java | 4 +- .../tests/hive/util/TableLocationUtils.java | 2 +- .../tests/hive/util/TemporaryHiveTable.java | 2 +- .../tests/iceberg/TestIcebergCreateTable.java | 10 +- .../tests/iceberg/TestSparkCompatibility.java | 8 +- .../io/trino/tests/jdbc/BaseLdapJdbcTest.java | 18 +- .../java/io/trino/tests/jdbc/TestJdbc.java | 12 +- .../trino/tests/jdbc/TestLdapPrestoJdbc.java | 14 +- .../tests/jdbc/TestPreparedStatements.java | 4 +- .../kafka/TestKafkaAvroReadsSmokeTest.java | 4 +- .../kafka/TestKafkaAvroWritesSmokeTest.java | 4 +- .../kafka/TestKafkaPushdownSmokeTest.java | 4 +- .../tests/kafka/TestKafkaReadsSmokeTest.java | 4 +- .../tests/kafka/TestKafkaWritesSmokeTest.java | 4 +- .../tests/mysql/TestCreateTableAsSelect.java | 6 +- .../SqlServerDataTypesTableDefinition.java | 2 +- .../SqlServerTpchTableDefinitions.java | 2 +- .../io/trino/tests/sqlserver/TestInsert.java | 12 +- .../tests/sqlserver/TestInvalidSelect.java | 10 +- .../io/trino/tests/sqlserver/TestSelect.java | 18 +- .../tests/teradata/TestTeradataFunctions.java | 4 +- .../io/trino/tests/utils/JdbcDriverUtils.java | 2 +- .../java/io/trino/JdbcDriverCapabilities.java | 2 +- .../java/io/trino/TestJdbcCompatibility.java | 20 +- ...stJdbcResultSetCompatibilityOldDriver.java | 14 +- .../java/io/trino/TestingServerUtils.java | 2 +- ...stJdbcResultSetCompatibilityOldServer.java | 4 +- .../testing/AbstractTestAggregations.java | 8 +- .../AbstractTestDistributedQueries.java | 34 +- .../testing/AbstractTestIndexedQueries.java | 6 +- .../AbstractTestIntegrationSmokeTest.java | 14 +- .../testing/AbstractTestJoinQueries.java | 20 +- .../testing/AbstractTestOrderByQueries.java | 14 +- .../io/trino/testing/AbstractTestQueries.java | 30 +- .../testing/AbstractTestQueryFramework.java | 76 +- .../testing/AbstractTestWindowQueries.java | 18 +- .../testing/AbstractTestingPrestoClient.java | 40 +- .../trino/testing/CountingMockConnector.java | 16 +- .../main/java/io/trino/testing/CreateHll.java | 6 +- .../main/java/io/trino/testing/CustomAdd.java | 6 +- .../java/io/trino/testing/CustomRank.java | 8 +- .../main/java/io/trino/testing/CustomSum.java | 20 +- .../trino/testing/DistributedQueryRunner.java | 54 +- .../java/io/trino/testing/H2QueryRunner.java | 64 +- .../trino/testing/PlanDeterminismChecker.java | 10 +- .../io/trino/testing/QueryAssertions.java | 16 +- .../io/trino/testing/ResultWithQueryId.java | 2 +- .../java/io/trino/testing/ResultsSession.java | 6 +- .../trino/testing/StandaloneQueryRunner.java | 34 +- .../io/trino/testing/StatefulSleepingSum.java | 30 +- .../io/trino/testing/StructuralTestUtil.java | 28 +- .../io/trino/testing/TestingPrestoClient.java | 76 +- .../io/trino/testing/TestingProcedures.java | 24 +- .../trino/testing/TestingSessionContext.java | 12 +- .../datatype/CreateAndInsertDataSetup.java | 4 +- .../CreateAndPrestoInsertDataSetup.java | 6 +- .../datatype/CreateAsSelectDataSetup.java | 4 +- .../io/trino/testing/datatype/DataSetup.java | 2 +- .../io/trino/testing/datatype/DataType.java | 44 +- .../trino/testing/datatype/DataTypeTest.java | 10 +- ...ataTypeTestToSqlDataTypeTestConverter.java | 16 +- .../testing/datatype/SqlDataTypeTest.java | 14 +- .../trino/testing/sql/PrestoSqlExecutor.java | 4 +- .../io/trino/testing/statistics/Metric.java | 2 +- .../testing/statistics/MetricComparator.java | 18 +- .../testing/statistics/MetricComparison.java | 6 +- .../io/trino/testing/statistics/Metrics.java | 4 +- .../statistics/StatisticsAssertion.java | 18 +- .../testing/statistics/StatsContext.java | 6 +- .../testing/tpch/AppendingRecordSet.java | 6 +- .../trino/testing/tpch/ConcatRecordSet.java | 6 +- .../testing/tpch/ExampleSystemTable.java | 26 +- .../tpch/IndexedTpchConnectorFactory.java | 34 +- .../trino/testing/tpch/IndexedTpchPlugin.java | 4 +- .../tpch/MaterializedTupleRecordSet.java | 6 +- .../testing/tpch/TpchConnectorIndex.java | 10 +- .../trino/testing/tpch/TpchIndexHandle.java | 6 +- .../testing/tpch/TpchIndexHandleResolver.java | 4 +- .../trino/testing/tpch/TpchIndexMetadata.java | 18 +- .../trino/testing/tpch/TpchIndexProvider.java | 24 +- .../trino/testing/tpch/TpchIndexedData.java | 18 +- .../io/trino/testing/TestH2QueryRunner.java | 4 +- .../trino/testing/datatype/TestDataType.java | 2 +- .../services/FlakyAnnotationVerifier.java | 2 +- .../services/LogTestDurationListener.java | 2 +- .../testng/services/ReportIllNamedTest.java | 4 +- ...eportMultiThreadedBeforeOrAfterMethod.java | 2 +- .../services/ReportOrphanedExecutors.java | 2 +- .../services/ReportUnannotatedMethods.java | 2 +- .../services/TestFlakyAnnotationVerifier.java | 2 +- .../services/TestFlakyTestRetryAnalyzer.java | 2 +- ...eportMultiThreadedBeforeOrAfterMethod.java | 2 +- .../TestReportUnannotatedMethods.java | 4 +- .../BenchmarkInformationSchema.java | 20 +- .../system/runtime/TestKillQuery.java | 18 +- .../system/runtime/TestSystemConnector.java | 28 +- .../execution/DeprecatedFunctionsPlugin.java | 10 +- .../execution/EventsAwaitingQueries.java | 6 +- .../io/trino/execution/EventsCollector.java | 6 +- .../io/trino/execution/TestBeginQuery.java | 58 +- .../execution/TestCompletedEventWarnings.java | 20 +- .../execution/TestConnectorEventListener.java | 12 +- .../TestCoordinatorDynamicFiltering.java | 96 +-- .../TestDeprecatedFunctionWarning.java | 46 +- .../execution/TestEventListenerBasic.java | 46 +- .../execution/TestEventListenerPlugin.java | 6 +- .../TestEventListenerWithSplits.java | 38 +- .../execution/TestExecutionJmxMetrics.java | 28 +- .../trino/execution/TestFinalQueryInfo.java | 16 +- .../execution/TestFlushingStageState.java | 20 +- .../io/trino/execution/TestGrantOnSchema.java | 30 +- .../io/trino/execution/TestGrantOnTable.java | 32 +- .../trino/execution/TestQueryRunnerUtil.java | 20 +- .../java/io/trino/execution/TestQueues.java | 38 +- .../trino/execution/TestRevokeOnSchema.java | 26 +- .../io/trino/execution/TestRevokeOnTable.java | 30 +- .../test/java/io/trino/execution/TestTry.java | 6 +- .../java/io/trino/execution/TestWarnings.java | 14 +- .../trino/execution/TestingEventListener.java | 8 +- .../TestResourceGroupIntegration.java | 12 +- ...ourceGroupConfigurationManagerFactory.java | 12 +- .../db/H2ResourceGroupManagerPlugin.java | 4 +- .../db/H2ResourceGroupsModule.java | 14 +- .../resourcegroups/db/H2TestUtil.java | 34 +- .../resourcegroups/db/TestEnvironments.java | 26 +- .../resourcegroups/db/TestQueuesDb.java | 72 +- .../db/TestResourceGroupDbIntegration.java | 6 +- .../memory/TestClusterMemoryLeakDetector.java | 20 +- .../io/trino/memory/TestMemoryManager.java | 30 +- .../memory/TestMemorySessionProperties.java | 12 +- .../io/trino/security/TestAccessControl.java | 60 +- .../tests/AbstractQueryAssertionsTest.java | 26 +- .../tests/AbstractTestEngineOnlyQueries.java | 52 +- .../java/io/trino/tests/TestAggregations.java | 6 +- .../tests/TestDictionaryAggregation.java | 16 +- .../TestDistributedEngineOnlyQueries.java | 12 +- .../tests/TestDistributedQueriesIndexed.java | 12 +- ...estDistributedQueriesNoHashGeneration.java | 6 +- .../tests/TestDistributedQueryAssertions.java | 4 +- .../tests/TestDistributedSpilledQueries.java | 14 +- .../io/trino/tests/TestGracefulShutdown.java | 18 +- .../tests/TestInformationSchemaConnector.java | 14 +- .../java/io/trino/tests/TestJoinQueries.java | 8 +- ...estJoinQueriesWithoutDynamicFiltering.java | 6 +- .../tests/TestLateMaterializationQueries.java | 24 +- .../tests/TestLocalEngineOnlyQueries.java | 2 +- .../java/io/trino/tests/TestLocalQueries.java | 30 +- .../trino/tests/TestLocalQueryAssertions.java | 6 +- .../io/trino/tests/TestMetadataManager.java | 40 +- .../trino/tests/TestMinWorkerRequirement.java | 20 +- ...TestOptimizeMixedDistinctAggregations.java | 6 +- .../io/trino/tests/TestOrderByQueries.java | 6 +- .../io/trino/tests/TestProcedureCall.java | 22 +- .../io/trino/tests/TestProcedureCreation.java | 8 +- .../java/io/trino/tests/TestQueryManager.java | 46 +- .../trino/tests/TestQueryPlanDeterminism.java | 26 +- .../tests/TestQuerySerializationFailures.java | 22 +- .../io/trino/tests/TestQuerySpillLimits.java | 14 +- .../trino/tests/TestSpilledAggregations.java | 4 +- .../trino/tests/TestSpilledJoinQueries.java | 4 +- .../tests/TestSpilledOrderByQueries.java | 4 +- .../trino/tests/TestSpilledWindowQueries.java | 4 +- .../java/io/trino/tests/TestTablesample.java | 14 +- .../tests/TestTpchDistributedQueries.java | 26 +- .../trino/tests/TestTpchDistributedStats.java | 26 +- .../io/trino/tests/TestTpchLocalStats.java | 38 +- .../tests/TestTpchTableScanRedirection.java | 10 +- .../io/trino/tests/TestWindowQueries.java | 6 +- .../io/trino/tests/tpch/TpchQueryRunner.java | 2 +- .../tests/tpch/TpchQueryRunnerBuilder.java | 16 +- 5356 files changed, 53498 insertions(+), 53500 deletions(-) diff --git a/client/trino-cli/src/main/java/io/trino/cli/AbstractWarningsPrinter.java b/client/trino-cli/src/main/java/io/trino/cli/AbstractWarningsPrinter.java index bef68111ba9e..b79837dbc564 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/AbstractWarningsPrinter.java +++ b/client/trino-cli/src/main/java/io/trino/cli/AbstractWarningsPrinter.java @@ -13,14 +13,14 @@ */ package io.trino.cli; -import io.prestosql.client.Warning; +import io.trino.client.Warning; import org.jline.utils.AttributedStringBuilder; import java.util.List; import java.util.OptionalInt; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.cli.TerminalUtils.isRealTerminal; +import static io.trino.cli.TerminalUtils.isRealTerminal; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.jline.utils.AttributedStyle.DEFAULT; diff --git a/client/trino-cli/src/main/java/io/trino/cli/AlignedTablePrinter.java b/client/trino-cli/src/main/java/io/trino/cli/AlignedTablePrinter.java index 0fb4ba05a957..ab917ec01cdc 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/AlignedTablePrinter.java +++ b/client/trino-cli/src/main/java/io/trino/cli/AlignedTablePrinter.java @@ -17,8 +17,8 @@ import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.client.Column; -import io.prestosql.client.Row; +import io.trino.client.Column; +import io.trino.client.Row; import java.io.IOException; import java.io.Writer; @@ -33,13 +33,13 @@ import static com.google.common.collect.Iterables.partition; import static com.google.common.collect.Iterables.transform; import static com.google.common.io.BaseEncoding.base16; -import static io.prestosql.client.ClientStandardTypes.BIGINT; -import static io.prestosql.client.ClientStandardTypes.DECIMAL; -import static io.prestosql.client.ClientStandardTypes.DOUBLE; -import static io.prestosql.client.ClientStandardTypes.INTEGER; -import static io.prestosql.client.ClientStandardTypes.REAL; -import static io.prestosql.client.ClientStandardTypes.SMALLINT; -import static io.prestosql.client.ClientStandardTypes.TINYINT; +import static io.trino.client.ClientStandardTypes.BIGINT; +import static io.trino.client.ClientStandardTypes.DECIMAL; +import static io.trino.client.ClientStandardTypes.DOUBLE; +import static io.trino.client.ClientStandardTypes.INTEGER; +import static io.trino.client.ClientStandardTypes.REAL; +import static io.trino.client.ClientStandardTypes.SMALLINT; +import static io.trino.client.ClientStandardTypes.TINYINT; import static java.lang.Math.max; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/client/trino-cli/src/main/java/io/trino/cli/ClientOptions.java b/client/trino-cli/src/main/java/io/trino/cli/ClientOptions.java index f883784b5505..0fa5ea69b78d 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/ClientOptions.java +++ b/client/trino-cli/src/main/java/io/trino/cli/ClientOptions.java @@ -20,7 +20,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.net.HostAndPort; import io.airlift.units.Duration; -import io.prestosql.client.ClientSession; +import io.trino.client.ClientSession; import java.net.URI; import java.net.URISyntaxException; @@ -35,7 +35,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Strings.nullToEmpty; -import static io.prestosql.client.KerberosUtil.defaultCredentialCachePath; +import static io.trino.client.KerberosUtil.defaultCredentialCachePath; import static java.util.Collections.emptyMap; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/client/trino-cli/src/main/java/io/trino/cli/Console.java b/client/trino-cli/src/main/java/io/trino/cli/Console.java index e521ec7a1e68..f67df3af416c 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/Console.java +++ b/client/trino-cli/src/main/java/io/trino/cli/Console.java @@ -19,11 +19,11 @@ import io.airlift.log.Logging; import io.airlift.log.LoggingConfiguration; import io.airlift.units.Duration; -import io.prestosql.cli.ClientOptions.OutputFormat; -import io.prestosql.cli.Presto.VersionProvider; -import io.prestosql.client.ClientSelectedRole; -import io.prestosql.client.ClientSession; -import io.prestosql.sql.parser.StatementSplitter; +import io.trino.cli.ClientOptions.OutputFormat; +import io.trino.cli.Presto.VersionProvider; +import io.trino.client.ClientSelectedRole; +import io.trino.client.ClientSession; +import io.trino.sql.parser.StatementSplitter; import org.jline.reader.EndOfFileException; import org.jline.reader.History; import org.jline.reader.LineReader; @@ -56,16 +56,16 @@ import static com.google.common.io.ByteStreams.nullOutputStream; import static com.google.common.io.Files.asCharSource; import static com.google.common.util.concurrent.Uninterruptibles.awaitUninterruptibly; -import static io.prestosql.cli.Completion.commandCompleter; -import static io.prestosql.cli.Help.getHelpText; -import static io.prestosql.cli.QueryPreprocessor.preprocessQuery; -import static io.prestosql.cli.TerminalUtils.closeTerminal; -import static io.prestosql.cli.TerminalUtils.getTerminal; -import static io.prestosql.cli.TerminalUtils.isRealTerminal; -import static io.prestosql.cli.TerminalUtils.terminalEncoding; -import static io.prestosql.client.ClientSession.stripTransactionId; -import static io.prestosql.sql.parser.StatementSplitter.Statement; -import static io.prestosql.sql.parser.StatementSplitter.isEmptyStatement; +import static io.trino.cli.Completion.commandCompleter; +import static io.trino.cli.Help.getHelpText; +import static io.trino.cli.QueryPreprocessor.preprocessQuery; +import static io.trino.cli.TerminalUtils.closeTerminal; +import static io.trino.cli.TerminalUtils.getTerminal; +import static io.trino.cli.TerminalUtils.isRealTerminal; +import static io.trino.cli.TerminalUtils.terminalEncoding; +import static io.trino.client.ClientSession.stripTransactionId; +import static io.trino.sql.parser.StatementSplitter.Statement; +import static io.trino.sql.parser.StatementSplitter.isEmptyStatement; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Locale.ENGLISH; diff --git a/client/trino-cli/src/main/java/io/trino/cli/ConsolePrinter.java b/client/trino-cli/src/main/java/io/trino/cli/ConsolePrinter.java index 36a24dd9c34b..f7a3108e9255 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/ConsolePrinter.java +++ b/client/trino-cli/src/main/java/io/trino/cli/ConsolePrinter.java @@ -15,7 +15,7 @@ import java.io.PrintStream; -import static io.prestosql.cli.TerminalUtils.isRealTerminal; +import static io.trino.cli.TerminalUtils.isRealTerminal; import static java.util.Objects.requireNonNull; public class ConsolePrinter diff --git a/client/trino-cli/src/main/java/io/trino/cli/CsvPrinter.java b/client/trino-cli/src/main/java/io/trino/cli/CsvPrinter.java index 81dda4269a2e..0ae103895092 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/CsvPrinter.java +++ b/client/trino-cli/src/main/java/io/trino/cli/CsvPrinter.java @@ -15,17 +15,17 @@ import au.com.bytecode.opencsv.CSVWriter; import com.google.common.collect.ImmutableList; -import io.prestosql.client.Row; +import io.trino.client.Row; import java.io.IOException; import java.io.Writer; import java.util.List; import java.util.Map; -import static io.prestosql.cli.AlignedTablePrinter.formatHexDump; -import static io.prestosql.cli.AlignedTablePrinter.formatList; -import static io.prestosql.cli.AlignedTablePrinter.formatMap; -import static io.prestosql.cli.AlignedTablePrinter.formatRow; +import static io.trino.cli.AlignedTablePrinter.formatHexDump; +import static io.trino.cli.AlignedTablePrinter.formatList; +import static io.trino.cli.AlignedTablePrinter.formatMap; +import static io.trino.cli.AlignedTablePrinter.formatRow; import static java.util.Objects.requireNonNull; public class CsvPrinter diff --git a/client/trino-cli/src/main/java/io/trino/cli/InputHighlighter.java b/client/trino-cli/src/main/java/io/trino/cli/InputHighlighter.java index 26afefcc22b6..945ea05bb92a 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/InputHighlighter.java +++ b/client/trino-cli/src/main/java/io/trino/cli/InputHighlighter.java @@ -13,8 +13,8 @@ */ package io.trino.cli; -import io.prestosql.sql.parser.SqlBaseLexer; -import io.prestosql.sql.parser.StatementSplitter; +import io.trino.sql.parser.SqlBaseLexer; +import io.trino.sql.parser.StatementSplitter; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.TokenSource; import org.jline.reader.Highlighter; @@ -27,8 +27,8 @@ import java.util.regex.Pattern; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.cli.Console.STATEMENT_DELIMITERS; -import static io.prestosql.sql.ReservedIdentifiers.sqlKeywords; +import static io.trino.cli.Console.STATEMENT_DELIMITERS; +import static io.trino.sql.ReservedIdentifiers.sqlKeywords; import static java.util.Locale.ENGLISH; import static org.jline.utils.AttributedStyle.BOLD; import static org.jline.utils.AttributedStyle.BRIGHT; diff --git a/client/trino-cli/src/main/java/io/trino/cli/InputParser.java b/client/trino-cli/src/main/java/io/trino/cli/InputParser.java index 17b4e57e931d..a5e1f67236fe 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/InputParser.java +++ b/client/trino-cli/src/main/java/io/trino/cli/InputParser.java @@ -14,7 +14,7 @@ package io.trino.cli; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.parser.StatementSplitter; +import io.trino.sql.parser.StatementSplitter; import org.jline.reader.EOFError; import org.jline.reader.ParsedLine; import org.jline.reader.Parser; @@ -24,7 +24,7 @@ import java.util.Set; import static com.google.common.base.CharMatcher.whitespace; -import static io.prestosql.cli.Console.STATEMENT_DELIMITERS; +import static io.trino.cli.Console.STATEMENT_DELIMITERS; import static java.util.Locale.ENGLISH; public class InputParser diff --git a/client/trino-cli/src/main/java/io/trino/cli/JsonPrinter.java b/client/trino-cli/src/main/java/io/trino/cli/JsonPrinter.java index df97b4117d1e..6391adf911f5 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/JsonPrinter.java +++ b/client/trino-cli/src/main/java/io/trino/cli/JsonPrinter.java @@ -21,7 +21,7 @@ import java.io.Writer; import java.util.List; -import static io.prestosql.cli.AlignedTablePrinter.formatHexDump; +import static io.trino.cli.AlignedTablePrinter.formatHexDump; import static java.util.Objects.requireNonNull; public class JsonPrinter diff --git a/client/trino-cli/src/main/java/io/trino/cli/OutputHandler.java b/client/trino-cli/src/main/java/io/trino/cli/OutputHandler.java index 9c97f55ec495..8a13cf6ed2e0 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/OutputHandler.java +++ b/client/trino-cli/src/main/java/io/trino/cli/OutputHandler.java @@ -14,7 +14,7 @@ package io.trino.cli; import io.airlift.units.Duration; -import io.prestosql.client.StatementClient; +import io.trino.client.StatementClient; import java.io.Closeable; import java.io.IOException; diff --git a/client/trino-cli/src/main/java/io/trino/cli/Presto.java b/client/trino-cli/src/main/java/io/trino/cli/Presto.java index b7a5839462df..c435f03a9b43 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/Presto.java +++ b/client/trino-cli/src/main/java/io/trino/cli/Presto.java @@ -15,9 +15,9 @@ import com.google.common.net.HostAndPort; import io.airlift.units.Duration; -import io.prestosql.cli.ClientOptions.ClientExtraCredential; -import io.prestosql.cli.ClientOptions.ClientResourceEstimate; -import io.prestosql.cli.ClientOptions.ClientSessionProperty; +import io.trino.cli.ClientOptions.ClientExtraCredential; +import io.trino.cli.ClientOptions.ClientResourceEstimate; +import io.trino.cli.ClientOptions.ClientSessionProperty; import picocli.CommandLine; import picocli.CommandLine.IVersionProvider; diff --git a/client/trino-cli/src/main/java/io/trino/cli/Query.java b/client/trino-cli/src/main/java/io/trino/cli/Query.java index 1cc82c3bdc5f..10179bb7f777 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/Query.java +++ b/client/trino-cli/src/main/java/io/trino/cli/Query.java @@ -17,14 +17,14 @@ import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; -import io.prestosql.cli.ClientOptions.OutputFormat; -import io.prestosql.client.ClientSelectedRole; -import io.prestosql.client.Column; -import io.prestosql.client.ErrorLocation; -import io.prestosql.client.QueryError; -import io.prestosql.client.QueryStatusInfo; -import io.prestosql.client.StatementClient; -import io.prestosql.client.Warning; +import io.trino.cli.ClientOptions.OutputFormat; +import io.trino.client.ClientSelectedRole; +import io.trino.client.Column; +import io.trino.client.ErrorLocation; +import io.trino.client.QueryError; +import io.trino.client.QueryStatusInfo; +import io.trino.client.StatementClient; +import io.trino.client.Warning; import org.jline.terminal.Terminal; import org.jline.terminal.Terminal.Signal; import org.jline.terminal.Terminal.SignalHandler; @@ -48,11 +48,11 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.cli.CsvPrinter.CsvOutputFormat.NO_HEADER; -import static io.prestosql.cli.CsvPrinter.CsvOutputFormat.NO_HEADER_AND_QUOTES; -import static io.prestosql.cli.CsvPrinter.CsvOutputFormat.NO_QUOTES; -import static io.prestosql.cli.CsvPrinter.CsvOutputFormat.STANDARD; -import static io.prestosql.cli.TerminalUtils.isRealTerminal; +import static io.trino.cli.CsvPrinter.CsvOutputFormat.NO_HEADER; +import static io.trino.cli.CsvPrinter.CsvOutputFormat.NO_HEADER_AND_QUOTES; +import static io.trino.cli.CsvPrinter.CsvOutputFormat.NO_QUOTES; +import static io.trino.cli.CsvPrinter.CsvOutputFormat.STANDARD; +import static io.trino.cli.TerminalUtils.isRealTerminal; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/client/trino-cli/src/main/java/io/trino/cli/QueryPreprocessor.java b/client/trino-cli/src/main/java/io/trino/cli/QueryPreprocessor.java index 569cc2fbf02f..c51135bd0d0f 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/QueryPreprocessor.java +++ b/client/trino-cli/src/main/java/io/trino/cli/QueryPreprocessor.java @@ -38,7 +38,7 @@ import static com.google.common.base.Strings.nullToEmpty; import static com.google.common.base.Throwables.propagateIfPossible; import static io.airlift.concurrent.MoreFutures.tryGetFutureValue; -import static io.prestosql.cli.TerminalUtils.isRealTerminal; +import static io.trino.cli.TerminalUtils.isRealTerminal; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/client/trino-cli/src/main/java/io/trino/cli/QueryRunner.java b/client/trino-cli/src/main/java/io/trino/cli/QueryRunner.java index 7ddd79355feb..cf79a74e5cca 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/QueryRunner.java +++ b/client/trino-cli/src/main/java/io/trino/cli/QueryRunner.java @@ -15,9 +15,9 @@ import com.google.common.net.HostAndPort; import io.airlift.log.Logger; -import io.prestosql.client.ClientSession; -import io.prestosql.client.OkHttpUtil; -import io.prestosql.client.StatementClient; +import io.trino.client.ClientSession; +import io.trino.client.OkHttpUtil; +import io.trino.client.StatementClient; import okhttp3.OkHttpClient; import java.io.Closeable; @@ -27,17 +27,17 @@ import java.util.function.Consumer; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.client.ClientSession.stripTransactionId; -import static io.prestosql.client.OkHttpUtil.basicAuth; -import static io.prestosql.client.OkHttpUtil.setupChannelSocket; -import static io.prestosql.client.OkHttpUtil.setupCookieJar; -import static io.prestosql.client.OkHttpUtil.setupHttpProxy; -import static io.prestosql.client.OkHttpUtil.setupKerberos; -import static io.prestosql.client.OkHttpUtil.setupSocksProxy; -import static io.prestosql.client.OkHttpUtil.setupSsl; -import static io.prestosql.client.OkHttpUtil.setupTimeouts; -import static io.prestosql.client.OkHttpUtil.tokenAuth; -import static io.prestosql.client.StatementClientFactory.newStatementClient; +import static io.trino.client.ClientSession.stripTransactionId; +import static io.trino.client.OkHttpUtil.basicAuth; +import static io.trino.client.OkHttpUtil.setupChannelSocket; +import static io.trino.client.OkHttpUtil.setupCookieJar; +import static io.trino.client.OkHttpUtil.setupHttpProxy; +import static io.trino.client.OkHttpUtil.setupKerberos; +import static io.trino.client.OkHttpUtil.setupSocksProxy; +import static io.trino.client.OkHttpUtil.setupSsl; +import static io.trino.client.OkHttpUtil.setupTimeouts; +import static io.trino.client.OkHttpUtil.tokenAuth; +import static io.trino.client.StatementClientFactory.newStatementClient; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/client/trino-cli/src/main/java/io/trino/cli/StatusPrinter.java b/client/trino-cli/src/main/java/io/trino/cli/StatusPrinter.java index 7fb2683cadf3..23105c26c134 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/StatusPrinter.java +++ b/client/trino-cli/src/main/java/io/trino/cli/StatusPrinter.java @@ -18,10 +18,10 @@ import io.airlift.log.Logger; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.client.QueryStatusInfo; -import io.prestosql.client.StageStats; -import io.prestosql.client.StatementClient; -import io.prestosql.client.StatementStats; +import io.trino.client.QueryStatusInfo; +import io.trino.client.StageStats; +import io.trino.client.StatementClient; +import io.trino.client.StatementStats; import org.jline.terminal.Attributes; import org.jline.terminal.Terminal; @@ -34,16 +34,16 @@ import static com.google.common.base.Verify.verify; import static io.airlift.units.Duration.nanosSince; import static io.airlift.units.Duration.succinctDuration; -import static io.prestosql.cli.FormatUtils.formatCount; -import static io.prestosql.cli.FormatUtils.formatCountRate; -import static io.prestosql.cli.FormatUtils.formatDataRate; -import static io.prestosql.cli.FormatUtils.formatDataSize; -import static io.prestosql.cli.FormatUtils.formatFinalTime; -import static io.prestosql.cli.FormatUtils.formatProgressBar; -import static io.prestosql.cli.FormatUtils.formatTime; -import static io.prestosql.cli.FormatUtils.pluralize; -import static io.prestosql.cli.TerminalUtils.isRealTerminal; -import static io.prestosql.cli.TerminalUtils.terminalWidth; +import static io.trino.cli.FormatUtils.formatCount; +import static io.trino.cli.FormatUtils.formatCountRate; +import static io.trino.cli.FormatUtils.formatDataRate; +import static io.trino.cli.FormatUtils.formatDataSize; +import static io.trino.cli.FormatUtils.formatFinalTime; +import static io.trino.cli.FormatUtils.formatProgressBar; +import static io.trino.cli.FormatUtils.formatTime; +import static io.trino.cli.FormatUtils.pluralize; +import static io.trino.cli.TerminalUtils.isRealTerminal; +import static io.trino.cli.TerminalUtils.terminalWidth; import static java.lang.Character.toUpperCase; import static java.lang.Math.max; import static java.lang.Math.min; diff --git a/client/trino-cli/src/main/java/io/trino/cli/TableNameCompleter.java b/client/trino-cli/src/main/java/io/trino/cli/TableNameCompleter.java index dc1480d4d1b7..5dbf915021f3 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/TableNameCompleter.java +++ b/client/trino-cli/src/main/java/io/trino/cli/TableNameCompleter.java @@ -17,8 +17,8 @@ import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import com.google.common.collect.ImmutableList; -import io.prestosql.client.QueryData; -import io.prestosql.client.StatementClient; +import io.trino.client.QueryData; +import io.trino.client.StatementClient; import org.jline.reader.Candidate; import org.jline.reader.Completer; import org.jline.reader.LineReader; diff --git a/client/trino-cli/src/main/java/io/trino/cli/TsvPrinter.java b/client/trino-cli/src/main/java/io/trino/cli/TsvPrinter.java index c8b88a9558b3..8bcdb06a6720 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/TsvPrinter.java +++ b/client/trino-cli/src/main/java/io/trino/cli/TsvPrinter.java @@ -20,7 +20,7 @@ import java.util.Iterator; import java.util.List; -import static io.prestosql.cli.CsvPrinter.formatValue; +import static io.trino.cli.CsvPrinter.formatValue; import static java.util.Objects.requireNonNull; public class TsvPrinter diff --git a/client/trino-cli/src/main/java/io/trino/cli/VerticalRecordPrinter.java b/client/trino-cli/src/main/java/io/trino/cli/VerticalRecordPrinter.java index 1580185433d1..28b789f18e1b 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/VerticalRecordPrinter.java +++ b/client/trino-cli/src/main/java/io/trino/cli/VerticalRecordPrinter.java @@ -21,9 +21,9 @@ import java.util.List; import static com.google.common.base.Strings.repeat; -import static io.prestosql.cli.AlignedTablePrinter.consoleWidth; -import static io.prestosql.cli.AlignedTablePrinter.formatValue; -import static io.prestosql.cli.AlignedTablePrinter.maxLineLength; +import static io.trino.cli.AlignedTablePrinter.consoleWidth; +import static io.trino.cli.AlignedTablePrinter.formatValue; +import static io.trino.cli.AlignedTablePrinter.maxLineLength; import static java.lang.Math.max; import static java.util.Objects.requireNonNull; diff --git a/client/trino-cli/src/main/java/io/trino/cli/WarningsPrinter.java b/client/trino-cli/src/main/java/io/trino/cli/WarningsPrinter.java index ade26936ad6c..301d7f817d59 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/WarningsPrinter.java +++ b/client/trino-cli/src/main/java/io/trino/cli/WarningsPrinter.java @@ -13,7 +13,7 @@ */ package io.trino.cli; -import io.prestosql.client.Warning; +import io.trino.client.Warning; import java.util.List; diff --git a/client/trino-cli/src/test/java/io/trino/cli/TestAlignedTablePrinter.java b/client/trino-cli/src/test/java/io/trino/cli/TestAlignedTablePrinter.java index 2e49cd614c89..208af5491bb1 100644 --- a/client/trino-cli/src/test/java/io/trino/cli/TestAlignedTablePrinter.java +++ b/client/trino-cli/src/test/java/io/trino/cli/TestAlignedTablePrinter.java @@ -14,8 +14,8 @@ package io.trino.cli; import com.google.common.collect.ImmutableList; -import io.prestosql.client.ClientTypeSignature; -import io.prestosql.client.Column; +import io.trino.client.ClientTypeSignature; +import io.trino.client.Column; import org.testng.annotations.Test; import java.io.StringWriter; @@ -23,11 +23,11 @@ import java.util.List; import java.util.Map; -import static io.prestosql.client.ClientStandardTypes.ARRAY; -import static io.prestosql.client.ClientStandardTypes.BIGINT; -import static io.prestosql.client.ClientStandardTypes.MAP; -import static io.prestosql.client.ClientStandardTypes.VARBINARY; -import static io.prestosql.client.ClientStandardTypes.VARCHAR; +import static io.trino.client.ClientStandardTypes.ARRAY; +import static io.trino.client.ClientStandardTypes.BIGINT; +import static io.trino.client.ClientStandardTypes.MAP; +import static io.trino.client.ClientStandardTypes.VARBINARY; +import static io.trino.client.ClientStandardTypes.VARCHAR; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Arrays.asList; import static java.util.stream.Collectors.toMap; diff --git a/client/trino-cli/src/test/java/io/trino/cli/TestClientOptions.java b/client/trino-cli/src/test/java/io/trino/cli/TestClientOptions.java index 617e77b0c619..1d95c7f78654 100644 --- a/client/trino-cli/src/test/java/io/trino/cli/TestClientOptions.java +++ b/client/trino-cli/src/test/java/io/trino/cli/TestClientOptions.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.net.HostAndPort; import io.airlift.units.Duration; -import io.prestosql.cli.ClientOptions.ClientResourceEstimate; -import io.prestosql.cli.ClientOptions.ClientSessionProperty; -import io.prestosql.cli.ClientOptions.OutputFormat; -import io.prestosql.client.ClientSession; +import io.trino.cli.ClientOptions.ClientResourceEstimate; +import io.trino.cli.ClientOptions.ClientSessionProperty; +import io.trino.cli.ClientOptions.OutputFormat; +import io.trino.client.ClientSession; import org.testng.annotations.Test; import java.time.ZoneId; import java.util.Optional; -import static io.prestosql.cli.Presto.createCommandLine; +import static io.trino.cli.Presto.createCommandLine; import static java.util.concurrent.TimeUnit.SECONDS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/client/trino-cli/src/test/java/io/trino/cli/TestCsvPrinter.java b/client/trino-cli/src/test/java/io/trino/cli/TestCsvPrinter.java index aa73fb662990..8cd210970d08 100644 --- a/client/trino-cli/src/test/java/io/trino/cli/TestCsvPrinter.java +++ b/client/trino-cli/src/test/java/io/trino/cli/TestCsvPrinter.java @@ -20,15 +20,15 @@ import java.io.StringWriter; import java.util.List; -import static io.prestosql.cli.CsvPrinter.CsvOutputFormat.NO_HEADER; -import static io.prestosql.cli.CsvPrinter.CsvOutputFormat.NO_HEADER_AND_QUOTES; -import static io.prestosql.cli.CsvPrinter.CsvOutputFormat.NO_QUOTES; -import static io.prestosql.cli.CsvPrinter.CsvOutputFormat.STANDARD; -import static io.prestosql.cli.TestAlignedTablePrinter.item; -import static io.prestosql.cli.TestAlignedTablePrinter.list; -import static io.prestosql.cli.TestAlignedTablePrinter.map; -import static io.prestosql.cli.TestAlignedTablePrinter.row; -import static io.prestosql.cli.TestAlignedTablePrinter.rows; +import static io.trino.cli.CsvPrinter.CsvOutputFormat.NO_HEADER; +import static io.trino.cli.CsvPrinter.CsvOutputFormat.NO_HEADER_AND_QUOTES; +import static io.trino.cli.CsvPrinter.CsvOutputFormat.NO_QUOTES; +import static io.trino.cli.CsvPrinter.CsvOutputFormat.STANDARD; +import static io.trino.cli.TestAlignedTablePrinter.item; +import static io.trino.cli.TestAlignedTablePrinter.list; +import static io.trino.cli.TestAlignedTablePrinter.map; +import static io.trino.cli.TestAlignedTablePrinter.row; +import static io.trino.cli.TestAlignedTablePrinter.rows; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; diff --git a/client/trino-cli/src/test/java/io/trino/cli/TestInsecureQueryRunner.java b/client/trino-cli/src/test/java/io/trino/cli/TestInsecureQueryRunner.java index 0b3468413903..8a918985ace2 100644 --- a/client/trino-cli/src/test/java/io/trino/cli/TestInsecureQueryRunner.java +++ b/client/trino-cli/src/test/java/io/trino/cli/TestInsecureQueryRunner.java @@ -29,12 +29,12 @@ import static com.google.common.io.Resources.getResource; import static com.google.common.net.HttpHeaders.CONTENT_TYPE; -import static io.prestosql.cli.ClientOptions.OutputFormat.CSV; -import static io.prestosql.cli.TerminalUtils.getTerminal; -import static io.prestosql.cli.TestQueryRunner.createClientSession; -import static io.prestosql.cli.TestQueryRunner.createQueryRunner; -import static io.prestosql.cli.TestQueryRunner.createResults; -import static io.prestosql.cli.TestQueryRunner.nullPrintStream; +import static io.trino.cli.ClientOptions.OutputFormat.CSV; +import static io.trino.cli.TerminalUtils.getTerminal; +import static io.trino.cli.TestQueryRunner.createClientSession; +import static io.trino.cli.TestQueryRunner.createQueryRunner; +import static io.trino.cli.TestQueryRunner.createResults; +import static io.trino.cli.TestQueryRunner.nullPrintStream; import static org.testng.Assert.assertEquals; @Test(singleThreaded = true) diff --git a/client/trino-cli/src/test/java/io/trino/cli/TestJsonPrinter.java b/client/trino-cli/src/test/java/io/trino/cli/TestJsonPrinter.java index 244e51bf2ec5..655e9f800a4a 100644 --- a/client/trino-cli/src/test/java/io/trino/cli/TestJsonPrinter.java +++ b/client/trino-cli/src/test/java/io/trino/cli/TestJsonPrinter.java @@ -20,8 +20,8 @@ import java.io.StringWriter; import java.util.List; -import static io.prestosql.cli.TestAlignedTablePrinter.row; -import static io.prestosql.cli.TestAlignedTablePrinter.rows; +import static io.trino.cli.TestAlignedTablePrinter.row; +import static io.trino.cli.TestAlignedTablePrinter.rows; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; diff --git a/client/trino-cli/src/test/java/io/trino/cli/TestQueryRunner.java b/client/trino-cli/src/test/java/io/trino/cli/TestQueryRunner.java index 777956408bb7..1d1f0e3ca731 100644 --- a/client/trino-cli/src/test/java/io/trino/cli/TestQueryRunner.java +++ b/client/trino-cli/src/test/java/io/trino/cli/TestQueryRunner.java @@ -18,11 +18,11 @@ import com.google.common.collect.ImmutableSet; import io.airlift.json.JsonCodec; import io.airlift.units.Duration; -import io.prestosql.client.ClientSession; -import io.prestosql.client.ClientTypeSignature; -import io.prestosql.client.Column; -import io.prestosql.client.QueryResults; -import io.prestosql.client.StatementStats; +import io.trino.client.ClientSession; +import io.trino.client.ClientTypeSignature; +import io.trino.client.Column; +import io.trino.client.QueryResults; +import io.trino.client.StatementStats; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import org.testng.annotations.AfterMethod; @@ -40,9 +40,9 @@ import static com.google.common.net.HttpHeaders.LOCATION; import static com.google.common.net.HttpHeaders.SET_COOKIE; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.cli.ClientOptions.OutputFormat.CSV; -import static io.prestosql.cli.TerminalUtils.getTerminal; -import static io.prestosql.client.ClientStandardTypes.BIGINT; +import static io.trino.cli.ClientOptions.OutputFormat.CSV; +import static io.trino.cli.TerminalUtils.getTerminal; +import static io.trino.client.ClientStandardTypes.BIGINT; import static java.util.concurrent.TimeUnit.MINUTES; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/client/trino-cli/src/test/java/io/trino/cli/TestTsvPrinter.java b/client/trino-cli/src/test/java/io/trino/cli/TestTsvPrinter.java index 08ad85877020..0d503c221073 100644 --- a/client/trino-cli/src/test/java/io/trino/cli/TestTsvPrinter.java +++ b/client/trino-cli/src/test/java/io/trino/cli/TestTsvPrinter.java @@ -20,8 +20,8 @@ import java.io.StringWriter; import java.util.List; -import static io.prestosql.cli.TestAlignedTablePrinter.row; -import static io.prestosql.cli.TestAlignedTablePrinter.rows; +import static io.trino.cli.TestAlignedTablePrinter.row; +import static io.trino.cli.TestAlignedTablePrinter.rows; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; diff --git a/client/trino-cli/src/test/java/io/trino/cli/TestVerticalRecordPrinter.java b/client/trino-cli/src/test/java/io/trino/cli/TestVerticalRecordPrinter.java index 67b7cb2deecc..3a611cb29274 100644 --- a/client/trino-cli/src/test/java/io/trino/cli/TestVerticalRecordPrinter.java +++ b/client/trino-cli/src/test/java/io/trino/cli/TestVerticalRecordPrinter.java @@ -19,9 +19,9 @@ import java.io.StringWriter; import java.util.List; -import static io.prestosql.cli.TestAlignedTablePrinter.bytes; -import static io.prestosql.cli.TestAlignedTablePrinter.row; -import static io.prestosql.cli.TestAlignedTablePrinter.rows; +import static io.trino.cli.TestAlignedTablePrinter.bytes; +import static io.trino.cli.TestAlignedTablePrinter.row; +import static io.trino.cli.TestAlignedTablePrinter.rows; import static org.testng.Assert.assertEquals; @SuppressWarnings("Duplicates") diff --git a/client/trino-client/src/main/java/io/trino/client/ClientTypeSignature.java b/client/trino-client/src/main/java/io/trino/client/ClientTypeSignature.java index c47f6149e96a..5257cb599079 100644 --- a/client/trino-client/src/main/java/io/trino/client/ClientTypeSignature.java +++ b/client/trino-client/src/main/java/io/trino/client/ClientTypeSignature.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.client.ClientTypeSignatureParameter.ParameterKind; +import io.trino.client.ClientTypeSignatureParameter.ParameterKind; import javax.annotation.concurrent.Immutable; @@ -29,8 +29,8 @@ 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.prestosql.client.ClientStandardTypes.ROW; -import static io.prestosql.client.ClientStandardTypes.VARCHAR; +import static io.trino.client.ClientStandardTypes.ROW; +import static io.trino.client.ClientStandardTypes.VARCHAR; import static java.lang.String.format; import static java.util.Collections.unmodifiableList; import static java.util.Objects.requireNonNull; diff --git a/client/trino-client/src/main/java/io/trino/client/FixJsonDataUtils.java b/client/trino-client/src/main/java/io/trino/client/FixJsonDataUtils.java index a31d0a3596f6..b5903a7a6419 100644 --- a/client/trino-client/src/main/java/io/trino/client/FixJsonDataUtils.java +++ b/client/trino-client/src/main/java/io/trino/client/FixJsonDataUtils.java @@ -14,7 +14,7 @@ package io.trino.client; import com.google.common.collect.ImmutableList; -import io.prestosql.client.ClientTypeSignatureParameter.ParameterKind; +import io.trino.client.ClientTypeSignatureParameter.ParameterKind; import java.util.ArrayList; import java.util.Base64; @@ -23,32 +23,32 @@ import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.client.ClientStandardTypes.ARRAY; -import static io.prestosql.client.ClientStandardTypes.BIGINT; -import static io.prestosql.client.ClientStandardTypes.BING_TILE; -import static io.prestosql.client.ClientStandardTypes.BOOLEAN; -import static io.prestosql.client.ClientStandardTypes.CHAR; -import static io.prestosql.client.ClientStandardTypes.DATE; -import static io.prestosql.client.ClientStandardTypes.DECIMAL; -import static io.prestosql.client.ClientStandardTypes.DOUBLE; -import static io.prestosql.client.ClientStandardTypes.GEOMETRY; -import static io.prestosql.client.ClientStandardTypes.INTEGER; -import static io.prestosql.client.ClientStandardTypes.INTERVAL_DAY_TO_SECOND; -import static io.prestosql.client.ClientStandardTypes.INTERVAL_YEAR_TO_MONTH; -import static io.prestosql.client.ClientStandardTypes.IPADDRESS; -import static io.prestosql.client.ClientStandardTypes.JSON; -import static io.prestosql.client.ClientStandardTypes.MAP; -import static io.prestosql.client.ClientStandardTypes.REAL; -import static io.prestosql.client.ClientStandardTypes.ROW; -import static io.prestosql.client.ClientStandardTypes.SMALLINT; -import static io.prestosql.client.ClientStandardTypes.SPHERICAL_GEOGRAPHY; -import static io.prestosql.client.ClientStandardTypes.TIME; -import static io.prestosql.client.ClientStandardTypes.TIMESTAMP; -import static io.prestosql.client.ClientStandardTypes.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.client.ClientStandardTypes.TIME_WITH_TIME_ZONE; -import static io.prestosql.client.ClientStandardTypes.TINYINT; -import static io.prestosql.client.ClientStandardTypes.UUID; -import static io.prestosql.client.ClientStandardTypes.VARCHAR; +import static io.trino.client.ClientStandardTypes.ARRAY; +import static io.trino.client.ClientStandardTypes.BIGINT; +import static io.trino.client.ClientStandardTypes.BING_TILE; +import static io.trino.client.ClientStandardTypes.BOOLEAN; +import static io.trino.client.ClientStandardTypes.CHAR; +import static io.trino.client.ClientStandardTypes.DATE; +import static io.trino.client.ClientStandardTypes.DECIMAL; +import static io.trino.client.ClientStandardTypes.DOUBLE; +import static io.trino.client.ClientStandardTypes.GEOMETRY; +import static io.trino.client.ClientStandardTypes.INTEGER; +import static io.trino.client.ClientStandardTypes.INTERVAL_DAY_TO_SECOND; +import static io.trino.client.ClientStandardTypes.INTERVAL_YEAR_TO_MONTH; +import static io.trino.client.ClientStandardTypes.IPADDRESS; +import static io.trino.client.ClientStandardTypes.JSON; +import static io.trino.client.ClientStandardTypes.MAP; +import static io.trino.client.ClientStandardTypes.REAL; +import static io.trino.client.ClientStandardTypes.ROW; +import static io.trino.client.ClientStandardTypes.SMALLINT; +import static io.trino.client.ClientStandardTypes.SPHERICAL_GEOGRAPHY; +import static io.trino.client.ClientStandardTypes.TIME; +import static io.trino.client.ClientStandardTypes.TIMESTAMP; +import static io.trino.client.ClientStandardTypes.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.client.ClientStandardTypes.TIME_WITH_TIME_ZONE; +import static io.trino.client.ClientStandardTypes.TINYINT; +import static io.trino.client.ClientStandardTypes.UUID; +import static io.trino.client.ClientStandardTypes.VARCHAR; import static java.util.Collections.unmodifiableList; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/client/trino-client/src/main/java/io/trino/client/QueryResults.java b/client/trino-client/src/main/java/io/trino/client/QueryResults.java index 029ff740851c..faedf1b4fdf1 100644 --- a/client/trino-client/src/main/java/io/trino/client/QueryResults.java +++ b/client/trino-client/src/main/java/io/trino/client/QueryResults.java @@ -27,7 +27,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.Iterables.unmodifiableIterable; -import static io.prestosql.client.FixJsonDataUtils.fixData; +import static io.trino.client.FixJsonDataUtils.fixData; import static java.util.Objects.requireNonNull; @Immutable diff --git a/client/trino-client/src/main/java/io/trino/client/StatementClientV1.java b/client/trino-client/src/main/java/io/trino/client/StatementClientV1.java index d638a229ba6b..2546afe2de68 100644 --- a/client/trino-client/src/main/java/io/trino/client/StatementClientV1.java +++ b/client/trino-client/src/main/java/io/trino/client/StatementClientV1.java @@ -50,32 +50,32 @@ import static com.google.common.net.HttpHeaders.ACCEPT_ENCODING; import static com.google.common.net.HttpHeaders.USER_AGENT; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.client.PrestoHeaders.PRESTO_ADDED_PREPARE; -import static io.prestosql.client.PrestoHeaders.PRESTO_CATALOG; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLEAR_SESSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLEAR_TRANSACTION_ID; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLIENT_CAPABILITIES; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLIENT_INFO; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLIENT_TAGS; -import static io.prestosql.client.PrestoHeaders.PRESTO_DEALLOCATED_PREPARE; -import static io.prestosql.client.PrestoHeaders.PRESTO_EXTRA_CREDENTIAL; -import static io.prestosql.client.PrestoHeaders.PRESTO_LANGUAGE; -import static io.prestosql.client.PrestoHeaders.PRESTO_PATH; -import static io.prestosql.client.PrestoHeaders.PRESTO_PREPARED_STATEMENT; -import static io.prestosql.client.PrestoHeaders.PRESTO_RESOURCE_ESTIMATE; -import static io.prestosql.client.PrestoHeaders.PRESTO_SCHEMA; -import static io.prestosql.client.PrestoHeaders.PRESTO_SESSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_SET_CATALOG; -import static io.prestosql.client.PrestoHeaders.PRESTO_SET_PATH; -import static io.prestosql.client.PrestoHeaders.PRESTO_SET_ROLE; -import static io.prestosql.client.PrestoHeaders.PRESTO_SET_SCHEMA; -import static io.prestosql.client.PrestoHeaders.PRESTO_SET_SESSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_SOURCE; -import static io.prestosql.client.PrestoHeaders.PRESTO_STARTED_TRANSACTION_ID; -import static io.prestosql.client.PrestoHeaders.PRESTO_TIME_ZONE; -import static io.prestosql.client.PrestoHeaders.PRESTO_TRACE_TOKEN; -import static io.prestosql.client.PrestoHeaders.PRESTO_TRANSACTION_ID; -import static io.prestosql.client.PrestoHeaders.PRESTO_USER; +import static io.trino.client.PrestoHeaders.PRESTO_ADDED_PREPARE; +import static io.trino.client.PrestoHeaders.PRESTO_CATALOG; +import static io.trino.client.PrestoHeaders.PRESTO_CLEAR_SESSION; +import static io.trino.client.PrestoHeaders.PRESTO_CLEAR_TRANSACTION_ID; +import static io.trino.client.PrestoHeaders.PRESTO_CLIENT_CAPABILITIES; +import static io.trino.client.PrestoHeaders.PRESTO_CLIENT_INFO; +import static io.trino.client.PrestoHeaders.PRESTO_CLIENT_TAGS; +import static io.trino.client.PrestoHeaders.PRESTO_DEALLOCATED_PREPARE; +import static io.trino.client.PrestoHeaders.PRESTO_EXTRA_CREDENTIAL; +import static io.trino.client.PrestoHeaders.PRESTO_LANGUAGE; +import static io.trino.client.PrestoHeaders.PRESTO_PATH; +import static io.trino.client.PrestoHeaders.PRESTO_PREPARED_STATEMENT; +import static io.trino.client.PrestoHeaders.PRESTO_RESOURCE_ESTIMATE; +import static io.trino.client.PrestoHeaders.PRESTO_SCHEMA; +import static io.trino.client.PrestoHeaders.PRESTO_SESSION; +import static io.trino.client.PrestoHeaders.PRESTO_SET_CATALOG; +import static io.trino.client.PrestoHeaders.PRESTO_SET_PATH; +import static io.trino.client.PrestoHeaders.PRESTO_SET_ROLE; +import static io.trino.client.PrestoHeaders.PRESTO_SET_SCHEMA; +import static io.trino.client.PrestoHeaders.PRESTO_SET_SESSION; +import static io.trino.client.PrestoHeaders.PRESTO_SOURCE; +import static io.trino.client.PrestoHeaders.PRESTO_STARTED_TRANSACTION_ID; +import static io.trino.client.PrestoHeaders.PRESTO_TIME_ZONE; +import static io.trino.client.PrestoHeaders.PRESTO_TRACE_TOKEN; +import static io.trino.client.PrestoHeaders.PRESTO_TRANSACTION_ID; +import static io.trino.client.PrestoHeaders.PRESTO_USER; import static java.lang.String.format; import static java.net.HttpURLConnection.HTTP_OK; import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED; diff --git a/client/trino-client/src/test/java/io/trino/client/TestClientTypeSignature.java b/client/trino-client/src/test/java/io/trino/client/TestClientTypeSignature.java index 0ff6e430d94d..e1cd159dfffc 100644 --- a/client/trino-client/src/test/java/io/trino/client/TestClientTypeSignature.java +++ b/client/trino-client/src/test/java/io/trino/client/TestClientTypeSignature.java @@ -17,7 +17,7 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.type.StandardTypes; import org.testng.annotations.Test; import java.util.Optional; diff --git a/client/trino-client/src/test/java/io/trino/client/TestFixJsonDataUtils.java b/client/trino-client/src/test/java/io/trino/client/TestFixJsonDataUtils.java index 75bff3ab2357..a0bd0ca43c0a 100644 --- a/client/trino-client/src/test/java/io/trino/client/TestFixJsonDataUtils.java +++ b/client/trino-client/src/test/java/io/trino/client/TestFixJsonDataUtils.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import org.testng.annotations.Test; import java.util.Base64; @@ -25,30 +25,30 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Lists.newArrayList; -import static io.prestosql.client.FixJsonDataUtils.fixData; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.StandardTypes.INTERVAL_DAY_TO_SECOND; -import static io.prestosql.spi.type.StandardTypes.INTERVAL_YEAR_TO_MONTH; -import static io.prestosql.spi.type.StandardTypes.IPADDRESS; -import static io.prestosql.spi.type.StandardTypes.JSON; -import static io.prestosql.spi.type.StandardTypes.UUID; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.client.FixJsonDataUtils.fixData; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.RowType.field; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.StandardTypes.INTERVAL_DAY_TO_SECOND; +import static io.trino.spi.type.StandardTypes.INTERVAL_YEAR_TO_MONTH; +import static io.trino.spi.type.StandardTypes.IPADDRESS; +import static io.trino.spi.type.StandardTypes.JSON; +import static io.trino.spi.type.StandardTypes.UUID; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; public class TestFixJsonDataUtils diff --git a/client/trino-client/src/test/java/io/trino/client/TestIntervalDayTime.java b/client/trino-client/src/test/java/io/trino/client/TestIntervalDayTime.java index 7a05b16f8bf9..fafd6c31d417 100644 --- a/client/trino-client/src/test/java/io/trino/client/TestIntervalDayTime.java +++ b/client/trino-client/src/test/java/io/trino/client/TestIntervalDayTime.java @@ -15,9 +15,9 @@ import org.testng.annotations.Test; -import static io.prestosql.client.IntervalDayTime.formatMillis; -import static io.prestosql.client.IntervalDayTime.parseMillis; -import static io.prestosql.client.IntervalDayTime.toMillis; +import static io.trino.client.IntervalDayTime.formatMillis; +import static io.trino.client.IntervalDayTime.parseMillis; +import static io.trino.client.IntervalDayTime.toMillis; import static java.util.concurrent.TimeUnit.DAYS; import static org.testng.Assert.assertEquals; diff --git a/client/trino-client/src/test/java/io/trino/client/TestIntervalYearMonth.java b/client/trino-client/src/test/java/io/trino/client/TestIntervalYearMonth.java index 4124289570b2..492a7e8d69b9 100644 --- a/client/trino-client/src/test/java/io/trino/client/TestIntervalYearMonth.java +++ b/client/trino-client/src/test/java/io/trino/client/TestIntervalYearMonth.java @@ -15,9 +15,9 @@ import org.testng.annotations.Test; -import static io.prestosql.client.IntervalYearMonth.formatMonths; -import static io.prestosql.client.IntervalYearMonth.parseMonths; -import static io.prestosql.client.IntervalYearMonth.toMonths; +import static io.trino.client.IntervalYearMonth.formatMonths; +import static io.trino.client.IntervalYearMonth.parseMonths; +import static io.trino.client.IntervalYearMonth.toMonths; import static org.testng.Assert.assertEquals; public class TestIntervalYearMonth diff --git a/client/trino-client/src/test/java/io/trino/client/TestServerInfo.java b/client/trino-client/src/test/java/io/trino/client/TestServerInfo.java index 4d9f539cbc19..ca74648d4c0d 100644 --- a/client/trino-client/src/test/java/io/trino/client/TestServerInfo.java +++ b/client/trino-client/src/test/java/io/trino/client/TestServerInfo.java @@ -20,7 +20,7 @@ import java.util.Optional; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.client.NodeVersion.UNKNOWN; +import static io.trino.client.NodeVersion.UNKNOWN; import static org.testng.Assert.assertEquals; public class TestServerInfo diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/AbstractPrestoResultSet.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/AbstractPrestoResultSet.java index 81d9e1e4b2e1..634aabe2e033 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/AbstractPrestoResultSet.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/AbstractPrestoResultSet.java @@ -18,15 +18,15 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.io.BaseEncoding; -import io.prestosql.client.ClientTypeSignature; -import io.prestosql.client.ClientTypeSignatureParameter; -import io.prestosql.client.Column; -import io.prestosql.client.IntervalDayTime; -import io.prestosql.client.IntervalYearMonth; -import io.prestosql.client.QueryError; -import io.prestosql.client.QueryStatusInfo; -import io.prestosql.jdbc.ColumnInfo.Nullable; -import io.prestosql.jdbc.TypeConversions.NoConversionRegisteredException; +import io.trino.client.ClientTypeSignature; +import io.trino.client.ClientTypeSignatureParameter; +import io.trino.client.Column; +import io.trino.client.IntervalDayTime; +import io.trino.client.IntervalYearMonth; +import io.trino.client.QueryError; +import io.trino.client.QueryStatusInfo; +import io.trino.jdbc.ColumnInfo.Nullable; +import io.trino.jdbc.TypeConversions.NoConversionRegisteredException; import org.joda.time.DateTimeZone; import org.joda.time.LocalDate; import org.joda.time.format.DateTimeFormat; @@ -75,7 +75,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Verify.verify; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.jdbc.ColumnInfo.setTypeInfo; +import static io.trino.jdbc.ColumnInfo.setTypeInfo; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.math.BigDecimal.ROUND_HALF_UP; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/ColumnInfo.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/ColumnInfo.java index 22358547fce1..54c0c8653c9b 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/ColumnInfo.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/ColumnInfo.java @@ -14,8 +14,8 @@ package io.trino.jdbc; import com.google.common.collect.ImmutableList; -import io.prestosql.client.ClientTypeSignature; -import io.prestosql.client.ClientTypeSignatureParameter; +import io.trino.client.ClientTypeSignature; +import io.trino.client.ClientTypeSignatureParameter; import java.sql.Types; import java.util.List; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/ConnectionProperties.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/ConnectionProperties.java index 65ef02143970..cc30a2bc130c 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/ConnectionProperties.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/ConnectionProperties.java @@ -18,7 +18,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.net.HostAndPort; -import io.prestosql.client.ClientSelectedRole; +import io.trino.client.ClientSelectedRole; import java.io.File; import java.util.List; @@ -31,9 +31,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.Maps.immutableEntry; -import static io.prestosql.client.ClientSelectedRole.Type.ALL; -import static io.prestosql.client.ClientSelectedRole.Type.NONE; -import static io.prestosql.jdbc.AbstractConnectionProperty.checkedPredicate; +import static io.trino.client.ClientSelectedRole.Type.ALL; +import static io.trino.client.ClientSelectedRole.Type.NONE; +import static io.trino.jdbc.AbstractConnectionProperty.checkedPredicate; import static java.util.Collections.unmodifiableMap; import static java.util.Objects.requireNonNull; import static java.util.function.Function.identity; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/InMemoryPrestoResultSet.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/InMemoryPrestoResultSet.java index 626e650d1958..d094e52b4f71 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/InMemoryPrestoResultSet.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/InMemoryPrestoResultSet.java @@ -13,7 +13,7 @@ */ package io.trino.jdbc; -import io.prestosql.client.Column; +import io.trino.client.Column; import java.sql.SQLException; import java.util.List; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoConnection.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoConnection.java index 7180a6007b1c..a9e37a1db38e 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoConnection.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoConnection.java @@ -19,10 +19,10 @@ import com.google.common.collect.ImmutableSet; import com.google.common.primitives.Ints; import io.airlift.units.Duration; -import io.prestosql.client.ClientSelectedRole; -import io.prestosql.client.ClientSession; -import io.prestosql.client.ServerInfo; -import io.prestosql.client.StatementClient; +import io.trino.client.ClientSelectedRole; +import io.trino.client.ClientSession; +import io.trino.client.ServerInfo; +import io.trino.client.StatementClient; import java.net.URI; import java.nio.charset.CharsetEncoder; @@ -59,10 +59,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Strings.nullToEmpty; import static com.google.common.collect.Maps.fromProperties; -import static io.prestosql.jdbc.ClientInfoProperty.APPLICATION_NAME; -import static io.prestosql.jdbc.ClientInfoProperty.CLIENT_INFO; -import static io.prestosql.jdbc.ClientInfoProperty.CLIENT_TAGS; -import static io.prestosql.jdbc.ClientInfoProperty.TRACE_TOKEN; +import static io.trino.jdbc.ClientInfoProperty.APPLICATION_NAME; +import static io.trino.jdbc.ClientInfoProperty.CLIENT_INFO; +import static io.trino.jdbc.ClientInfoProperty.CLIENT_TAGS; +import static io.trino.jdbc.ClientInfoProperty.TRACE_TOKEN; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.US_ASCII; import static java.util.Objects.requireNonNull; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoDatabaseMetaData.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoDatabaseMetaData.java index 45887a4424a6..23284fc33f92 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoDatabaseMetaData.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoDatabaseMetaData.java @@ -16,9 +16,9 @@ import com.google.common.base.Joiner; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; -import io.prestosql.client.ClientTypeSignature; -import io.prestosql.client.ClientTypeSignatureParameter; -import io.prestosql.client.Column; +import io.trino.client.ClientTypeSignature; +import io.trino.client.ClientTypeSignatureParameter; +import io.trino.client.Column; import java.sql.Connection; import java.sql.DatabaseMetaData; @@ -32,7 +32,7 @@ import java.util.stream.Stream; import static com.google.common.collect.Lists.newArrayList; -import static io.prestosql.client.ClientTypeSignature.VARCHAR_UNBOUNDED_LENGTH; +import static io.trino.client.ClientTypeSignature.VARCHAR_UNBOUNDED_LENGTH; import static java.lang.Integer.parseInt; import static java.util.Objects.requireNonNull; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoDriver.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoDriver.java index fbe3203dd69d..e701648d84b2 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoDriver.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoDriver.java @@ -28,8 +28,8 @@ import java.util.regex.Pattern; import static com.google.common.base.MoreObjects.firstNonNull; -import static io.prestosql.client.OkHttpUtil.setupChannelSocket; -import static io.prestosql.client.OkHttpUtil.userAgent; +import static io.trino.client.OkHttpUtil.setupChannelSocket; +import static io.trino.client.OkHttpUtil.userAgent; import static java.lang.Integer.parseInt; public class PrestoDriver diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoDriverUri.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoDriverUri.java index 49266b8400cf..0047013d4f7d 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoDriverUri.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoDriverUri.java @@ -17,8 +17,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import com.google.common.net.HostAndPort; -import io.prestosql.client.ClientException; -import io.prestosql.client.ClientSelectedRole; +import io.trino.client.ClientException; +import io.trino.client.ClientSelectedRole; import okhttp3.OkHttpClient; import java.io.File; @@ -33,48 +33,48 @@ import java.util.Properties; import static com.google.common.base.Strings.isNullOrEmpty; -import static io.prestosql.client.KerberosUtil.defaultCredentialCachePath; -import static io.prestosql.client.OkHttpUtil.basicAuth; -import static io.prestosql.client.OkHttpUtil.setupCookieJar; -import static io.prestosql.client.OkHttpUtil.setupHttpProxy; -import static io.prestosql.client.OkHttpUtil.setupInsecureSsl; -import static io.prestosql.client.OkHttpUtil.setupKerberos; -import static io.prestosql.client.OkHttpUtil.setupSocksProxy; -import static io.prestosql.client.OkHttpUtil.setupSsl; -import static io.prestosql.client.OkHttpUtil.tokenAuth; -import static io.prestosql.jdbc.ConnectionProperties.ACCESS_TOKEN; -import static io.prestosql.jdbc.ConnectionProperties.APPLICATION_NAME_PREFIX; -import static io.prestosql.jdbc.ConnectionProperties.CLIENT_INFO; -import static io.prestosql.jdbc.ConnectionProperties.CLIENT_TAGS; -import static io.prestosql.jdbc.ConnectionProperties.DISABLE_COMPRESSION; -import static io.prestosql.jdbc.ConnectionProperties.EXTRA_CREDENTIALS; -import static io.prestosql.jdbc.ConnectionProperties.HTTP_PROXY; -import static io.prestosql.jdbc.ConnectionProperties.KERBEROS_CONFIG_PATH; -import static io.prestosql.jdbc.ConnectionProperties.KERBEROS_CREDENTIAL_CACHE_PATH; -import static io.prestosql.jdbc.ConnectionProperties.KERBEROS_KEYTAB_PATH; -import static io.prestosql.jdbc.ConnectionProperties.KERBEROS_PRINCIPAL; -import static io.prestosql.jdbc.ConnectionProperties.KERBEROS_REMOTE_SERVICE_NAME; -import static io.prestosql.jdbc.ConnectionProperties.KERBEROS_SERVICE_PRINCIPAL_PATTERN; -import static io.prestosql.jdbc.ConnectionProperties.KERBEROS_USE_CANONICAL_HOSTNAME; -import static io.prestosql.jdbc.ConnectionProperties.PASSWORD; -import static io.prestosql.jdbc.ConnectionProperties.ROLES; -import static io.prestosql.jdbc.ConnectionProperties.SESSION_PROPERTIES; -import static io.prestosql.jdbc.ConnectionProperties.SOCKS_PROXY; -import static io.prestosql.jdbc.ConnectionProperties.SOURCE; -import static io.prestosql.jdbc.ConnectionProperties.SSL; -import static io.prestosql.jdbc.ConnectionProperties.SSL_KEY_STORE_PASSWORD; -import static io.prestosql.jdbc.ConnectionProperties.SSL_KEY_STORE_PATH; -import static io.prestosql.jdbc.ConnectionProperties.SSL_KEY_STORE_TYPE; -import static io.prestosql.jdbc.ConnectionProperties.SSL_TRUST_STORE_PASSWORD; -import static io.prestosql.jdbc.ConnectionProperties.SSL_TRUST_STORE_PATH; -import static io.prestosql.jdbc.ConnectionProperties.SSL_TRUST_STORE_TYPE; -import static io.prestosql.jdbc.ConnectionProperties.SSL_VERIFICATION; -import static io.prestosql.jdbc.ConnectionProperties.SslVerificationMode; -import static io.prestosql.jdbc.ConnectionProperties.SslVerificationMode.CA; -import static io.prestosql.jdbc.ConnectionProperties.SslVerificationMode.FULL; -import static io.prestosql.jdbc.ConnectionProperties.SslVerificationMode.NONE; -import static io.prestosql.jdbc.ConnectionProperties.TRACE_TOKEN; -import static io.prestosql.jdbc.ConnectionProperties.USER; +import static io.trino.client.KerberosUtil.defaultCredentialCachePath; +import static io.trino.client.OkHttpUtil.basicAuth; +import static io.trino.client.OkHttpUtil.setupCookieJar; +import static io.trino.client.OkHttpUtil.setupHttpProxy; +import static io.trino.client.OkHttpUtil.setupInsecureSsl; +import static io.trino.client.OkHttpUtil.setupKerberos; +import static io.trino.client.OkHttpUtil.setupSocksProxy; +import static io.trino.client.OkHttpUtil.setupSsl; +import static io.trino.client.OkHttpUtil.tokenAuth; +import static io.trino.jdbc.ConnectionProperties.ACCESS_TOKEN; +import static io.trino.jdbc.ConnectionProperties.APPLICATION_NAME_PREFIX; +import static io.trino.jdbc.ConnectionProperties.CLIENT_INFO; +import static io.trino.jdbc.ConnectionProperties.CLIENT_TAGS; +import static io.trino.jdbc.ConnectionProperties.DISABLE_COMPRESSION; +import static io.trino.jdbc.ConnectionProperties.EXTRA_CREDENTIALS; +import static io.trino.jdbc.ConnectionProperties.HTTP_PROXY; +import static io.trino.jdbc.ConnectionProperties.KERBEROS_CONFIG_PATH; +import static io.trino.jdbc.ConnectionProperties.KERBEROS_CREDENTIAL_CACHE_PATH; +import static io.trino.jdbc.ConnectionProperties.KERBEROS_KEYTAB_PATH; +import static io.trino.jdbc.ConnectionProperties.KERBEROS_PRINCIPAL; +import static io.trino.jdbc.ConnectionProperties.KERBEROS_REMOTE_SERVICE_NAME; +import static io.trino.jdbc.ConnectionProperties.KERBEROS_SERVICE_PRINCIPAL_PATTERN; +import static io.trino.jdbc.ConnectionProperties.KERBEROS_USE_CANONICAL_HOSTNAME; +import static io.trino.jdbc.ConnectionProperties.PASSWORD; +import static io.trino.jdbc.ConnectionProperties.ROLES; +import static io.trino.jdbc.ConnectionProperties.SESSION_PROPERTIES; +import static io.trino.jdbc.ConnectionProperties.SOCKS_PROXY; +import static io.trino.jdbc.ConnectionProperties.SOURCE; +import static io.trino.jdbc.ConnectionProperties.SSL; +import static io.trino.jdbc.ConnectionProperties.SSL_KEY_STORE_PASSWORD; +import static io.trino.jdbc.ConnectionProperties.SSL_KEY_STORE_PATH; +import static io.trino.jdbc.ConnectionProperties.SSL_KEY_STORE_TYPE; +import static io.trino.jdbc.ConnectionProperties.SSL_TRUST_STORE_PASSWORD; +import static io.trino.jdbc.ConnectionProperties.SSL_TRUST_STORE_PATH; +import static io.trino.jdbc.ConnectionProperties.SSL_TRUST_STORE_TYPE; +import static io.trino.jdbc.ConnectionProperties.SSL_VERIFICATION; +import static io.trino.jdbc.ConnectionProperties.SslVerificationMode; +import static io.trino.jdbc.ConnectionProperties.SslVerificationMode.CA; +import static io.trino.jdbc.ConnectionProperties.SslVerificationMode.FULL; +import static io.trino.jdbc.ConnectionProperties.SslVerificationMode.NONE; +import static io.trino.jdbc.ConnectionProperties.TRACE_TOKEN; +import static io.trino.jdbc.ConnectionProperties.USER; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoIntervalDayTime.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoIntervalDayTime.java index 4e91dbddb68a..efe202803466 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoIntervalDayTime.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoIntervalDayTime.java @@ -15,8 +15,8 @@ import java.util.Objects; -import static io.prestosql.client.IntervalDayTime.formatMillis; -import static io.prestosql.client.IntervalDayTime.toMillis; +import static io.trino.client.IntervalDayTime.formatMillis; +import static io.trino.client.IntervalDayTime.toMillis; public class PrestoIntervalDayTime implements Comparable diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoIntervalYearMonth.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoIntervalYearMonth.java index fadb121fb3ca..e9e20753d479 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoIntervalYearMonth.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoIntervalYearMonth.java @@ -15,8 +15,8 @@ import java.util.Objects; -import static io.prestosql.client.IntervalYearMonth.formatMonths; -import static io.prestosql.client.IntervalYearMonth.toMonths; +import static io.trino.client.IntervalYearMonth.formatMonths; +import static io.trino.client.IntervalYearMonth.toMonths; public class PrestoIntervalYearMonth implements Comparable diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoPreparedStatement.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoPreparedStatement.java index 502402322f27..002b7193b796 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoPreparedStatement.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoPreparedStatement.java @@ -18,8 +18,8 @@ import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.client.ClientTypeSignature; -import io.prestosql.client.ClientTypeSignatureParameter; +import io.trino.client.ClientTypeSignature; +import io.trino.client.ClientTypeSignatureParameter; import org.joda.time.DateTimeZone; import java.io.InputStream; @@ -61,21 +61,21 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.io.BaseEncoding.base16; -import static io.prestosql.client.ClientTypeSignature.VARCHAR_UNBOUNDED_LENGTH; -import static io.prestosql.jdbc.AbstractPrestoResultSet.DATE_FORMATTER; -import static io.prestosql.jdbc.AbstractPrestoResultSet.TIMESTAMP_FORMATTER; -import static io.prestosql.jdbc.AbstractPrestoResultSet.TIME_FORMATTER; -import static io.prestosql.jdbc.ColumnInfo.setTypeInfo; -import static io.prestosql.jdbc.ObjectCasts.castToBigDecimal; -import static io.prestosql.jdbc.ObjectCasts.castToBinary; -import static io.prestosql.jdbc.ObjectCasts.castToBoolean; -import static io.prestosql.jdbc.ObjectCasts.castToByte; -import static io.prestosql.jdbc.ObjectCasts.castToDouble; -import static io.prestosql.jdbc.ObjectCasts.castToFloat; -import static io.prestosql.jdbc.ObjectCasts.castToInt; -import static io.prestosql.jdbc.ObjectCasts.castToLong; -import static io.prestosql.jdbc.ObjectCasts.castToShort; -import static io.prestosql.jdbc.ObjectCasts.invalidConversion; +import static io.trino.client.ClientTypeSignature.VARCHAR_UNBOUNDED_LENGTH; +import static io.trino.jdbc.AbstractPrestoResultSet.DATE_FORMATTER; +import static io.trino.jdbc.AbstractPrestoResultSet.TIMESTAMP_FORMATTER; +import static io.trino.jdbc.AbstractPrestoResultSet.TIME_FORMATTER; +import static io.trino.jdbc.ColumnInfo.setTypeInfo; +import static io.trino.jdbc.ObjectCasts.castToBigDecimal; +import static io.trino.jdbc.ObjectCasts.castToBinary; +import static io.trino.jdbc.ObjectCasts.castToBoolean; +import static io.trino.jdbc.ObjectCasts.castToByte; +import static io.trino.jdbc.ObjectCasts.castToDouble; +import static io.trino.jdbc.ObjectCasts.castToFloat; +import static io.trino.jdbc.ObjectCasts.castToInt; +import static io.trino.jdbc.ObjectCasts.castToLong; +import static io.trino.jdbc.ObjectCasts.castToShort; +import static io.trino.jdbc.ObjectCasts.invalidConversion; import static java.lang.Long.parseLong; import static java.lang.String.format; import static java.time.format.DateTimeFormatter.ISO_LOCAL_DATE; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoResultSet.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoResultSet.java index 33980ca82127..5b8047f81656 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoResultSet.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoResultSet.java @@ -15,9 +15,9 @@ import com.google.common.collect.AbstractIterator; import com.google.common.collect.Streams; -import io.prestosql.client.Column; -import io.prestosql.client.QueryStatusInfo; -import io.prestosql.client.StatementClient; +import io.trino.client.Column; +import io.trino.client.QueryStatusInfo; +import io.trino.client.StatementClient; import java.sql.SQLException; import java.sql.Statement; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoSqlWarning.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoSqlWarning.java index b04d266a7b0a..555b5cdf0ccb 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoSqlWarning.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoSqlWarning.java @@ -13,7 +13,7 @@ */ package io.trino.jdbc; -import io.prestosql.client.Warning; +import io.trino.client.Warning; import java.sql.SQLWarning; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoStatement.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoStatement.java index 10de9c74a931..68f0db10fba1 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoStatement.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/PrestoStatement.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableMap; import com.google.common.primitives.Ints; -import io.prestosql.client.ClientException; -import io.prestosql.client.QueryStatusInfo; -import io.prestosql.client.StatementClient; +import io.trino.client.ClientException; +import io.trino.client.QueryStatusInfo; +import io.trino.client.StatementClient; import java.sql.Connection; import java.sql.ResultSet; @@ -33,7 +33,7 @@ import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; -import static io.prestosql.jdbc.AbstractPrestoResultSet.resultsException; +import static io.trino.jdbc.AbstractPrestoResultSet.resultsException; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/QueryExecutor.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/QueryExecutor.java index 5ace9a9b5a3c..de3bcf6553ab 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/QueryExecutor.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/QueryExecutor.java @@ -14,11 +14,11 @@ package io.trino.jdbc; import io.airlift.json.JsonCodec; -import io.prestosql.client.ClientException; -import io.prestosql.client.ClientSession; -import io.prestosql.client.JsonResponse; -import io.prestosql.client.ServerInfo; -import io.prestosql.client.StatementClient; +import io.trino.client.ClientException; +import io.trino.client.ClientSession; +import io.trino.client.JsonResponse; +import io.trino.client.ServerInfo; +import io.trino.client.StatementClient; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; import okhttp3.Request; @@ -26,7 +26,7 @@ import java.net.URI; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.client.StatementClientFactory.newStatementClient; +import static io.trino.client.StatementClientFactory.newStatementClient; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/QueryStats.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/QueryStats.java index a8cef3edcb61..33efda892018 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/QueryStats.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/QueryStats.java @@ -13,7 +13,7 @@ */ package io.trino.jdbc; -import io.prestosql.client.StatementStats; +import io.trino.client.StatementStats; import java.util.Optional; import java.util.OptionalDouble; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/TypeConversions.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/TypeConversions.java index 6c95f14b6c62..ffc10087b832 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/TypeConversions.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/TypeConversions.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableTable; import com.google.common.collect.Table; -import io.prestosql.client.ClientTypeSignature; +import io.trino.client.ClientTypeSignature; import java.sql.SQLException; diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/WarningsManager.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/WarningsManager.java index 08a5c8fb001d..bb4f1c915b47 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/WarningsManager.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/WarningsManager.java @@ -13,7 +13,7 @@ */ package io.trino.jdbc; -import io.prestosql.client.Warning; +import io.trino.client.Warning; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/BaseTestJdbcResultSet.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/BaseTestJdbcResultSet.java index f5c2c3d12436..893a3610727f 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/BaseTestJdbcResultSet.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/BaseTestJdbcResultSet.java @@ -41,7 +41,7 @@ import java.util.Map; import static com.google.common.base.Verify.verify; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.NANOSECONDS_PER_MILLISECOND; import static java.lang.String.format; import static java.math.RoundingMode.UNNECESSARY; import static java.util.Arrays.asList; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestAbstractPrestoResultSet.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestAbstractPrestoResultSet.java index 25ea73680e16..4cf2d1cac643 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestAbstractPrestoResultSet.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestAbstractPrestoResultSet.java @@ -15,8 +15,8 @@ import org.testng.annotations.Test; -import static io.prestosql.jdbc.AbstractPrestoResultSet.DEFAULT_OBJECT_REPRESENTATION; -import static io.prestosql.jdbc.AbstractPrestoResultSet.TYPE_CONVERSIONS; +import static io.trino.jdbc.AbstractPrestoResultSet.DEFAULT_OBJECT_REPRESENTATION; +import static io.trino.jdbc.AbstractPrestoResultSet.TYPE_CONVERSIONS; import static org.testng.Assert.fail; public class TestAbstractPrestoResultSet diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcConnection.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcConnection.java index 5680b182b8af..37a901dfc910 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcConnection.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcConnection.java @@ -20,17 +20,17 @@ import com.google.inject.Module; import com.google.inject.Scopes; import io.airlift.log.Logging; -import io.prestosql.client.ClientSelectedRole; -import io.prestosql.plugin.hive.HiveHadoop2Plugin; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.client.ClientSelectedRole; +import io.trino.plugin.hive.HiveHadoop2Plugin; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -46,9 +46,9 @@ import java.util.Set; import static com.google.inject.multibindings.Multibinder.newSetBinder; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.connector.SystemTable.Distribution.ALL_NODES; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.connector.SystemTable.Distribution.ALL_NODES; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcPreparedStatement.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcPreparedStatement.java index 9920075de4e4..9f5feb694131 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcPreparedStatement.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcPreparedStatement.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import io.airlift.log.Logging; -import io.prestosql.client.ClientTypeSignature; -import io.prestosql.client.ClientTypeSignatureParameter; -import io.prestosql.plugin.blackhole.BlackHolePlugin; -import io.prestosql.plugin.memory.MemoryPlugin; -import io.prestosql.server.testing.TestingPrestoServer; +import io.trino.client.ClientTypeSignature; +import io.trino.client.ClientTypeSignatureParameter; +import io.trino.plugin.blackhole.BlackHolePlugin; +import io.trino.plugin.memory.MemoryPlugin; +import io.trino.server.testing.TestingPrestoServer; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -51,10 +51,10 @@ import static com.google.common.base.Strings.repeat; import static com.google.common.base.Verify.verify; import static com.google.common.primitives.Ints.asList; -import static io.prestosql.client.ClientTypeSignature.VARCHAR_UNBOUNDED_LENGTH; -import static io.prestosql.jdbc.BaseTestJdbcResultSet.toSqlTime; -import static io.prestosql.jdbc.TestingJdbcUtils.list; -import static io.prestosql.jdbc.TestingJdbcUtils.readRows; +import static io.trino.client.ClientTypeSignature.VARCHAR_UNBOUNDED_LENGTH; +import static io.trino.jdbc.BaseTestJdbcResultSet.toSqlTime; +import static io.trino.jdbc.TestingJdbcUtils.list; +import static io.trino.jdbc.TestingJdbcUtils.readRows; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.time.ZoneOffset.UTC; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcResultSet.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcResultSet.java index a901f12b7acd..538aacf62327 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcResultSet.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcResultSet.java @@ -14,7 +14,7 @@ package io.trino.jdbc; import io.airlift.log.Logging; -import io.prestosql.server.testing.TestingPrestoServer; +import io.trino.server.testing.TestingPrestoServer; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcVendorCompatibility.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcVendorCompatibility.java index 468e63f78b01..60019df1159a 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcVendorCompatibility.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcVendorCompatibility.java @@ -17,7 +17,7 @@ import com.google.common.io.Closer; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.server.testing.TestingPrestoServer; +import io.trino.server.testing.TestingPrestoServer; import oracle.jdbc.OracleType; import org.testcontainers.containers.OracleContainer; import org.testcontainers.containers.PostgreSQLContainer; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcWarnings.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcWarnings.java index e0dc5c99ec0b..f9c703f13f77 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcWarnings.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcWarnings.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterators; -import io.prestosql.client.Warning; -import io.prestosql.execution.warnings.WarningCollectorConfig; -import io.prestosql.plugin.blackhole.BlackHolePlugin; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.PrestoWarning; -import io.prestosql.spi.WarningCode; -import io.prestosql.testing.TestingWarningCollector; -import io.prestosql.testing.TestingWarningCollectorConfig; +import io.trino.client.Warning; +import io.trino.execution.warnings.WarningCollectorConfig; +import io.trino.plugin.blackhole.BlackHolePlugin; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.PrestoWarning; +import io.trino.spi.WarningCode; +import io.trino.testing.TestingWarningCollector; +import io.trino.testing.TestingWarningCollectorConfig; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDatabaseMetaData.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDatabaseMetaData.java index 92d85e9a1b92..870696ac9c82 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDatabaseMetaData.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDatabaseMetaData.java @@ -17,31 +17,31 @@ import com.google.common.collect.ImmutableMultiset; import com.google.common.collect.Multiset; import io.airlift.log.Logging; -import io.prestosql.plugin.blackhole.BlackHolePlugin; -import io.prestosql.plugin.hive.HiveHadoop2Plugin; -import io.prestosql.plugin.tpch.TpchMetadata; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.testing.CountingMockConnector; -import io.prestosql.testing.CountingMockConnector.MetadataCallsCount; -import io.prestosql.type.ColorType; +import io.trino.plugin.blackhole.BlackHolePlugin; +import io.trino.plugin.hive.HiveHadoop2Plugin; +import io.trino.plugin.tpch.TpchMetadata; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.server.BasicQueryInfo; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.QueryId; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.testing.CountingMockConnector; +import io.trino.testing.CountingMockConnector.MetadataCallsCount; +import io.trino.type.ColorType; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; @@ -70,18 +70,18 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.getOnlyElement; import static io.airlift.testing.Assertions.assertContains; -import static io.prestosql.jdbc.TestingJdbcUtils.array; -import static io.prestosql.jdbc.TestingJdbcUtils.assertResultSet; -import static io.prestosql.jdbc.TestingJdbcUtils.list; -import static io.prestosql.jdbc.TestingJdbcUtils.readRows; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.TimeType.createTimeType; -import static io.prestosql.spi.type.TimeWithTimeZoneType.createTimeWithTimeZoneType; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.jdbc.TestingJdbcUtils.array; +import static io.trino.jdbc.TestingJdbcUtils.assertResultSet; +import static io.trino.jdbc.TestingJdbcUtils.list; +import static io.trino.jdbc.TestingJdbcUtils.readRows; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.TimeType.createTimeType; +import static io.trino.spi.type.TimeWithTimeZoneType.createTimeWithTimeZoneType; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDriver.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDriver.java index 213a0f836b58..23eb58971efa 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDriver.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDriver.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logging; -import io.prestosql.client.ClientSelectedRole; -import io.prestosql.execution.QueryState; -import io.prestosql.plugin.blackhole.BlackHolePlugin; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.client.ClientSelectedRole; +import io.trino.execution.QueryState; +import io.trino.plugin.blackhole.BlackHolePlugin; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.type.TimeZoneKey; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.testng.annotations.AfterClass; @@ -59,8 +59,8 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertContains; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.RUNNING; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.RUNNING; import static java.lang.Float.POSITIVE_INFINITY; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDriverAuth.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDriverAuth.java index ae06c7c97a60..9036e11a01eb 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDriverAuth.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDriverAuth.java @@ -18,8 +18,8 @@ import io.airlift.security.pem.PemReader; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.server.testing.TestingPrestoServer; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.server.testing.TestingPrestoServer; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDriverUri.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDriverUri.java index e4dbe6777076..1c88c0bed5ad 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDriverUri.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestPrestoDriverUri.java @@ -19,17 +19,17 @@ import java.sql.SQLException; import java.util.Properties; -import static io.prestosql.jdbc.ConnectionProperties.CLIENT_TAGS; -import static io.prestosql.jdbc.ConnectionProperties.DISABLE_COMPRESSION; -import static io.prestosql.jdbc.ConnectionProperties.EXTRA_CREDENTIALS; -import static io.prestosql.jdbc.ConnectionProperties.HTTP_PROXY; -import static io.prestosql.jdbc.ConnectionProperties.SOCKS_PROXY; -import static io.prestosql.jdbc.ConnectionProperties.SSL_TRUST_STORE_PASSWORD; -import static io.prestosql.jdbc.ConnectionProperties.SSL_TRUST_STORE_PATH; -import static io.prestosql.jdbc.ConnectionProperties.SSL_VERIFICATION; -import static io.prestosql.jdbc.ConnectionProperties.SslVerificationMode.CA; -import static io.prestosql.jdbc.ConnectionProperties.SslVerificationMode.FULL; -import static io.prestosql.jdbc.ConnectionProperties.SslVerificationMode.NONE; +import static io.trino.jdbc.ConnectionProperties.CLIENT_TAGS; +import static io.trino.jdbc.ConnectionProperties.DISABLE_COMPRESSION; +import static io.trino.jdbc.ConnectionProperties.EXTRA_CREDENTIALS; +import static io.trino.jdbc.ConnectionProperties.HTTP_PROXY; +import static io.trino.jdbc.ConnectionProperties.SOCKS_PROXY; +import static io.trino.jdbc.ConnectionProperties.SSL_TRUST_STORE_PASSWORD; +import static io.trino.jdbc.ConnectionProperties.SSL_TRUST_STORE_PATH; +import static io.trino.jdbc.ConnectionProperties.SSL_VERIFICATION; +import static io.trino.jdbc.ConnectionProperties.SslVerificationMode.CA; +import static io.trino.jdbc.ConnectionProperties.SslVerificationMode.FULL; +import static io.trino.jdbc.ConnectionProperties.SslVerificationMode.NONE; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestProgressMonitor.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestProgressMonitor.java index 4743ad613beb..e6272762872f 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestProgressMonitor.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestProgressMonitor.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import io.airlift.json.JsonCodec; -import io.prestosql.client.ClientTypeSignature; -import io.prestosql.client.Column; -import io.prestosql.client.QueryResults; -import io.prestosql.client.StatementStats; -import io.prestosql.spi.type.StandardTypes; +import io.trino.client.ClientTypeSignature; +import io.trino.client.Column; +import io.trino.client.QueryResults; +import io.trino.client.StatementStats; +import io.trino.spi.type.StandardTypes; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import org.testng.annotations.AfterMethod; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestQueryExecutor.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestQueryExecutor.java index f58a166cd0f5..d800eb6aeb16 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestQueryExecutor.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestQueryExecutor.java @@ -15,7 +15,7 @@ import io.airlift.json.JsonCodec; import io.airlift.units.Duration; -import io.prestosql.client.ServerInfo; +import io.trino.client.ServerInfo; import okhttp3.OkHttpClient; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; @@ -28,7 +28,7 @@ import static com.google.common.net.HttpHeaders.CONTENT_TYPE; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.client.NodeVersion.UNKNOWN; +import static io.trino.client.NodeVersion.UNKNOWN; import static org.testng.Assert.assertEquals; @Test(singleThreaded = true) diff --git a/core/trino-main/src/main/java/io/trino/ExceededCpuLimitException.java b/core/trino-main/src/main/java/io/trino/ExceededCpuLimitException.java index 8c287f9e823e..57bd3958ab7d 100644 --- a/core/trino-main/src/main/java/io/trino/ExceededCpuLimitException.java +++ b/core/trino-main/src/main/java/io/trino/ExceededCpuLimitException.java @@ -14,9 +14,9 @@ package io.trino; import io.airlift.units.Duration; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_CPU_LIMIT; +import static io.trino.spi.StandardErrorCode.EXCEEDED_CPU_LIMIT; public class ExceededCpuLimitException extends PrestoException diff --git a/core/trino-main/src/main/java/io/trino/ExceededMemoryLimitException.java b/core/trino-main/src/main/java/io/trino/ExceededMemoryLimitException.java index 1340e8b4ebe8..fa73b643417a 100644 --- a/core/trino-main/src/main/java/io/trino/ExceededMemoryLimitException.java +++ b/core/trino-main/src/main/java/io/trino/ExceededMemoryLimitException.java @@ -14,11 +14,11 @@ package io.trino; import io.airlift.units.DataSize; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_GLOBAL_MEMORY_LIMIT; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_LOCAL_MEMORY_LIMIT; +import static io.trino.spi.StandardErrorCode.EXCEEDED_GLOBAL_MEMORY_LIMIT; +import static io.trino.spi.StandardErrorCode.EXCEEDED_LOCAL_MEMORY_LIMIT; import static java.lang.String.format; public class ExceededMemoryLimitException diff --git a/core/trino-main/src/main/java/io/trino/ExceededScanLimitException.java b/core/trino-main/src/main/java/io/trino/ExceededScanLimitException.java index 5aa885df91cd..30d9c1a31027 100644 --- a/core/trino-main/src/main/java/io/trino/ExceededScanLimitException.java +++ b/core/trino-main/src/main/java/io/trino/ExceededScanLimitException.java @@ -14,9 +14,9 @@ package io.trino; import io.airlift.units.DataSize; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_SCAN_LIMIT; +import static io.trino.spi.StandardErrorCode.EXCEEDED_SCAN_LIMIT; public class ExceededScanLimitException extends PrestoException diff --git a/core/trino-main/src/main/java/io/trino/ExceededSpillLimitException.java b/core/trino-main/src/main/java/io/trino/ExceededSpillLimitException.java index 4f90412cd8a1..e66b9360065e 100644 --- a/core/trino-main/src/main/java/io/trino/ExceededSpillLimitException.java +++ b/core/trino-main/src/main/java/io/trino/ExceededSpillLimitException.java @@ -14,9 +14,9 @@ package io.trino; import io.airlift.units.DataSize; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_SPILL_LIMIT; +import static io.trino.spi.StandardErrorCode.EXCEEDED_SPILL_LIMIT; import static java.lang.String.format; public class ExceededSpillLimitException diff --git a/core/trino-main/src/main/java/io/trino/FullConnectorSession.java b/core/trino-main/src/main/java/io/trino/FullConnectorSession.java index 465f4f850811..d44780f71e8d 100644 --- a/core/trino-main/src/main/java/io/trino/FullConnectorSession.java +++ b/core/trino-main/src/main/java/io/trino/FullConnectorSession.java @@ -14,12 +14,12 @@ package io.trino; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.connector.CatalogName; +import io.trino.metadata.SessionPropertyManager; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.type.TimeZoneKey; import java.time.Instant; import java.util.Locale; @@ -27,7 +27,7 @@ import java.util.Optional; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; +import static io.trino.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/GroupByHashPageIndexer.java b/core/trino-main/src/main/java/io/trino/GroupByHashPageIndexer.java index 67b560fbaa12..b500a3cd7a0a 100644 --- a/core/trino-main/src/main/java/io/trino/GroupByHashPageIndexer.java +++ b/core/trino-main/src/main/java/io/trino/GroupByHashPageIndexer.java @@ -13,21 +13,21 @@ */ package io.trino; -import io.prestosql.operator.GroupByHash; -import io.prestosql.operator.GroupByIdBlock; -import io.prestosql.operator.Work; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageIndexer; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.operator.GroupByHash; +import io.trino.operator.GroupByIdBlock; +import io.trino.operator.Work; +import io.trino.spi.Page; +import io.trino.spi.PageIndexer; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; import java.util.stream.IntStream; import static com.google.common.base.Verify.verify; -import static io.prestosql.operator.UpdateMemory.NOOP; +import static io.trino.operator.UpdateMemory.NOOP; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/GroupByHashPageIndexerFactory.java b/core/trino-main/src/main/java/io/trino/GroupByHashPageIndexerFactory.java index 9d879f1be1a7..a32d919e3eaf 100644 --- a/core/trino-main/src/main/java/io/trino/GroupByHashPageIndexerFactory.java +++ b/core/trino-main/src/main/java/io/trino/GroupByHashPageIndexerFactory.java @@ -13,12 +13,12 @@ */ package io.trino; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageIndexer; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.spi.Page; +import io.trino.spi.PageIndexer; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/NotInTransactionException.java b/core/trino-main/src/main/java/io/trino/NotInTransactionException.java index 72478dc4fed8..19a97a5ed5d0 100644 --- a/core/trino-main/src/main/java/io/trino/NotInTransactionException.java +++ b/core/trino-main/src/main/java/io/trino/NotInTransactionException.java @@ -13,10 +13,10 @@ */ package io.trino; -import io.prestosql.spi.PrestoException; -import io.prestosql.transaction.TransactionId; +import io.trino.spi.PrestoException; +import io.trino.transaction.TransactionId; -import static io.prestosql.spi.StandardErrorCode.UNKNOWN_TRANSACTION; +import static io.trino.spi.StandardErrorCode.UNKNOWN_TRANSACTION; import static java.lang.String.format; public class NotInTransactionException diff --git a/core/trino-main/src/main/java/io/trino/PagesIndexPageSorter.java b/core/trino-main/src/main/java/io/trino/PagesIndexPageSorter.java index b09d214d9017..4f8d16b2f3fd 100644 --- a/core/trino-main/src/main/java/io/trino/PagesIndexPageSorter.java +++ b/core/trino-main/src/main/java/io/trino/PagesIndexPageSorter.java @@ -13,18 +13,18 @@ */ package io.trino; -import io.prestosql.operator.PagesIndex; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; +import io.trino.operator.PagesIndex; +import io.trino.spi.Page; +import io.trino.spi.PageSorter; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; import javax.inject.Inject; import java.util.List; -import static io.prestosql.operator.SyntheticAddress.decodePosition; -import static io.prestosql.operator.SyntheticAddress.decodeSliceIndex; +import static io.trino.operator.SyntheticAddress.decodePosition; +import static io.trino.operator.SyntheticAddress.decodeSliceIndex; import static java.util.Objects.requireNonNull; public class PagesIndexPageSorter diff --git a/core/trino-main/src/main/java/io/trino/Session.java b/core/trino-main/src/main/java/io/trino/Session.java index 7e99d78738b9..29c077f92171 100644 --- a/core/trino-main/src/main/java/io/trino/Session.java +++ b/core/trino-main/src/main/java/io/trino/Session.java @@ -19,21 +19,21 @@ import com.google.common.collect.Maps; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.security.AccessControl; -import io.prestosql.security.SecurityContext; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.spi.session.ResourceEstimates; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.sql.SqlPath; -import io.prestosql.sql.tree.Execute; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionManager; +import io.trino.connector.CatalogName; +import io.trino.metadata.SessionPropertyManager; +import io.trino.security.AccessControl; +import io.trino.security.SecurityContext; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.security.Identity; +import io.trino.spi.security.SelectedRole; +import io.trino.spi.session.ResourceEstimates; +import io.trino.spi.type.TimeZoneKey; +import io.trino.sql.SqlPath; +import io.trino.sql.tree.Execute; +import io.trino.transaction.TransactionId; +import io.trino.transaction.TransactionManager; import java.security.Principal; import java.time.Instant; @@ -49,10 +49,10 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.connector.CatalogName.createInformationSchemaCatalogName; -import static io.prestosql.connector.CatalogName.createSystemTablesCatalogName; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.connector.CatalogName.createInformationSchemaCatalogName; +import static io.trino.connector.CatalogName.createSystemTablesCatalogName; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.util.Failures.checkCondition; import static java.util.Objects.requireNonNull; public final class Session diff --git a/core/trino-main/src/main/java/io/trino/SessionRepresentation.java b/core/trino-main/src/main/java/io/trino/SessionRepresentation.java index 31a2b1b52cf9..e1dfe29aa2ac 100644 --- a/core/trino-main/src/main/java/io/trino/SessionRepresentation.java +++ b/core/trino-main/src/main/java/io/trino/SessionRepresentation.java @@ -16,16 +16,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.security.BasicPrincipal; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.spi.session.ResourceEstimates; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.sql.SqlPath; -import io.prestosql.transaction.TransactionId; +import io.trino.connector.CatalogName; +import io.trino.metadata.SessionPropertyManager; +import io.trino.spi.QueryId; +import io.trino.spi.security.BasicPrincipal; +import io.trino.spi.security.Identity; +import io.trino.spi.security.SelectedRole; +import io.trino.spi.session.ResourceEstimates; +import io.trino.spi.type.TimeZoneKey; +import io.trino.sql.SqlPath; +import io.trino.transaction.TransactionId; import java.time.Instant; import java.util.Locale; 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 edcb2a70745d..58c3dc8d8e6d 100644 --- a/core/trino-main/src/main/java/io/trino/SystemSessionProperties.java +++ b/core/trino-main/src/main/java/io/trino/SystemSessionProperties.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.DynamicFilterConfig; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.execution.TaskManagerConfig; -import io.prestosql.memory.MemoryManagerConfig; -import io.prestosql.memory.NodeMemoryConfig; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; +import io.trino.execution.DynamicFilterConfig; +import io.trino.execution.QueryManagerConfig; +import io.trino.execution.TaskManagerConfig; +import io.trino.memory.MemoryManagerConfig; +import io.trino.memory.NodeMemoryConfig; +import io.trino.spi.PrestoException; +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; @@ -34,14 +34,14 @@ import java.util.OptionalInt; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.base.session.PropertyMetadataUtil.dataSizeProperty; -import static io.prestosql.plugin.base.session.PropertyMetadataUtil.durationProperty; -import static io.prestosql.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.plugin.base.session.PropertyMetadataUtil.dataSizeProperty; +import static io.trino.plugin.base.session.PropertyMetadataUtil.durationProperty; +import static io.trino.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.lang.Math.min; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/block/BlockJsonSerde.java b/core/trino-main/src/main/java/io/trino/block/BlockJsonSerde.java index 18932e42e83a..1431d5de871f 100644 --- a/core/trino-main/src/main/java/io/trino/block/BlockJsonSerde.java +++ b/core/trino-main/src/main/java/io/trino/block/BlockJsonSerde.java @@ -24,15 +24,15 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockEncodingSerde; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockEncodingSerde; import javax.inject.Inject; import java.io.IOException; -import static io.prestosql.block.BlockSerdeUtil.readBlock; -import static io.prestosql.block.BlockSerdeUtil.writeBlock; +import static io.trino.block.BlockSerdeUtil.readBlock; +import static io.trino.block.BlockSerdeUtil.writeBlock; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/block/BlockSerdeUtil.java b/core/trino-main/src/main/java/io/trino/block/BlockSerdeUtil.java index 581244620bb3..1ef48170cd28 100644 --- a/core/trino-main/src/main/java/io/trino/block/BlockSerdeUtil.java +++ b/core/trino-main/src/main/java/io/trino/block/BlockSerdeUtil.java @@ -16,13 +16,13 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceInput; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.type.Type; import java.lang.invoke.MethodHandle; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.util.Reflection.methodHandle; public final class BlockSerdeUtil { diff --git a/core/trino-main/src/main/java/io/trino/connector/ConnectorAwareNodeManager.java b/core/trino-main/src/main/java/io/trino/connector/ConnectorAwareNodeManager.java index ac33761335ec..f8bf8c53d8fd 100644 --- a/core/trino-main/src/main/java/io/trino/connector/ConnectorAwareNodeManager.java +++ b/core/trino-main/src/main/java/io/trino/connector/ConnectorAwareNodeManager.java @@ -14,9 +14,9 @@ package io.trino.connector; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; +import io.trino.metadata.InternalNodeManager; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/connector/ConnectorContextInstance.java b/core/trino-main/src/main/java/io/trino/connector/ConnectorContextInstance.java index 8ddd2bbed7ac..daaf2e8ea02e 100644 --- a/core/trino-main/src/main/java/io/trino/connector/ConnectorContextInstance.java +++ b/core/trino-main/src/main/java/io/trino/connector/ConnectorContextInstance.java @@ -13,12 +13,12 @@ */ package io.trino.connector; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.VersionEmbedder; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.NodeManager; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.PageSorter; +import io.trino.spi.VersionEmbedder; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.type.TypeManager; import java.util.function.Supplier; diff --git a/core/trino-main/src/main/java/io/trino/connector/ConnectorManager.java b/core/trino-main/src/main/java/io/trino/connector/ConnectorManager.java index 57fdef749513..ad88acfe0840 100644 --- a/core/trino-main/src/main/java/io/trino/connector/ConnectorManager.java +++ b/core/trino-main/src/main/java/io/trino/connector/ConnectorManager.java @@ -17,47 +17,47 @@ import com.google.common.collect.ImmutableSet; import io.airlift.log.Logger; import io.airlift.node.NodeInfo; -import io.prestosql.connector.informationschema.InformationSchemaConnector; -import io.prestosql.connector.system.CoordinatorSystemTablesProvider; -import io.prestosql.connector.system.StaticSystemTablesProvider; -import io.prestosql.connector.system.SystemConnector; -import io.prestosql.connector.system.SystemTablesProvider; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.index.IndexManager; -import io.prestosql.metadata.Catalog; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.HandleResolver; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.security.AccessControlManager; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.VersionEmbedder; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorIndexProvider; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.split.PageSinkManager; -import io.prestosql.split.PageSourceManager; -import io.prestosql.split.RecordPageSourceProvider; -import io.prestosql.split.SplitManager; -import io.prestosql.sql.planner.NodePartitioningManager; -import io.prestosql.transaction.TransactionManager; -import io.prestosql.type.InternalTypeManager; -import io.prestosql.version.EmbedVersion; +import io.trino.connector.informationschema.InformationSchemaConnector; +import io.trino.connector.system.CoordinatorSystemTablesProvider; +import io.trino.connector.system.StaticSystemTablesProvider; +import io.trino.connector.system.SystemConnector; +import io.trino.connector.system.SystemTablesProvider; +import io.trino.eventlistener.EventListenerManager; +import io.trino.index.IndexManager; +import io.trino.metadata.Catalog; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.HandleResolver; +import io.trino.metadata.InternalNodeManager; +import io.trino.metadata.MetadataManager; +import io.trino.security.AccessControlManager; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.PageSorter; +import io.trino.spi.VersionEmbedder; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorIndexProvider; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.TypeOperators; +import io.trino.split.PageSinkManager; +import io.trino.split.PageSourceManager; +import io.trino.split.RecordPageSourceProvider; +import io.trino.split.SplitManager; +import io.trino.sql.planner.NodePartitioningManager; +import io.trino.transaction.TransactionManager; +import io.trino.type.InternalTypeManager; +import io.trino.version.EmbedVersion; import javax.annotation.PreDestroy; import javax.annotation.concurrent.GuardedBy; @@ -76,8 +76,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.connector.CatalogName.createInformationSchemaCatalogName; -import static io.prestosql.connector.CatalogName.createSystemTablesCatalogName; +import static io.trino.connector.CatalogName.createInformationSchemaCatalogName; +import static io.trino.connector.CatalogName.createSystemTablesCatalogName; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaColumnHandle.java b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaColumnHandle.java index 3ef4bd0be153..70162b87e1fb 100644 --- a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaColumnHandle.java +++ b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaColumnHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnHandle; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaConnector.java b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaConnector.java index 9344e3db856a..333cc376a350 100644 --- a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaConnector.java +++ b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaConnector.java @@ -13,16 +13,16 @@ */ package io.trino.connector.informationschema; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; -import io.prestosql.transaction.InternalConnector; -import io.prestosql.transaction.TransactionId; +import io.trino.metadata.InternalNodeManager; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; +import io.trino.transaction.InternalConnector; +import io.trino.transaction.TransactionId; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaHandleResolver.java b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaHandleResolver.java index 65c89a9e3d05..c7290588d76b 100644 --- a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaHandleResolver.java +++ b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.connector.informationschema; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class InformationSchemaHandleResolver implements ConnectorHandleResolver diff --git a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaMetadata.java b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaMetadata.java index 7e6921498db2..7dee36547fa1 100644 --- a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaMetadata.java +++ b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaMetadata.java @@ -17,29 +17,29 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.FullConnectorSession; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.QualifiedTablePrefix; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.LimitApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.EquatableValueSet; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.SortedRangeSet; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.FullConnectorSession; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.QualifiedTablePrefix; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.LimitApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.EquatableValueSet; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.SortedRangeSet; +import io.trino.spi.predicate.TupleDomain; import java.util.Arrays; import java.util.Collection; @@ -58,14 +58,14 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.connector.informationschema.InformationSchemaTable.COLUMNS; -import static io.prestosql.connector.informationschema.InformationSchemaTable.INFORMATION_SCHEMA; -import static io.prestosql.connector.informationschema.InformationSchemaTable.ROLE_AUTHORIZATION_DESCRIPTORS; -import static io.prestosql.connector.informationschema.InformationSchemaTable.TABLES; -import static io.prestosql.connector.informationschema.InformationSchemaTable.TABLE_PRIVILEGES; -import static io.prestosql.connector.informationschema.InformationSchemaTable.VIEWS; -import static io.prestosql.metadata.MetadataUtil.findColumnMetadata; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.connector.informationschema.InformationSchemaTable.COLUMNS; +import static io.trino.connector.informationschema.InformationSchemaTable.INFORMATION_SCHEMA; +import static io.trino.connector.informationschema.InformationSchemaTable.ROLE_AUTHORIZATION_DESCRIPTORS; +import static io.trino.connector.informationschema.InformationSchemaTable.TABLES; +import static io.trino.connector.informationschema.InformationSchemaTable.TABLE_PRIVILEGES; +import static io.trino.connector.informationschema.InformationSchemaTable.VIEWS; +import static io.trino.metadata.MetadataUtil.findColumnMetadata; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Collections.emptyList; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaPageSource.java b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaPageSource.java index 9a33f1605d10..c1d153e8e371 100644 --- a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaPageSource.java +++ b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaPageSource.java @@ -15,23 +15,23 @@ import com.google.common.base.Suppliers; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedTablePrefix; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.GrantInfo; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.type.Type; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedTablePrefix; +import io.trino.security.AccessControl; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.GrantInfo; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.type.Type; import java.util.ArrayDeque; import java.util.Iterator; @@ -50,18 +50,18 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Sets.union; -import static io.prestosql.SystemSessionProperties.isOmitDateTimeTypePrecision; -import static io.prestosql.connector.informationschema.InformationSchemaMetadata.defaultPrefixes; -import static io.prestosql.connector.informationschema.InformationSchemaMetadata.isTablesEnumeratingTable; -import static io.prestosql.metadata.MetadataListing.getViews; -import static io.prestosql.metadata.MetadataListing.listSchemas; -import static io.prestosql.metadata.MetadataListing.listTableColumns; -import static io.prestosql.metadata.MetadataListing.listTablePrivileges; -import static io.prestosql.metadata.MetadataListing.listTables; -import static io.prestosql.metadata.MetadataListing.listViews; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; -import static io.prestosql.type.TypeUtils.getDisplayLabel; +import static io.trino.SystemSessionProperties.isOmitDateTimeTypePrecision; +import static io.trino.connector.informationschema.InformationSchemaMetadata.defaultPrefixes; +import static io.trino.connector.informationschema.InformationSchemaMetadata.isTablesEnumeratingTable; +import static io.trino.metadata.MetadataListing.getViews; +import static io.trino.metadata.MetadataListing.listSchemas; +import static io.trino.metadata.MetadataListing.listTableColumns; +import static io.trino.metadata.MetadataListing.listTablePrivileges; +import static io.trino.metadata.MetadataListing.listTables; +import static io.trino.metadata.MetadataListing.listViews; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.spi.type.TypeUtils.writeNativeValue; +import static io.trino.type.TypeUtils.getDisplayLabel; import static java.util.Objects.requireNonNull; public class InformationSchemaPageSource diff --git a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaPageSourceProvider.java b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaPageSourceProvider.java index 54494fefbccd..5c43167007c3 100644 --- a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaPageSourceProvider.java +++ b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaPageSourceProvider.java @@ -14,17 +14,17 @@ package io.trino.connector.informationschema; import io.airlift.log.Logger; -import io.prestosql.FullConnectorSession; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.FullConnectorSession; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.predicate.TupleDomain; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaSplit.java b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaSplit.java index b692c32f2e9f..43f790977de7 100644 --- a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaSplit.java +++ b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaSplitManager.java b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaSplitManager.java index 36e0cb9d0cf4..3128a99f1a0a 100644 --- a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaSplitManager.java +++ b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaSplitManager.java @@ -14,16 +14,16 @@ package io.trino.connector.informationschema; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.metadata.InternalNodeManager; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaTable.java b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaTable.java index 6d09aebde947..489c7fb78729 100644 --- a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaTable.java @@ -15,15 +15,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -import io.prestosql.metadata.MetadataUtil.TableMetadataBuilder; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.metadata.MetadataUtil.TableMetadataBuilder; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; import java.util.Optional; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaTableHandle.java b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaTableHandle.java index fbff5841ff6c..91d1b7c0a2f1 100644 --- a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaTableHandle.java +++ b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaTableHandle.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.QualifiedTablePrefix; -import io.prestosql.spi.connector.ConnectorTableHandle; +import io.trino.metadata.QualifiedTablePrefix; +import io.trino.spi.connector.ConnectorTableHandle; import java.util.Objects; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaTransactionHandle.java b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaTransactionHandle.java index 360e08b32ae4..3270594c8ec3 100644 --- a/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaTransactionHandle.java +++ b/core/trino-main/src/main/java/io/trino/connector/informationschema/InformationSchemaTransactionHandle.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.transaction.TransactionId; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.transaction.TransactionId; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/AbstractPropertiesSystemTable.java b/core/trino-main/src/main/java/io/trino/connector/system/AbstractPropertiesSystemTable.java index 2fe6c43a0ef5..993a18f495e8 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/AbstractPropertiesSystemTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/AbstractPropertiesSystemTable.java @@ -14,18 +14,18 @@ package io.trino.connector.system; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionManager; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.session.PropertyMetadata; +import io.trino.transaction.TransactionId; +import io.trino.transaction.TransactionManager; import java.util.Map; import java.util.Map.Entry; @@ -33,9 +33,9 @@ import java.util.function.Supplier; import static com.google.common.base.MoreObjects.firstNonNull; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; abstract class AbstractPropertiesSystemTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/AnalyzePropertiesSystemTable.java b/core/trino-main/src/main/java/io/trino/connector/system/AnalyzePropertiesSystemTable.java index a893d445fc03..7f9fe8477877 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/AnalyzePropertiesSystemTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/AnalyzePropertiesSystemTable.java @@ -13,8 +13,8 @@ */ package io.trino.connector.system; -import io.prestosql.metadata.Metadata; -import io.prestosql.transaction.TransactionManager; +import io.trino.metadata.Metadata; +import io.trino.transaction.TransactionManager; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/CatalogSystemTable.java b/core/trino-main/src/main/java/io/trino/connector/system/CatalogSystemTable.java index fa3f2cf805a8..c2b944df066c 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/CatalogSystemTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/CatalogSystemTable.java @@ -13,29 +13,29 @@ */ package io.trino.connector.system; -import io.prestosql.FullConnectorSession; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.InMemoryRecordSet.Builder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.FullConnectorSession; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.InMemoryRecordSet.Builder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; import java.util.Map; -import static io.prestosql.metadata.MetadataListing.listCatalogs; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataListing.listCatalogs; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class CatalogSystemTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/ColumnPropertiesSystemTable.java b/core/trino-main/src/main/java/io/trino/connector/system/ColumnPropertiesSystemTable.java index f584b6df4ae9..55dec67b4fe0 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/ColumnPropertiesSystemTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/ColumnPropertiesSystemTable.java @@ -13,8 +13,8 @@ */ package io.trino.connector.system; -import io.prestosql.metadata.Metadata; -import io.prestosql.transaction.TransactionManager; +import io.trino.metadata.Metadata; +import io.trino.transaction.TransactionManager; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/CoordinatorSystemTablesProvider.java b/core/trino-main/src/main/java/io/trino/connector/system/CoordinatorSystemTablesProvider.java index df7127ef7f07..7338ea890353 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/CoordinatorSystemTablesProvider.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/CoordinatorSystemTablesProvider.java @@ -14,21 +14,21 @@ package io.trino.connector.system; -import io.prestosql.FullConnectorSession; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.transaction.TransactionManager; +import io.trino.FullConnectorSession; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.transaction.TransactionManager; import java.util.Optional; import java.util.Set; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; import static java.util.Objects.requireNonNull; public class CoordinatorSystemTablesProvider diff --git a/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemConnector.java b/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemConnector.java index 2cd496363fe6..7bb3bf38dd09 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemConnector.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemConnector.java @@ -14,13 +14,13 @@ package io.trino.connector.system; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.transaction.IsolationLevel; -import io.prestosql.transaction.InternalConnector; -import io.prestosql.transaction.TransactionId; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.transaction.IsolationLevel; +import io.trino.transaction.InternalConnector; +import io.trino.transaction.TransactionId; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemConnectorFactory.java b/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemConnectorFactory.java index c337c5344f70..aee61a3aff20 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemConnectorFactory.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemConnectorFactory.java @@ -14,12 +14,12 @@ package io.trino.connector.system; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.procedure.Procedure; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.procedure.Procedure; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemHandleResolver.java b/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemHandleResolver.java index b5307b7d0c62..db7bfd2f1f5e 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemHandleResolver.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemHandleResolver.java @@ -13,7 +13,7 @@ */ package io.trino.connector.system; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class GlobalSystemHandleResolver extends SystemHandleResolver diff --git a/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemTransactionHandle.java b/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemTransactionHandle.java index 8a77394a0afd..d38396821003 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemTransactionHandle.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/GlobalSystemTransactionHandle.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.transaction.TransactionId; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.transaction.TransactionId; import static com.google.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/KillQueryProcedure.java b/core/trino-main/src/main/java/io/trino/connector/system/KillQueryProcedure.java index 6f3c6806531e..9eae93e91ba3 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/KillQueryProcedure.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/KillQueryProcedure.java @@ -14,16 +14,16 @@ package io.trino.connector.system; import com.google.common.collect.ImmutableList; -import io.prestosql.FullConnectorSession; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.dispatcher.DispatchQuery; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.procedure.Procedure.Argument; +import io.trino.FullConnectorSession; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.dispatcher.DispatchManager; +import io.trino.dispatcher.DispatchQuery; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.procedure.Procedure.Argument; import javax.inject.Inject; @@ -33,14 +33,14 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Strings.isNullOrEmpty; -import static io.prestosql.security.AccessControlUtil.checkCanKillQueryOwnedBy; -import static io.prestosql.spi.StandardErrorCode.ADMINISTRATIVELY_KILLED; -import static io.prestosql.spi.StandardErrorCode.ADMINISTRATIVELY_PREEMPTED; -import static io.prestosql.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.security.AccessControlUtil.checkCanKillQueryOwnedBy; +import static io.trino.spi.StandardErrorCode.ADMINISTRATIVELY_KILLED; +import static io.trino.spi.StandardErrorCode.ADMINISTRATIVELY_PREEMPTED; +import static io.trino.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.Reflection.methodHandle; import static java.util.Objects.requireNonNull; public class KillQueryProcedure diff --git a/core/trino-main/src/main/java/io/trino/connector/system/NodeSystemTable.java b/core/trino-main/src/main/java/io/trino/connector/system/NodeSystemTable.java index 2333372230a3..ac4892dc75a6 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/NodeSystemTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/NodeSystemTable.java @@ -13,32 +13,32 @@ */ package io.trino.connector.system; -import io.prestosql.metadata.AllNodes; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.metadata.NodeState; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.InMemoryRecordSet.Builder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.metadata.AllNodes; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; +import io.trino.metadata.NodeState; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.InMemoryRecordSet.Builder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; import java.util.Locale; import java.util.Set; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.metadata.NodeState.ACTIVE; -import static io.prestosql.metadata.NodeState.INACTIVE; -import static io.prestosql.metadata.NodeState.SHUTTING_DOWN; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.metadata.NodeState.ACTIVE; +import static io.trino.metadata.NodeState.INACTIVE; +import static io.trino.metadata.NodeState.SHUTTING_DOWN; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class NodeSystemTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/QuerySystemTable.java b/core/trino-main/src/main/java/io/trino/connector/system/QuerySystemTable.java index 829330335a1c..696f9d0fa9b1 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/QuerySystemTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/QuerySystemTable.java @@ -14,26 +14,26 @@ package io.trino.connector.system; import io.airlift.units.Duration; -import io.prestosql.FullConnectorSession; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryStats; -import io.prestosql.security.AccessControl; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.InMemoryRecordSet.Builder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.type.ArrayType; +import io.trino.FullConnectorSession; +import io.trino.dispatcher.DispatchManager; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryStats; +import io.trino.security.AccessControl; +import io.trino.server.BasicQueryInfo; +import io.trino.spi.ErrorCode; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.InMemoryRecordSet.Builder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.type.ArrayType; import org.joda.time.DateTime; import javax.inject.Inject; @@ -43,14 +43,14 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.security.AccessControlUtil.filterQueries; -import static io.prestosql.spi.connector.SystemTable.Distribution.ALL_COORDINATORS; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.security.AccessControlUtil.filterQueries; +import static io.trino.spi.connector.SystemTable.Distribution.ALL_COORDINATORS; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class QuerySystemTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/RuleStatsSystemTable.java b/core/trino-main/src/main/java/io/trino/connector/system/RuleStatsSystemTable.java index 663dd0895788..da63a6612378 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/RuleStatsSystemTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/RuleStatsSystemTable.java @@ -14,21 +14,21 @@ package io.trino.connector.system; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.iterative.RuleStats; +import io.trino.metadata.Metadata; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.iterative.RuleStats; import javax.inject.Inject; @@ -37,12 +37,12 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; public class RuleStatsSystemTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/SchemaPropertiesSystemTable.java b/core/trino-main/src/main/java/io/trino/connector/system/SchemaPropertiesSystemTable.java index e115882770a0..efff5bdea6e4 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/SchemaPropertiesSystemTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/SchemaPropertiesSystemTable.java @@ -13,8 +13,8 @@ */ package io.trino.connector.system; -import io.prestosql.metadata.Metadata; -import io.prestosql.transaction.TransactionManager; +import io.trino.metadata.Metadata; +import io.trino.transaction.TransactionManager; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/StaticSystemTablesProvider.java b/core/trino-main/src/main/java/io/trino/connector/system/StaticSystemTablesProvider.java index 4501310dc85e..79068b83e175 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/StaticSystemTablesProvider.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/StaticSystemTablesProvider.java @@ -14,9 +14,9 @@ package io.trino.connector.system; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; import java.util.Map; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/SystemColumnHandle.java b/core/trino-main/src/main/java/io/trino/connector/system/SystemColumnHandle.java index 6ebbe7ea8e67..36604968aeb9 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/SystemColumnHandle.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/SystemColumnHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/SystemConnector.java b/core/trino-main/src/main/java/io/trino/connector/system/SystemConnector.java index 2442293a38ac..58c20eb1242a 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/SystemConnector.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/SystemConnector.java @@ -13,15 +13,15 @@ */ package io.trino.connector.system; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.transaction.IsolationLevel; -import io.prestosql.transaction.InternalConnector; -import io.prestosql.transaction.TransactionId; +import io.trino.metadata.InternalNodeManager; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.transaction.IsolationLevel; +import io.trino.transaction.InternalConnector; +import io.trino.transaction.TransactionId; import java.util.Set; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/SystemConnectorModule.java b/core/trino-main/src/main/java/io/trino/connector/system/SystemConnectorModule.java index 8d48b9716ace..8ca12e51a3a4 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/SystemConnectorModule.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/SystemConnectorModule.java @@ -19,22 +19,22 @@ import com.google.inject.Scopes; import com.google.inject.multibindings.Multibinder; import com.google.inject.multibindings.ProvidesIntoSet; -import io.prestosql.connector.ConnectorManager; -import io.prestosql.connector.system.jdbc.AttributeJdbcTable; -import io.prestosql.connector.system.jdbc.CatalogJdbcTable; -import io.prestosql.connector.system.jdbc.ColumnJdbcTable; -import io.prestosql.connector.system.jdbc.ProcedureColumnJdbcTable; -import io.prestosql.connector.system.jdbc.ProcedureJdbcTable; -import io.prestosql.connector.system.jdbc.PseudoColumnJdbcTable; -import io.prestosql.connector.system.jdbc.SchemaJdbcTable; -import io.prestosql.connector.system.jdbc.SuperTableJdbcTable; -import io.prestosql.connector.system.jdbc.SuperTypeJdbcTable; -import io.prestosql.connector.system.jdbc.TableJdbcTable; -import io.prestosql.connector.system.jdbc.TableTypeJdbcTable; -import io.prestosql.connector.system.jdbc.TypesJdbcTable; -import io.prestosql.connector.system.jdbc.UdtJdbcTable; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.procedure.Procedure; +import io.trino.connector.ConnectorManager; +import io.trino.connector.system.jdbc.AttributeJdbcTable; +import io.trino.connector.system.jdbc.CatalogJdbcTable; +import io.trino.connector.system.jdbc.ColumnJdbcTable; +import io.trino.connector.system.jdbc.ProcedureColumnJdbcTable; +import io.trino.connector.system.jdbc.ProcedureJdbcTable; +import io.trino.connector.system.jdbc.PseudoColumnJdbcTable; +import io.trino.connector.system.jdbc.SchemaJdbcTable; +import io.trino.connector.system.jdbc.SuperTableJdbcTable; +import io.trino.connector.system.jdbc.SuperTypeJdbcTable; +import io.trino.connector.system.jdbc.TableJdbcTable; +import io.trino.connector.system.jdbc.TableTypeJdbcTable; +import io.trino.connector.system.jdbc.TypesJdbcTable; +import io.trino.connector.system.jdbc.UdtJdbcTable; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.procedure.Procedure; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/SystemHandleResolver.java b/core/trino-main/src/main/java/io/trino/connector/system/SystemHandleResolver.java index d3d40b1aca57..f82eaa6b9457 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/SystemHandleResolver.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/SystemHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.connector.system; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class SystemHandleResolver implements ConnectorHandleResolver diff --git a/core/trino-main/src/main/java/io/trino/connector/system/SystemPageSourceProvider.java b/core/trino-main/src/main/java/io/trino/connector/system/SystemPageSourceProvider.java index 0931bbb5bb8f..c5403d4cea24 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/SystemPageSourceProvider.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/SystemPageSourceProvider.java @@ -14,33 +14,33 @@ package io.trino.connector.system; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.EmptyPageSource; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.split.MappedPageSource; -import io.prestosql.split.MappedRecordSet; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.EmptyPageSource; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.split.MappedPageSource; +import io.trino.split.MappedRecordSet; import java.util.HashMap; import java.util.List; import java.util.Map; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/SystemSplit.java b/core/trino-main/src/main/java/io/trino/connector/system/SystemSplit.java index 75fb6c1a5871..2d5a11b180b3 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/SystemSplit.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/SystemSplit.java @@ -16,10 +16,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.predicate.TupleDomain; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/SystemSplitManager.java b/core/trino-main/src/main/java/io/trino/connector/system/SystemSplitManager.java index 84802dc2eecb..0cab1db75356 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/SystemSplitManager.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/SystemSplitManager.java @@ -15,29 +15,29 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.SystemTable.Distribution; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.SystemTable.Distribution; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; import java.util.Set; -import static io.prestosql.metadata.NodeState.ACTIVE; -import static io.prestosql.spi.connector.SystemTable.Distribution.ALL_COORDINATORS; -import static io.prestosql.spi.connector.SystemTable.Distribution.ALL_NODES; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.metadata.NodeState.ACTIVE; +import static io.trino.spi.connector.SystemTable.Distribution.ALL_COORDINATORS; +import static io.trino.spi.connector.SystemTable.Distribution.ALL_NODES; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; import static java.util.Objects.requireNonNull; public class SystemSplitManager diff --git a/core/trino-main/src/main/java/io/trino/connector/system/SystemTableHandle.java b/core/trino-main/src/main/java/io/trino/connector/system/SystemTableHandle.java index 50003c1eaf85..4a19130fc983 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/SystemTableHandle.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/SystemTableHandle.java @@ -15,15 +15,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.Objects; -import static io.prestosql.metadata.MetadataUtil.checkSchemaName; -import static io.prestosql.metadata.MetadataUtil.checkTableName; +import static io.trino.metadata.MetadataUtil.checkSchemaName; +import static io.trino.metadata.MetadataUtil.checkTableName; import static java.util.Objects.requireNonNull; public class SystemTableHandle diff --git a/core/trino-main/src/main/java/io/trino/connector/system/SystemTablesMetadata.java b/core/trino-main/src/main/java/io/trino/connector/system/SystemTablesMetadata.java index d5fafee23eee..ee471661cf0d 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/SystemTablesMetadata.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/SystemTablesMetadata.java @@ -14,21 +14,21 @@ package io.trino.connector.system; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.system.jdbc.JdbcTable; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.connector.system.jdbc.JdbcTable; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; import java.util.List; import java.util.Map; @@ -36,9 +36,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.connector.system.SystemColumnHandle.toSystemColumnHandles; -import static io.prestosql.metadata.MetadataUtil.findColumnMetadata; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.connector.system.SystemColumnHandle.toSystemColumnHandles; +import static io.trino.metadata.MetadataUtil.findColumnMetadata; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; import static java.lang.String.format; import static java.util.Collections.singletonMap; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/SystemTablesProvider.java b/core/trino-main/src/main/java/io/trino/connector/system/SystemTablesProvider.java index 110bcada040a..ae26b6f505ab 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/SystemTablesProvider.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/SystemTablesProvider.java @@ -13,9 +13,9 @@ */ package io.trino.connector.system; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; import java.util.Optional; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/SystemTransactionHandle.java b/core/trino-main/src/main/java/io/trino/connector/system/SystemTransactionHandle.java index 8f08e867043d..c5983fe5c864 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/SystemTransactionHandle.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/SystemTransactionHandle.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Suppliers; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.transaction.TransactionId; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.transaction.TransactionId; import java.util.function.Function; import java.util.function.Supplier; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/TableCommentSystemTable.java b/core/trino-main/src/main/java/io/trino/connector/system/TableCommentSystemTable.java index f801daed9fd3..296f7a0790bc 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/TableCommentSystemTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/TableCommentSystemTable.java @@ -15,35 +15,35 @@ import com.google.common.collect.ImmutableSet; import io.airlift.log.Logger; -import io.prestosql.FullConnectorSession; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.QualifiedTablePrefix; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.InMemoryRecordSet.Builder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.FullConnectorSession; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.QualifiedTablePrefix; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.InMemoryRecordSet.Builder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; import java.util.Optional; import java.util.Set; -import static io.prestosql.connector.system.jdbc.FilterUtil.tablePrefix; -import static io.prestosql.connector.system.jdbc.FilterUtil.tryGetSingleVarcharValue; -import static io.prestosql.metadata.MetadataListing.listCatalogs; -import static io.prestosql.metadata.MetadataListing.listTables; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.connector.system.jdbc.FilterUtil.tablePrefix; +import static io.trino.connector.system.jdbc.FilterUtil.tryGetSingleVarcharValue; +import static io.trino.metadata.MetadataListing.listCatalogs; +import static io.trino.metadata.MetadataListing.listTables; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class TableCommentSystemTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/TablePropertiesSystemTable.java b/core/trino-main/src/main/java/io/trino/connector/system/TablePropertiesSystemTable.java index a83d74839bf8..f04302253d58 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/TablePropertiesSystemTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/TablePropertiesSystemTable.java @@ -13,8 +13,8 @@ */ package io.trino.connector.system; -import io.prestosql.metadata.Metadata; -import io.prestosql.transaction.TransactionManager; +import io.trino.metadata.Metadata; +import io.trino.transaction.TransactionManager; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/TaskSystemTable.java b/core/trino-main/src/main/java/io/trino/connector/system/TaskSystemTable.java index e568d686ba8a..89e5e839bf4f 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/TaskSystemTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/TaskSystemTable.java @@ -16,30 +16,30 @@ import io.airlift.node.NodeInfo; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.TaskInfo; -import io.prestosql.execution.TaskManager; -import io.prestosql.execution.TaskStatus; -import io.prestosql.operator.TaskStats; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.InMemoryRecordSet.Builder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.execution.TaskInfo; +import io.trino.execution.TaskManager; +import io.trino.execution.TaskStatus; +import io.trino.operator.TaskStats; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.InMemoryRecordSet.Builder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; import org.joda.time.DateTime; import javax.inject.Inject; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.connector.SystemTable.Distribution.ALL_NODES; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.connector.SystemTable.Distribution.ALL_NODES; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; public class TaskSystemTable implements SystemTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/TransactionsSystemTable.java b/core/trino-main/src/main/java/io/trino/connector/system/TransactionsSystemTable.java index b7396a364a67..8301e526c10f 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/TransactionsSystemTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/TransactionsSystemTable.java @@ -14,23 +14,23 @@ package io.trino.connector.system; import com.google.common.collect.ImmutableList; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.InMemoryRecordSet.Builder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.transaction.TransactionInfo; -import io.prestosql.transaction.TransactionManager; +import io.trino.connector.CatalogName; +import io.trino.metadata.Metadata; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.InMemoryRecordSet.Builder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarcharType; +import io.trino.transaction.TransactionInfo; +import io.trino.transaction.TransactionManager; import org.joda.time.DateTime; import javax.inject.Inject; @@ -38,15 +38,15 @@ import java.util.List; import java.util.concurrent.TimeUnit; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.StandardTypes.ARRAY; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.StandardTypes.ARRAY; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class TransactionsSystemTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/AttributeJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/AttributeJdbcTable.java index 11cecab33d45..95cded5049be 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/AttributeJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/AttributeJdbcTable.java @@ -13,17 +13,17 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; public class AttributeJdbcTable extends JdbcTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/CatalogJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/CatalogJdbcTable.java index 5709f50320af..4f35ba2057ef 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/CatalogJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/CatalogJdbcTable.java @@ -13,24 +13,24 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.FullConnectorSession; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.InMemoryRecordSet.Builder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.FullConnectorSession; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.InMemoryRecordSet.Builder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; -import static io.prestosql.metadata.MetadataListing.listCatalogs; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataListing.listCatalogs; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class CatalogJdbcTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/ColumnJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/ColumnJdbcTable.java index dbbc383c851d..09fd846c18d5 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/ColumnJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/ColumnJdbcTable.java @@ -16,36 +16,36 @@ import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slices; -import io.prestosql.FullConnectorSession; -import io.prestosql.Session; -import io.prestosql.connector.system.SystemColumnHandle; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedTablePrefix; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.InMemoryRecordSet.Builder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.FullConnectorSession; +import io.trino.Session; +import io.trino.connector.system.SystemColumnHandle; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedTablePrefix; +import io.trino.security.AccessControl; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.InMemoryRecordSet.Builder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import javax.inject.Inject; @@ -65,25 +65,25 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.SystemSessionProperties.isOmitDateTimeTypePrecision; -import static io.prestosql.connector.system.jdbc.FilterUtil.tablePrefix; -import static io.prestosql.connector.system.jdbc.FilterUtil.tryGetSingleVarcharValue; -import static io.prestosql.metadata.MetadataListing.listCatalogs; -import static io.prestosql.metadata.MetadataListing.listSchemas; -import static io.prestosql.metadata.MetadataListing.listTableColumns; -import static io.prestosql.metadata.MetadataListing.listTables; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.type.TypeUtils.getDisplayLabel; +import static io.trino.SystemSessionProperties.isOmitDateTimeTypePrecision; +import static io.trino.connector.system.jdbc.FilterUtil.tablePrefix; +import static io.trino.connector.system.jdbc.FilterUtil.tryGetSingleVarcharValue; +import static io.trino.metadata.MetadataListing.listCatalogs; +import static io.trino.metadata.MetadataListing.listSchemas; +import static io.trino.metadata.MetadataListing.listTableColumns; +import static io.trino.metadata.MetadataListing.listTables; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.type.TypeUtils.getDisplayLabel; import static java.lang.Math.min; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/FilterUtil.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/FilterUtil.java index 53034e1674fd..8dca5f34c0da 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/FilterUtil.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/FilterUtil.java @@ -14,9 +14,9 @@ package io.trino.connector.system.jdbc; import io.airlift.slice.Slice; -import io.prestosql.metadata.QualifiedTablePrefix; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.metadata.QualifiedTablePrefix; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/JdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/JdbcTable.java index 7b2723500195..5431c8c32d01 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/JdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/JdbcTable.java @@ -13,13 +13,13 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; public abstract class JdbcTable implements SystemTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/ProcedureColumnJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/ProcedureColumnJdbcTable.java index eb8107132378..c73e0e8cacbc 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/ProcedureColumnJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/ProcedureColumnJdbcTable.java @@ -13,17 +13,17 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; public class ProcedureColumnJdbcTable extends JdbcTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/ProcedureJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/ProcedureJdbcTable.java index 72d9a0ab1de2..141527e9f643 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/ProcedureJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/ProcedureJdbcTable.java @@ -13,17 +13,17 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; public class ProcedureJdbcTable extends JdbcTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/PseudoColumnJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/PseudoColumnJdbcTable.java index 3a4648a0be49..0a21f8e89dbf 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/PseudoColumnJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/PseudoColumnJdbcTable.java @@ -13,17 +13,17 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; public class PseudoColumnJdbcTable extends JdbcTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/SchemaJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/SchemaJdbcTable.java index c5813fc2fa7c..cd43682f715a 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/SchemaJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/SchemaJdbcTable.java @@ -13,28 +13,28 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.FullConnectorSession; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.InMemoryRecordSet.Builder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.FullConnectorSession; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.InMemoryRecordSet.Builder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; import java.util.Optional; -import static io.prestosql.connector.system.jdbc.FilterUtil.tryGetSingleVarcharValue; -import static io.prestosql.metadata.MetadataListing.listCatalogs; -import static io.prestosql.metadata.MetadataListing.listSchemas; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.connector.system.jdbc.FilterUtil.tryGetSingleVarcharValue; +import static io.trino.metadata.MetadataListing.listCatalogs; +import static io.trino.metadata.MetadataListing.listSchemas; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class SchemaJdbcTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/SuperTableJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/SuperTableJdbcTable.java index ead6a42d09cf..d26c5b0a4003 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/SuperTableJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/SuperTableJdbcTable.java @@ -13,16 +13,16 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; public class SuperTableJdbcTable extends JdbcTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/SuperTypeJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/SuperTypeJdbcTable.java index c2d3ba3e4f24..1f8233d29374 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/SuperTypeJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/SuperTypeJdbcTable.java @@ -13,16 +13,16 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; public class SuperTypeJdbcTable extends JdbcTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/TableJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/TableJdbcTable.java index e0ba8b101277..fbfab5d2eb1a 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/TableJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/TableJdbcTable.java @@ -13,33 +13,33 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.FullConnectorSession; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedTablePrefix; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.InMemoryRecordSet.Builder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.FullConnectorSession; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedTablePrefix; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.InMemoryRecordSet.Builder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; import java.util.Optional; import java.util.Set; -import static io.prestosql.connector.system.jdbc.FilterUtil.emptyOrEquals; -import static io.prestosql.connector.system.jdbc.FilterUtil.tablePrefix; -import static io.prestosql.connector.system.jdbc.FilterUtil.tryGetSingleVarcharValue; -import static io.prestosql.metadata.MetadataListing.listCatalogs; -import static io.prestosql.metadata.MetadataListing.listTables; -import static io.prestosql.metadata.MetadataListing.listViews; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.connector.system.jdbc.FilterUtil.emptyOrEquals; +import static io.trino.connector.system.jdbc.FilterUtil.tablePrefix; +import static io.trino.connector.system.jdbc.FilterUtil.tryGetSingleVarcharValue; +import static io.trino.metadata.MetadataListing.listCatalogs; +import static io.trino.metadata.MetadataListing.listTables; +import static io.trino.metadata.MetadataListing.listViews; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/TableTypeJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/TableTypeJdbcTable.java index bcecf676d5ae..f5007dc70369 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/TableTypeJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/TableTypeJdbcTable.java @@ -13,16 +13,16 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; public class TableTypeJdbcTable extends JdbcTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/TypesJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/TypesJdbcTable.java index 9cc7e6f81e85..73de8a791500 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/TypesJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/TypesJdbcTable.java @@ -13,30 +13,30 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.InMemoryRecordSet.Builder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.Type; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.InMemoryRecordSet.Builder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.Type; import javax.inject.Inject; import java.sql.DatabaseMetaData; import java.sql.Types; -import static io.prestosql.connector.system.jdbc.ColumnJdbcTable.columnSize; -import static io.prestosql.connector.system.jdbc.ColumnJdbcTable.jdbcDataType; -import static io.prestosql.connector.system.jdbc.ColumnJdbcTable.numPrecRadix; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.connector.system.jdbc.ColumnJdbcTable.columnSize; +import static io.trino.connector.system.jdbc.ColumnJdbcTable.jdbcDataType; +import static io.trino.connector.system.jdbc.ColumnJdbcTable.numPrecRadix; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class TypesJdbcTable diff --git a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/UdtJdbcTable.java b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/UdtJdbcTable.java index 2904ad4a7e8f..fdead013b101 100644 --- a/core/trino-main/src/main/java/io/trino/connector/system/jdbc/UdtJdbcTable.java +++ b/core/trino-main/src/main/java/io/trino/connector/system/jdbc/UdtJdbcTable.java @@ -13,16 +13,16 @@ */ package io.trino.connector.system.jdbc; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; public class UdtJdbcTable extends JdbcTable diff --git a/core/trino-main/src/main/java/io/trino/cost/AggregationStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/AggregationStatsRule.java index d64a96f8590d..5f0cefb41406 100644 --- a/core/trino-main/src/main/java/io/trino/cost/AggregationStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/AggregationStatsRule.java @@ -13,20 +13,20 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; import java.util.Collection; import java.util.Map; import java.util.Optional; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.Patterns.aggregation; import static java.lang.Math.min; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/cost/AssignUniqueIdStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/AssignUniqueIdStatsRule.java index d32fd46cd832..1c8352afb4f4 100644 --- a/core/trino-main/src/main/java/io/trino/cost/AssignUniqueIdStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/AssignUniqueIdStatsRule.java @@ -13,16 +13,16 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Patterns; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Patterns; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class AssignUniqueIdStatsRule implements ComposableStatsCalculator.Rule diff --git a/core/trino-main/src/main/java/io/trino/cost/CachingCostProvider.java b/core/trino-main/src/main/java/io/trino/cost/CachingCostProvider.java index 021d7e361724..bbf840e2b626 100644 --- a/core/trino-main/src/main/java/io/trino/cost/CachingCostProvider.java +++ b/core/trino-main/src/main/java/io/trino/cost/CachingCostProvider.java @@ -14,19 +14,19 @@ package io.trino.cost; import io.airlift.log.Logger; -import io.prestosql.Session; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.GroupReference; -import io.prestosql.sql.planner.iterative.Memo; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.iterative.Memo; +import io.trino.sql.planner.plan.PlanNode; import java.util.IdentityHashMap; import java.util.Map; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.SystemSessionProperties.isEnableStatsCalculator; -import static io.prestosql.SystemSessionProperties.isIgnoreStatsCalculatorFailures; +import static io.trino.SystemSessionProperties.isEnableStatsCalculator; +import static io.trino.SystemSessionProperties.isIgnoreStatsCalculatorFailures; import static java.util.Objects.requireNonNull; public class CachingCostProvider diff --git a/core/trino-main/src/main/java/io/trino/cost/CachingStatsProvider.java b/core/trino-main/src/main/java/io/trino/cost/CachingStatsProvider.java index e1643d25dc2b..6b5c61aafc0d 100644 --- a/core/trino-main/src/main/java/io/trino/cost/CachingStatsProvider.java +++ b/core/trino-main/src/main/java/io/trino/cost/CachingStatsProvider.java @@ -14,21 +14,21 @@ package io.trino.cost; import io.airlift.log.Logger; -import io.prestosql.Session; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.GroupReference; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.iterative.Memo; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.iterative.Memo; +import io.trino.sql.planner.plan.PlanNode; import java.util.IdentityHashMap; import java.util.Map; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.SystemSessionProperties.isEnableStatsCalculator; -import static io.prestosql.SystemSessionProperties.isIgnoreStatsCalculatorFailures; -import static io.prestosql.sql.planner.iterative.Lookup.noLookup; +import static io.trino.SystemSessionProperties.isEnableStatsCalculator; +import static io.trino.SystemSessionProperties.isIgnoreStatsCalculatorFailures; +import static io.trino.sql.planner.iterative.Lookup.noLookup; import static java.util.Objects.requireNonNull; public final class CachingStatsProvider diff --git a/core/trino-main/src/main/java/io/trino/cost/ComparisonStatsCalculator.java b/core/trino-main/src/main/java/io/trino/cost/ComparisonStatsCalculator.java index b50c737cde14..6fc4292611fb 100644 --- a/core/trino-main/src/main/java/io/trino/cost/ComparisonStatsCalculator.java +++ b/core/trino-main/src/main/java/io/trino/cost/ComparisonStatsCalculator.java @@ -13,16 +13,16 @@ */ package io.trino.cost; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.ComparisonExpression; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.ComparisonExpression; import java.util.Optional; import java.util.OptionalDouble; -import static io.prestosql.cost.SymbolStatsEstimate.buildFrom; -import static io.prestosql.util.MoreMath.firstNonNaN; -import static io.prestosql.util.MoreMath.max; -import static io.prestosql.util.MoreMath.min; +import static io.trino.cost.SymbolStatsEstimate.buildFrom; +import static io.trino.util.MoreMath.firstNonNaN; +import static io.trino.util.MoreMath.max; +import static io.trino.util.MoreMath.min; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.NaN; import static java.lang.Double.POSITIVE_INFINITY; diff --git a/core/trino-main/src/main/java/io/trino/cost/ComposableStatsCalculator.java b/core/trino-main/src/main/java/io/trino/cost/ComposableStatsCalculator.java index d311c328a58c..5b903dca8651 100644 --- a/core/trino-main/src/main/java/io/trino/cost/ComposableStatsCalculator.java +++ b/core/trino-main/src/main/java/io/trino/cost/ComposableStatsCalculator.java @@ -15,12 +15,12 @@ import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.matching.pattern.TypeOfPattern; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.matching.pattern.TypeOfPattern; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.PlanNode; import java.lang.reflect.Modifier; import java.util.Iterator; diff --git a/core/trino-main/src/main/java/io/trino/cost/CostCalculator.java b/core/trino-main/src/main/java/io/trino/cost/CostCalculator.java index ba7f6be6f2cb..372584716637 100644 --- a/core/trino-main/src/main/java/io/trino/cost/CostCalculator.java +++ b/core/trino-main/src/main/java/io/trino/cost/CostCalculator.java @@ -15,9 +15,9 @@ package io.trino.cost; import com.google.inject.BindingAnnotation; -import io.prestosql.Session; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNode; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/cost/CostCalculatorUsingExchanges.java b/core/trino-main/src/main/java/io/trino/cost/CostCalculatorUsingExchanges.java index f9ff30fca0e3..a5f472c7fc83 100644 --- a/core/trino-main/src/main/java/io/trino/cost/CostCalculatorUsingExchanges.java +++ b/core/trino-main/src/main/java/io/trino/cost/CostCalculatorUsingExchanges.java @@ -15,27 +15,27 @@ package io.trino.cost; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.GroupReference; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.Session; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.ValuesNode; import javax.annotation.concurrent.ThreadSafe; import javax.inject.Inject; @@ -47,14 +47,14 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.cost.CostCalculatorWithEstimatedExchanges.calculateJoinInputCost; -import static io.prestosql.cost.CostCalculatorWithEstimatedExchanges.calculateLocalRepartitionCost; -import static io.prestosql.cost.CostCalculatorWithEstimatedExchanges.calculateRemoteGatherCost; -import static io.prestosql.cost.CostCalculatorWithEstimatedExchanges.calculateRemoteRepartitionCost; -import static io.prestosql.cost.CostCalculatorWithEstimatedExchanges.calculateRemoteReplicateCost; -import static io.prestosql.cost.LocalCostEstimate.addPartialComponents; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.FINAL; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.cost.CostCalculatorWithEstimatedExchanges.calculateJoinInputCost; +import static io.trino.cost.CostCalculatorWithEstimatedExchanges.calculateLocalRepartitionCost; +import static io.trino.cost.CostCalculatorWithEstimatedExchanges.calculateRemoteGatherCost; +import static io.trino.cost.CostCalculatorWithEstimatedExchanges.calculateRemoteRepartitionCost; +import static io.trino.cost.CostCalculatorWithEstimatedExchanges.calculateRemoteReplicateCost; +import static io.trino.cost.LocalCostEstimate.addPartialComponents; +import static io.trino.sql.planner.plan.AggregationNode.Step.FINAL; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; import static java.lang.Math.max; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/cost/CostCalculatorWithEstimatedExchanges.java b/core/trino-main/src/main/java/io/trino/cost/CostCalculatorWithEstimatedExchanges.java index 4c95cf53b59f..265c9bd6137d 100644 --- a/core/trino-main/src/main/java/io/trino/cost/CostCalculatorWithEstimatedExchanges.java +++ b/core/trino-main/src/main/java/io/trino/cost/CostCalculatorWithEstimatedExchanges.java @@ -14,18 +14,18 @@ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.GroupReference; -import io.prestosql.sql.planner.iterative.rule.DetermineJoinDistributionType; -import io.prestosql.sql.planner.iterative.rule.ReorderJoins; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.Session; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.iterative.rule.DetermineJoinDistributionType; +import io.trino.sql.planner.iterative.rule.ReorderJoins; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.UnionNode; import javax.annotation.concurrent.ThreadSafe; import javax.inject.Inject; @@ -33,7 +33,7 @@ import java.util.Objects; import java.util.Optional; -import static io.prestosql.cost.LocalCostEstimate.addPartialComponents; +import static io.trino.cost.LocalCostEstimate.addPartialComponents; import static java.util.Objects.requireNonNull; /** 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 9c257c7bb0b3..1b14afde5311 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.prestosql.Session; -import io.prestosql.sql.analyzer.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/cost/CostProvider.java b/core/trino-main/src/main/java/io/trino/cost/CostProvider.java index e44ea59c1d30..5312903d397c 100644 --- a/core/trino-main/src/main/java/io/trino/cost/CostProvider.java +++ b/core/trino-main/src/main/java/io/trino/cost/CostProvider.java @@ -13,7 +13,7 @@ */ package io.trino.cost; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNode; public interface CostProvider { diff --git a/core/trino-main/src/main/java/io/trino/cost/EnforceSingleRowStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/EnforceSingleRowStatsRule.java index c77a91d957ec..3e461c76f283 100644 --- a/core/trino-main/src/main/java/io/trino/cost/EnforceSingleRowStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/EnforceSingleRowStatsRule.java @@ -13,15 +13,15 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.EnforceSingleRowNode; import java.util.Optional; -import static io.prestosql.sql.planner.plan.Patterns.enforceSingleRow; +import static io.trino.sql.planner.plan.Patterns.enforceSingleRow; public class EnforceSingleRowStatsRule extends SimpleStatsRule diff --git a/core/trino-main/src/main/java/io/trino/cost/ExchangeStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/ExchangeStatsRule.java index 3879429fe37c..95bc658b0358 100644 --- a/core/trino-main/src/main/java/io/trino/cost/ExchangeStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/ExchangeStatsRule.java @@ -13,21 +13,21 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Verify.verify; -import static io.prestosql.cost.PlanNodeStatsEstimateMath.addStatsAndMaxDistinctValues; -import static io.prestosql.sql.planner.plan.Patterns.exchange; +import static io.trino.cost.PlanNodeStatsEstimateMath.addStatsAndMaxDistinctValues; +import static io.trino.sql.planner.plan.Patterns.exchange; public class ExchangeStatsRule extends SimpleStatsRule diff --git a/core/trino-main/src/main/java/io/trino/cost/FilterStatsCalculator.java b/core/trino-main/src/main/java/io/trino/cost/FilterStatsCalculator.java index 0b7cdc457059..abed4ff1f6e0 100644 --- a/core/trino-main/src/main/java/io/trino/cost/FilterStatsCalculator.java +++ b/core/trino-main/src/main/java/io/trino/cost/FilterStatsCalculator.java @@ -16,35 +16,35 @@ import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.ExpressionAnalyzer; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.planner.ExpressionInterpreter; -import io.prestosql.sql.planner.LiteralEncoder; -import io.prestosql.sql.planner.LiteralInterpreter; -import io.prestosql.sql.planner.NoOpSymbolResolver; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.InListExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.Literal; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.type.Type; +import io.trino.sql.analyzer.ExpressionAnalyzer; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.planner.ExpressionInterpreter; +import io.trino.sql.planner.LiteralEncoder; +import io.trino.sql.planner.LiteralInterpreter; +import io.trino.sql.planner.NoOpSymbolResolver; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.InListExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.Literal; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.SymbolReference; import javax.annotation.Nullable; @@ -54,18 +54,18 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.cost.ComparisonStatsCalculator.estimateExpressionToExpressionComparison; -import static io.prestosql.cost.ComparisonStatsCalculator.estimateExpressionToLiteralComparison; -import static io.prestosql.cost.PlanNodeStatsEstimateMath.addStatsAndSumDistinctValues; -import static io.prestosql.cost.PlanNodeStatsEstimateMath.capStats; -import static io.prestosql.cost.PlanNodeStatsEstimateMath.subtractSubsetStats; -import static io.prestosql.cost.StatsUtil.toStatsRepresentation; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.DynamicFilters.isDynamicFilter; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.cost.ComparisonStatsCalculator.estimateExpressionToExpressionComparison; +import static io.trino.cost.ComparisonStatsCalculator.estimateExpressionToLiteralComparison; +import static io.trino.cost.PlanNodeStatsEstimateMath.addStatsAndSumDistinctValues; +import static io.trino.cost.PlanNodeStatsEstimateMath.capStats; +import static io.trino.cost.PlanNodeStatsEstimateMath.subtractSubsetStats; +import static io.trino.cost.StatsUtil.toStatsRepresentation; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.DynamicFilters.isDynamicFilter; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; import static java.lang.Double.NaN; import static java.lang.Double.isInfinite; import static java.lang.Double.isNaN; diff --git a/core/trino-main/src/main/java/io/trino/cost/FilterStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/FilterStatsRule.java index 26eb6419aed8..17b2d7e14027 100644 --- a/core/trino-main/src/main/java/io/trino/cost/FilterStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/FilterStatsRule.java @@ -13,17 +13,17 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.FilterNode; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.FilterNode; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.isDefaultFilterFactorEnabled; -import static io.prestosql.cost.FilterStatsCalculator.UNKNOWN_FILTER_COEFFICIENT; -import static io.prestosql.sql.planner.plan.Patterns.filter; +import static io.trino.SystemSessionProperties.isDefaultFilterFactorEnabled; +import static io.trino.cost.FilterStatsCalculator.UNKNOWN_FILTER_COEFFICIENT; +import static io.trino.sql.planner.plan.Patterns.filter; public class FilterStatsRule extends SimpleStatsRule diff --git a/core/trino-main/src/main/java/io/trino/cost/JoinStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/JoinStatsRule.java index 456751d2ed6f..134aa8552098 100644 --- a/core/trino-main/src/main/java/io/trino/cost/JoinStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/JoinStatsRule.java @@ -14,16 +14,16 @@ package io.trino.cost; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.JoinNode.EquiJoinClause; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.util.MoreMath; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode.EquiJoinClause; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.util.MoreMath; import java.util.Collection; import java.util.LinkedList; @@ -34,11 +34,11 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Sets.difference; -import static io.prestosql.cost.FilterStatsCalculator.UNKNOWN_FILTER_COEFFICIENT; -import static io.prestosql.cost.SymbolStatsEstimate.buildFrom; -import static io.prestosql.sql.ExpressionUtils.extractConjuncts; -import static io.prestosql.sql.planner.plan.Patterns.join; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.cost.FilterStatsCalculator.UNKNOWN_FILTER_COEFFICIENT; +import static io.trino.cost.SymbolStatsEstimate.buildFrom; +import static io.trino.sql.ExpressionUtils.extractConjuncts; +import static io.trino.sql.planner.plan.Patterns.join; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; import static java.lang.Double.NaN; import static java.lang.Double.isNaN; import static java.lang.Math.min; diff --git a/core/trino-main/src/main/java/io/trino/cost/LimitStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/LimitStatsRule.java index 1d9adbfb85be..135a061a2712 100644 --- a/core/trino-main/src/main/java/io/trino/cost/LimitStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/LimitStatsRule.java @@ -13,15 +13,15 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.LimitNode; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.LimitNode; import java.util.Optional; -import static io.prestosql.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.limit; public class LimitStatsRule extends SimpleStatsRule diff --git a/core/trino-main/src/main/java/io/trino/cost/LocalCostEstimate.java b/core/trino-main/src/main/java/io/trino/cost/LocalCostEstimate.java index 47af2218c338..62a575ed3057 100644 --- a/core/trino-main/src/main/java/io/trino/cost/LocalCostEstimate.java +++ b/core/trino-main/src/main/java/io/trino/cost/LocalCostEstimate.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.Objects; import java.util.stream.Stream; diff --git a/core/trino-main/src/main/java/io/trino/cost/OutputStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/OutputStatsRule.java index 31f3bf968cdf..39473f04a304 100644 --- a/core/trino-main/src/main/java/io/trino/cost/OutputStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/OutputStatsRule.java @@ -13,16 +13,16 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.cost.ComposableStatsCalculator.Rule; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.OutputNode; +import io.trino.Session; +import io.trino.cost.ComposableStatsCalculator.Rule; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.OutputNode; import java.util.Optional; -import static io.prestosql.sql.planner.plan.Patterns.output; +import static io.trino.sql.planner.plan.Patterns.output; public class OutputStatsRule implements Rule diff --git a/core/trino-main/src/main/java/io/trino/cost/PlanNodeStatsEstimate.java b/core/trino-main/src/main/java/io/trino/cost/PlanNodeStatsEstimate.java index 5334ec0011e9..0a9760bf36ee 100644 --- a/core/trino-main/src/main/java/io/trino/cost/PlanNodeStatsEstimate.java +++ b/core/trino-main/src/main/java/io/trino/cost/PlanNodeStatsEstimate.java @@ -16,10 +16,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.FixedWidthType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; +import io.trino.spi.type.FixedWidthType; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; import org.pcollections.HashTreePMap; import org.pcollections.PMap; @@ -31,7 +31,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.util.MoreMath.firstNonNaN; +import static io.trino.util.MoreMath.firstNonNaN; import static java.lang.Double.NaN; import static java.lang.Double.isNaN; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/cost/ProjectStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/ProjectStatsRule.java index 55b054559728..27177bfd78af 100644 --- a/core/trino-main/src/main/java/io/trino/cost/ProjectStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/ProjectStatsRule.java @@ -13,18 +13,18 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; import java.util.Map; import java.util.Optional; -import static io.prestosql.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.project; import static java.util.Objects.requireNonNull; public class ProjectStatsRule diff --git a/core/trino-main/src/main/java/io/trino/cost/RowNumberStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/RowNumberStatsRule.java index 720a097ab8f4..5999a59213a6 100644 --- a/core/trino-main/src/main/java/io/trino/cost/RowNumberStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/RowNumberStatsRule.java @@ -13,17 +13,17 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.Patterns; -import io.prestosql.sql.planner.plan.RowNumberNode; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.Patterns; +import io.trino.sql.planner.plan.RowNumberNode; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.Double.isNaN; import static java.lang.Math.min; diff --git a/core/trino-main/src/main/java/io/trino/cost/ScalarStatsCalculator.java b/core/trino-main/src/main/java/io/trino/cost/ScalarStatsCalculator.java index f072d929f52d..b16586cd23c0 100644 --- a/core/trino-main/src/main/java/io/trino/cost/ScalarStatsCalculator.java +++ b/core/trino-main/src/main/java/io/trino/cost/ScalarStatsCalculator.java @@ -14,46 +14,46 @@ package io.trino.cost; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.ExpressionAnalyzer; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.planner.ExpressionInterpreter; -import io.prestosql.sql.planner.NoOpSymbolResolver; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.Literal; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.sql.analyzer.ExpressionAnalyzer; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.planner.ExpressionInterpreter; +import io.trino.sql.planner.NoOpSymbolResolver; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArithmeticUnaryExpression; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.Literal; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.SymbolReference; import javax.inject.Inject; import java.util.Map; import java.util.OptionalDouble; -import static io.prestosql.cost.StatsUtil.toStatsRepresentation; -import static io.prestosql.sql.analyzer.ExpressionAnalyzer.createConstantAnalyzer; -import static io.prestosql.sql.planner.LiteralInterpreter.evaluate; -import static io.prestosql.util.MoreMath.max; -import static io.prestosql.util.MoreMath.min; +import static io.trino.cost.StatsUtil.toStatsRepresentation; +import static io.trino.sql.analyzer.ExpressionAnalyzer.createConstantAnalyzer; +import static io.trino.sql.planner.LiteralInterpreter.evaluate; +import static io.trino.util.MoreMath.max; +import static io.trino.util.MoreMath.min; import static java.lang.Double.NaN; import static java.lang.Double.isFinite; import static java.lang.Double.isNaN; diff --git a/core/trino-main/src/main/java/io/trino/cost/SemiJoinStatsCalculator.java b/core/trino-main/src/main/java/io/trino/cost/SemiJoinStatsCalculator.java index 88d2a2c92964..87a349ecbf30 100644 --- a/core/trino-main/src/main/java/io/trino/cost/SemiJoinStatsCalculator.java +++ b/core/trino-main/src/main/java/io/trino/cost/SemiJoinStatsCalculator.java @@ -13,7 +13,7 @@ */ package io.trino.cost; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import java.util.function.BiFunction; diff --git a/core/trino-main/src/main/java/io/trino/cost/SemiJoinStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/SemiJoinStatsRule.java index 0ef328078c36..606a5cf80a6d 100644 --- a/core/trino-main/src/main/java/io/trino/cost/SemiJoinStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/SemiJoinStatsRule.java @@ -13,16 +13,16 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.cost.ComposableStatsCalculator.Rule; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.SemiJoinNode; +import io.trino.Session; +import io.trino.cost.ComposableStatsCalculator.Rule; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.SemiJoinNode; import java.util.Optional; -import static io.prestosql.sql.planner.plan.Patterns.semiJoin; +import static io.trino.sql.planner.plan.Patterns.semiJoin; public class SemiJoinStatsRule implements Rule diff --git a/core/trino-main/src/main/java/io/trino/cost/SimpleFilterProjectSemiJoinStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/SimpleFilterProjectSemiJoinStatsRule.java index 3e1e1b5bad04..04158dba0484 100644 --- a/core/trino-main/src/main/java/io/trino/cost/SimpleFilterProjectSemiJoinStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/SimpleFilterProjectSemiJoinStatsRule.java @@ -14,30 +14,30 @@ package io.trino.cost; import com.google.common.collect.Iterables; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.cost.FilterStatsCalculator.UNKNOWN_FILTER_COEFFICIENT; -import static io.prestosql.cost.SemiJoinStatsCalculator.computeAntiJoin; -import static io.prestosql.cost.SemiJoinStatsCalculator.computeSemiJoin; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.ExpressionUtils.extractConjuncts; -import static io.prestosql.sql.planner.plan.Patterns.filter; +import static io.trino.cost.FilterStatsCalculator.UNKNOWN_FILTER_COEFFICIENT; +import static io.trino.cost.SemiJoinStatsCalculator.computeAntiJoin; +import static io.trino.cost.SemiJoinStatsCalculator.computeSemiJoin; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.ExpressionUtils.extractConjuncts; +import static io.trino.sql.planner.plan.Patterns.filter; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/cost/SimpleStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/SimpleStatsRule.java index a60b69425246..2183e6a41453 100644 --- a/core/trino-main/src/main/java/io/trino/cost/SimpleStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/SimpleStatsRule.java @@ -13,11 +13,11 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.cost.ComposableStatsCalculator.Rule; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.ComposableStatsCalculator.Rule; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/cost/SortStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/SortStatsRule.java index b2ea728618cb..d291c350b6bf 100644 --- a/core/trino-main/src/main/java/io/trino/cost/SortStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/SortStatsRule.java @@ -13,16 +13,16 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.cost.ComposableStatsCalculator.Rule; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.SortNode; +import io.trino.Session; +import io.trino.cost.ComposableStatsCalculator.Rule; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.SortNode; import java.util.Optional; -import static io.prestosql.sql.planner.plan.Patterns.sort; +import static io.trino.sql.planner.plan.Patterns.sort; public class SortStatsRule implements Rule diff --git a/core/trino-main/src/main/java/io/trino/cost/SpatialJoinStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/SpatialJoinStatsRule.java index dea0a3c60179..8cf0afbd2c5a 100644 --- a/core/trino-main/src/main/java/io/trino/cost/SpatialJoinStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/SpatialJoinStatsRule.java @@ -13,15 +13,15 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.SpatialJoinNode; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.SpatialJoinNode; import java.util.Optional; -import static io.prestosql.sql.planner.plan.Patterns.spatialJoin; +import static io.trino.sql.planner.plan.Patterns.spatialJoin; import static java.util.Objects.requireNonNull; public class SpatialJoinStatsRule diff --git a/core/trino-main/src/main/java/io/trino/cost/StatsAndCosts.java b/core/trino-main/src/main/java/io/trino/cost/StatsAndCosts.java index 40d82aa6dd90..8005b2767724 100644 --- a/core/trino-main/src/main/java/io/trino/cost/StatsAndCosts.java +++ b/core/trino-main/src/main/java/io/trino/cost/StatsAndCosts.java @@ -18,10 +18,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; import com.google.common.graph.Traverser; -import io.prestosql.execution.StageInfo; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.StageInfo; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/cost/StatsCalculator.java b/core/trino-main/src/main/java/io/trino/cost/StatsCalculator.java index 6ffbe6618cc1..5b22b169ed25 100644 --- a/core/trino-main/src/main/java/io/trino/cost/StatsCalculator.java +++ b/core/trino-main/src/main/java/io/trino/cost/StatsCalculator.java @@ -13,11 +13,11 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.IterativeOptimizer; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.IterativeOptimizer; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.PlanNode; public interface StatsCalculator { diff --git a/core/trino-main/src/main/java/io/trino/cost/StatsCalculatorModule.java b/core/trino-main/src/main/java/io/trino/cost/StatsCalculatorModule.java index df4606c150df..7d9a75fb8728 100644 --- a/core/trino-main/src/main/java/io/trino/cost/StatsCalculatorModule.java +++ b/core/trino-main/src/main/java/io/trino/cost/StatsCalculatorModule.java @@ -17,8 +17,8 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Provides; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.TypeAnalyzer; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.TypeAnalyzer; import javax.inject.Singleton; diff --git a/core/trino-main/src/main/java/io/trino/cost/StatsNormalizer.java b/core/trino-main/src/main/java/io/trino/cost/StatsNormalizer.java index 18105d12e451..4ccdf498293f 100644 --- a/core/trino-main/src/main/java/io/trino/cost/StatsNormalizer.java +++ b/core/trino-main/src/main/java/io/trino/cost/StatsNormalizer.java @@ -14,16 +14,16 @@ package io.trino.cost; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; import java.util.Collection; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/cost/StatsProvider.java b/core/trino-main/src/main/java/io/trino/cost/StatsProvider.java index 788465a72a44..a66a255f4021 100644 --- a/core/trino-main/src/main/java/io/trino/cost/StatsProvider.java +++ b/core/trino-main/src/main/java/io/trino/cost/StatsProvider.java @@ -13,7 +13,7 @@ */ package io.trino.cost; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNode; public interface StatsProvider { diff --git a/core/trino-main/src/main/java/io/trino/cost/StatsUtil.java b/core/trino-main/src/main/java/io/trino/cost/StatsUtil.java index 7c1fd3411f3e..f04aedb14636 100644 --- a/core/trino-main/src/main/java/io/trino/cost/StatsUtil.java +++ b/core/trino-main/src/main/java/io/trino/cost/StatsUtil.java @@ -13,24 +13,24 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.InterpretedFunctionInvoker; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.sql.InterpretedFunctionInvoker; import java.util.OptionalDouble; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.util.Collections.singletonList; final class StatsUtil diff --git a/core/trino-main/src/main/java/io/trino/cost/TableScanStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/TableScanStatsRule.java index 02b2373db103..29fced59c39d 100644 --- a/core/trino-main/src/main/java/io/trino/cost/TableScanStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/TableScanStatsRule.java @@ -13,26 +13,26 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.statistics.ColumnStatistics; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.FixedWidthType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.Constraint; +import io.trino.spi.statistics.ColumnStatistics; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.FixedWidthType; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.TableScanNode; import java.util.HashMap; import java.util.Map; import java.util.Optional; import static com.google.common.base.Verify.verifyNotNull; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; +import static io.trino.sql.planner.plan.Patterns.tableScan; import static java.lang.Double.NaN; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/cost/TaskCountEstimator.java b/core/trino-main/src/main/java/io/trino/cost/TaskCountEstimator.java index f0608ef877ac..d4ccefe24ab6 100644 --- a/core/trino-main/src/main/java/io/trino/cost/TaskCountEstimator.java +++ b/core/trino-main/src/main/java/io/trino/cost/TaskCountEstimator.java @@ -13,18 +13,18 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.execution.scheduler.NodeSchedulerConfig; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; +import io.trino.Session; +import io.trino.execution.scheduler.NodeSchedulerConfig; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; import javax.inject.Inject; import java.util.Set; import java.util.function.IntSupplier; -import static io.prestosql.SystemSessionProperties.getCostEstimationWorkerCount; -import static io.prestosql.SystemSessionProperties.getHashPartitionCount; +import static io.trino.SystemSessionProperties.getCostEstimationWorkerCount; +import static io.trino.SystemSessionProperties.getHashPartitionCount; import static java.lang.Math.min; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/cost/TopNStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/TopNStatsRule.java index 2294e17d2cd1..e601e29c5830 100644 --- a/core/trino-main/src/main/java/io/trino/cost/TopNStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/TopNStatsRule.java @@ -13,17 +13,17 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.TopNNode; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.TopNNode; import java.util.Optional; -import static io.prestosql.sql.planner.plan.Patterns.topN; +import static io.trino.sql.planner.plan.Patterns.topN; public class TopNStatsRule extends SimpleStatsRule diff --git a/core/trino-main/src/main/java/io/trino/cost/UnionStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/UnionStatsRule.java index 17254668af2c..8892ad2aa733 100644 --- a/core/trino-main/src/main/java/io/trino/cost/UnionStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/UnionStatsRule.java @@ -15,19 +15,19 @@ package io.trino.cost; import com.google.common.collect.ListMultimap; -import io.prestosql.Session; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.Session; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.UnionNode; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.cost.PlanNodeStatsEstimateMath.addStatsAndCollapseDistinctValues; -import static io.prestosql.sql.planner.plan.Patterns.union; +import static io.trino.cost.PlanNodeStatsEstimateMath.addStatsAndCollapseDistinctValues; +import static io.trino.sql.planner.plan.Patterns.union; public class UnionStatsRule extends SimpleStatsRule diff --git a/core/trino-main/src/main/java/io/trino/cost/ValuesStatsRule.java b/core/trino-main/src/main/java/io/trino/cost/ValuesStatsRule.java index 6d9e9ccb8ce1..f8c5f7bf383f 100644 --- a/core/trino-main/src/main/java/io/trino/cost/ValuesStatsRule.java +++ b/core/trino-main/src/main/java/io/trino/cost/ValuesStatsRule.java @@ -14,18 +14,18 @@ package io.trino.cost; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.cost.ComposableStatsCalculator.Rule; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.block.SingleRowBlock; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.Session; +import io.trino.cost.ComposableStatsCalculator.Rule; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.block.SingleRowBlock; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.ValuesNode; import java.util.List; import java.util.Objects; @@ -36,11 +36,11 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.cost.StatsUtil.toStatsRepresentation; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.sql.planner.ExpressionInterpreter.evaluateConstantExpression; -import static io.prestosql.sql.planner.plan.Patterns.values; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.cost.StatsUtil.toStatsRepresentation; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.sql.planner.ExpressionInterpreter.evaluateConstantExpression; +import static io.trino.sql.planner.plan.Patterns.values; +import static io.trino.type.UnknownType.UNKNOWN; import static java.util.stream.Collectors.toList; public class ValuesStatsRule diff --git a/core/trino-main/src/main/java/io/trino/dispatcher/DispatchExecutor.java b/core/trino-main/src/main/java/io/trino/dispatcher/DispatchExecutor.java index 6855d757cc0b..2094327afe96 100644 --- a/core/trino-main/src/main/java/io/trino/dispatcher/DispatchExecutor.java +++ b/core/trino-main/src/main/java/io/trino/dispatcher/DispatchExecutor.java @@ -17,8 +17,8 @@ import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.ListeningScheduledExecutorService; import io.airlift.concurrent.ThreadPoolExecutorMBean; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.version.EmbedVersion; +import io.trino.execution.QueryManagerConfig; +import io.trino.version.EmbedVersion; import org.weakref.jmx.Flatten; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; diff --git a/core/trino-main/src/main/java/io/trino/dispatcher/DispatchInfo.java b/core/trino-main/src/main/java/io/trino/dispatcher/DispatchInfo.java index 3a639670f42a..d647b9348a61 100644 --- a/core/trino-main/src/main/java/io/trino/dispatcher/DispatchInfo.java +++ b/core/trino-main/src/main/java/io/trino/dispatcher/DispatchInfo.java @@ -14,7 +14,7 @@ package io.trino.dispatcher; import io.airlift.units.Duration; -import io.prestosql.execution.ExecutionFailureInfo; +import io.trino.execution.ExecutionFailureInfo; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/dispatcher/DispatchManager.java b/core/trino-main/src/main/java/io/trino/dispatcher/DispatchManager.java index 9bb427d1d1ff..05071babc972 100644 --- a/core/trino-main/src/main/java/io/trino/dispatcher/DispatchManager.java +++ b/core/trino-main/src/main/java/io/trino/dispatcher/DispatchManager.java @@ -15,27 +15,27 @@ import com.google.common.util.concurrent.AbstractFuture; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.execution.QueryIdGenerator; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.execution.QueryManagerStats; -import io.prestosql.execution.QueryPreparer; -import io.prestosql.execution.QueryPreparer.PreparedQuery; -import io.prestosql.execution.QueryTracker; -import io.prestosql.execution.resourcegroups.ResourceGroupManager; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.security.AccessControl; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.SessionContext; -import io.prestosql.server.SessionPropertyDefaults; -import io.prestosql.server.SessionSupplier; -import io.prestosql.server.protocol.Slug; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.execution.QueryIdGenerator; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryManagerConfig; +import io.trino.execution.QueryManagerStats; +import io.trino.execution.QueryPreparer; +import io.trino.execution.QueryPreparer.PreparedQuery; +import io.trino.execution.QueryTracker; +import io.trino.execution.resourcegroups.ResourceGroupManager; +import io.trino.metadata.SessionPropertyManager; +import io.trino.security.AccessControl; +import io.trino.server.BasicQueryInfo; +import io.trino.server.SessionContext; +import io.trino.server.SessionPropertyDefaults; +import io.trino.server.SessionSupplier; +import io.trino.server.protocol.Slug; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; +import io.trino.transaction.TransactionManager; import org.weakref.jmx.Flatten; import org.weakref.jmx.Managed; @@ -50,11 +50,11 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.spi.StandardErrorCode.QUERY_TEXT_TOO_LARGE; -import static io.prestosql.util.StatementUtils.getQueryType; -import static io.prestosql.util.StatementUtils.isTransactionControlStatement; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.spi.StandardErrorCode.QUERY_TEXT_TOO_LARGE; +import static io.trino.util.StatementUtils.getQueryType; +import static io.trino.util.StatementUtils.isTransactionControlStatement; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/dispatcher/DispatchQuery.java b/core/trino-main/src/main/java/io/trino/dispatcher/DispatchQuery.java index 2f8d7d825cb3..3c996a430641 100644 --- a/core/trino-main/src/main/java/io/trino/dispatcher/DispatchQuery.java +++ b/core/trino-main/src/main/java/io/trino/dispatcher/DispatchQuery.java @@ -14,8 +14,8 @@ package io.trino.dispatcher; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.execution.ManagedQueryExecution; -import io.prestosql.execution.QueryTracker.TrackedQuery; +import io.trino.execution.ManagedQueryExecution; +import io.trino.execution.QueryTracker.TrackedQuery; public interface DispatchQuery extends TrackedQuery, ManagedQueryExecution diff --git a/core/trino-main/src/main/java/io/trino/dispatcher/DispatchQueryFactory.java b/core/trino-main/src/main/java/io/trino/dispatcher/DispatchQueryFactory.java index aae9586262e3..3185584cd84a 100644 --- a/core/trino-main/src/main/java/io/trino/dispatcher/DispatchQueryFactory.java +++ b/core/trino-main/src/main/java/io/trino/dispatcher/DispatchQueryFactory.java @@ -13,10 +13,10 @@ */ package io.trino.dispatcher; -import io.prestosql.Session; -import io.prestosql.execution.QueryPreparer.PreparedQuery; -import io.prestosql.server.protocol.Slug; -import io.prestosql.spi.resourcegroups.ResourceGroupId; +import io.trino.Session; +import io.trino.execution.QueryPreparer.PreparedQuery; +import io.trino.server.protocol.Slug; +import io.trino.spi.resourcegroups.ResourceGroupId; public interface DispatchQueryFactory { diff --git a/core/trino-main/src/main/java/io/trino/dispatcher/FailedDispatchQuery.java b/core/trino-main/src/main/java/io/trino/dispatcher/FailedDispatchQuery.java index 24226064e083..0a1aa71a5588 100644 --- a/core/trino-main/src/main/java/io/trino/dispatcher/FailedDispatchQuery.java +++ b/core/trino-main/src/main/java/io/trino/dispatcher/FailedDispatchQuery.java @@ -19,16 +19,16 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.ExecutionFailureInfo; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryState; -import io.prestosql.execution.QueryStats; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.resourcegroups.ResourceGroupId; +import io.trino.Session; +import io.trino.execution.ExecutionFailureInfo; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryState; +import io.trino.execution.QueryStats; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.server.BasicQueryInfo; +import io.trino.spi.ErrorCode; +import io.trino.spi.QueryId; +import io.trino.spi.resourcegroups.ResourceGroupId; import org.joda.time.DateTime; import java.net.URI; @@ -36,9 +36,9 @@ import java.util.concurrent.Executor; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; -import static io.prestosql.server.DynamicFilterService.DynamicFiltersStats; -import static io.prestosql.util.Failures.toFailure; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.server.DynamicFilterService.DynamicFiltersStats; +import static io.trino.util.Failures.toFailure; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/main/java/io/trino/dispatcher/FailedDispatchQueryFactory.java b/core/trino-main/src/main/java/io/trino/dispatcher/FailedDispatchQueryFactory.java index 248e7e49576f..d06c631f866e 100644 --- a/core/trino-main/src/main/java/io/trino/dispatcher/FailedDispatchQueryFactory.java +++ b/core/trino-main/src/main/java/io/trino/dispatcher/FailedDispatchQueryFactory.java @@ -13,18 +13,18 @@ */ package io.trino.dispatcher; -import io.prestosql.Session; -import io.prestosql.event.QueryMonitor; -import io.prestosql.execution.LocationFactory; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.spi.resourcegroups.ResourceGroupId; +import io.trino.Session; +import io.trino.event.QueryMonitor; +import io.trino.execution.LocationFactory; +import io.trino.server.BasicQueryInfo; +import io.trino.spi.resourcegroups.ResourceGroupId; import javax.inject.Inject; import java.util.Optional; import java.util.concurrent.ExecutorService; -import static io.prestosql.util.Failures.toFailure; +import static io.trino.util.Failures.toFailure; import static java.util.Objects.requireNonNull; public class FailedDispatchQueryFactory diff --git a/core/trino-main/src/main/java/io/trino/dispatcher/LocalDispatchQuery.java b/core/trino-main/src/main/java/io/trino/dispatcher/LocalDispatchQuery.java index 90f7c389b1bf..2c251274edd4 100644 --- a/core/trino-main/src/main/java/io/trino/dispatcher/LocalDispatchQuery.java +++ b/core/trino-main/src/main/java/io/trino/dispatcher/LocalDispatchQuery.java @@ -18,19 +18,19 @@ import io.airlift.log.Logger; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.event.QueryMonitor; -import io.prestosql.execution.ClusterSizeMonitor; -import io.prestosql.execution.ExecutionFailureInfo; -import io.prestosql.execution.QueryExecution; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryState; -import io.prestosql.execution.QueryStateMachine; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; +import io.trino.Session; +import io.trino.event.QueryMonitor; +import io.trino.execution.ClusterSizeMonitor; +import io.trino.execution.ExecutionFailureInfo; +import io.trino.execution.QueryExecution; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryState; +import io.trino.execution.QueryStateMachine; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.server.BasicQueryInfo; +import io.trino.spi.ErrorCode; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; import org.joda.time.DateTime; import java.util.Optional; @@ -42,10 +42,10 @@ import static io.airlift.concurrent.MoreFutures.addExceptionCallback; import static io.airlift.concurrent.MoreFutures.addSuccessCallback; import static io.airlift.concurrent.MoreFutures.tryGetFutureValue; -import static io.prestosql.SystemSessionProperties.getRequiredWorkers; -import static io.prestosql.SystemSessionProperties.getRequiredWorkersMaxWait; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.util.Failures.toFailure; +import static io.trino.SystemSessionProperties.getRequiredWorkers; +import static io.trino.SystemSessionProperties.getRequiredWorkersMaxWait; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.util.Failures.toFailure; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/main/java/io/trino/dispatcher/LocalDispatchQueryFactory.java b/core/trino-main/src/main/java/io/trino/dispatcher/LocalDispatchQueryFactory.java index 7c47b1251f99..de8dad43cd1b 100644 --- a/core/trino-main/src/main/java/io/trino/dispatcher/LocalDispatchQueryFactory.java +++ b/core/trino-main/src/main/java/io/trino/dispatcher/LocalDispatchQueryFactory.java @@ -15,33 +15,33 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; -import io.prestosql.Session; -import io.prestosql.event.QueryMonitor; -import io.prestosql.execution.ClusterSizeMonitor; -import io.prestosql.execution.LocationFactory; -import io.prestosql.execution.QueryExecution; -import io.prestosql.execution.QueryExecution.QueryExecutionFactory; -import io.prestosql.execution.QueryManager; -import io.prestosql.execution.QueryPreparer.PreparedQuery; -import io.prestosql.execution.QueryStateMachine; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.execution.warnings.WarningCollectorFactory; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.server.protocol.Slug; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.sql.tree.Statement; -import io.prestosql.transaction.TransactionManager; -import io.prestosql.util.StatementUtils; +import io.trino.Session; +import io.trino.event.QueryMonitor; +import io.trino.execution.ClusterSizeMonitor; +import io.trino.execution.LocationFactory; +import io.trino.execution.QueryExecution; +import io.trino.execution.QueryExecution.QueryExecutionFactory; +import io.trino.execution.QueryManager; +import io.trino.execution.QueryPreparer.PreparedQuery; +import io.trino.execution.QueryStateMachine; +import io.trino.execution.warnings.WarningCollector; +import io.trino.execution.warnings.WarningCollectorFactory; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.server.protocol.Slug; +import io.trino.spi.PrestoException; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.sql.tree.Statement; +import io.trino.transaction.TransactionManager; +import io.trino.util.StatementUtils; import javax.inject.Inject; import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.util.StatementUtils.isTransactionControlStatement; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.util.StatementUtils.isTransactionControlStatement; import static java.util.Objects.requireNonNull; public class LocalDispatchQueryFactory diff --git a/core/trino-main/src/main/java/io/trino/dispatcher/QueuedStatementResource.java b/core/trino-main/src/main/java/io/trino/dispatcher/QueuedStatementResource.java index b65b27f2f285..db889f6b2131 100644 --- a/core/trino-main/src/main/java/io/trino/dispatcher/QueuedStatementResource.java +++ b/core/trino-main/src/main/java/io/trino/dispatcher/QueuedStatementResource.java @@ -20,20 +20,20 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.client.QueryError; -import io.prestosql.client.QueryResults; -import io.prestosql.client.StatementStats; -import io.prestosql.execution.ExecutionFailureInfo; -import io.prestosql.execution.QueryState; -import io.prestosql.server.HttpRequestSessionContext; -import io.prestosql.server.ServerConfig; -import io.prestosql.server.SessionContext; -import io.prestosql.server.protocol.Slug; -import io.prestosql.server.security.ResourceSecurity; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.security.Identity; +import io.trino.client.QueryError; +import io.trino.client.QueryResults; +import io.trino.client.StatementStats; +import io.trino.execution.ExecutionFailureInfo; +import io.trino.execution.QueryState; +import io.trino.server.HttpRequestSessionContext; +import io.trino.server.ServerConfig; +import io.trino.server.SessionContext; +import io.trino.server.protocol.Slug; +import io.trino.server.security.ResourceSecurity; +import io.trino.spi.ErrorCode; +import io.trino.spi.QueryId; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.security.Identity; import javax.annotation.PreDestroy; import javax.annotation.concurrent.GuardedBy; @@ -72,14 +72,14 @@ import static io.airlift.concurrent.MoreFutures.addTimeout; import static io.airlift.concurrent.Threads.threadsNamed; import static io.airlift.jaxrs.AsyncResponseHandler.bindAsyncResponse; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.server.HttpRequestSessionContext.AUTHENTICATED_IDENTITY; -import static io.prestosql.server.protocol.Slug.Context.EXECUTING_QUERY; -import static io.prestosql.server.protocol.Slug.Context.QUEUED_QUERY; -import static io.prestosql.server.security.ResourceSecurity.AccessType.AUTHENTICATED_USER; -import static io.prestosql.server.security.ResourceSecurity.AccessType.PUBLIC; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.server.HttpRequestSessionContext.AUTHENTICATED_IDENTITY; +import static io.trino.server.protocol.Slug.Context.EXECUTING_QUERY; +import static io.trino.server.protocol.Slug.Context.QUEUED_QUERY; +import static io.trino.server.security.ResourceSecurity.AccessType.AUTHENTICATED_USER; +import static io.trino.server.security.ResourceSecurity.AccessType.PUBLIC; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/main/java/io/trino/event/QueryMonitor.java b/core/trino-main/src/main/java/io/trino/event/QueryMonitor.java index ca60a368b604..d276de194c89 100644 --- a/core/trino-main/src/main/java/io/trino/event/QueryMonitor.java +++ b/core/trino-main/src/main/java/io/trino/event/QueryMonitor.java @@ -24,45 +24,45 @@ import io.airlift.stats.Distribution; import io.airlift.stats.Distribution.DistributionSnapshot; import io.airlift.units.DataSize; -import io.prestosql.SessionRepresentation; -import io.prestosql.client.NodeVersion; -import io.prestosql.connector.CatalogName; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.execution.Column; -import io.prestosql.execution.ExecutionFailureInfo; -import io.prestosql.execution.Input; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryStats; -import io.prestosql.execution.StageInfo; -import io.prestosql.execution.TaskInfo; -import io.prestosql.execution.TaskState; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.operator.OperatorStats; -import io.prestosql.operator.TableFinishInfo; -import io.prestosql.operator.TaskStats; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.eventlistener.QueryCompletedEvent; -import io.prestosql.spi.eventlistener.QueryContext; -import io.prestosql.spi.eventlistener.QueryCreatedEvent; -import io.prestosql.spi.eventlistener.QueryFailureInfo; -import io.prestosql.spi.eventlistener.QueryIOMetadata; -import io.prestosql.spi.eventlistener.QueryInputMetadata; -import io.prestosql.spi.eventlistener.QueryMetadata; -import io.prestosql.spi.eventlistener.QueryOutputMetadata; -import io.prestosql.spi.eventlistener.QueryStatistics; -import io.prestosql.spi.eventlistener.StageCpuDistribution; -import io.prestosql.spi.resourcegroups.QueryType; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.planprinter.ValuePrinter; -import io.prestosql.transaction.TransactionId; +import io.trino.SessionRepresentation; +import io.trino.client.NodeVersion; +import io.trino.connector.CatalogName; +import io.trino.cost.StatsAndCosts; +import io.trino.eventlistener.EventListenerManager; +import io.trino.execution.Column; +import io.trino.execution.ExecutionFailureInfo; +import io.trino.execution.Input; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryStats; +import io.trino.execution.StageInfo; +import io.trino.execution.TaskInfo; +import io.trino.execution.TaskState; +import io.trino.metadata.Metadata; +import io.trino.metadata.SessionPropertyManager; +import io.trino.operator.OperatorStats; +import io.trino.operator.TableFinishInfo; +import io.trino.operator.TaskStats; +import io.trino.server.BasicQueryInfo; +import io.trino.spi.QueryId; +import io.trino.spi.eventlistener.QueryCompletedEvent; +import io.trino.spi.eventlistener.QueryContext; +import io.trino.spi.eventlistener.QueryCreatedEvent; +import io.trino.spi.eventlistener.QueryFailureInfo; +import io.trino.spi.eventlistener.QueryIOMetadata; +import io.trino.spi.eventlistener.QueryInputMetadata; +import io.trino.spi.eventlistener.QueryMetadata; +import io.trino.spi.eventlistener.QueryOutputMetadata; +import io.trino.spi.eventlistener.QueryStatistics; +import io.trino.spi.eventlistener.StageCpuDistribution; +import io.trino.spi.resourcegroups.QueryType; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.planprinter.ValuePrinter; +import io.trino.transaction.TransactionId; import org.joda.time.DateTime; import javax.inject.Inject; @@ -76,9 +76,9 @@ import java.util.OptionalLong; import java.util.stream.Collectors; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.execution.StageInfo.getAllStages; -import static io.prestosql.sql.planner.planprinter.PlanPrinter.textDistributedPlan; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.execution.StageInfo.getAllStages; +import static io.trino.sql.planner.planprinter.PlanPrinter.textDistributedPlan; import static java.lang.Math.max; import static java.lang.Math.toIntExact; import static java.time.Duration.ofMillis; diff --git a/core/trino-main/src/main/java/io/trino/event/SplitMonitor.java b/core/trino-main/src/main/java/io/trino/event/SplitMonitor.java index 2c2475755e56..ea64691a6fad 100644 --- a/core/trino-main/src/main/java/io/trino/event/SplitMonitor.java +++ b/core/trino-main/src/main/java/io/trino/event/SplitMonitor.java @@ -16,14 +16,14 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import io.airlift.log.Logger; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.execution.TaskId; -import io.prestosql.operator.DriverStats; -import io.prestosql.operator.OperatorStats; -import io.prestosql.operator.SplitOperatorInfo; -import io.prestosql.spi.eventlistener.SplitCompletedEvent; -import io.prestosql.spi.eventlistener.SplitFailureInfo; -import io.prestosql.spi.eventlistener.SplitStatistics; +import io.trino.eventlistener.EventListenerManager; +import io.trino.execution.TaskId; +import io.trino.operator.DriverStats; +import io.trino.operator.OperatorStats; +import io.trino.operator.SplitOperatorInfo; +import io.trino.spi.eventlistener.SplitCompletedEvent; +import io.trino.spi.eventlistener.SplitFailureInfo; +import io.trino.spi.eventlistener.SplitStatistics; import javax.annotation.Nullable; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/eventlistener/EventListenerManager.java b/core/trino-main/src/main/java/io/trino/eventlistener/EventListenerManager.java index f352df32798a..54424536f924 100644 --- a/core/trino-main/src/main/java/io/trino/eventlistener/EventListenerManager.java +++ b/core/trino-main/src/main/java/io/trino/eventlistener/EventListenerManager.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; import io.airlift.log.Logger; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.eventlistener.EventListenerFactory; -import io.prestosql.spi.eventlistener.QueryCompletedEvent; -import io.prestosql.spi.eventlistener.QueryCreatedEvent; -import io.prestosql.spi.eventlistener.SplitCompletedEvent; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.eventlistener.EventListenerFactory; +import io.trino.spi.eventlistener.QueryCompletedEvent; +import io.trino.spi.eventlistener.QueryCreatedEvent; +import io.trino.spi.eventlistener.SplitCompletedEvent; import java.io.File; import java.io.IOException; diff --git a/core/trino-main/src/main/java/io/trino/execution/AddColumnTask.java b/core/trino-main/src/main/java/io/trino/execution/AddColumnTask.java index 90afcd33c4ec..82cec50b76eb 100644 --- a/core/trino-main/src/main/java/io/trino/execution/AddColumnTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/AddColumnTask.java @@ -14,40 +14,40 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeNotFoundException; -import io.prestosql.sql.tree.AddColumn; -import io.prestosql.sql.tree.ColumnDefinition; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeNotFoundException; +import io.trino.sql.tree.AddColumn; +import io.trino.sql.tree.ColumnDefinition; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Map; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.COLUMN_ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.COLUMN_TYPE_UNKNOWN; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TYPE_NOT_FOUND; -import static io.prestosql.spi.connector.ConnectorCapabilities.NOT_NULL_COLUMN_CONSTRAINT; -import static io.prestosql.sql.NodeUtils.mapFromProperties; -import static io.prestosql.sql.ParameterUtils.parameterExtractor; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toTypeSignature; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.COLUMN_ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.COLUMN_TYPE_UNKNOWN; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TYPE_NOT_FOUND; +import static io.trino.spi.connector.ConnectorCapabilities.NOT_NULL_COLUMN_CONSTRAINT; +import static io.trino.sql.NodeUtils.mapFromProperties; +import static io.trino.sql.ParameterUtils.parameterExtractor; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toTypeSignature; +import static io.trino.type.UnknownType.UNKNOWN; import static java.util.Locale.ENGLISH; public class AddColumnTask diff --git a/core/trino-main/src/main/java/io/trino/execution/BasicStageStats.java b/core/trino-main/src/main/java/io/trino/execution/BasicStageStats.java index 2537821d607a..5b1ffc92de28 100644 --- a/core/trino-main/src/main/java/io/trino/execution/BasicStageStats.java +++ b/core/trino-main/src/main/java/io/trino/execution/BasicStageStats.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.operator.BlockedReason; +import io.trino.operator.BlockedReason; import java.util.HashSet; import java.util.OptionalDouble; diff --git a/core/trino-main/src/main/java/io/trino/execution/CallTask.java b/core/trino-main/src/main/java/io/trino/execution/CallTask.java index 8550088e791a..85af420b434a 100644 --- a/core/trino-main/src/main/java/io/trino/execution/CallTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/CallTask.java @@ -15,28 +15,28 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.security.AccessControl; -import io.prestosql.security.InjectedConnectorAccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.eventlistener.RoutineInfo; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.procedure.Procedure.Argument; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.ParameterRewriter; -import io.prestosql.sql.tree.Call; -import io.prestosql.sql.tree.CallArgument; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.security.AccessControl; +import io.trino.security.InjectedConnectorAccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.eventlistener.RoutineInfo; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.procedure.Procedure.Argument; +import io.trino.spi.type.Type; +import io.trino.sql.planner.ParameterRewriter; +import io.trino.sql.tree.Call; +import io.trino.sql.tree.CallArgument; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Parameter; +import io.trino.transaction.TransactionManager; import java.lang.invoke.MethodType; import java.util.ArrayList; @@ -51,16 +51,16 @@ import static com.google.common.base.Throwables.throwIfInstanceOf; import static com.google.common.base.Verify.verify; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.CATALOG_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.INVALID_ARGUMENTS; -import static io.prestosql.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.PROCEDURE_CALL_FAILED; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; -import static io.prestosql.sql.ParameterUtils.parameterExtractor; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.sql.planner.ExpressionInterpreter.evaluateConstantExpression; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.CATALOG_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.INVALID_ARGUMENTS; +import static io.trino.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.PROCEDURE_CALL_FAILED; +import static io.trino.spi.type.TypeUtils.writeNativeValue; +import static io.trino.sql.ParameterUtils.parameterExtractor; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.sql.planner.ExpressionInterpreter.evaluateConstantExpression; import static java.util.Arrays.asList; public class CallTask diff --git a/core/trino-main/src/main/java/io/trino/execution/ClusterSizeMonitor.java b/core/trino-main/src/main/java/io/trino/execution/ClusterSizeMonitor.java index 33a3e9a165c9..da471b96dcc2 100644 --- a/core/trino-main/src/main/java/io/trino/execution/ClusterSizeMonitor.java +++ b/core/trino-main/src/main/java/io/trino/execution/ClusterSizeMonitor.java @@ -18,10 +18,10 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import io.airlift.units.Duration; -import io.prestosql.execution.scheduler.NodeSchedulerConfig; -import io.prestosql.metadata.AllNodes; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.spi.PrestoException; +import io.trino.execution.scheduler.NodeSchedulerConfig; +import io.trino.metadata.AllNodes; +import io.trino.metadata.InternalNodeManager; +import io.trino.spi.PrestoException; import org.weakref.jmx.Managed; import javax.annotation.PostConstruct; @@ -38,7 +38,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.util.concurrent.Futures.immediateFuture; import static io.airlift.concurrent.Threads.threadsNamed; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; +import static io.trino.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; import static java.lang.String.format; import static java.util.Comparator.comparing; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/CommentTask.java b/core/trino-main/src/main/java/io/trino/execution/CommentTask.java index f2dc164f7fe3..1b2da1f5b1f2 100644 --- a/core/trino-main/src/main/java/io/trino/execution/CommentTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/CommentTask.java @@ -14,28 +14,28 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.sql.tree.Comment; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ColumnHandle; +import io.trino.sql.tree.Comment; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.QualifiedName; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Map; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.COLUMN_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.MISSING_TABLE; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.COLUMN_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.MISSING_TABLE; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class CommentTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/CommitTask.java b/core/trino-main/src/main/java/io/trino/execution/CommitTask.java index 85389be34311..a55492cae6de 100644 --- a/core/trino-main/src/main/java/io/trino/execution/CommitTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/CommitTask.java @@ -14,18 +14,18 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.tree.Commit; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.sql.tree.Commit; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionId; +import io.trino.transaction.TransactionManager; import java.util.List; -import static io.prestosql.spi.StandardErrorCode.NOT_IN_TRANSACTION; +import static io.trino.spi.StandardErrorCode.NOT_IN_TRANSACTION; public class CommitTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/CreateMaterializedViewTask.java b/core/trino-main/src/main/java/io/trino/execution/CreateMaterializedViewTask.java index 1d31a3bae4ac..bc72e2c35eaf 100644 --- a/core/trino-main/src/main/java/io/trino/execution/CreateMaterializedViewTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/CreateMaterializedViewTask.java @@ -14,23 +14,23 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorMaterializedViewDefinition; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.Analyzer; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.CreateMaterializedView; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.cost.StatsCalculator; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorMaterializedViewDefinition; +import io.trino.spi.security.GroupProvider; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.analyzer.Analyzer; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.CreateMaterializedView; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Parameter; +import io.trino.transaction.TransactionManager; import javax.inject.Inject; @@ -40,11 +40,11 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.sql.NodeUtils.mapFromProperties; -import static io.prestosql.sql.ParameterUtils.parameterExtractor; -import static io.prestosql.sql.SqlFormatterUtil.getFormattedSql; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.sql.NodeUtils.mapFromProperties; +import static io.trino.sql.ParameterUtils.parameterExtractor; +import static io.trino.sql.SqlFormatterUtil.getFormattedSql; import static java.util.Objects.requireNonNull; public class CreateMaterializedViewTask diff --git a/core/trino-main/src/main/java/io/trino/execution/CreateRoleTask.java b/core/trino-main/src/main/java/io/trino/execution/CreateRoleTask.java index 250dcc1eff64..5a61d7e54ca9 100644 --- a/core/trino-main/src/main/java/io/trino/execution/CreateRoleTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/CreateRoleTask.java @@ -14,25 +14,25 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.sql.tree.CreateRole; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.sql.tree.CreateRole; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Optional; import java.util.Set; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createPrincipal; -import static io.prestosql.metadata.MetadataUtil.getSessionCatalog; -import static io.prestosql.spi.StandardErrorCode.ROLE_ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.ROLE_NOT_FOUND; -import static io.prestosql.spi.security.PrincipalType.ROLE; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createPrincipal; +import static io.trino.metadata.MetadataUtil.getSessionCatalog; +import static io.trino.spi.StandardErrorCode.ROLE_ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.ROLE_NOT_FOUND; +import static io.trino.spi.security.PrincipalType.ROLE; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; import static java.util.Locale.ENGLISH; public class CreateRoleTask diff --git a/core/trino-main/src/main/java/io/trino/execution/CreateSchemaTask.java b/core/trino-main/src/main/java/io/trino/execution/CreateSchemaTask.java index ad85a17f7363..3cdafbd360f1 100644 --- a/core/trino-main/src/main/java/io/trino/execution/CreateSchemaTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/CreateSchemaTask.java @@ -15,33 +15,33 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.sql.tree.CreateSchema; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.PrincipalType; +import io.trino.sql.tree.CreateSchema; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Map; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createCatalogSchemaName; -import static io.prestosql.metadata.MetadataUtil.createPrincipal; -import static io.prestosql.metadata.MetadataUtil.getSessionCatalog; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.ROLE_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_ALREADY_EXISTS; -import static io.prestosql.sql.NodeUtils.mapFromProperties; -import static io.prestosql.sql.ParameterUtils.parameterExtractor; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createCatalogSchemaName; +import static io.trino.metadata.MetadataUtil.createPrincipal; +import static io.trino.metadata.MetadataUtil.getSessionCatalog; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.ROLE_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.SCHEMA_ALREADY_EXISTS; +import static io.trino.sql.NodeUtils.mapFromProperties; +import static io.trino.sql.ParameterUtils.parameterExtractor; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class CreateSchemaTask implements DataDefinitionTask 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 df8cd54be1f4..456d42f43793 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 @@ -17,27 +17,27 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.metadata.TableMetadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeNotFoundException; -import io.prestosql.sql.tree.ColumnDefinition; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.LikeClause; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.TableElement; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.metadata.TableMetadata; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeNotFoundException; +import io.trino.sql.tree.ColumnDefinition; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.LikeClause; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.TableElement; +import io.trino.transaction.TransactionManager; import java.util.HashMap; import java.util.LinkedHashMap; @@ -50,25 +50,25 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.CATALOG_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.COLUMN_TYPE_UNKNOWN; -import static io.prestosql.spi.StandardErrorCode.DUPLICATE_COLUMN_NAME; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TABLE_ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TYPE_NOT_FOUND; -import static io.prestosql.spi.connector.ConnectorCapabilities.NOT_NULL_COLUMN_CONSTRAINT; -import static io.prestosql.sql.NodeUtils.mapFromProperties; -import static io.prestosql.sql.ParameterUtils.parameterExtractor; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toTypeSignature; -import static io.prestosql.sql.tree.LikeClause.PropertiesOption.EXCLUDING; -import static io.prestosql.sql.tree.LikeClause.PropertiesOption.INCLUDING; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.CATALOG_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.COLUMN_TYPE_UNKNOWN; +import static io.trino.spi.StandardErrorCode.DUPLICATE_COLUMN_NAME; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TABLE_ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TYPE_NOT_FOUND; +import static io.trino.spi.connector.ConnectorCapabilities.NOT_NULL_COLUMN_CONSTRAINT; +import static io.trino.sql.NodeUtils.mapFromProperties; +import static io.trino.sql.ParameterUtils.parameterExtractor; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toTypeSignature; +import static io.trino.sql.tree.LikeClause.PropertiesOption.EXCLUDING; +import static io.trino.sql.tree.LikeClause.PropertiesOption.INCLUDING; +import static io.trino.type.UnknownType.UNKNOWN; public class CreateTableTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/CreateViewTask.java b/core/trino-main/src/main/java/io/trino/execution/CreateViewTask.java index bd722f938e1f..0d544ae7a2ad 100644 --- a/core/trino-main/src/main/java/io/trino/execution/CreateViewTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/CreateViewTask.java @@ -14,19 +14,19 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.Analyzer; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.CreateView; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.cost.StatsCalculator; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.security.GroupProvider; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.analyzer.Analyzer; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.CreateView; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionManager; import javax.inject.Inject; @@ -35,11 +35,11 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.connector.ConnectorViewDefinition.ViewColumn; -import static io.prestosql.sql.ParameterUtils.parameterExtractor; -import static io.prestosql.sql.SqlFormatterUtil.getFormattedSql; -import static io.prestosql.sql.tree.CreateView.Security.INVOKER; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.connector.ConnectorViewDefinition.ViewColumn; +import static io.trino.sql.ParameterUtils.parameterExtractor; +import static io.trino.sql.SqlFormatterUtil.getFormattedSql; +import static io.trino.sql.tree.CreateView.Security.INVOKER; import static java.util.Objects.requireNonNull; public class CreateViewTask diff --git a/core/trino-main/src/main/java/io/trino/execution/DataDefinitionExecution.java b/core/trino-main/src/main/java/io/trino/execution/DataDefinitionExecution.java index 1f5f50124060..02c04b6c359d 100644 --- a/core/trino-main/src/main/java/io/trino/execution/DataDefinitionExecution.java +++ b/core/trino-main/src/main/java/io/trino/execution/DataDefinitionExecution.java @@ -18,20 +18,20 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.QueryPreparer.PreparedQuery; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.memory.VersionedMemoryPoolId; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.protocol.Slug; -import io.prestosql.spi.QueryId; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Statement; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.execution.QueryPreparer.PreparedQuery; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.warnings.WarningCollector; +import io.trino.memory.VersionedMemoryPoolId; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.server.BasicQueryInfo; +import io.trino.server.protocol.Slug; +import io.trino.spi.QueryId; +import io.trino.sql.planner.Plan; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Statement; +import io.trino.transaction.TransactionManager; import org.joda.time.DateTime; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/execution/DataDefinitionTask.java b/core/trino-main/src/main/java/io/trino/execution/DataDefinitionTask.java index b919336d0079..679a06b8869e 100644 --- a/core/trino-main/src/main/java/io/trino/execution/DataDefinitionTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/DataDefinitionTask.java @@ -14,12 +14,12 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.sql.SqlFormatter; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Statement; -import io.prestosql.transaction.TransactionManager; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.sql.SqlFormatter; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Statement; +import io.trino.transaction.TransactionManager; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/execution/DeallocateTask.java b/core/trino-main/src/main/java/io/trino/execution/DeallocateTask.java index dce381b42923..a124f1f66ef2 100644 --- a/core/trino-main/src/main/java/io/trino/execution/DeallocateTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/DeallocateTask.java @@ -14,11 +14,11 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.sql.tree.Deallocate; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionManager; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.sql.tree.Deallocate; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionManager; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/execution/DropColumnTask.java b/core/trino-main/src/main/java/io/trino/execution/DropColumnTask.java index 1560a0a26eba..2c78900da723 100644 --- a/core/trino-main/src/main/java/io/trino/execution/DropColumnTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/DropColumnTask.java @@ -14,25 +14,25 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.sql.tree.DropColumn; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ColumnHandle; +import io.trino.sql.tree.DropColumn; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.COLUMN_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.COLUMN_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; import static java.util.Locale.ENGLISH; public class DropColumnTask diff --git a/core/trino-main/src/main/java/io/trino/execution/DropMaterializedViewTask.java b/core/trino-main/src/main/java/io/trino/execution/DropMaterializedViewTask.java index 53db8ef43f9a..74bc8096331e 100644 --- a/core/trino-main/src/main/java/io/trino/execution/DropMaterializedViewTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/DropMaterializedViewTask.java @@ -14,22 +14,22 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ConnectorMaterializedViewDefinition; -import io.prestosql.sql.tree.DropMaterializedView; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ConnectorMaterializedViewDefinition; +import io.trino.sql.tree.DropMaterializedView; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class DropMaterializedViewTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/DropRoleTask.java b/core/trino-main/src/main/java/io/trino/execution/DropRoleTask.java index b59ec9ae8e5a..c8a0c1ded8af 100644 --- a/core/trino-main/src/main/java/io/trino/execution/DropRoleTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/DropRoleTask.java @@ -14,20 +14,20 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.sql.tree.DropRole; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.sql.tree.DropRole; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Set; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.getSessionCatalog; -import static io.prestosql.spi.StandardErrorCode.ROLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.getSessionCatalog; +import static io.trino.spi.StandardErrorCode.ROLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; import static java.util.Locale.ENGLISH; public class DropRoleTask diff --git a/core/trino-main/src/main/java/io/trino/execution/DropSchemaTask.java b/core/trino-main/src/main/java/io/trino/execution/DropSchemaTask.java index 2aeae8d5139d..5e20f41d64c8 100644 --- a/core/trino-main/src/main/java/io/trino/execution/DropSchemaTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/DropSchemaTask.java @@ -14,23 +14,23 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.sql.tree.DropSchema; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.sql.tree.DropSchema; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createCatalogSchemaName; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createCatalogSchemaName; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class DropSchemaTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/DropTableTask.java b/core/trino-main/src/main/java/io/trino/execution/DropTableTask.java index 10cc61aa1120..430b48a3e539 100644 --- a/core/trino-main/src/main/java/io/trino/execution/DropTableTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/DropTableTask.java @@ -14,22 +14,22 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.security.AccessControl; -import io.prestosql.sql.tree.DropTable; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.security.AccessControl; +import io.trino.sql.tree.DropTable; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class DropTableTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/DropViewTask.java b/core/trino-main/src/main/java/io/trino/execution/DropViewTask.java index fc1ed0e89dea..124193663080 100644 --- a/core/trino-main/src/main/java/io/trino/execution/DropViewTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/DropViewTask.java @@ -14,22 +14,22 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.sql.tree.DropView; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.sql.tree.DropView; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class DropViewTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/DynamicFiltersCollector.java b/core/trino-main/src/main/java/io/trino/execution/DynamicFiltersCollector.java index d80d7a355c0e..d12cf32f904c 100644 --- a/core/trino-main/src/main/java/io/trino/execution/DynamicFiltersCollector.java +++ b/core/trino-main/src/main/java/io/trino/execution/DynamicFiltersCollector.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.sql.planner.plan.DynamicFilterId; +import io.trino.spi.predicate.Domain; +import io.trino.sql.planner.plan.DynamicFilterId; import javax.annotation.concurrent.GuardedBy; diff --git a/core/trino-main/src/main/java/io/trino/execution/ExecutionFailureInfo.java b/core/trino-main/src/main/java/io/trino/execution/ExecutionFailureInfo.java index 065c7b56c5bf..ef9d29b19199 100644 --- a/core/trino-main/src/main/java/io/trino/execution/ExecutionFailureInfo.java +++ b/core/trino-main/src/main/java/io/trino/execution/ExecutionFailureInfo.java @@ -16,10 +16,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.client.ErrorLocation; -import io.prestosql.client.FailureInfo; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.HostAddress; +import io.trino.client.ErrorLocation; +import io.trino.client.FailureInfo; +import io.trino.spi.ErrorCode; +import io.trino.spi.HostAddress; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/execution/Failure.java b/core/trino-main/src/main/java/io/trino/execution/Failure.java index 7e3ff01efe2a..1e6899e865e1 100644 --- a/core/trino-main/src/main/java/io/trino/execution/Failure.java +++ b/core/trino-main/src/main/java/io/trino/execution/Failure.java @@ -13,7 +13,7 @@ */ package io.trino.execution; -import io.prestosql.spi.ErrorCode; +import io.trino.spi.ErrorCode; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/execution/GrantRolesTask.java b/core/trino-main/src/main/java/io/trino/execution/GrantRolesTask.java index 53fbf42e62c2..9176f554040f 100644 --- a/core/trino-main/src/main/java/io/trino/execution/GrantRolesTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/GrantRolesTask.java @@ -14,14 +14,14 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.MetadataUtil; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.GrantRoles; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.MetadataUtil; +import io.trino.security.AccessControl; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.GrantRoles; +import io.trino.transaction.TransactionManager; import java.util.LinkedHashSet; import java.util.List; @@ -31,11 +31,11 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createPrincipal; -import static io.prestosql.metadata.MetadataUtil.getSessionCatalog; -import static io.prestosql.spi.StandardErrorCode.ROLE_NOT_FOUND; -import static io.prestosql.spi.security.PrincipalType.ROLE; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createPrincipal; +import static io.trino.metadata.MetadataUtil.getSessionCatalog; +import static io.trino.spi.StandardErrorCode.ROLE_NOT_FOUND; +import static io.trino.spi.security.PrincipalType.ROLE; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class GrantRolesTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/GrantTask.java b/core/trino-main/src/main/java/io/trino/execution/GrantTask.java index e2ce3c8c1397..b22e81410c29 100644 --- a/core/trino-main/src/main/java/io/trino/execution/GrantTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/GrantTask.java @@ -14,17 +14,17 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.security.Privilege; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Grant; -import io.prestosql.sql.tree.GrantOnType; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.security.AccessControl; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.security.Privilege; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Grant; +import io.trino.sql.tree.GrantOnType; +import io.trino.transaction.TransactionManager; import java.util.EnumSet; import java.util.List; @@ -33,13 +33,13 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createCatalogSchemaName; -import static io.prestosql.metadata.MetadataUtil.createPrincipal; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.INVALID_PRIVILEGE; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createCatalogSchemaName; +import static io.trino.metadata.MetadataUtil.createPrincipal; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.INVALID_PRIVILEGE; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class GrantTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/Input.java b/core/trino-main/src/main/java/io/trino/execution/Input.java index 61c8258526df..825f894d1be1 100644 --- a/core/trino-main/src/main/java/io/trino/execution/Input.java +++ b/core/trino-main/src/main/java/io/trino/execution/Input.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/execution/LocationFactory.java b/core/trino-main/src/main/java/io/trino/execution/LocationFactory.java index 1f3db3e4313e..5a9de6e1f53f 100644 --- a/core/trino-main/src/main/java/io/trino/execution/LocationFactory.java +++ b/core/trino-main/src/main/java/io/trino/execution/LocationFactory.java @@ -13,8 +13,8 @@ */ package io.trino.execution; -import io.prestosql.metadata.InternalNode; -import io.prestosql.spi.QueryId; +import io.trino.metadata.InternalNode; +import io.trino.spi.QueryId; import java.net.URI; diff --git a/core/trino-main/src/main/java/io/trino/execution/ManagedQueryExecution.java b/core/trino-main/src/main/java/io/trino/execution/ManagedQueryExecution.java index 26658b6511d0..4fb9441040ff 100644 --- a/core/trino-main/src/main/java/io/trino/execution/ManagedQueryExecution.java +++ b/core/trino-main/src/main/java/io/trino/execution/ManagedQueryExecution.java @@ -15,10 +15,10 @@ import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.spi.ErrorCode; +import io.trino.Session; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.server.BasicQueryInfo; +import io.trino.spi.ErrorCode; import java.util.Optional; 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 0a154f008044..f66ae6342d39 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,14 +17,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Ordering; import io.airlift.log.Logger; -import io.prestosql.memory.LocalMemoryManager; -import io.prestosql.memory.MemoryPool; -import io.prestosql.memory.MemoryPoolListener; -import io.prestosql.memory.QueryContext; -import io.prestosql.memory.TraversingQueryContextVisitor; -import io.prestosql.memory.VoidTraversingQueryContextVisitor; -import io.prestosql.operator.OperatorContext; -import io.prestosql.sql.analyzer.FeaturesConfig; +import io.trino.memory.LocalMemoryManager; +import io.trino.memory.MemoryPool; +import io.trino.memory.MemoryPoolListener; +import io.trino.memory.QueryContext; +import io.trino.memory.TraversingQueryContextVisitor; +import io.trino.memory.VoidTraversingQueryContextVisitor; +import io.trino.operator.OperatorContext; +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/execution/MemoryTrackingRemoteTaskFactory.java b/core/trino-main/src/main/java/io/trino/execution/MemoryTrackingRemoteTaskFactory.java index 26fecd43f0ff..e7b99c0bb3cf 100644 --- a/core/trino-main/src/main/java/io/trino/execution/MemoryTrackingRemoteTaskFactory.java +++ b/core/trino-main/src/main/java/io/trino/execution/MemoryTrackingRemoteTaskFactory.java @@ -14,14 +14,14 @@ package io.trino.execution; import com.google.common.collect.Multimap; -import io.prestosql.Session; -import io.prestosql.execution.NodeTaskMap.PartitionedSplitCountTracker; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.execution.NodeTaskMap.PartitionedSplitCountTracker; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.OptionalInt; diff --git a/core/trino-main/src/main/java/io/trino/execution/NodeTaskMap.java b/core/trino-main/src/main/java/io/trino/execution/NodeTaskMap.java index a069a67ce6c7..a3f77279a155 100644 --- a/core/trino-main/src/main/java/io/trino/execution/NodeTaskMap.java +++ b/core/trino-main/src/main/java/io/trino/execution/NodeTaskMap.java @@ -15,8 +15,8 @@ import com.google.common.collect.Sets; import io.airlift.log.Logger; -import io.prestosql.metadata.InternalNode; -import io.prestosql.util.FinalizerService; +import io.trino.metadata.InternalNode; +import io.trino.util.FinalizerService; import javax.annotation.concurrent.ThreadSafe; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/execution/ParameterExtractor.java b/core/trino-main/src/main/java/io/trino/execution/ParameterExtractor.java index 5f0e8529c5ff..35c843e106bf 100644 --- a/core/trino-main/src/main/java/io/trino/execution/ParameterExtractor.java +++ b/core/trino-main/src/main/java/io/trino/execution/ParameterExtractor.java @@ -13,9 +13,9 @@ */ package io.trino.execution; -import io.prestosql.sql.tree.DefaultTraversalVisitor; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.Statement; +import io.trino.sql.tree.DefaultTraversalVisitor; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.Statement; import java.util.ArrayList; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/execution/PrepareTask.java b/core/trino-main/src/main/java/io/trino/execution/PrepareTask.java index 27b2715a476f..129a2f50685d 100644 --- a/core/trino-main/src/main/java/io/trino/execution/PrepareTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/PrepareTask.java @@ -14,24 +14,24 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.Deallocate; -import io.prestosql.sql.tree.Execute; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Prepare; -import io.prestosql.sql.tree.Statement; -import io.prestosql.transaction.TransactionManager; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.Deallocate; +import io.trino.sql.tree.Execute; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Prepare; +import io.trino.sql.tree.Statement; +import io.trino.transaction.TransactionManager; import javax.inject.Inject; import java.util.List; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.sql.SqlFormatterUtil.getFormattedSql; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.sql.SqlFormatterUtil.getFormattedSql; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/QueryExecution.java b/core/trino-main/src/main/java/io/trino/execution/QueryExecution.java index acb5b5695506..b48bb2d567a3 100644 --- a/core/trino-main/src/main/java/io/trino/execution/QueryExecution.java +++ b/core/trino-main/src/main/java/io/trino/execution/QueryExecution.java @@ -18,15 +18,15 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.QueryPreparer.PreparedQuery; -import io.prestosql.execution.QueryTracker.TrackedQuery; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.memory.VersionedMemoryPoolId; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.protocol.Slug; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Plan; +import io.trino.execution.QueryPreparer.PreparedQuery; +import io.trino.execution.QueryTracker.TrackedQuery; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.warnings.WarningCollector; +import io.trino.memory.VersionedMemoryPoolId; +import io.trino.server.BasicQueryInfo; +import io.trino.server.protocol.Slug; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Plan; import java.net.URI; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/execution/QueryIdGenerator.java b/core/trino-main/src/main/java/io/trino/execution/QueryIdGenerator.java index 8e5709c6c2b3..51de72e14ece 100644 --- a/core/trino-main/src/main/java/io/trino/execution/QueryIdGenerator.java +++ b/core/trino-main/src/main/java/io/trino/execution/QueryIdGenerator.java @@ -17,7 +17,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.primitives.Chars; import com.google.common.util.concurrent.Uninterruptibles; -import io.prestosql.spi.QueryId; +import io.trino.spi.QueryId; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; diff --git a/core/trino-main/src/main/java/io/trino/execution/QueryInfo.java b/core/trino-main/src/main/java/io/trino/execution/QueryInfo.java index 21edf214cb06..c05abc5cc08b 100644 --- a/core/trino-main/src/main/java/io/trino/execution/QueryInfo.java +++ b/core/trino-main/src/main/java/io/trino/execution/QueryInfo.java @@ -18,19 +18,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.SessionRepresentation; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorType; -import io.prestosql.spi.PrestoWarning; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.eventlistener.RoutineInfo; -import io.prestosql.spi.eventlistener.TableInfo; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.resourcegroups.QueryType; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.sql.analyzer.Output; -import io.prestosql.transaction.TransactionId; +import io.trino.SessionRepresentation; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorType; +import io.trino.spi.PrestoWarning; +import io.trino.spi.QueryId; +import io.trino.spi.eventlistener.RoutineInfo; +import io.trino.spi.eventlistener.TableInfo; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.resourcegroups.QueryType; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.security.SelectedRole; +import io.trino.sql.analyzer.Output; +import io.trino.transaction.TransactionId; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; @@ -42,7 +42,7 @@ import java.util.Set; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.execution.StageInfo.getAllStages; +import static io.trino.execution.StageInfo.getAllStages; import static java.util.Objects.requireNonNull; @Immutable diff --git a/core/trino-main/src/main/java/io/trino/execution/QueryManager.java b/core/trino-main/src/main/java/io/trino/execution/QueryManager.java index 022646315357..d15c20ffbda6 100644 --- a/core/trino-main/src/main/java/io/trino/execution/QueryManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/QueryManager.java @@ -14,11 +14,11 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.protocol.Slug; -import io.prestosql.spi.QueryId; +import io.trino.Session; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.server.BasicQueryInfo; +import io.trino.server.protocol.Slug; +import io.trino.spi.QueryId; import java.util.List; import java.util.NoSuchElementException; diff --git a/core/trino-main/src/main/java/io/trino/execution/QueryManagerStats.java b/core/trino-main/src/main/java/io/trino/execution/QueryManagerStats.java index 27396b04b688..61833c267531 100644 --- a/core/trino-main/src/main/java/io/trino/execution/QueryManagerStats.java +++ b/core/trino-main/src/main/java/io/trino/execution/QueryManagerStats.java @@ -16,9 +16,9 @@ import io.airlift.stats.CounterStat; import io.airlift.stats.DistributionStat; import io.airlift.stats.TimeStat; -import io.prestosql.dispatcher.DispatchQuery; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.server.BasicQueryInfo; +import io.trino.dispatcher.DispatchQuery; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.server.BasicQueryInfo; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -27,9 +27,9 @@ import java.util.Optional; import java.util.function.Supplier; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.spi.StandardErrorCode.ABANDONED_QUERY; -import static io.prestosql.spi.StandardErrorCode.USER_CANCELED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.spi.StandardErrorCode.ABANDONED_QUERY; +import static io.trino.spi.StandardErrorCode.USER_CANCELED; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/trino-main/src/main/java/io/trino/execution/QueryPerformanceFetcher.java b/core/trino-main/src/main/java/io/trino/execution/QueryPerformanceFetcher.java index fe16f989353e..548613ce64c8 100644 --- a/core/trino-main/src/main/java/io/trino/execution/QueryPerformanceFetcher.java +++ b/core/trino-main/src/main/java/io/trino/execution/QueryPerformanceFetcher.java @@ -13,7 +13,7 @@ */ package io.trino.execution; -import io.prestosql.spi.QueryId; +import io.trino.spi.QueryId; public interface QueryPerformanceFetcher { diff --git a/core/trino-main/src/main/java/io/trino/execution/QueryPreparer.java b/core/trino-main/src/main/java/io/trino/execution/QueryPreparer.java index 7ec970898d75..833ae37b8c73 100644 --- a/core/trino-main/src/main/java/io/trino/execution/QueryPreparer.java +++ b/core/trino-main/src/main/java/io/trino/execution/QueryPreparer.java @@ -14,28 +14,28 @@ package io.trino.execution; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.resourcegroups.QueryType; -import io.prestosql.sql.parser.ParsingException; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.Execute; -import io.prestosql.sql.tree.Explain; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Statement; -import io.prestosql.util.StatementUtils; +import io.trino.Session; +import io.trino.spi.PrestoException; +import io.trino.spi.resourcegroups.QueryType; +import io.trino.sql.parser.ParsingException; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.Execute; +import io.trino.sql.tree.Explain; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Statement; +import io.trino.util.StatementUtils; import javax.inject.Inject; import java.util.List; import java.util.Optional; -import static io.prestosql.execution.ParameterExtractor.getParameterCount; -import static io.prestosql.spi.StandardErrorCode.INVALID_PARAMETER_USAGE; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.sql.ParsingUtil.createParsingOptions; -import static io.prestosql.sql.analyzer.ConstantExpressionVerifier.verifyExpressionIsConstant; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.execution.ParameterExtractor.getParameterCount; +import static io.trino.spi.StandardErrorCode.INVALID_PARAMETER_USAGE; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.sql.ParsingUtil.createParsingOptions; +import static io.trino.sql.analyzer.ConstantExpressionVerifier.verifyExpressionIsConstant; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; import static java.util.Collections.emptySet; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/QueryStateMachine.java b/core/trino-main/src/main/java/io/trino/execution/QueryStateMachine.java index d47006b29ccc..959334da15c8 100644 --- a/core/trino-main/src/main/java/io/trino/execution/QueryStateMachine.java +++ b/core/trino-main/src/main/java/io/trino/execution/QueryStateMachine.java @@ -24,32 +24,32 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.QueryExecution.QueryOutputInfo; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.memory.VersionedMemoryPoolId; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.BlockedReason; -import io.prestosql.operator.OperatorStats; -import io.prestosql.security.AccessControl; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.BasicQueryStats; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.eventlistener.RoutineInfo; -import io.prestosql.spi.eventlistener.StageGcStatistics; -import io.prestosql.spi.eventlistener.TableInfo; -import io.prestosql.spi.resourcegroups.QueryType; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.Output; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.execution.QueryExecution.QueryOutputInfo; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.warnings.WarningCollector; +import io.trino.memory.VersionedMemoryPoolId; +import io.trino.metadata.Metadata; +import io.trino.operator.BlockedReason; +import io.trino.operator.OperatorStats; +import io.trino.security.AccessControl; +import io.trino.server.BasicQueryInfo; +import io.trino.server.BasicQueryStats; +import io.trino.spi.ErrorCode; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.spi.eventlistener.RoutineInfo; +import io.trino.spi.eventlistener.StageGcStatistics; +import io.trino.spi.eventlistener.TableInfo; +import io.trino.spi.resourcegroups.QueryType; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.security.SelectedRole; +import io.trino.spi.type.Type; +import io.trino.sql.analyzer.Output; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.transaction.TransactionId; +import io.trino.transaction.TransactionManager; import org.joda.time.DateTime; import javax.annotation.Nullable; @@ -76,23 +76,23 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.execution.BasicStageStats.EMPTY_STAGE_STATS; -import static io.prestosql.execution.QueryState.DISPATCHING; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.FINISHED; -import static io.prestosql.execution.QueryState.FINISHING; -import static io.prestosql.execution.QueryState.PLANNING; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.execution.QueryState.STARTING; -import static io.prestosql.execution.QueryState.TERMINAL_QUERY_STATES; -import static io.prestosql.execution.QueryState.WAITING_FOR_RESOURCES; -import static io.prestosql.execution.StageInfo.getAllStages; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; -import static io.prestosql.server.DynamicFilterService.DynamicFiltersStats; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.USER_CANCELED; -import static io.prestosql.util.Failures.toFailure; +import static io.trino.execution.BasicStageStats.EMPTY_STAGE_STATS; +import static io.trino.execution.QueryState.DISPATCHING; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.FINISHED; +import static io.trino.execution.QueryState.FINISHING; +import static io.trino.execution.QueryState.PLANNING; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.execution.QueryState.STARTING; +import static io.trino.execution.QueryState.TERMINAL_QUERY_STATES; +import static io.trino.execution.QueryState.WAITING_FOR_RESOURCES; +import static io.trino.execution.StageInfo.getAllStages; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.server.DynamicFilterService.DynamicFiltersStats; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.USER_CANCELED; +import static io.trino.util.Failures.toFailure; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/main/java/io/trino/execution/QueryStats.java b/core/trino-main/src/main/java/io/trino/execution/QueryStats.java index f3ad9522ace5..a1c99ca37584 100644 --- a/core/trino-main/src/main/java/io/trino/execution/QueryStats.java +++ b/core/trino-main/src/main/java/io/trino/execution/QueryStats.java @@ -19,10 +19,10 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.operator.BlockedReason; -import io.prestosql.operator.OperatorStats; -import io.prestosql.operator.TableWriterOperator; -import io.prestosql.spi.eventlistener.StageGcStatistics; +import io.trino.operator.BlockedReason; +import io.trino.operator.OperatorStats; +import io.trino.operator.TableWriterOperator; +import io.trino.spi.eventlistener.StageGcStatistics; import org.joda.time.DateTime; import javax.annotation.Nullable; @@ -33,7 +33,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.server.DynamicFilterService.DynamicFiltersStats; +import static io.trino.server.DynamicFilterService.DynamicFiltersStats; import static java.lang.Math.min; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/QueryTracker.java b/core/trino-main/src/main/java/io/trino/execution/QueryTracker.java index cd816e575744..a90c7ac64038 100644 --- a/core/trino-main/src/main/java/io/trino/execution/QueryTracker.java +++ b/core/trino-main/src/main/java/io/trino/execution/QueryTracker.java @@ -16,10 +16,10 @@ import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.QueryTracker.TrackedQuery; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; +import io.trino.Session; +import io.trino.execution.QueryTracker.TrackedQuery; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; import org.joda.time.DateTime; import javax.annotation.concurrent.GuardedBy; @@ -37,11 +37,11 @@ import java.util.concurrent.TimeUnit; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.SystemSessionProperties.getQueryMaxExecutionTime; -import static io.prestosql.SystemSessionProperties.getQueryMaxRunTime; -import static io.prestosql.spi.StandardErrorCode.ABANDONED_QUERY; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_TIME_LIMIT; -import static io.prestosql.spi.StandardErrorCode.SERVER_SHUTTING_DOWN; +import static io.trino.SystemSessionProperties.getQueryMaxExecutionTime; +import static io.trino.SystemSessionProperties.getQueryMaxRunTime; +import static io.trino.spi.StandardErrorCode.ABANDONED_QUERY; +import static io.trino.spi.StandardErrorCode.EXCEEDED_TIME_LIMIT; +import static io.trino.spi.StandardErrorCode.SERVER_SHUTTING_DOWN; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/RemoteTask.java b/core/trino-main/src/main/java/io/trino/execution/RemoteTask.java index 195af2a82247..5f98f92a6abc 100644 --- a/core/trino-main/src/main/java/io/trino/execution/RemoteTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/RemoteTask.java @@ -15,10 +15,10 @@ import com.google.common.collect.Multimap; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.metadata.Split; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.metadata.Split; +import io.trino.sql.planner.plan.PlanNodeId; public interface RemoteTask { diff --git a/core/trino-main/src/main/java/io/trino/execution/RemoteTaskFactory.java b/core/trino-main/src/main/java/io/trino/execution/RemoteTaskFactory.java index 53113e627f9d..947a66fe18b1 100644 --- a/core/trino-main/src/main/java/io/trino/execution/RemoteTaskFactory.java +++ b/core/trino-main/src/main/java/io/trino/execution/RemoteTaskFactory.java @@ -14,13 +14,13 @@ package io.trino.execution; import com.google.common.collect.Multimap; -import io.prestosql.Session; -import io.prestosql.execution.NodeTaskMap.PartitionedSplitCountTracker; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.execution.NodeTaskMap.PartitionedSplitCountTracker; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.OptionalInt; diff --git a/core/trino-main/src/main/java/io/trino/execution/RenameColumnTask.java b/core/trino-main/src/main/java/io/trino/execution/RenameColumnTask.java index 22953e6dd9ee..d365dbd2dafe 100644 --- a/core/trino-main/src/main/java/io/trino/execution/RenameColumnTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/RenameColumnTask.java @@ -14,27 +14,27 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.RenameColumn; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ColumnHandle; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.RenameColumn; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Map; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.COLUMN_ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.COLUMN_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.COLUMN_ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.COLUMN_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; import static java.util.Locale.ENGLISH; public class RenameColumnTask diff --git a/core/trino-main/src/main/java/io/trino/execution/RenameSchemaTask.java b/core/trino-main/src/main/java/io/trino/execution/RenameSchemaTask.java index 57a19e2e3005..31a882cd4524 100644 --- a/core/trino-main/src/main/java/io/trino/execution/RenameSchemaTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/RenameSchemaTask.java @@ -14,22 +14,22 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.RenameSchema; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.RenameSchema; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createCatalogSchemaName; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createCatalogSchemaName; +import static io.trino.spi.StandardErrorCode.SCHEMA_ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class RenameSchemaTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/RenameTableTask.java b/core/trino-main/src/main/java/io/trino/execution/RenameTableTask.java index de2ef09d9caf..85a59646ba6d 100644 --- a/core/trino-main/src/main/java/io/trino/execution/RenameTableTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/RenameTableTask.java @@ -14,25 +14,25 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.security.AccessControl; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.RenameTable; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.security.AccessControl; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.RenameTable; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.CATALOG_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TABLE_ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.CATALOG_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TABLE_ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class RenameTableTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/RenameViewTask.java b/core/trino-main/src/main/java/io/trino/execution/RenameViewTask.java index 365c218d7f1d..4666074dbe26 100644 --- a/core/trino-main/src/main/java/io/trino/execution/RenameViewTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/RenameViewTask.java @@ -14,25 +14,25 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.RenameView; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.RenameView; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.CATALOG_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TABLE_ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.CATALOG_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TABLE_ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class RenameViewTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/ResetSessionTask.java b/core/trino-main/src/main/java/io/trino/execution/ResetSessionTask.java index f4f3ec32c131..158d52de1b97 100644 --- a/core/trino-main/src/main/java/io/trino/execution/ResetSessionTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/ResetSessionTask.java @@ -14,19 +14,19 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ResetSession; -import io.prestosql.transaction.TransactionManager; +import io.trino.connector.CatalogName; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ResetSession; +import io.trino.transaction.TransactionManager; import java.util.List; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.spi.StandardErrorCode.CATALOG_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.spi.StandardErrorCode.CATALOG_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class ResetSessionTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/RevokeRolesTask.java b/core/trino-main/src/main/java/io/trino/execution/RevokeRolesTask.java index b1271730e454..4ee2f9cbed98 100644 --- a/core/trino-main/src/main/java/io/trino/execution/RevokeRolesTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/RevokeRolesTask.java @@ -14,14 +14,14 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.MetadataUtil; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.RevokeRoles; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.MetadataUtil; +import io.trino.security.AccessControl; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.RevokeRoles; +import io.trino.transaction.TransactionManager; import java.util.LinkedHashSet; import java.util.List; @@ -31,11 +31,11 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createPrincipal; -import static io.prestosql.metadata.MetadataUtil.getSessionCatalog; -import static io.prestosql.spi.StandardErrorCode.ROLE_NOT_FOUND; -import static io.prestosql.spi.security.PrincipalType.ROLE; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createPrincipal; +import static io.trino.metadata.MetadataUtil.getSessionCatalog; +import static io.trino.spi.StandardErrorCode.ROLE_NOT_FOUND; +import static io.trino.spi.security.PrincipalType.ROLE; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class RevokeRolesTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/RevokeTask.java b/core/trino-main/src/main/java/io/trino/execution/RevokeTask.java index 546d34990401..61fd8aae32d0 100644 --- a/core/trino-main/src/main/java/io/trino/execution/RevokeTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/RevokeTask.java @@ -14,17 +14,17 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.security.Privilege; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.GrantOnType; -import io.prestosql.sql.tree.Revoke; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.security.AccessControl; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.security.Privilege; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.GrantOnType; +import io.trino.sql.tree.Revoke; +import io.trino.transaction.TransactionManager; import java.util.EnumSet; import java.util.List; @@ -33,13 +33,13 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createCatalogSchemaName; -import static io.prestosql.metadata.MetadataUtil.createPrincipal; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.INVALID_PRIVILEGE; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createCatalogSchemaName; +import static io.trino.metadata.MetadataUtil.createPrincipal; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.INVALID_PRIVILEGE; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class RevokeTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/RollbackTask.java b/core/trino-main/src/main/java/io/trino/execution/RollbackTask.java index 2ac3439bbb18..db4aa2bae5c6 100644 --- a/core/trino-main/src/main/java/io/trino/execution/RollbackTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/RollbackTask.java @@ -14,19 +14,19 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Rollback; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Rollback; +import io.trino.transaction.TransactionId; +import io.trino.transaction.TransactionManager; import java.util.List; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.spi.StandardErrorCode.NOT_IN_TRANSACTION; +import static io.trino.spi.StandardErrorCode.NOT_IN_TRANSACTION; public class RollbackTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/ScheduledSplit.java b/core/trino-main/src/main/java/io/trino/execution/ScheduledSplit.java index 04d7c53d7582..b8b63e7aa91e 100644 --- a/core/trino-main/src/main/java/io/trino/execution/ScheduledSplit.java +++ b/core/trino-main/src/main/java/io/trino/execution/ScheduledSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.primitives.Longs; -import io.prestosql.metadata.Split; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.metadata.Split; +import io.trino.sql.planner.plan.PlanNodeId; import static com.google.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/SetPathTask.java b/core/trino-main/src/main/java/io/trino/execution/SetPathTask.java index 2f01732b72ba..f51fbd39f9a2 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SetPathTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/SetPathTask.java @@ -14,25 +14,25 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.client.ClientCapabilities; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.SqlPath; -import io.prestosql.sql.SqlPathElement; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SetPath; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.client.ClientCapabilities; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.sql.SqlPath; +import io.trino.sql.SqlPathElement; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SetPath; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.spi.StandardErrorCode.MISSING_CATALOG_NAME; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.spi.StandardErrorCode.MISSING_CATALOG_NAME; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; import static java.util.Locale.ENGLISH; public class SetPathTask diff --git a/core/trino-main/src/main/java/io/trino/execution/SetRoleTask.java b/core/trino-main/src/main/java/io/trino/execution/SetRoleTask.java index 47844b9b5464..508d6b10779d 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SetRoleTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/SetRoleTask.java @@ -14,19 +14,19 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.security.SecurityContext; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SetRole; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.security.SecurityContext; +import io.trino.spi.security.SelectedRole; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SetRole; +import io.trino.transaction.TransactionManager; import java.util.List; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.getSessionCatalog; +import static io.trino.metadata.MetadataUtil.getSessionCatalog; import static java.util.Locale.ENGLISH; public class SetRoleTask diff --git a/core/trino-main/src/main/java/io/trino/execution/SetSchemaAuthorizationTask.java b/core/trino-main/src/main/java/io/trino/execution/SetSchemaAuthorizationTask.java index f84f6ffb54aa..95a630922de7 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SetSchemaAuthorizationTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/SetSchemaAuthorizationTask.java @@ -14,26 +14,26 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SetSchemaAuthorization; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.PrincipalType; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SetSchemaAuthorization; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createCatalogSchemaName; -import static io.prestosql.metadata.MetadataUtil.createPrincipal; -import static io.prestosql.metadata.MetadataUtil.getSessionCatalog; -import static io.prestosql.spi.StandardErrorCode.ROLE_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createCatalogSchemaName; +import static io.trino.metadata.MetadataUtil.createPrincipal; +import static io.trino.metadata.MetadataUtil.getSessionCatalog; +import static io.trino.spi.StandardErrorCode.ROLE_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class SetSchemaAuthorizationTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/SetSessionTask.java b/core/trino-main/src/main/java/io/trino/execution/SetSessionTask.java index a1b9493d7a7a..05599db9a3d2 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SetSessionTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/SetSessionTask.java @@ -14,28 +14,28 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.security.SecurityContext; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SetSession; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.security.SecurityContext; +import io.trino.spi.PrestoException; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.Type; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SetSession; +import io.trino.transaction.TransactionManager; import java.util.List; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.SessionPropertyManager.evaluatePropertyValue; -import static io.prestosql.metadata.SessionPropertyManager.serializeSessionProperty; -import static io.prestosql.spi.StandardErrorCode.CATALOG_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; -import static io.prestosql.sql.ParameterUtils.parameterExtractor; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.SessionPropertyManager.evaluatePropertyValue; +import static io.trino.metadata.SessionPropertyManager.serializeSessionProperty; +import static io.trino.spi.StandardErrorCode.CATALOG_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; +import static io.trino.sql.ParameterUtils.parameterExtractor; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; import static java.lang.String.format; public class SetSessionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/SetTableAuthorizationTask.java b/core/trino-main/src/main/java/io/trino/execution/SetTableAuthorizationTask.java index 80376968a522..7548f6a2e0aa 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SetTableAuthorizationTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/SetTableAuthorizationTask.java @@ -14,27 +14,27 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SetTableAuthorization; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.PrincipalType; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SetTableAuthorization; +import io.trino.transaction.TransactionManager; import java.util.List; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createPrincipal; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.ROLE_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createPrincipal; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.ROLE_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class SetTableAuthorizationTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/SetViewAuthorizationTask.java b/core/trino-main/src/main/java/io/trino/execution/SetViewAuthorizationTask.java index 1251d039ad3c..b8e63c0c3dfb 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SetViewAuthorizationTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/SetViewAuthorizationTask.java @@ -14,27 +14,27 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SetViewAuthorization; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.PrincipalType; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SetViewAuthorization; +import io.trino.transaction.TransactionManager; import java.util.List; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.metadata.MetadataUtil.createPrincipal; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.ROLE_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.MetadataUtil.createPrincipal; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.ROLE_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class SetViewAuthorizationTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/SqlQueryExecution.java b/core/trino-main/src/main/java/io/trino/execution/SqlQueryExecution.java index 647a1348bdbd..ce696da7ab7e 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SqlQueryExecution.java +++ b/core/trino-main/src/main/java/io/trino/execution/SqlQueryExecution.java @@ -18,55 +18,55 @@ import io.airlift.log.Logger; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.connector.CatalogName; -import io.prestosql.cost.CostCalculator; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.execution.QueryPreparer.PreparedQuery; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.execution.scheduler.ExecutionPolicy; -import io.prestosql.execution.scheduler.NodeScheduler; -import io.prestosql.execution.scheduler.SplitSchedulerStats; -import io.prestosql.execution.scheduler.SqlQueryScheduler; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.failuredetector.FailureDetector; -import io.prestosql.memory.VersionedMemoryPoolId; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.operator.ForScheduler; -import io.prestosql.security.AccessControl; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.DynamicFilterService; -import io.prestosql.server.protocol.Slug; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.split.SplitManager; -import io.prestosql.split.SplitSource; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.Analyzer; -import io.prestosql.sql.analyzer.QueryExplainer; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.DistributedExecutionPlanner; -import io.prestosql.sql.planner.InputExtractor; -import io.prestosql.sql.planner.LogicalPlanner; -import io.prestosql.sql.planner.NodePartitioningManager; -import io.prestosql.sql.planner.PartitioningHandle; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.PlanFragmenter; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.PlanOptimizers; -import io.prestosql.sql.planner.StageExecutionPlan; -import io.prestosql.sql.planner.SubPlan; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.tree.Explain; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.Statement; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.connector.CatalogName; +import io.trino.cost.CostCalculator; +import io.trino.cost.StatsCalculator; +import io.trino.execution.QueryPreparer.PreparedQuery; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.scheduler.ExecutionPolicy; +import io.trino.execution.scheduler.NodeScheduler; +import io.trino.execution.scheduler.SplitSchedulerStats; +import io.trino.execution.scheduler.SqlQueryScheduler; +import io.trino.execution.warnings.WarningCollector; +import io.trino.failuredetector.FailureDetector; +import io.trino.memory.VersionedMemoryPoolId; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.operator.ForScheduler; +import io.trino.security.AccessControl; +import io.trino.server.BasicQueryInfo; +import io.trino.server.DynamicFilterService; +import io.trino.server.protocol.Slug; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.type.TypeOperators; +import io.trino.split.SplitManager; +import io.trino.split.SplitSource; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.analyzer.Analyzer; +import io.trino.sql.analyzer.QueryExplainer; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.DistributedExecutionPlanner; +import io.trino.sql.planner.InputExtractor; +import io.trino.sql.planner.LogicalPlanner; +import io.trino.sql.planner.NodePartitioningManager; +import io.trino.sql.planner.PartitioningHandle; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.PlanFragmenter; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.PlanOptimizers; +import io.trino.sql.planner.StageExecutionPlan; +import io.trino.sql.planner.SubPlan; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.tree.Explain; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.Statement; import org.joda.time.DateTime; import javax.annotation.concurrent.ThreadSafe; @@ -85,13 +85,13 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Throwables.throwIfInstanceOf; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.SystemSessionProperties.isEnableDynamicFiltering; -import static io.prestosql.execution.buffer.OutputBuffers.BROADCAST_PARTITION_ID; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.execution.scheduler.SqlQueryScheduler.createSqlQueryScheduler; -import static io.prestosql.server.DynamicFilterService.DynamicFiltersStats; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.sql.ParameterUtils.parameterExtractor; +import static io.trino.SystemSessionProperties.isEnableDynamicFiltering; +import static io.trino.execution.buffer.OutputBuffers.BROADCAST_PARTITION_ID; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.execution.scheduler.SqlQueryScheduler.createSqlQueryScheduler; +import static io.trino.server.DynamicFilterService.DynamicFiltersStats; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.sql.ParameterUtils.parameterExtractor; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/trino-main/src/main/java/io/trino/execution/SqlQueryManager.java b/core/trino-main/src/main/java/io/trino/execution/SqlQueryManager.java index ceb367212d4a..7526195a7ef7 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SqlQueryManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/SqlQueryManager.java @@ -19,17 +19,17 @@ import io.airlift.log.Logger; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.ExceededCpuLimitException; -import io.prestosql.ExceededScanLimitException; -import io.prestosql.Session; -import io.prestosql.execution.QueryExecution.QueryOutputInfo; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.memory.ClusterMemoryManager; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.protocol.Slug; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.sql.planner.Plan; +import io.trino.ExceededCpuLimitException; +import io.trino.ExceededScanLimitException; +import io.trino.Session; +import io.trino.execution.QueryExecution.QueryOutputInfo; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.memory.ClusterMemoryManager; +import io.trino.server.BasicQueryInfo; +import io.trino.server.protocol.Slug; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.sql.planner.Plan; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -52,10 +52,10 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.util.concurrent.Futures.immediateFailedFuture; import static io.airlift.concurrent.Threads.threadsNamed; -import static io.prestosql.SystemSessionProperties.getQueryMaxCpuTime; -import static io.prestosql.SystemSessionProperties.getQueryMaxScanPhysicalBytes; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.SystemSessionProperties.getQueryMaxCpuTime; +import static io.trino.SystemSessionProperties.getQueryMaxScanPhysicalBytes; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/core/trino-main/src/main/java/io/trino/execution/SqlStageExecution.java b/core/trino-main/src/main/java/io/trino/execution/SqlStageExecution.java index 388d7cb01ca1..f75124556922 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SqlStageExecution.java +++ b/core/trino-main/src/main/java/io/trino/execution/SqlStageExecution.java @@ -20,20 +20,20 @@ import com.google.common.collect.Multimap; import com.google.common.collect.Sets; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.scheduler.SplitSchedulerStats; -import io.prestosql.failuredetector.FailureDetector; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; -import io.prestosql.server.DynamicFilterService; -import io.prestosql.spi.PrestoException; -import io.prestosql.split.RemoteSplit; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.RemoteSourceNode; +import io.trino.Session; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.scheduler.SplitSchedulerStats; +import io.trino.failuredetector.FailureDetector; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; +import io.trino.server.DynamicFilterService; +import io.trino.spi.PrestoException; +import io.trino.split.RemoteSplit; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.RemoteSourceNode; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; @@ -62,10 +62,10 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Sets.newConcurrentHashSet; import static io.airlift.http.client.HttpUriBuilder.uriBuilderFrom; -import static io.prestosql.failuredetector.FailureDetector.State.GONE; -import static io.prestosql.operator.ExchangeOperator.REMOTE_CONNECTOR_ID; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.REMOTE_HOST_GONE; +import static io.trino.failuredetector.FailureDetector.State.GONE; +import static io.trino.operator.ExchangeOperator.REMOTE_CONNECTOR_ID; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.REMOTE_HOST_GONE; import static java.util.Objects.requireNonNull; @ThreadSafe diff --git a/core/trino-main/src/main/java/io/trino/execution/SqlTask.java b/core/trino-main/src/main/java/io/trino/execution/SqlTask.java index 4f6cf9f57acf..6741e67dfeef 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SqlTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/SqlTask.java @@ -22,21 +22,21 @@ import io.airlift.stats.CounterStat; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.buffer.BufferResult; -import io.prestosql.execution.buffer.LazyOutputBuffer; -import io.prestosql.execution.buffer.OutputBuffer; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.memory.QueryContext; -import io.prestosql.operator.PipelineContext; -import io.prestosql.operator.PipelineStatus; -import io.prestosql.operator.TaskContext; -import io.prestosql.operator.TaskStats; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.buffer.BufferResult; +import io.trino.execution.buffer.LazyOutputBuffer; +import io.trino.execution.buffer.OutputBuffer; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.memory.QueryContext; +import io.trino.operator.PipelineContext; +import io.trino.operator.PipelineStatus; +import io.trino.operator.TaskContext; +import io.trino.operator.TaskStats; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.PlanNodeId; import org.joda.time.DateTime; import javax.annotation.Nullable; @@ -59,12 +59,12 @@ import static com.google.common.util.concurrent.Futures.immediateFuture; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; -import static io.prestosql.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTER_DOMAINS; -import static io.prestosql.execution.TaskState.ABORTED; -import static io.prestosql.execution.TaskState.FAILED; -import static io.prestosql.execution.TaskState.RUNNING; -import static io.prestosql.util.Failures.toFailures; +import static io.trino.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; +import static io.trino.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTER_DOMAINS; +import static io.trino.execution.TaskState.ABORTED; +import static io.trino.execution.TaskState.FAILED; +import static io.trino.execution.TaskState.RUNNING; +import static io.trino.util.Failures.toFailures; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/main/java/io/trino/execution/SqlTaskExecution.java b/core/trino-main/src/main/java/io/trino/execution/SqlTaskExecution.java index 1c6271141cfe..b2e4e82be2a3 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SqlTaskExecution.java +++ b/core/trino-main/src/main/java/io/trino/execution/SqlTaskExecution.java @@ -23,22 +23,22 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.concurrent.SetThreadName; import io.airlift.units.Duration; -import io.prestosql.event.SplitMonitor; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.buffer.BufferState; -import io.prestosql.execution.buffer.OutputBuffer; -import io.prestosql.execution.executor.TaskExecutor; -import io.prestosql.execution.executor.TaskHandle; -import io.prestosql.operator.Driver; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.DriverFactory; -import io.prestosql.operator.DriverStats; -import io.prestosql.operator.PipelineContext; -import io.prestosql.operator.PipelineExecutionStrategy; -import io.prestosql.operator.StageExecutionDescriptor; -import io.prestosql.operator.TaskContext; -import io.prestosql.sql.planner.LocalExecutionPlanner.LocalExecutionPlan; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.event.SplitMonitor; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.buffer.BufferState; +import io.trino.execution.buffer.OutputBuffer; +import io.trino.execution.executor.TaskExecutor; +import io.trino.execution.executor.TaskHandle; +import io.trino.operator.Driver; +import io.trino.operator.DriverContext; +import io.trino.operator.DriverFactory; +import io.trino.operator.DriverStats; +import io.trino.operator.PipelineContext; +import io.trino.operator.PipelineExecutionStrategy; +import io.trino.operator.StageExecutionDescriptor; +import io.trino.operator.TaskContext; +import io.trino.sql.planner.LocalExecutionPlanner.LocalExecutionPlan; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.Nullable; import javax.annotation.concurrent.GuardedBy; @@ -67,13 +67,13 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.SystemSessionProperties.getInitialSplitsPerNode; -import static io.prestosql.SystemSessionProperties.getMaxDriversPerTask; -import static io.prestosql.SystemSessionProperties.getSplitConcurrencyAdjustmentInterval; -import static io.prestosql.execution.SqlTaskExecution.SplitsState.ADDING_SPLITS; -import static io.prestosql.execution.SqlTaskExecution.SplitsState.FINISHED; -import static io.prestosql.execution.SqlTaskExecution.SplitsState.NO_MORE_SPLITS; -import static io.prestosql.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.SystemSessionProperties.getInitialSplitsPerNode; +import static io.trino.SystemSessionProperties.getMaxDriversPerTask; +import static io.trino.SystemSessionProperties.getSplitConcurrencyAdjustmentInterval; +import static io.trino.execution.SqlTaskExecution.SplitsState.ADDING_SPLITS; +import static io.trino.execution.SqlTaskExecution.SplitsState.FINISHED; +import static io.trino.execution.SqlTaskExecution.SplitsState.NO_MORE_SPLITS; +import static io.trino.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.function.Function.identity; diff --git a/core/trino-main/src/main/java/io/trino/execution/SqlTaskExecutionFactory.java b/core/trino-main/src/main/java/io/trino/execution/SqlTaskExecutionFactory.java index d49b92b35fff..0cd56a3c9dc9 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SqlTaskExecutionFactory.java +++ b/core/trino-main/src/main/java/io/trino/execution/SqlTaskExecutionFactory.java @@ -14,23 +14,23 @@ package io.trino.execution; import io.airlift.concurrent.SetThreadName; -import io.prestosql.Session; -import io.prestosql.event.SplitMonitor; -import io.prestosql.execution.buffer.OutputBuffer; -import io.prestosql.execution.executor.TaskExecutor; -import io.prestosql.memory.QueryContext; -import io.prestosql.operator.TaskContext; -import io.prestosql.sql.planner.LocalExecutionPlanner; -import io.prestosql.sql.planner.LocalExecutionPlanner.LocalExecutionPlan; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.TypeProvider; +import io.trino.Session; +import io.trino.event.SplitMonitor; +import io.trino.execution.buffer.OutputBuffer; +import io.trino.execution.executor.TaskExecutor; +import io.trino.memory.QueryContext; +import io.trino.operator.TaskContext; +import io.trino.sql.planner.LocalExecutionPlanner; +import io.trino.sql.planner.LocalExecutionPlanner.LocalExecutionPlan; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.TypeProvider; import java.util.List; import java.util.OptionalInt; import java.util.concurrent.Executor; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.execution.SqlTaskExecution.createSqlTaskExecution; +import static io.trino.execution.SqlTaskExecution.createSqlTaskExecution; import static java.util.Objects.requireNonNull; public class SqlTaskExecutionFactory diff --git a/core/trino-main/src/main/java/io/trino/execution/SqlTaskManager.java b/core/trino-main/src/main/java/io/trino/execution/SqlTaskManager.java index 440fc7960571..31d0e29e1a12 100644 --- a/core/trino-main/src/main/java/io/trino/execution/SqlTaskManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/SqlTaskManager.java @@ -26,26 +26,26 @@ import io.airlift.stats.GcMonitor; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.event.SplitMonitor; -import io.prestosql.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.buffer.BufferResult; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.execution.executor.TaskExecutor; -import io.prestosql.memory.LocalMemoryManager; -import io.prestosql.memory.MemoryPool; -import io.prestosql.memory.MemoryPoolAssignment; -import io.prestosql.memory.MemoryPoolAssignmentsRequest; -import io.prestosql.memory.NodeMemoryConfig; -import io.prestosql.memory.QueryContext; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.spiller.LocalSpillManager; -import io.prestosql.spiller.NodeSpillConfig; -import io.prestosql.sql.planner.LocalExecutionPlanner; -import io.prestosql.sql.planner.PlanFragment; +import io.trino.Session; +import io.trino.event.SplitMonitor; +import io.trino.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.buffer.BufferResult; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.executor.TaskExecutor; +import io.trino.memory.LocalMemoryManager; +import io.trino.memory.MemoryPool; +import io.trino.memory.MemoryPoolAssignment; +import io.trino.memory.MemoryPoolAssignmentsRequest; +import io.trino.memory.NodeMemoryConfig; +import io.trino.memory.QueryContext; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.spiller.LocalSpillManager; +import io.trino.spiller.NodeSpillConfig; +import io.trino.sql.planner.LocalExecutionPlanner; +import io.trino.sql.planner.PlanFragment; import org.joda.time.DateTime; import org.weakref.jmx.Flatten; import org.weakref.jmx.Managed; @@ -69,14 +69,14 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.concurrent.Threads.threadsNamed; -import static io.prestosql.SystemSessionProperties.getQueryMaxMemoryPerNode; -import static io.prestosql.SystemSessionProperties.getQueryMaxTotalMemoryPerNode; -import static io.prestosql.SystemSessionProperties.resourceOvercommit; -import static io.prestosql.execution.SqlTask.createSqlTask; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; -import static io.prestosql.memory.LocalMemoryManager.RESERVED_POOL; -import static io.prestosql.spi.StandardErrorCode.ABANDONED_TASK; -import static io.prestosql.spi.StandardErrorCode.SERVER_SHUTTING_DOWN; +import static io.trino.SystemSessionProperties.getQueryMaxMemoryPerNode; +import static io.trino.SystemSessionProperties.getQueryMaxTotalMemoryPerNode; +import static io.trino.SystemSessionProperties.resourceOvercommit; +import static io.trino.execution.SqlTask.createSqlTask; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.memory.LocalMemoryManager.RESERVED_POOL; +import static io.trino.spi.StandardErrorCode.ABANDONED_TASK; +import static io.trino.spi.StandardErrorCode.SERVER_SHUTTING_DOWN; import static java.lang.Math.min; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/StageId.java b/core/trino-main/src/main/java/io/trino/execution/StageId.java index f0ce3b37b6ba..52da17862149 100644 --- a/core/trino-main/src/main/java/io/trino/execution/StageId.java +++ b/core/trino-main/src/main/java/io/trino/execution/StageId.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -import io.prestosql.spi.QueryId; +import io.trino.spi.QueryId; import java.util.List; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/execution/StageInfo.java b/core/trino-main/src/main/java/io/trino/execution/StageInfo.java index cca60201facc..d6f24b089cb5 100644 --- a/core/trino-main/src/main/java/io/trino/execution/StageInfo.java +++ b/core/trino-main/src/main/java/io/trino/execution/StageInfo.java @@ -17,9 +17,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.spi.type.Type; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/execution/StageStateMachine.java b/core/trino-main/src/main/java/io/trino/execution/StageStateMachine.java index 3682ac9bdaf1..9d71ffea47d1 100644 --- a/core/trino-main/src/main/java/io/trino/execution/StageStateMachine.java +++ b/core/trino-main/src/main/java/io/trino/execution/StageStateMachine.java @@ -18,18 +18,18 @@ import io.airlift.log.Logger; import io.airlift.stats.Distribution; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.scheduler.SplitSchedulerStats; -import io.prestosql.operator.BlockedReason; -import io.prestosql.operator.OperatorStats; -import io.prestosql.operator.PipelineStats; -import io.prestosql.operator.TaskStats; -import io.prestosql.spi.eventlistener.StageGcStatistics; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.util.Failures; +import io.trino.Session; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.scheduler.SplitSchedulerStats; +import io.trino.operator.BlockedReason; +import io.trino.operator.OperatorStats; +import io.trino.operator.PipelineStats; +import io.trino.operator.TaskStats; +import io.trino.spi.eventlistener.StageGcStatistics; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.util.Failures; import org.joda.time.DateTime; import javax.annotation.concurrent.ThreadSafe; @@ -52,17 +52,17 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.units.DataSize.succinctBytes; import static io.airlift.units.Duration.succinctDuration; -import static io.prestosql.execution.StageState.ABORTED; -import static io.prestosql.execution.StageState.CANCELED; -import static io.prestosql.execution.StageState.FAILED; -import static io.prestosql.execution.StageState.FINISHED; -import static io.prestosql.execution.StageState.FLUSHING; -import static io.prestosql.execution.StageState.PLANNED; -import static io.prestosql.execution.StageState.RUNNING; -import static io.prestosql.execution.StageState.SCHEDULED; -import static io.prestosql.execution.StageState.SCHEDULING; -import static io.prestosql.execution.StageState.SCHEDULING_SPLITS; -import static io.prestosql.execution.StageState.TERMINAL_STAGE_STATES; +import static io.trino.execution.StageState.ABORTED; +import static io.trino.execution.StageState.CANCELED; +import static io.trino.execution.StageState.FAILED; +import static io.trino.execution.StageState.FINISHED; +import static io.trino.execution.StageState.FLUSHING; +import static io.trino.execution.StageState.PLANNED; +import static io.trino.execution.StageState.RUNNING; +import static io.trino.execution.StageState.SCHEDULED; +import static io.trino.execution.StageState.SCHEDULING; +import static io.trino.execution.StageState.SCHEDULING_SPLITS; +import static io.trino.execution.StageState.TERMINAL_STAGE_STATES; import static java.lang.Math.max; import static java.lang.Math.min; import static java.lang.Math.toIntExact; diff --git a/core/trino-main/src/main/java/io/trino/execution/StageStats.java b/core/trino-main/src/main/java/io/trino/execution/StageStats.java index 3adaddba13c1..6bf6bae00cf1 100644 --- a/core/trino-main/src/main/java/io/trino/execution/StageStats.java +++ b/core/trino-main/src/main/java/io/trino/execution/StageStats.java @@ -20,9 +20,9 @@ import io.airlift.stats.Distribution.DistributionSnapshot; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.operator.BlockedReason; -import io.prestosql.operator.OperatorStats; -import io.prestosql.spi.eventlistener.StageGcStatistics; +import io.trino.operator.BlockedReason; +import io.trino.operator.OperatorStats; +import io.trino.spi.eventlistener.StageGcStatistics; import org.joda.time.DateTime; import javax.annotation.concurrent.Immutable; @@ -32,8 +32,8 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.execution.StageState.FLUSHING; -import static io.prestosql.execution.StageState.RUNNING; +import static io.trino.execution.StageState.FLUSHING; +import static io.trino.execution.StageState.RUNNING; import static java.lang.Math.min; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/StartTransactionTask.java b/core/trino-main/src/main/java/io/trino/execution/StartTransactionTask.java index e058779da0dd..0d8d6249de8b 100644 --- a/core/trino-main/src/main/java/io/trino/execution/StartTransactionTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/StartTransactionTask.java @@ -14,25 +14,25 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.transaction.IsolationLevel; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Isolation; -import io.prestosql.sql.tree.StartTransaction; -import io.prestosql.sql.tree.TransactionAccessMode; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.transaction.IsolationLevel; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Isolation; +import io.trino.sql.tree.StartTransaction; +import io.trino.sql.tree.TransactionAccessMode; +import io.trino.transaction.TransactionId; +import io.trino.transaction.TransactionManager; import java.util.List; import java.util.Optional; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.spi.StandardErrorCode.SYNTAX_ERROR; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.spi.StandardErrorCode.SYNTAX_ERROR; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public class StartTransactionTask implements DataDefinitionTask diff --git a/core/trino-main/src/main/java/io/trino/execution/StateMachine.java b/core/trino-main/src/main/java/io/trino/execution/StateMachine.java index 3e2404ee7632..8db92a66564a 100644 --- a/core/trino-main/src/main/java/io/trino/execution/StateMachine.java +++ b/core/trino-main/src/main/java/io/trino/execution/StateMachine.java @@ -18,7 +18,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.log.Logger; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; @@ -34,7 +34,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.spi.StandardErrorCode.SERVER_SHUTTING_DOWN; +import static io.trino.spi.StandardErrorCode.SERVER_SHUTTING_DOWN; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/execution/TableInfo.java b/core/trino-main/src/main/java/io/trino/execution/TableInfo.java index cda0829acce1..11a401cd3603 100644 --- a/core/trino-main/src/main/java/io/trino/execution/TableInfo.java +++ b/core/trino-main/src/main/java/io/trino/execution/TableInfo.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.metadata.QualifiedObjectName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.TupleDomain; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/execution/TaskId.java b/core/trino-main/src/main/java/io/trino/execution/TaskId.java index f242d1709e0a..9409433232e9 100644 --- a/core/trino-main/src/main/java/io/trino/execution/TaskId.java +++ b/core/trino-main/src/main/java/io/trino/execution/TaskId.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -import io.prestosql.spi.QueryId; +import io.trino.spi.QueryId; import java.util.List; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/execution/TaskInfo.java b/core/trino-main/src/main/java/io/trino/execution/TaskInfo.java index 8361812e1af5..61ed7e279ac5 100644 --- a/core/trino-main/src/main/java/io/trino/execution/TaskInfo.java +++ b/core/trino-main/src/main/java/io/trino/execution/TaskInfo.java @@ -16,10 +16,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableSet; -import io.prestosql.execution.buffer.BufferInfo; -import io.prestosql.execution.buffer.OutputBufferInfo; -import io.prestosql.operator.TaskStats; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.buffer.BufferInfo; +import io.trino.execution.buffer.OutputBufferInfo; +import io.trino.operator.TaskStats; +import io.trino.sql.planner.plan.PlanNodeId; import org.joda.time.DateTime; import javax.annotation.concurrent.Immutable; @@ -29,8 +29,8 @@ import java.util.Set; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.execution.TaskStatus.initialTaskStatus; -import static io.prestosql.execution.buffer.BufferState.OPEN; +import static io.trino.execution.TaskStatus.initialTaskStatus; +import static io.trino.execution.buffer.BufferState.OPEN; import static java.util.Objects.requireNonNull; @Immutable diff --git a/core/trino-main/src/main/java/io/trino/execution/TaskManager.java b/core/trino-main/src/main/java/io/trino/execution/TaskManager.java index 491877c8d440..62cf3fa3ab28 100644 --- a/core/trino-main/src/main/java/io/trino/execution/TaskManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/TaskManager.java @@ -15,14 +15,14 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.buffer.BufferResult; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.memory.MemoryPoolAssignmentsRequest; -import io.prestosql.sql.planner.PlanFragment; +import io.trino.Session; +import io.trino.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.buffer.BufferResult; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.memory.MemoryPoolAssignmentsRequest; +import io.trino.sql.planner.PlanFragment; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/execution/TaskManagerConfig.java b/core/trino-main/src/main/java/io/trino/execution/TaskManagerConfig.java index eb94150e227c..078bfbc317f5 100644 --- a/core/trino-main/src/main/java/io/trino/execution/TaskManagerConfig.java +++ b/core/trino-main/src/main/java/io/trino/execution/TaskManagerConfig.java @@ -22,7 +22,7 @@ import io.airlift.units.Duration; import io.airlift.units.MaxDuration; import io.airlift.units.MinDuration; -import io.prestosql.util.PowerOfTwo; +import io.trino.util.PowerOfTwo; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/TaskSource.java b/core/trino-main/src/main/java/io/trino/execution/TaskSource.java index fef347878f9a..074b9c6be67a 100644 --- a/core/trino-main/src/main/java/io/trino/execution/TaskSource.java +++ b/core/trino-main/src/main/java/io/trino/execution/TaskSource.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/execution/TaskStateMachine.java b/core/trino-main/src/main/java/io/trino/execution/TaskStateMachine.java index def29bfd6051..3a0617708b5c 100644 --- a/core/trino-main/src/main/java/io/trino/execution/TaskStateMachine.java +++ b/core/trino-main/src/main/java/io/trino/execution/TaskStateMachine.java @@ -15,7 +15,7 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.log.Logger; -import io.prestosql.execution.StateMachine.StateChangeListener; +import io.trino.execution.StateMachine.StateChangeListener; import org.joda.time.DateTime; import javax.annotation.concurrent.ThreadSafe; @@ -26,9 +26,9 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.execution.TaskState.FLUSHING; -import static io.prestosql.execution.TaskState.RUNNING; -import static io.prestosql.execution.TaskState.TERMINAL_TASK_STATES; +import static io.trino.execution.TaskState.FLUSHING; +import static io.trino.execution.TaskState.RUNNING; +import static io.trino.execution.TaskState.TERMINAL_TASK_STATES; import static java.util.Objects.requireNonNull; @ThreadSafe diff --git a/core/trino-main/src/main/java/io/trino/execution/TaskStatus.java b/core/trino-main/src/main/java/io/trino/execution/TaskStatus.java index 81f10774d53f..797bfdefe472 100644 --- a/core/trino-main/src/main/java/io/trino/execution/TaskStatus.java +++ b/core/trino-main/src/main/java/io/trino/execution/TaskStatus.java @@ -27,8 +27,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; -import static io.prestosql.execution.TaskState.PLANNED; +import static io.trino.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; +import static io.trino.execution.TaskState.PLANNED; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/main/java/io/trino/execution/UseTask.java b/core/trino-main/src/main/java/io/trino/execution/UseTask.java index 52aa2376292b..ef4e3bead1ec 100644 --- a/core/trino-main/src/main/java/io/trino/execution/UseTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/UseTask.java @@ -14,21 +14,21 @@ package io.trino.execution; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Use; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Use; +import io.trino.transaction.TransactionManager; import java.util.List; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.spi.StandardErrorCode.MISSING_CATALOG_NAME; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.spi.StandardErrorCode.MISSING_CATALOG_NAME; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; import static java.util.Locale.ENGLISH; public class UseTask diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/ArbitraryOutputBuffer.java b/core/trino-main/src/main/java/io/trino/execution/buffer/ArbitraryOutputBuffer.java index c4faece22ac3..6eee801f00c5 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/ArbitraryOutputBuffer.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/ArbitraryOutputBuffer.java @@ -19,12 +19,12 @@ import com.google.common.collect.Sets.SetView; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.execution.StateMachine; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.buffer.ClientBuffer.PagesSupplier; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.execution.buffer.SerializedPageReference.PagesReleasedListener; -import io.prestosql.memory.context.LocalMemoryContext; +import io.trino.execution.StateMachine; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.buffer.ClientBuffer.PagesSupplier; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.SerializedPageReference.PagesReleasedListener; +import io.trino.memory.context.LocalMemoryContext; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; @@ -44,15 +44,15 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.execution.buffer.BufferState.FAILED; -import static io.prestosql.execution.buffer.BufferState.FINISHED; -import static io.prestosql.execution.buffer.BufferState.FLUSHING; -import static io.prestosql.execution.buffer.BufferState.NO_MORE_BUFFERS; -import static io.prestosql.execution.buffer.BufferState.NO_MORE_PAGES; -import static io.prestosql.execution.buffer.BufferState.OPEN; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.ARBITRARY; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.execution.buffer.SerializedPageReference.dereferencePages; +import static io.trino.execution.buffer.BufferState.FAILED; +import static io.trino.execution.buffer.BufferState.FINISHED; +import static io.trino.execution.buffer.BufferState.FLUSHING; +import static io.trino.execution.buffer.BufferState.NO_MORE_BUFFERS; +import static io.trino.execution.buffer.BufferState.NO_MORE_PAGES; +import static io.trino.execution.buffer.BufferState.OPEN; +import static io.trino.execution.buffer.OutputBuffers.BufferType.ARBITRARY; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.execution.buffer.SerializedPageReference.dereferencePages; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/BroadcastOutputBuffer.java b/core/trino-main/src/main/java/io/trino/execution/buffer/BroadcastOutputBuffer.java index 71974731686b..7faa59b35806 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/BroadcastOutputBuffer.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/BroadcastOutputBuffer.java @@ -19,11 +19,11 @@ import com.google.common.collect.Sets.SetView; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.execution.StateMachine; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.execution.buffer.SerializedPageReference.PagesReleasedListener; -import io.prestosql.memory.context.LocalMemoryContext; +import io.trino.execution.StateMachine; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.SerializedPageReference.PagesReleasedListener; +import io.trino.memory.context.LocalMemoryContext; import javax.annotation.concurrent.GuardedBy; @@ -41,14 +41,14 @@ 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.prestosql.execution.buffer.BufferState.FAILED; -import static io.prestosql.execution.buffer.BufferState.FINISHED; -import static io.prestosql.execution.buffer.BufferState.FLUSHING; -import static io.prestosql.execution.buffer.BufferState.NO_MORE_BUFFERS; -import static io.prestosql.execution.buffer.BufferState.NO_MORE_PAGES; -import static io.prestosql.execution.buffer.BufferState.OPEN; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.BROADCAST; -import static io.prestosql.execution.buffer.SerializedPageReference.dereferencePages; +import static io.trino.execution.buffer.BufferState.FAILED; +import static io.trino.execution.buffer.BufferState.FINISHED; +import static io.trino.execution.buffer.BufferState.FLUSHING; +import static io.trino.execution.buffer.BufferState.NO_MORE_BUFFERS; +import static io.trino.execution.buffer.BufferState.NO_MORE_PAGES; +import static io.trino.execution.buffer.BufferState.OPEN; +import static io.trino.execution.buffer.OutputBuffers.BufferType.BROADCAST; +import static io.trino.execution.buffer.SerializedPageReference.dereferencePages; import static java.util.Objects.requireNonNull; public class BroadcastOutputBuffer diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/BufferInfo.java b/core/trino-main/src/main/java/io/trino/execution/buffer/BufferInfo.java index 71685209743d..473d83fdb21b 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/BufferInfo.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/BufferInfo.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/ClientBuffer.java b/core/trino-main/src/main/java/io/trino/execution/buffer/ClientBuffer.java index 06526d39b982..6488e65bfa04 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/ClientBuffer.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/ClientBuffer.java @@ -17,8 +17,8 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import io.airlift.units.DataSize; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.execution.buffer.SerializedPageReference.PagesReleasedListener; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.SerializedPageReference.PagesReleasedListener; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.Immutable; @@ -37,8 +37,8 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.execution.buffer.BufferResult.emptyResults; -import static io.prestosql.execution.buffer.SerializedPageReference.dereferencePages; +import static io.trino.execution.buffer.BufferResult.emptyResults; +import static io.trino.execution.buffer.SerializedPageReference.dereferencePages; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/LazyOutputBuffer.java b/core/trino-main/src/main/java/io/trino/execution/buffer/LazyOutputBuffer.java index fe5d54810d78..960d66505ce2 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/LazyOutputBuffer.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/LazyOutputBuffer.java @@ -18,11 +18,11 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.concurrent.ExtendedSettableFuture; import io.airlift.units.DataSize; -import io.prestosql.execution.StateMachine; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.memory.context.LocalMemoryContext; +import io.trino.execution.StateMachine; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.TaskId; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.memory.context.LocalMemoryContext; import javax.annotation.Nullable; import javax.annotation.concurrent.GuardedBy; @@ -37,11 +37,11 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.execution.buffer.BufferResult.emptyResults; -import static io.prestosql.execution.buffer.BufferState.FAILED; -import static io.prestosql.execution.buffer.BufferState.FINISHED; -import static io.prestosql.execution.buffer.BufferState.OPEN; -import static io.prestosql.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; +import static io.trino.execution.buffer.BufferResult.emptyResults; +import static io.trino.execution.buffer.BufferState.FAILED; +import static io.trino.execution.buffer.BufferState.FINISHED; +import static io.trino.execution.buffer.BufferState.OPEN; +import static io.trino.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; import static java.util.Objects.requireNonNull; public class LazyOutputBuffer diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/OutputBuffer.java b/core/trino-main/src/main/java/io/trino/execution/buffer/OutputBuffer.java index a2aeb5edead1..5ee9a7f93ba5 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/OutputBuffer.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/OutputBuffer.java @@ -15,8 +15,8 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/OutputBufferMemoryManager.java b/core/trino-main/src/main/java/io/trino/execution/buffer/OutputBufferMemoryManager.java index f71ded82e6c7..dc2a7491571c 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/OutputBufferMemoryManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/OutputBufferMemoryManager.java @@ -18,7 +18,7 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.memory.context.LocalMemoryContext; +import io.trino.memory.context.LocalMemoryContext; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/OutputBuffers.java b/core/trino-main/src/main/java/io/trino/execution/buffer/OutputBuffers.java index e915b76843f9..a4c42fd922bc 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/OutputBuffers.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/OutputBuffers.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.PartitioningHandle; +import io.trino.sql.planner.PartitioningHandle; import java.util.HashMap; import java.util.Map; @@ -27,11 +27,11 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.ARBITRARY; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.BROADCAST; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.PARTITIONED; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_BROADCAST_DISTRIBUTION; +import static io.trino.execution.buffer.OutputBuffers.BufferType.ARBITRARY; +import static io.trino.execution.buffer.OutputBuffers.BufferType.BROADCAST; +import static io.trino.execution.buffer.OutputBuffers.BufferType.PARTITIONED; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_BROADCAST_DISTRIBUTION; import static java.lang.Integer.parseInt; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/PageSplitterUtil.java b/core/trino-main/src/main/java/io/trino/execution/buffer/PageSplitterUtil.java index afdb44eab43e..47ae68351424 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/PageSplitterUtil.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/PageSplitterUtil.java @@ -14,7 +14,7 @@ package io.trino.execution.buffer; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerde.java b/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerde.java index 00cd074dfea6..79c126e7e286 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerde.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerde.java @@ -18,10 +18,10 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.execution.buffer.PageCodecMarker.MarkerSet; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spiller.SpillCipher; +import io.trino.execution.buffer.PageCodecMarker.MarkerSet; +import io.trino.spi.Page; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spiller.SpillCipher; import javax.annotation.concurrent.NotThreadSafe; @@ -29,11 +29,11 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.execution.buffer.PageCodecMarker.COMPRESSED; -import static io.prestosql.execution.buffer.PageCodecMarker.ENCRYPTED; -import static io.prestosql.execution.buffer.PagesSerdeUtil.readRawPage; -import static io.prestosql.execution.buffer.PagesSerdeUtil.writeRawPage; -import static io.prestosql.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; +import static io.trino.execution.buffer.PageCodecMarker.COMPRESSED; +import static io.trino.execution.buffer.PageCodecMarker.ENCRYPTED; +import static io.trino.execution.buffer.PagesSerdeUtil.readRawPage; +import static io.trino.execution.buffer.PagesSerdeUtil.writeRawPage; +import static io.trino.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerdeFactory.java b/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerdeFactory.java index 29b05c1adc2b..33bb7fe5459f 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerdeFactory.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerdeFactory.java @@ -15,8 +15,8 @@ import io.airlift.compress.lz4.Lz4Compressor; import io.airlift.compress.lz4.Lz4Decompressor; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spiller.SpillCipher; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spiller.SpillCipher; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerdeUtil.java b/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerdeUtil.java index ef5f361799c5..1076211cc9e2 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerdeUtil.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerdeUtil.java @@ -19,15 +19,15 @@ import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; import io.airlift.slice.XxHash64; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockEncodingSerde; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockEncodingSerde; import java.util.Iterator; import java.util.List; -import static io.prestosql.block.BlockSerdeUtil.readBlock; -import static io.prestosql.block.BlockSerdeUtil.writeBlock; +import static io.trino.block.BlockSerdeUtil.readBlock; +import static io.trino.block.BlockSerdeUtil.writeBlock; import static java.util.Arrays.asList; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/PartitionedOutputBuffer.java b/core/trino-main/src/main/java/io/trino/execution/buffer/PartitionedOutputBuffer.java index 776f989ac7e0..fc0c7a82907e 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/PartitionedOutputBuffer.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/PartitionedOutputBuffer.java @@ -17,11 +17,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.execution.StateMachine; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.execution.buffer.SerializedPageReference.PagesReleasedListener; -import io.prestosql.memory.context.LocalMemoryContext; +import io.trino.execution.StateMachine; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.SerializedPageReference.PagesReleasedListener; +import io.trino.memory.context.LocalMemoryContext; import java.util.List; import java.util.concurrent.Executor; @@ -30,14 +30,14 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.execution.buffer.BufferState.FAILED; -import static io.prestosql.execution.buffer.BufferState.FINISHED; -import static io.prestosql.execution.buffer.BufferState.FLUSHING; -import static io.prestosql.execution.buffer.BufferState.NO_MORE_BUFFERS; -import static io.prestosql.execution.buffer.BufferState.NO_MORE_PAGES; -import static io.prestosql.execution.buffer.BufferState.OPEN; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.PARTITIONED; -import static io.prestosql.execution.buffer.SerializedPageReference.dereferencePages; +import static io.trino.execution.buffer.BufferState.FAILED; +import static io.trino.execution.buffer.BufferState.FINISHED; +import static io.trino.execution.buffer.BufferState.FLUSHING; +import static io.trino.execution.buffer.BufferState.NO_MORE_BUFFERS; +import static io.trino.execution.buffer.BufferState.NO_MORE_PAGES; +import static io.trino.execution.buffer.BufferState.OPEN; +import static io.trino.execution.buffer.OutputBuffers.BufferType.PARTITIONED; +import static io.trino.execution.buffer.SerializedPageReference.dereferencePages; import static java.util.Objects.requireNonNull; public class PartitionedOutputBuffer diff --git a/core/trino-main/src/main/java/io/trino/execution/buffer/SerializedPage.java b/core/trino-main/src/main/java/io/trino/execution/buffer/SerializedPage.java index cffdf70b783e..e9ee100d8e9c 100644 --- a/core/trino-main/src/main/java/io/trino/execution/buffer/SerializedPage.java +++ b/core/trino-main/src/main/java/io/trino/execution/buffer/SerializedPage.java @@ -18,8 +18,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.execution.buffer.PageCodecMarker.COMPRESSED; -import static io.prestosql.execution.buffer.PageCodecMarker.ENCRYPTED; +import static io.trino.execution.buffer.PageCodecMarker.COMPRESSED; +import static io.trino.execution.buffer.PageCodecMarker.ENCRYPTED; import static java.util.Objects.requireNonNull; public class SerializedPage diff --git a/core/trino-main/src/main/java/io/trino/execution/executor/MultilevelSplitQueue.java b/core/trino-main/src/main/java/io/trino/execution/executor/MultilevelSplitQueue.java index cf0c110ef54d..5d8ca6f4a57c 100644 --- a/core/trino-main/src/main/java/io/trino/execution/executor/MultilevelSplitQueue.java +++ b/core/trino-main/src/main/java/io/trino/execution/executor/MultilevelSplitQueue.java @@ -16,7 +16,7 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import io.airlift.stats.CounterStat; -import io.prestosql.execution.TaskManagerConfig; +import io.trino.execution.TaskManagerConfig; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; diff --git a/core/trino-main/src/main/java/io/trino/execution/executor/PrioritizedSplitRunner.java b/core/trino-main/src/main/java/io/trino/execution/executor/PrioritizedSplitRunner.java index 4cbf7790f1e8..bc67a80b0046 100644 --- a/core/trino-main/src/main/java/io/trino/execution/executor/PrioritizedSplitRunner.java +++ b/core/trino-main/src/main/java/io/trino/execution/executor/PrioritizedSplitRunner.java @@ -21,14 +21,14 @@ import io.airlift.stats.CpuTimer; import io.airlift.stats.TimeStat; import io.airlift.units.Duration; -import io.prestosql.execution.SplitRunner; +import io.trino.execution.SplitRunner; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; -import static io.prestosql.operator.Operator.NOT_BLOCKED; +import static io.trino.operator.Operator.NOT_BLOCKED; import static java.lang.String.format; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/main/java/io/trino/execution/executor/TaskExecutor.java b/core/trino-main/src/main/java/io/trino/execution/executor/TaskExecutor.java index 567b34da265b..8abf7f53a2b7 100644 --- a/core/trino-main/src/main/java/io/trino/execution/executor/TaskExecutor.java +++ b/core/trino-main/src/main/java/io/trino/execution/executor/TaskExecutor.java @@ -24,11 +24,11 @@ import io.airlift.stats.TimeDistribution; import io.airlift.stats.TimeStat; import io.airlift.units.Duration; -import io.prestosql.execution.SplitRunner; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskManagerConfig; -import io.prestosql.spi.PrestoException; -import io.prestosql.version.EmbedVersion; +import io.trino.execution.SplitRunner; +import io.trino.execution.TaskId; +import io.trino.execution.TaskManagerConfig; +import io.trino.spi.PrestoException; +import io.trino.version.EmbedVersion; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -65,9 +65,9 @@ import static com.google.common.collect.Sets.newConcurrentHashSet; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.concurrent.Threads.threadsNamed; -import static io.prestosql.execution.executor.MultilevelSplitQueue.computeLevel; -import static io.prestosql.util.MoreMath.min; -import static io.prestosql.version.EmbedVersion.testingVersionEmbedder; +import static io.trino.execution.executor.MultilevelSplitQueue.computeLevel; +import static io.trino.util.MoreMath.min; +import static io.trino.version.EmbedVersion.testingVersionEmbedder; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/core/trino-main/src/main/java/io/trino/execution/executor/TaskHandle.java b/core/trino-main/src/main/java/io/trino/execution/executor/TaskHandle.java index ff8bd0de96da..b07e21067775 100644 --- a/core/trino-main/src/main/java/io/trino/execution/executor/TaskHandle.java +++ b/core/trino-main/src/main/java/io/trino/execution/executor/TaskHandle.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.Duration; -import io.prestosql.execution.SplitConcurrencyController; -import io.prestosql.execution.TaskId; +import io.trino.execution.SplitConcurrencyController; +import io.trino.execution.TaskId; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/InternalResourceGroup.java b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/InternalResourceGroup.java index e3cd63cb7f86..4dc9c943b3aa 100644 --- a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/InternalResourceGroup.java +++ b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/InternalResourceGroup.java @@ -16,15 +16,15 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import io.airlift.stats.CounterStat; -import io.prestosql.execution.ManagedQueryExecution; -import io.prestosql.execution.resourcegroups.WeightedFairQueue.Usage; -import io.prestosql.server.QueryStateInfo; -import io.prestosql.server.ResourceGroupInfo; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.resourcegroups.ResourceGroup; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.ResourceGroupState; -import io.prestosql.spi.resourcegroups.SchedulingPolicy; +import io.trino.execution.ManagedQueryExecution; +import io.trino.execution.resourcegroups.WeightedFairQueue.Usage; +import io.trino.server.QueryStateInfo; +import io.trino.server.ResourceGroupInfo; +import io.trino.spi.PrestoException; +import io.trino.spi.resourcegroups.ResourceGroup; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.ResourceGroupState; +import io.trino.spi.resourcegroups.SchedulingPolicy; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -52,16 +52,16 @@ import static com.google.common.math.LongMath.saturatedSubtract; import static io.airlift.units.DataSize.succinctBytes; import static io.airlift.units.Duration.succinctDuration; -import static io.prestosql.SystemSessionProperties.getQueryPriority; -import static io.prestosql.server.QueryStateInfo.createQueryStateInfo; -import static io.prestosql.spi.StandardErrorCode.INVALID_RESOURCE_GROUP; -import static io.prestosql.spi.resourcegroups.ResourceGroupState.CAN_QUEUE; -import static io.prestosql.spi.resourcegroups.ResourceGroupState.CAN_RUN; -import static io.prestosql.spi.resourcegroups.ResourceGroupState.FULL; -import static io.prestosql.spi.resourcegroups.SchedulingPolicy.FAIR; -import static io.prestosql.spi.resourcegroups.SchedulingPolicy.QUERY_PRIORITY; -import static io.prestosql.spi.resourcegroups.SchedulingPolicy.WEIGHTED; -import static io.prestosql.spi.resourcegroups.SchedulingPolicy.WEIGHTED_FAIR; +import static io.trino.SystemSessionProperties.getQueryPriority; +import static io.trino.server.QueryStateInfo.createQueryStateInfo; +import static io.trino.spi.StandardErrorCode.INVALID_RESOURCE_GROUP; +import static io.trino.spi.resourcegroups.ResourceGroupState.CAN_QUEUE; +import static io.trino.spi.resourcegroups.ResourceGroupState.CAN_RUN; +import static io.trino.spi.resourcegroups.ResourceGroupState.FULL; +import static io.trino.spi.resourcegroups.SchedulingPolicy.FAIR; +import static io.trino.spi.resourcegroups.SchedulingPolicy.QUERY_PRIORITY; +import static io.trino.spi.resourcegroups.SchedulingPolicy.WEIGHTED; +import static io.trino.spi.resourcegroups.SchedulingPolicy.WEIGHTED_FAIR; import static java.lang.Math.min; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/InternalResourceGroupManager.java b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/InternalResourceGroupManager.java index a226d6f9cc99..b20acd4ae03d 100644 --- a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/InternalResourceGroupManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/InternalResourceGroupManager.java @@ -17,16 +17,16 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.node.NodeInfo; -import io.prestosql.execution.ManagedQueryExecution; -import io.prestosql.server.ResourceGroupInfo; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.memory.ClusterMemoryPoolManager; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManager; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerContext; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; +import io.trino.execution.ManagedQueryExecution; +import io.trino.server.ResourceGroupInfo; +import io.trino.spi.PrestoException; +import io.trino.spi.memory.ClusterMemoryPoolManager; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManager; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerContext; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; import org.weakref.jmx.JmxException; import org.weakref.jmx.MBeanExporter; import org.weakref.jmx.Managed; @@ -55,7 +55,7 @@ import static com.google.common.base.Strings.isNullOrEmpty; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.configuration.ConfigurationLoader.loadPropertiesFrom; -import static io.prestosql.spi.StandardErrorCode.QUERY_REJECTED; +import static io.trino.spi.StandardErrorCode.QUERY_REJECTED; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; diff --git a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/LegacyResourceGroupConfigurationManager.java b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/LegacyResourceGroupConfigurationManager.java index 6fdd144eb783..42bcad193fd3 100644 --- a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/LegacyResourceGroupConfigurationManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/LegacyResourceGroupConfigurationManager.java @@ -13,13 +13,13 @@ */ package io.trino.execution.resourcegroups; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.execution.resourcegroups.LegacyResourceGroupConfigurationManager.VoidContext; -import io.prestosql.spi.resourcegroups.ResourceGroup; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManager; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; +import io.trino.execution.QueryManagerConfig; +import io.trino.execution.resourcegroups.LegacyResourceGroupConfigurationManager.VoidContext; +import io.trino.spi.resourcegroups.ResourceGroup; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManager; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/NoOpResourceGroupManager.java b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/NoOpResourceGroupManager.java index 048065304e34..4a8adaf0d721 100644 --- a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/NoOpResourceGroupManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/NoOpResourceGroupManager.java @@ -13,12 +13,12 @@ */ package io.trino.execution.resourcegroups; -import io.prestosql.execution.ManagedQueryExecution; -import io.prestosql.server.ResourceGroupInfo; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; +import io.trino.execution.ManagedQueryExecution; +import io.trino.server.ResourceGroupInfo; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/QueryQueueFullException.java b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/QueryQueueFullException.java index ec54c96b73bd..27e9e2749c06 100644 --- a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/QueryQueueFullException.java +++ b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/QueryQueueFullException.java @@ -13,10 +13,10 @@ */ package io.trino.execution.resourcegroups; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.PrestoException; +import io.trino.spi.resourcegroups.ResourceGroupId; -import static io.prestosql.spi.StandardErrorCode.QUERY_QUEUE_FULL; +import static io.trino.spi.StandardErrorCode.QUERY_QUEUE_FULL; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/ResourceGroupConfigurationManagerContextInstance.java b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/ResourceGroupConfigurationManagerContextInstance.java index 9fbb0b306634..f3a709e6238b 100644 --- a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/ResourceGroupConfigurationManagerContextInstance.java +++ b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/ResourceGroupConfigurationManagerContextInstance.java @@ -13,8 +13,8 @@ */ package io.trino.execution.resourcegroups; -import io.prestosql.spi.memory.ClusterMemoryPoolManager; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerContext; +import io.trino.spi.memory.ClusterMemoryPoolManager; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerContext; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/ResourceGroupManager.java b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/ResourceGroupManager.java index 0da29813f0e1..b52f10404cef 100644 --- a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/ResourceGroupManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/ResourceGroupManager.java @@ -13,12 +13,12 @@ */ package io.trino.execution.resourcegroups; -import io.prestosql.execution.ManagedQueryExecution; -import io.prestosql.server.ResourceGroupInfo; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; +import io.trino.execution.ManagedQueryExecution; +import io.trino.server.ResourceGroupInfo; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/AllAtOnceExecutionPolicy.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/AllAtOnceExecutionPolicy.java index 7efa51a003fd..34e7ed2bdb9c 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/AllAtOnceExecutionPolicy.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/AllAtOnceExecutionPolicy.java @@ -13,7 +13,7 @@ */ package io.trino.execution.scheduler; -import io.prestosql.execution.SqlStageExecution; +import io.trino.execution.SqlStageExecution; import java.util.Collection; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/AllAtOnceExecutionSchedule.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/AllAtOnceExecutionSchedule.java index 6d35ac94be20..8d46987a8bff 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/AllAtOnceExecutionSchedule.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/AllAtOnceExecutionSchedule.java @@ -17,19 +17,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Ordering; -import io.prestosql.execution.SqlStageExecution; -import io.prestosql.execution.StageState; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.execution.SqlStageExecution; +import io.trino.execution.StageState; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.UnionNode; import java.util.Collection; import java.util.Iterator; @@ -43,9 +43,9 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.execution.StageState.FLUSHING; -import static io.prestosql.execution.StageState.RUNNING; -import static io.prestosql.execution.StageState.SCHEDULED; +import static io.trino.execution.StageState.FLUSHING; +import static io.trino.execution.StageState.RUNNING; +import static io.trino.execution.StageState.SCHEDULED; import static java.util.Objects.requireNonNull; import static java.util.function.Function.identity; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/BroadcastOutputBufferManager.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/BroadcastOutputBufferManager.java index f9eac402fc0f..af4da83997e9 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/BroadcastOutputBufferManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/BroadcastOutputBufferManager.java @@ -13,8 +13,8 @@ */ package io.trino.execution.scheduler; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; @@ -22,9 +22,9 @@ import java.util.List; import java.util.function.Consumer; -import static io.prestosql.execution.buffer.OutputBuffers.BROADCAST_PARTITION_ID; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.BROADCAST; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.execution.buffer.OutputBuffers.BROADCAST_PARTITION_ID; +import static io.trino.execution.buffer.OutputBuffers.BufferType.BROADCAST; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; import static java.util.Objects.requireNonNull; @ThreadSafe diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/BucketNodeMap.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/BucketNodeMap.java index 8c6a46746e5d..0bf6d6a880fe 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/BucketNodeMap.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/BucketNodeMap.java @@ -13,8 +13,8 @@ */ package io.trino.execution.scheduler; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; import java.util.Optional; import java.util.function.ToIntFunction; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/DynamicSplitPlacementPolicy.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/DynamicSplitPlacementPolicy.java index 440eb8f32549..3652fe293b79 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/DynamicSplitPlacementPolicy.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/DynamicSplitPlacementPolicy.java @@ -13,9 +13,9 @@ */ package io.trino.execution.scheduler; -import io.prestosql.execution.RemoteTask; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; +import io.trino.execution.RemoteTask; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; import java.util.List; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/ExecutionPolicy.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/ExecutionPolicy.java index e77e29104802..46c91e7e919e 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/ExecutionPolicy.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/ExecutionPolicy.java @@ -13,7 +13,7 @@ */ package io.trino.execution.scheduler; -import io.prestosql.execution.SqlStageExecution; +import io.trino.execution.SqlStageExecution; import java.util.Collection; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/ExecutionSchedule.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/ExecutionSchedule.java index f77e04ef42f7..1b5096d2f5dc 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/ExecutionSchedule.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/ExecutionSchedule.java @@ -13,7 +13,7 @@ */ package io.trino.execution.scheduler; -import io.prestosql.execution.SqlStageExecution; +import io.trino.execution.SqlStageExecution; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/FileBasedNetworkTopology.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/FileBasedNetworkTopology.java index e4ae33426c92..2ea9c6f14d54 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/FileBasedNetworkTopology.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/FileBasedNetworkTopology.java @@ -19,7 +19,7 @@ import com.google.common.io.Files; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import org.weakref.jmx.Managed; import javax.annotation.concurrent.GuardedBy; @@ -32,7 +32,7 @@ import java.util.Map; import static com.google.common.base.CharMatcher.whitespace; -import static io.prestosql.execution.scheduler.NetworkLocation.ROOT_LOCATION; +import static io.trino.execution.scheduler.NetworkLocation.ROOT_LOCATION; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/FixedBucketNodeMap.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/FixedBucketNodeMap.java index 07d87a6b762c..9322c3138390 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/FixedBucketNodeMap.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/FixedBucketNodeMap.java @@ -14,8 +14,8 @@ package io.trino.execution.scheduler; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/FixedCountScheduler.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/FixedCountScheduler.java index 8e905bea1d95..2268dd0eced5 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/FixedCountScheduler.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/FixedCountScheduler.java @@ -14,9 +14,9 @@ package io.trino.execution.scheduler; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.execution.RemoteTask; -import io.prestosql.execution.SqlStageExecution; -import io.prestosql.metadata.InternalNode; +import io.trino.execution.RemoteTask; +import io.trino.execution.SqlStageExecution; +import io.trino.metadata.InternalNode; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/FixedSourcePartitionedScheduler.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/FixedSourcePartitionedScheduler.java index 618fc8271b0f..1170c1736327 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/FixedSourcePartitionedScheduler.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/FixedSourcePartitionedScheduler.java @@ -18,20 +18,20 @@ import com.google.common.collect.Streams; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.log.Logger; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.RemoteTask; -import io.prestosql.execution.SqlStageExecution; -import io.prestosql.execution.scheduler.ScheduleResult.BlockedReason; -import io.prestosql.execution.scheduler.group.DynamicLifespanScheduler; -import io.prestosql.execution.scheduler.group.FixedLifespanScheduler; -import io.prestosql.execution.scheduler.group.LifespanScheduler; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; -import io.prestosql.operator.StageExecutionDescriptor; -import io.prestosql.server.DynamicFilterService; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.split.SplitSource; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.execution.RemoteTask; +import io.trino.execution.SqlStageExecution; +import io.trino.execution.scheduler.ScheduleResult.BlockedReason; +import io.trino.execution.scheduler.group.DynamicLifespanScheduler; +import io.trino.execution.scheduler.group.FixedLifespanScheduler; +import io.trino.execution.scheduler.group.LifespanScheduler; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; +import io.trino.operator.StageExecutionDescriptor; +import io.trino.server.DynamicFilterService; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.split.SplitSource; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.ArrayList; import java.util.Iterator; @@ -47,8 +47,8 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.concurrent.MoreFutures.whenAnyComplete; -import static io.prestosql.execution.scheduler.SourcePartitionedScheduler.newSourcePartitionedSchedulerAsSourceScheduler; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.execution.scheduler.SourcePartitionedScheduler.newSourcePartitionedSchedulerAsSourceScheduler; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/FlatNetworkTopology.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/FlatNetworkTopology.java index 17737c6a65a7..9d9459783932 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/FlatNetworkTopology.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/FlatNetworkTopology.java @@ -13,7 +13,7 @@ */ package io.trino.execution.scheduler; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; public class FlatNetworkTopology implements NetworkTopology diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/NetworkTopology.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/NetworkTopology.java index e98937b8896f..4a446172c6a2 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/NetworkTopology.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/NetworkTopology.java @@ -13,7 +13,7 @@ */ package io.trino.execution.scheduler; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeAssignmentStats.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeAssignmentStats.java index 8ca8a6eada42..05efd71989b2 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeAssignmentStats.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeAssignmentStats.java @@ -13,9 +13,9 @@ */ package io.trino.execution.scheduler; -import io.prestosql.execution.NodeTaskMap; -import io.prestosql.execution.RemoteTask; -import io.prestosql.metadata.InternalNode; +import io.trino.execution.NodeTaskMap; +import io.trino.execution.RemoteTask; +import io.trino.metadata.InternalNode; import java.util.HashMap; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeMap.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeMap.java index a4dd6305ce4c..c1f99332e280 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeMap.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeMap.java @@ -14,8 +14,8 @@ package io.trino.execution.scheduler; import com.google.common.collect.SetMultimap; -import io.prestosql.metadata.InternalNode; -import io.prestosql.spi.HostAddress; +import io.trino.metadata.InternalNode; +import io.trino.spi.HostAddress; import java.net.InetAddress; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeScheduler.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeScheduler.java index df3ae21c14b8..f501e974b3b3 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeScheduler.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeScheduler.java @@ -18,12 +18,12 @@ import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.NodeTaskMap; -import io.prestosql.execution.RemoteTask; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; -import io.prestosql.spi.HostAddress; +import io.trino.connector.CatalogName; +import io.trino.execution.NodeTaskMap; +import io.trino.execution.RemoteTask; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; +import io.trino.spi.HostAddress; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSelector.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSelector.java index 4bb631ac0329..217715d2754a 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSelector.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSelector.java @@ -14,9 +14,9 @@ package io.trino.execution.scheduler; import com.google.common.collect.ImmutableSet; -import io.prestosql.execution.RemoteTask; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; +import io.trino.execution.RemoteTask; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; import java.util.List; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSelectorFactory.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSelectorFactory.java index 0192c4f06e1c..5dcd9df4104b 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSelectorFactory.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSelectorFactory.java @@ -13,7 +13,7 @@ */ package io.trino.execution.scheduler; -import io.prestosql.connector.CatalogName; +import io.trino.connector.CatalogName; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/OutputBufferManager.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/OutputBufferManager.java index 58ef5dc622bb..c655e2487426 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/OutputBufferManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/OutputBufferManager.java @@ -13,7 +13,7 @@ */ package io.trino.execution.scheduler; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/PartitionedOutputBufferManager.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/PartitionedOutputBufferManager.java index 90e390cffa43..bad4a9e1e162 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/PartitionedOutputBufferManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/PartitionedOutputBufferManager.java @@ -14,9 +14,9 @@ package io.trino.execution.scheduler; import com.google.common.collect.ImmutableMap; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.sql.planner.PartitioningHandle; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.sql.planner.PartitioningHandle; import javax.annotation.concurrent.ThreadSafe; @@ -25,7 +25,7 @@ import java.util.function.Consumer; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; import static java.util.Objects.requireNonNull; @ThreadSafe diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/PhasedExecutionPolicy.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/PhasedExecutionPolicy.java index 5bd853be93aa..99190392603d 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/PhasedExecutionPolicy.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/PhasedExecutionPolicy.java @@ -13,7 +13,7 @@ */ package io.trino.execution.scheduler; -import io.prestosql.execution.SqlStageExecution; +import io.trino.execution.SqlStageExecution; import java.util.Collection; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/PhasedExecutionSchedule.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/PhasedExecutionSchedule.java index 4e83f8e17617..f1b14d289021 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/PhasedExecutionSchedule.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/PhasedExecutionSchedule.java @@ -16,19 +16,19 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.execution.SqlStageExecution; -import io.prestosql.execution.StageState; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.execution.SqlStageExecution; +import io.trino.execution.StageState; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.UnionNode; import org.jgrapht.DirectedGraph; import org.jgrapht.alg.StrongConnectivityInspector; import org.jgrapht.graph.DefaultDirectedGraph; @@ -50,10 +50,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.execution.StageState.FLUSHING; -import static io.prestosql.execution.StageState.RUNNING; -import static io.prestosql.execution.StageState.SCHEDULED; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.execution.StageState.FLUSHING; +import static io.trino.execution.StageState.RUNNING; +import static io.trino.execution.StageState.SCHEDULED; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; import static java.util.function.Function.identity; @NotThreadSafe diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/ScaledOutputBufferManager.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/ScaledOutputBufferManager.java index 0b2200c033c3..4af58c3c7990 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/ScaledOutputBufferManager.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/ScaledOutputBufferManager.java @@ -13,16 +13,16 @@ */ package io.trino.execution.scheduler; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; import javax.annotation.concurrent.GuardedBy; import java.util.List; import java.util.function.Consumer; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.ARBITRARY; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.execution.buffer.OutputBuffers.BufferType.ARBITRARY; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; import static java.util.Objects.requireNonNull; public class ScaledOutputBufferManager diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/ScaledWriterScheduler.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/ScaledWriterScheduler.java index 6e34c9a6054e..d61ee76c9d94 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/ScaledWriterScheduler.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/ScaledWriterScheduler.java @@ -16,10 +16,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.SettableFuture; import io.airlift.units.DataSize; -import io.prestosql.execution.RemoteTask; -import io.prestosql.execution.SqlStageExecution; -import io.prestosql.execution.TaskStatus; -import io.prestosql.metadata.InternalNode; +import io.trino.execution.RemoteTask; +import io.trino.execution.SqlStageExecution; +import io.trino.execution.TaskStatus; +import io.trino.metadata.InternalNode; import java.util.Collection; import java.util.HashSet; @@ -31,9 +31,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Supplier; -import static io.prestosql.execution.scheduler.ScheduleResult.BlockedReason.WRITER_SCALING; -import static io.prestosql.spi.StandardErrorCode.NO_NODES_AVAILABLE; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.execution.scheduler.ScheduleResult.BlockedReason.WRITER_SCALING; +import static io.trino.spi.StandardErrorCode.NO_NODES_AVAILABLE; +import static io.trino.util.Failures.checkCondition; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/ScheduleResult.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/ScheduleResult.java index 7b2057862641..9dfad93f92ef 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/ScheduleResult.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/ScheduleResult.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.execution.RemoteTask; +import io.trino.execution.RemoteTask; import java.util.Optional; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/SourcePartitionedScheduler.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/SourcePartitionedScheduler.java index 1339c031964b..3e4bf01b0d03 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/SourcePartitionedScheduler.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/SourcePartitionedScheduler.java @@ -20,18 +20,18 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.RemoteTask; -import io.prestosql.execution.SqlStageExecution; -import io.prestosql.execution.scheduler.FixedSourcePartitionedScheduler.BucketedSplitPlacementPolicy; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; -import io.prestosql.server.DynamicFilterService; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.split.EmptySplit; -import io.prestosql.split.SplitSource; -import io.prestosql.split.SplitSource.SplitBatch; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.execution.RemoteTask; +import io.trino.execution.SqlStageExecution; +import io.trino.execution.scheduler.FixedSourcePartitionedScheduler.BucketedSplitPlacementPolicy; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; +import io.trino.server.DynamicFilterService; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.split.EmptySplit; +import io.trino.split.SplitSource; +import io.trino.split.SplitSource.SplitBatch; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.ArrayList; import java.util.HashMap; @@ -52,11 +52,11 @@ import static io.airlift.concurrent.MoreFutures.addSuccessCallback; import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.MoreFutures.whenAnyComplete; -import static io.prestosql.execution.scheduler.ScheduleResult.BlockedReason.MIXED_SPLIT_QUEUES_FULL_AND_WAITING_FOR_SOURCE; -import static io.prestosql.execution.scheduler.ScheduleResult.BlockedReason.NO_ACTIVE_DRIVER_GROUP; -import static io.prestosql.execution.scheduler.ScheduleResult.BlockedReason.SPLIT_QUEUES_FULL; -import static io.prestosql.execution.scheduler.ScheduleResult.BlockedReason.WAITING_FOR_SOURCE; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.execution.scheduler.ScheduleResult.BlockedReason.MIXED_SPLIT_QUEUES_FULL_AND_WAITING_FOR_SOURCE; +import static io.trino.execution.scheduler.ScheduleResult.BlockedReason.NO_ACTIVE_DRIVER_GROUP; +import static io.trino.execution.scheduler.ScheduleResult.BlockedReason.SPLIT_QUEUES_FULL; +import static io.trino.execution.scheduler.ScheduleResult.BlockedReason.WAITING_FOR_SOURCE; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; import static java.util.Objects.requireNonNull; public class SourcePartitionedScheduler diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/SourceScheduler.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/SourceScheduler.java index 30d55e2ba4ce..e78817c17f8b 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/SourceScheduler.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/SourceScheduler.java @@ -14,9 +14,9 @@ package io.trino.execution.scheduler; -import io.prestosql.execution.Lifespan; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/SplitPlacementPolicy.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/SplitPlacementPolicy.java index c7b5d83d79b0..b49224923365 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/SplitPlacementPolicy.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/SplitPlacementPolicy.java @@ -13,8 +13,8 @@ */ package io.trino.execution.scheduler; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; import java.util.List; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/SplitPlacementResult.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/SplitPlacementResult.java index 5378f284b1b3..918c038bce20 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/SplitPlacementResult.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/SplitPlacementResult.java @@ -15,8 +15,8 @@ import com.google.common.collect.Multimap; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/SqlQueryScheduler.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/SqlQueryScheduler.java index 830d95399bb1..344ab2381658 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/SqlQueryScheduler.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/SqlQueryScheduler.java @@ -23,33 +23,33 @@ import io.airlift.concurrent.SetThreadName; import io.airlift.stats.TimeStat; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.BasicStageStats; -import io.prestosql.execution.NodeTaskMap; -import io.prestosql.execution.QueryState; -import io.prestosql.execution.QueryStateMachine; -import io.prestosql.execution.RemoteTask; -import io.prestosql.execution.RemoteTaskFactory; -import io.prestosql.execution.SqlStageExecution; -import io.prestosql.execution.StageId; -import io.prestosql.execution.StageInfo; -import io.prestosql.execution.StageState; -import io.prestosql.execution.TaskStatus; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.failuredetector.FailureDetector; -import io.prestosql.metadata.InternalNode; -import io.prestosql.server.DynamicFilterService; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.split.SplitSource; -import io.prestosql.sql.planner.NodePartitionMap; -import io.prestosql.sql.planner.NodePartitioningManager; -import io.prestosql.sql.planner.PartitioningHandle; -import io.prestosql.sql.planner.StageExecutionPlan; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.execution.BasicStageStats; +import io.trino.execution.NodeTaskMap; +import io.trino.execution.QueryState; +import io.trino.execution.QueryStateMachine; +import io.trino.execution.RemoteTask; +import io.trino.execution.RemoteTaskFactory; +import io.trino.execution.SqlStageExecution; +import io.trino.execution.StageId; +import io.trino.execution.StageInfo; +import io.trino.execution.StageState; +import io.trino.execution.TaskStatus; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.failuredetector.FailureDetector; +import io.trino.metadata.InternalNode; +import io.trino.server.DynamicFilterService; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.split.SplitSource; +import io.trino.sql.planner.NodePartitionMap; +import io.trino.sql.planner.NodePartitioningManager; +import io.trino.sql.planner.PartitioningHandle; +import io.trino.sql.planner.StageExecutionPlan; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNodeId; import java.net.URI; import java.util.ArrayList; @@ -81,27 +81,27 @@ import static io.airlift.concurrent.MoreFutures.tryGetFutureValue; import static io.airlift.concurrent.MoreFutures.whenAnyComplete; import static io.airlift.http.client.HttpUriBuilder.uriBuilderFrom; -import static io.prestosql.SystemSessionProperties.getConcurrentLifespansPerNode; -import static io.prestosql.SystemSessionProperties.getWriterMinSize; -import static io.prestosql.connector.CatalogName.isInternalSystemConnector; -import static io.prestosql.execution.BasicStageStats.aggregateBasicStageStats; -import static io.prestosql.execution.SqlStageExecution.createSqlStageExecution; -import static io.prestosql.execution.StageState.ABORTED; -import static io.prestosql.execution.StageState.CANCELED; -import static io.prestosql.execution.StageState.FAILED; -import static io.prestosql.execution.StageState.FINISHED; -import static io.prestosql.execution.StageState.FLUSHING; -import static io.prestosql.execution.StageState.RUNNING; -import static io.prestosql.execution.StageState.SCHEDULED; -import static io.prestosql.execution.scheduler.SourcePartitionedScheduler.newSourcePartitionedSchedulerAsStageScheduler; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.NO_NODES_AVAILABLE; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_BROADCAST_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SCALED_WRITER_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPLICATE; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.SystemSessionProperties.getConcurrentLifespansPerNode; +import static io.trino.SystemSessionProperties.getWriterMinSize; +import static io.trino.connector.CatalogName.isInternalSystemConnector; +import static io.trino.execution.BasicStageStats.aggregateBasicStageStats; +import static io.trino.execution.SqlStageExecution.createSqlStageExecution; +import static io.trino.execution.StageState.ABORTED; +import static io.trino.execution.StageState.CANCELED; +import static io.trino.execution.StageState.FAILED; +import static io.trino.execution.StageState.FINISHED; +import static io.trino.execution.StageState.FLUSHING; +import static io.trino.execution.StageState.RUNNING; +import static io.trino.execution.StageState.SCHEDULED; +import static io.trino.execution.scheduler.SourcePartitionedScheduler.newSourcePartitionedSchedulerAsStageScheduler; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.NO_NODES_AVAILABLE; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_BROADCAST_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SCALED_WRITER_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPLICATE; +import static io.trino.util.Failures.checkCondition; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/SubnetBasedTopology.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/SubnetBasedTopology.java index 9f7283f28081..c9b5dc478131 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/SubnetBasedTopology.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/SubnetBasedTopology.java @@ -17,7 +17,7 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Ordering; import com.google.common.net.InetAddresses; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import javax.inject.Inject; @@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.execution.scheduler.NetworkLocation.ROOT_LOCATION; +import static io.trino.execution.scheduler.NetworkLocation.ROOT_LOCATION; import static java.util.Objects.requireNonNull; public class SubnetBasedTopology diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/SubnetTopologyConfig.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/SubnetTopologyConfig.java index 863b974781b7..c0170fa50250 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/SubnetTopologyConfig.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/SubnetTopologyConfig.java @@ -20,7 +20,7 @@ import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.execution.scheduler.SubnetBasedTopology.AddressProtocol.IPv4; +import static io.trino.execution.scheduler.SubnetBasedTopology.AddressProtocol.IPv4; public class SubnetTopologyConfig { diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelector.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelector.java index 67eca55899a2..af31a73e8d4f 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelector.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelector.java @@ -19,13 +19,13 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.log.Logger; import io.airlift.stats.CounterStat; -import io.prestosql.execution.NodeTaskMap; -import io.prestosql.execution.RemoteTask; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.metadata.Split; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.PrestoException; +import io.trino.execution.NodeTaskMap; +import io.trino.execution.RemoteTask; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; +import io.trino.metadata.Split; +import io.trino.spi.HostAddress; +import io.trino.spi.PrestoException; import javax.annotation.Nullable; @@ -36,15 +36,15 @@ import java.util.concurrent.atomic.AtomicReference; import java.util.function.Supplier; -import static io.prestosql.execution.scheduler.NetworkLocation.ROOT_LOCATION; -import static io.prestosql.execution.scheduler.NodeScheduler.calculateLowWatermark; -import static io.prestosql.execution.scheduler.NodeScheduler.getAllNodes; -import static io.prestosql.execution.scheduler.NodeScheduler.randomizedNodes; -import static io.prestosql.execution.scheduler.NodeScheduler.selectDistributionNodes; -import static io.prestosql.execution.scheduler.NodeScheduler.selectExactNodes; -import static io.prestosql.execution.scheduler.NodeScheduler.selectNodes; -import static io.prestosql.execution.scheduler.NodeScheduler.toWhenHasSplitQueueSpaceFuture; -import static io.prestosql.spi.StandardErrorCode.NO_NODES_AVAILABLE; +import static io.trino.execution.scheduler.NetworkLocation.ROOT_LOCATION; +import static io.trino.execution.scheduler.NodeScheduler.calculateLowWatermark; +import static io.trino.execution.scheduler.NodeScheduler.getAllNodes; +import static io.trino.execution.scheduler.NodeScheduler.randomizedNodes; +import static io.trino.execution.scheduler.NodeScheduler.selectDistributionNodes; +import static io.trino.execution.scheduler.NodeScheduler.selectExactNodes; +import static io.trino.execution.scheduler.NodeScheduler.selectNodes; +import static io.trino.execution.scheduler.NodeScheduler.toWhenHasSplitQueueSpaceFuture; +import static io.trino.spi.StandardErrorCode.NO_NODES_AVAILABLE; import static java.util.Objects.requireNonNull; public class TopologyAwareNodeSelector diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelectorFactory.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelectorFactory.java index 37ea61a6eee1..8042960ce973 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelectorFactory.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelectorFactory.java @@ -22,11 +22,11 @@ import com.google.common.collect.ImmutableSetMultimap; import io.airlift.log.Logger; import io.airlift.stats.CounterStat; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.NodeTaskMap; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.spi.HostAddress; +import io.trino.connector.CatalogName; +import io.trino.execution.NodeTaskMap; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; +import io.trino.spi.HostAddress; import javax.inject.Inject; @@ -41,7 +41,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.metadata.NodeState.ACTIVE; +import static io.trino.metadata.NodeState.ACTIVE; import static java.util.Objects.requireNonNull; public class TopologyAwareNodeSelectorFactory diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelectorModule.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelectorModule.java index 859ec46f60a6..d148fb241b44 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelectorModule.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelectorModule.java @@ -19,9 +19,9 @@ import static io.airlift.configuration.ConditionalModule.installModuleIf; import static io.airlift.configuration.ConfigBinder.configBinder; -import static io.prestosql.execution.scheduler.TopologyAwareNodeSelectorConfig.TopologyType.FILE; -import static io.prestosql.execution.scheduler.TopologyAwareNodeSelectorConfig.TopologyType.FLAT; -import static io.prestosql.execution.scheduler.TopologyAwareNodeSelectorConfig.TopologyType.SUBNET; +import static io.trino.execution.scheduler.TopologyAwareNodeSelectorConfig.TopologyType.FILE; +import static io.trino.execution.scheduler.TopologyAwareNodeSelectorConfig.TopologyType.FLAT; +import static io.trino.execution.scheduler.TopologyAwareNodeSelectorConfig.TopologyType.SUBNET; import static org.weakref.jmx.guice.ExportBinder.newExporter; public class TopologyAwareNodeSelectorModule diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java index 92849b33a84c..9fd3d33ed959 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java @@ -21,14 +21,14 @@ import com.google.common.collect.SetMultimap; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.log.Logger; -import io.prestosql.execution.NodeTaskMap; -import io.prestosql.execution.RemoteTask; -import io.prestosql.execution.resourcegroups.IndexedPriorityQueue; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.metadata.Split; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.PrestoException; +import io.trino.execution.NodeTaskMap; +import io.trino.execution.RemoteTask; +import io.trino.execution.resourcegroups.IndexedPriorityQueue; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; +import io.trino.metadata.Split; +import io.trino.spi.HostAddress; +import io.trino.spi.PrestoException; import java.net.InetAddress; import java.net.UnknownHostException; @@ -42,14 +42,14 @@ import java.util.function.Supplier; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.execution.scheduler.NodeScheduler.calculateLowWatermark; -import static io.prestosql.execution.scheduler.NodeScheduler.getAllNodes; -import static io.prestosql.execution.scheduler.NodeScheduler.randomizedNodes; -import static io.prestosql.execution.scheduler.NodeScheduler.selectDistributionNodes; -import static io.prestosql.execution.scheduler.NodeScheduler.selectExactNodes; -import static io.prestosql.execution.scheduler.NodeScheduler.selectNodes; -import static io.prestosql.execution.scheduler.NodeScheduler.toWhenHasSplitQueueSpaceFuture; -import static io.prestosql.spi.StandardErrorCode.NO_NODES_AVAILABLE; +import static io.trino.execution.scheduler.NodeScheduler.calculateLowWatermark; +import static io.trino.execution.scheduler.NodeScheduler.getAllNodes; +import static io.trino.execution.scheduler.NodeScheduler.randomizedNodes; +import static io.trino.execution.scheduler.NodeScheduler.selectDistributionNodes; +import static io.trino.execution.scheduler.NodeScheduler.selectExactNodes; +import static io.trino.execution.scheduler.NodeScheduler.selectNodes; +import static io.trino.execution.scheduler.NodeScheduler.toWhenHasSplitQueueSpaceFuture; +import static io.trino.spi.StandardErrorCode.NO_NODES_AVAILABLE; import static java.util.Comparator.comparingInt; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelectorFactory.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelectorFactory.java index 76361d3ff0a3..d4e6164ff17e 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelectorFactory.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelectorFactory.java @@ -20,11 +20,11 @@ import com.google.common.collect.ImmutableSetMultimap; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.NodeTaskMap; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.spi.HostAddress; +import io.trino.connector.CatalogName; +import io.trino.execution.NodeTaskMap; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; +import io.trino.spi.HostAddress; import javax.inject.Inject; @@ -37,7 +37,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.metadata.NodeState.ACTIVE; +import static io.trino.metadata.NodeState.ACTIVE; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/group/DynamicBucketNodeMap.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/group/DynamicBucketNodeMap.java index 7f206137c72d..543f21018be0 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/group/DynamicBucketNodeMap.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/group/DynamicBucketNodeMap.java @@ -13,9 +13,9 @@ */ package io.trino.execution.scheduler.group; -import io.prestosql.execution.scheduler.BucketNodeMap; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; +import io.trino.execution.scheduler.BucketNodeMap; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/group/DynamicLifespanScheduler.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/group/DynamicLifespanScheduler.java index 08f69773aec7..46af973a03f0 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/group/DynamicLifespanScheduler.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/group/DynamicLifespanScheduler.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.scheduler.BucketNodeMap; -import io.prestosql.execution.scheduler.SourceScheduler; -import io.prestosql.metadata.InternalNode; -import io.prestosql.spi.connector.ConnectorPartitionHandle; +import io.trino.execution.Lifespan; +import io.trino.execution.scheduler.BucketNodeMap; +import io.trino.execution.scheduler.SourceScheduler; +import io.trino.metadata.InternalNode; +import io.trino.spi.connector.ConnectorPartitionHandle; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntListIterator; diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/group/FixedLifespanScheduler.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/group/FixedLifespanScheduler.java index d21e9197d9a6..cd37ec2436da 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/group/FixedLifespanScheduler.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/group/FixedLifespanScheduler.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.scheduler.BucketNodeMap; -import io.prestosql.execution.scheduler.SourceScheduler; -import io.prestosql.metadata.InternalNode; -import io.prestosql.spi.connector.ConnectorPartitionHandle; +import io.trino.execution.Lifespan; +import io.trino.execution.scheduler.BucketNodeMap; +import io.trino.execution.scheduler.SourceScheduler; +import io.trino.metadata.InternalNode; +import io.trino.spi.connector.ConnectorPartitionHandle; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import it.unimi.dsi.fastutil.ints.IntArrayList; @@ -38,7 +38,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/execution/scheduler/group/LifespanScheduler.java b/core/trino-main/src/main/java/io/trino/execution/scheduler/group/LifespanScheduler.java index c31546b11d05..f3ce9b32bbe5 100644 --- a/core/trino-main/src/main/java/io/trino/execution/scheduler/group/LifespanScheduler.java +++ b/core/trino-main/src/main/java/io/trino/execution/scheduler/group/LifespanScheduler.java @@ -14,8 +14,8 @@ package io.trino.execution.scheduler.group; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.scheduler.SourceScheduler; +import io.trino.execution.Lifespan; +import io.trino.execution.scheduler.SourceScheduler; public interface LifespanScheduler { diff --git a/core/trino-main/src/main/java/io/trino/execution/warnings/DefaultWarningCollector.java b/core/trino-main/src/main/java/io/trino/execution/warnings/DefaultWarningCollector.java index 79c3b05874e0..a81819bc1078 100644 --- a/core/trino-main/src/main/java/io/trino/execution/warnings/DefaultWarningCollector.java +++ b/core/trino-main/src/main/java/io/trino/execution/warnings/DefaultWarningCollector.java @@ -14,8 +14,8 @@ package io.trino.execution.warnings; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoWarning; -import io.prestosql.spi.WarningCode; +import io.trino.spi.PrestoWarning; +import io.trino.spi.WarningCode; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/execution/warnings/WarningCollector.java b/core/trino-main/src/main/java/io/trino/execution/warnings/WarningCollector.java index 28a49c2f6198..27e5d7619213 100644 --- a/core/trino-main/src/main/java/io/trino/execution/warnings/WarningCollector.java +++ b/core/trino-main/src/main/java/io/trino/execution/warnings/WarningCollector.java @@ -14,7 +14,7 @@ package io.trino.execution.warnings; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoWarning; +import io.trino.spi.PrestoWarning; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/failuredetector/FailureDetector.java b/core/trino-main/src/main/java/io/trino/failuredetector/FailureDetector.java index 532cae42d229..b442fd218196 100644 --- a/core/trino-main/src/main/java/io/trino/failuredetector/FailureDetector.java +++ b/core/trino-main/src/main/java/io/trino/failuredetector/FailureDetector.java @@ -14,7 +14,7 @@ package io.trino.failuredetector; import io.airlift.discovery.client.ServiceDescriptor; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/failuredetector/HeartbeatFailureDetector.java b/core/trino-main/src/main/java/io/trino/failuredetector/HeartbeatFailureDetector.java index 7d406c48eceb..08962bbedac4 100644 --- a/core/trino-main/src/main/java/io/trino/failuredetector/HeartbeatFailureDetector.java +++ b/core/trino-main/src/main/java/io/trino/failuredetector/HeartbeatFailureDetector.java @@ -30,10 +30,10 @@ import io.airlift.stats.DecayCounter; import io.airlift.stats.ExponentialDecay; import io.airlift.units.Duration; -import io.prestosql.client.FailureInfo; -import io.prestosql.server.InternalCommunicationConfig; -import io.prestosql.spi.HostAddress; -import io.prestosql.util.Failures; +import io.trino.client.FailureInfo; +import io.trino.server.InternalCommunicationConfig; +import io.trino.spi.HostAddress; +import io.trino.util.Failures; import org.joda.time.DateTime; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -68,11 +68,11 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.http.client.HttpUriBuilder.uriBuilderFrom; import static io.airlift.http.client.Request.Builder.prepareHead; -import static io.prestosql.failuredetector.FailureDetector.State.ALIVE; -import static io.prestosql.failuredetector.FailureDetector.State.GONE; -import static io.prestosql.failuredetector.FailureDetector.State.UNKNOWN; -import static io.prestosql.failuredetector.FailureDetector.State.UNRESPONSIVE; -import static io.prestosql.spi.HostAddress.fromUri; +import static io.trino.failuredetector.FailureDetector.State.ALIVE; +import static io.trino.failuredetector.FailureDetector.State.GONE; +import static io.trino.failuredetector.FailureDetector.State.UNKNOWN; +import static io.trino.failuredetector.FailureDetector.State.UNRESPONSIVE; +import static io.trino.spi.HostAddress.fromUri; import static java.util.Objects.requireNonNull; public class HeartbeatFailureDetector diff --git a/core/trino-main/src/main/java/io/trino/failuredetector/NoOpFailureDetector.java b/core/trino-main/src/main/java/io/trino/failuredetector/NoOpFailureDetector.java index 75ac79e80103..0b9043fefaa7 100644 --- a/core/trino-main/src/main/java/io/trino/failuredetector/NoOpFailureDetector.java +++ b/core/trino-main/src/main/java/io/trino/failuredetector/NoOpFailureDetector.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableSet; import io.airlift.discovery.client.ServiceDescriptor; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/index/IndexManager.java b/core/trino-main/src/main/java/io/trino/index/IndexManager.java index 7fdd0745e6fa..b9fcda071fc3 100644 --- a/core/trino-main/src/main/java/io/trino/index/IndexManager.java +++ b/core/trino-main/src/main/java/io/trino/index/IndexManager.java @@ -13,13 +13,13 @@ */ package io.trino.index; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.IndexHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorIndex; -import io.prestosql.spi.connector.ConnectorIndexProvider; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.IndexHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorIndex; +import io.trino.spi.connector.ConnectorIndexProvider; +import io.trino.spi.connector.ConnectorSession; import java.util.List; import java.util.concurrent.ConcurrentHashMap; diff --git a/core/trino-main/src/main/java/io/trino/memory/ClusterMemoryLeakDetector.java b/core/trino-main/src/main/java/io/trino/memory/ClusterMemoryLeakDetector.java index defeffa129bc..d0d19abed1fa 100644 --- a/core/trino-main/src/main/java/io/trino/memory/ClusterMemoryLeakDetector.java +++ b/core/trino-main/src/main/java/io/trino/memory/ClusterMemoryLeakDetector.java @@ -16,8 +16,8 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; import io.airlift.log.Logger; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.spi.QueryId; +import io.trino.server.BasicQueryInfo; +import io.trino.spi.QueryId; import org.joda.time.DateTime; import javax.annotation.concurrent.GuardedBy; @@ -30,7 +30,7 @@ import java.util.function.Supplier; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.execution.QueryState.RUNNING; +import static io.trino.execution.QueryState.RUNNING; import static java.util.Objects.requireNonNull; import static org.joda.time.DateTime.now; import static org.joda.time.Seconds.secondsBetween; diff --git a/core/trino-main/src/main/java/io/trino/memory/ClusterMemoryManager.java b/core/trino-main/src/main/java/io/trino/memory/ClusterMemoryManager.java index 3b00515dd71a..d52b09de01f7 100644 --- a/core/trino-main/src/main/java/io/trino/memory/ClusterMemoryManager.java +++ b/core/trino-main/src/main/java/io/trino/memory/ClusterMemoryManager.java @@ -25,20 +25,20 @@ import io.airlift.log.Logger; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.LocationFactory; -import io.prestosql.execution.QueryExecution; -import io.prestosql.execution.QueryIdGenerator; -import io.prestosql.execution.scheduler.NodeSchedulerConfig; -import io.prestosql.memory.LowMemoryKiller.QueryMemoryInfo; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.ServerConfig; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.ClusterMemoryPoolManager; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.memory.MemoryPoolInfo; +import io.trino.execution.LocationFactory; +import io.trino.execution.QueryExecution; +import io.trino.execution.QueryIdGenerator; +import io.trino.execution.scheduler.NodeSchedulerConfig; +import io.trino.memory.LowMemoryKiller.QueryMemoryInfo; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; +import io.trino.server.BasicQueryInfo; +import io.trino.server.ServerConfig; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.spi.memory.ClusterMemoryPoolManager; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.memory.MemoryPoolInfo; import org.weakref.jmx.JmxException; import org.weakref.jmx.MBeanExporter; import org.weakref.jmx.Managed; @@ -71,17 +71,17 @@ import static com.google.common.collect.Sets.difference; import static io.airlift.units.DataSize.succinctBytes; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.ExceededMemoryLimitException.exceededGlobalTotalLimit; -import static io.prestosql.ExceededMemoryLimitException.exceededGlobalUserLimit; -import static io.prestosql.SystemSessionProperties.RESOURCE_OVERCOMMIT; -import static io.prestosql.SystemSessionProperties.getQueryMaxMemory; -import static io.prestosql.SystemSessionProperties.getQueryMaxTotalMemory; -import static io.prestosql.SystemSessionProperties.resourceOvercommit; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; -import static io.prestosql.memory.LocalMemoryManager.RESERVED_POOL; -import static io.prestosql.metadata.NodeState.ACTIVE; -import static io.prestosql.metadata.NodeState.SHUTTING_DOWN; -import static io.prestosql.spi.StandardErrorCode.CLUSTER_OUT_OF_MEMORY; +import static io.trino.ExceededMemoryLimitException.exceededGlobalTotalLimit; +import static io.trino.ExceededMemoryLimitException.exceededGlobalUserLimit; +import static io.trino.SystemSessionProperties.RESOURCE_OVERCOMMIT; +import static io.trino.SystemSessionProperties.getQueryMaxMemory; +import static io.trino.SystemSessionProperties.getQueryMaxTotalMemory; +import static io.trino.SystemSessionProperties.resourceOvercommit; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.memory.LocalMemoryManager.RESERVED_POOL; +import static io.trino.metadata.NodeState.ACTIVE; +import static io.trino.metadata.NodeState.SHUTTING_DOWN; +import static io.trino.spi.StandardErrorCode.CLUSTER_OUT_OF_MEMORY; import static java.lang.Math.min; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/memory/ClusterMemoryPool.java b/core/trino-main/src/main/java/io/trino/memory/ClusterMemoryPool.java index 4f4f94cbf193..37f50b8c727f 100644 --- a/core/trino-main/src/main/java/io/trino/memory/ClusterMemoryPool.java +++ b/core/trino-main/src/main/java/io/trino/memory/ClusterMemoryPool.java @@ -14,10 +14,10 @@ package io.trino.memory; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryAllocation; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.memory.MemoryPoolInfo; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryAllocation; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.memory.MemoryPoolInfo; import org.weakref.jmx.Managed; import javax.annotation.concurrent.GuardedBy; diff --git a/core/trino-main/src/main/java/io/trino/memory/LocalMemoryManager.java b/core/trino-main/src/main/java/io/trino/memory/LocalMemoryManager.java index ffdc65497466..766465ee1b34 100644 --- a/core/trino-main/src/main/java/io/trino/memory/LocalMemoryManager.java +++ b/core/trino-main/src/main/java/io/trino/memory/LocalMemoryManager.java @@ -17,8 +17,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.units.DataSize; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.memory.MemoryPoolInfo; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.memory.MemoryPoolInfo; import javax.inject.Inject; @@ -30,8 +30,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Verify.verify; -import static io.prestosql.memory.NodeMemoryConfig.QUERY_MAX_MEMORY_PER_NODE_CONFIG; -import static io.prestosql.memory.NodeMemoryConfig.QUERY_MAX_TOTAL_MEMORY_PER_NODE_CONFIG; +import static io.trino.memory.NodeMemoryConfig.QUERY_MAX_MEMORY_PER_NODE_CONFIG; +import static io.trino.memory.NodeMemoryConfig.QUERY_MAX_TOTAL_MEMORY_PER_NODE_CONFIG; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/memory/LowMemoryKiller.java b/core/trino-main/src/main/java/io/trino/memory/LowMemoryKiller.java index 7e40f19ddc73..94b0ef5e3dca 100644 --- a/core/trino-main/src/main/java/io/trino/memory/LowMemoryKiller.java +++ b/core/trino-main/src/main/java/io/trino/memory/LowMemoryKiller.java @@ -14,8 +14,8 @@ package io.trino.memory; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/memory/MemoryInfo.java b/core/trino-main/src/main/java/io/trino/memory/MemoryInfo.java index 6b566f8780ed..06ac76a8ecef 100644 --- a/core/trino-main/src/main/java/io/trino/memory/MemoryInfo.java +++ b/core/trino-main/src/main/java/io/trino/memory/MemoryInfo.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; import io.airlift.units.DataSize; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.memory.MemoryPoolInfo; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.memory.MemoryPoolInfo; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/memory/MemoryPool.java b/core/trino-main/src/main/java/io/trino/memory/MemoryPool.java index a6171e140bda..6a521467f937 100644 --- a/core/trino-main/src/main/java/io/trino/memory/MemoryPool.java +++ b/core/trino-main/src/main/java/io/trino/memory/MemoryPool.java @@ -19,10 +19,10 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryAllocation; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.memory.MemoryPoolInfo; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryAllocation; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.memory.MemoryPoolInfo; import org.weakref.jmx.Managed; import javax.annotation.Nullable; @@ -38,7 +38,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.Operator.NOT_BLOCKED; +import static io.trino.operator.Operator.NOT_BLOCKED; import static java.util.Objects.requireNonNull; public class MemoryPool diff --git a/core/trino-main/src/main/java/io/trino/memory/MemoryPoolAssignment.java b/core/trino-main/src/main/java/io/trino/memory/MemoryPoolAssignment.java index 60175f5f21c0..fa399c643c6a 100644 --- a/core/trino-main/src/main/java/io/trino/memory/MemoryPoolAssignment.java +++ b/core/trino-main/src/main/java/io/trino/memory/MemoryPoolAssignment.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; import static com.google.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/memory/MemoryResource.java b/core/trino-main/src/main/java/io/trino/memory/MemoryResource.java index 88adc854da04..448f6660ff0b 100644 --- a/core/trino-main/src/main/java/io/trino/memory/MemoryResource.java +++ b/core/trino-main/src/main/java/io/trino/memory/MemoryResource.java @@ -13,9 +13,9 @@ */ package io.trino.memory; -import io.prestosql.execution.TaskManager; -import io.prestosql.server.security.ResourceSecurity; -import io.prestosql.spi.memory.MemoryPoolInfo; +import io.trino.execution.TaskManager; +import io.trino.server.security.ResourceSecurity; +import io.trino.spi.memory.MemoryPoolInfo; import javax.inject.Inject; import javax.ws.rs.Consumes; @@ -27,10 +27,10 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; -import static io.prestosql.memory.LocalMemoryManager.RESERVED_POOL; -import static io.prestosql.server.security.ResourceSecurity.AccessType.INTERNAL_ONLY; -import static io.prestosql.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.memory.LocalMemoryManager.RESERVED_POOL; +import static io.trino.server.security.ResourceSecurity.AccessType.INTERNAL_ONLY; +import static io.trino.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.Response.Status.NOT_FOUND; diff --git a/core/trino-main/src/main/java/io/trino/memory/NoneLowMemoryKiller.java b/core/trino-main/src/main/java/io/trino/memory/NoneLowMemoryKiller.java index 40b56fc2cfa6..1c3f7208a168 100644 --- a/core/trino-main/src/main/java/io/trino/memory/NoneLowMemoryKiller.java +++ b/core/trino-main/src/main/java/io/trino/memory/NoneLowMemoryKiller.java @@ -14,7 +14,7 @@ package io.trino.memory; -import io.prestosql.spi.QueryId; +import io.trino.spi.QueryId; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/memory/QueryContext.java b/core/trino-main/src/main/java/io/trino/memory/QueryContext.java index 52881ec96c97..32b54fa4f68a 100644 --- a/core/trino-main/src/main/java/io/trino/memory/QueryContext.java +++ b/core/trino-main/src/main/java/io/trino/memory/QueryContext.java @@ -17,14 +17,14 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.stats.GcMonitor; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskStateMachine; -import io.prestosql.memory.context.MemoryReservationHandler; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.operator.TaskContext; -import io.prestosql.spi.QueryId; -import io.prestosql.spiller.SpillSpaceTracker; +import io.trino.Session; +import io.trino.execution.TaskId; +import io.trino.execution.TaskStateMachine; +import io.trino.memory.context.MemoryReservationHandler; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.operator.TaskContext; +import io.trino.spi.QueryId; +import io.trino.spiller.SpillSpaceTracker; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; @@ -47,11 +47,11 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.units.DataSize.Unit.MEGABYTE; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.ExceededMemoryLimitException.exceededLocalTotalMemoryLimit; -import static io.prestosql.ExceededMemoryLimitException.exceededLocalUserMemoryLimit; -import static io.prestosql.ExceededSpillLimitException.exceededPerQueryLocalLimit; -import static io.prestosql.memory.context.AggregatedMemoryContext.newRootAggregatedMemoryContext; -import static io.prestosql.operator.Operator.NOT_BLOCKED; +import static io.trino.ExceededMemoryLimitException.exceededLocalTotalMemoryLimit; +import static io.trino.ExceededMemoryLimitException.exceededLocalUserMemoryLimit; +import static io.trino.ExceededSpillLimitException.exceededPerQueryLocalLimit; +import static io.trino.memory.context.AggregatedMemoryContext.newRootAggregatedMemoryContext; +import static io.trino.operator.Operator.NOT_BLOCKED; import static java.lang.String.format; import static java.util.Map.Entry.comparingByValue; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/memory/QueryContextVisitor.java b/core/trino-main/src/main/java/io/trino/memory/QueryContextVisitor.java index 6892b91048ba..c18c4a7d6a57 100644 --- a/core/trino-main/src/main/java/io/trino/memory/QueryContextVisitor.java +++ b/core/trino-main/src/main/java/io/trino/memory/QueryContextVisitor.java @@ -13,10 +13,10 @@ */ package io.trino.memory; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.PipelineContext; -import io.prestosql.operator.TaskContext; +import io.trino.operator.DriverContext; +import io.trino.operator.OperatorContext; +import io.trino.operator.PipelineContext; +import io.trino.operator.TaskContext; public interface QueryContextVisitor { diff --git a/core/trino-main/src/main/java/io/trino/memory/RemoteNodeMemory.java b/core/trino-main/src/main/java/io/trino/memory/RemoteNodeMemory.java index 9cfee2362245..3d65c100057c 100644 --- a/core/trino-main/src/main/java/io/trino/memory/RemoteNodeMemory.java +++ b/core/trino-main/src/main/java/io/trino/memory/RemoteNodeMemory.java @@ -22,7 +22,7 @@ import io.airlift.json.JsonCodec; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.metadata.InternalNode; +import io.trino.metadata.InternalNode; import javax.annotation.Nullable; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/memory/TotalReservationLowMemoryKiller.java b/core/trino-main/src/main/java/io/trino/memory/TotalReservationLowMemoryKiller.java index 6dd153081f14..9f4535459d18 100644 --- a/core/trino-main/src/main/java/io/trino/memory/TotalReservationLowMemoryKiller.java +++ b/core/trino-main/src/main/java/io/trino/memory/TotalReservationLowMemoryKiller.java @@ -14,12 +14,12 @@ package io.trino.memory; -import io.prestosql.spi.QueryId; +import io.trino.spi.QueryId; import java.util.List; import java.util.Optional; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; public class TotalReservationLowMemoryKiller implements LowMemoryKiller diff --git a/core/trino-main/src/main/java/io/trino/memory/TotalReservationOnBlockedNodesLowMemoryKiller.java b/core/trino-main/src/main/java/io/trino/memory/TotalReservationOnBlockedNodesLowMemoryKiller.java index dc1692f5678b..9f1edc19b0b4 100644 --- a/core/trino-main/src/main/java/io/trino/memory/TotalReservationOnBlockedNodesLowMemoryKiller.java +++ b/core/trino-main/src/main/java/io/trino/memory/TotalReservationOnBlockedNodesLowMemoryKiller.java @@ -14,15 +14,15 @@ package io.trino.memory; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolInfo; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolInfo; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; import static java.util.Comparator.comparingLong; public class TotalReservationOnBlockedNodesLowMemoryKiller diff --git a/core/trino-main/src/main/java/io/trino/memory/TraversingQueryContextVisitor.java b/core/trino-main/src/main/java/io/trino/memory/TraversingQueryContextVisitor.java index 098ebb90833d..59c2cbf67557 100644 --- a/core/trino-main/src/main/java/io/trino/memory/TraversingQueryContextVisitor.java +++ b/core/trino-main/src/main/java/io/trino/memory/TraversingQueryContextVisitor.java @@ -13,10 +13,10 @@ */ package io.trino.memory; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.PipelineContext; -import io.prestosql.operator.TaskContext; +import io.trino.operator.DriverContext; +import io.trino.operator.OperatorContext; +import io.trino.operator.PipelineContext; +import io.trino.operator.TaskContext; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/memory/VersionedMemoryPoolId.java b/core/trino-main/src/main/java/io/trino/memory/VersionedMemoryPoolId.java index 9fbaf55ff46c..4d2e62f0ee07 100644 --- a/core/trino-main/src/main/java/io/trino/memory/VersionedMemoryPoolId.java +++ b/core/trino-main/src/main/java/io/trino/memory/VersionedMemoryPoolId.java @@ -13,7 +13,7 @@ */ package io.trino.memory; -import io.prestosql.spi.memory.MemoryPoolId; +import io.trino.spi.memory.MemoryPoolId; import static com.google.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/metadata/AbstractPropertyManager.java b/core/trino-main/src/main/java/io/trino/metadata/AbstractPropertyManager.java index d65974518d1e..f317811a083c 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/AbstractPropertyManager.java +++ b/core/trino-main/src/main/java/io/trino/metadata/AbstractPropertyManager.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.ParameterRewriter; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Parameter; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.security.AccessControl; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.Type; +import io.trino.sql.planner.ParameterRewriter; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Parameter; import java.util.List; import java.util.Map; @@ -35,9 +35,9 @@ import java.util.concurrent.ConcurrentMap; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; -import static io.prestosql.sql.planner.ExpressionInterpreter.evaluateConstantExpression; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.type.TypeUtils.writeNativeValue; +import static io.trino.sql.planner.ExpressionInterpreter.evaluateConstantExpression; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/metadata/AggregationFunctionMetadata.java b/core/trino-main/src/main/java/io/trino/metadata/AggregationFunctionMetadata.java index badf7f6f7bd2..6603ceb9e9e6 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/AggregationFunctionMetadata.java +++ b/core/trino-main/src/main/java/io/trino/metadata/AggregationFunctionMetadata.java @@ -13,7 +13,7 @@ */ package io.trino.metadata; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignature; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/metadata/AnalyzeMetadata.java b/core/trino-main/src/main/java/io/trino/metadata/AnalyzeMetadata.java index e6abe2416f97..c1edfe746638 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/AnalyzeMetadata.java +++ b/core/trino-main/src/main/java/io/trino/metadata/AnalyzeMetadata.java @@ -13,7 +13,7 @@ */ package io.trino.metadata; -import io.prestosql.spi.statistics.TableStatisticsMetadata; +import io.trino.spi.statistics.TableStatisticsMetadata; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/metadata/AnalyzePropertyManager.java b/core/trino-main/src/main/java/io/trino/metadata/AnalyzePropertyManager.java index e79dd789250c..f31d733310d4 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/AnalyzePropertyManager.java +++ b/core/trino-main/src/main/java/io/trino/metadata/AnalyzePropertyManager.java @@ -13,7 +13,7 @@ */ package io.trino.metadata; -import static io.prestosql.spi.StandardErrorCode.INVALID_ANALYZE_PROPERTY; +import static io.trino.spi.StandardErrorCode.INVALID_ANALYZE_PROPERTY; public class AnalyzePropertyManager extends AbstractPropertyManager diff --git a/core/trino-main/src/main/java/io/trino/metadata/AnalyzeTableHandle.java b/core/trino-main/src/main/java/io/trino/metadata/AnalyzeTableHandle.java index ce587afe0cec..45587474f4e1 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/AnalyzeTableHandle.java +++ b/core/trino-main/src/main/java/io/trino/metadata/AnalyzeTableHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/metadata/BoundSignature.java b/core/trino-main/src/main/java/io/trino/metadata/BoundSignature.java index b304243ca8a2..628bbb17d45f 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/BoundSignature.java +++ b/core/trino-main/src/main/java/io/trino/metadata/BoundSignature.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/metadata/BoundVariables.java b/core/trino-main/src/main/java/io/trino/metadata/BoundVariables.java index 10c9d9aa1c83..4525a8ab18ab 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/BoundVariables.java +++ b/core/trino-main/src/main/java/io/trino/metadata/BoundVariables.java @@ -13,7 +13,7 @@ */ package io.trino.metadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Map; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/metadata/Catalog.java b/core/trino-main/src/main/java/io/trino/metadata/Catalog.java index f3b168d58dd1..2879117750e3 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/Catalog.java +++ b/core/trino-main/src/main/java/io/trino/metadata/Catalog.java @@ -13,11 +13,11 @@ */ package io.trino.metadata; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.Connector; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.Connector; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.metadata.MetadataUtil.checkCatalogName; +import static io.trino.metadata.MetadataUtil.checkCatalogName; import static java.util.Objects.requireNonNull; public class Catalog diff --git a/core/trino-main/src/main/java/io/trino/metadata/CatalogManager.java b/core/trino-main/src/main/java/io/trino/metadata/CatalogManager.java index 8a45a601662b..e6342d12369f 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/CatalogManager.java +++ b/core/trino-main/src/main/java/io/trino/metadata/CatalogManager.java @@ -14,7 +14,7 @@ package io.trino.metadata; import com.google.common.collect.ImmutableList; -import io.prestosql.connector.CatalogName; +import io.trino.connector.CatalogName; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/metadata/CatalogMetadata.java b/core/trino-main/src/main/java/io/trino/metadata/CatalogMetadata.java index f2590654b97e..2371c6880fc8 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/CatalogMetadata.java +++ b/core/trino-main/src/main/java/io/trino/metadata/CatalogMetadata.java @@ -14,11 +14,11 @@ package io.trino.metadata; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.ConnectorCapabilities; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.ConnectorCapabilities; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.List; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/metadata/ColumnPropertyManager.java b/core/trino-main/src/main/java/io/trino/metadata/ColumnPropertyManager.java index 9be420805a56..949d4e44834b 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/ColumnPropertyManager.java +++ b/core/trino-main/src/main/java/io/trino/metadata/ColumnPropertyManager.java @@ -13,7 +13,7 @@ */ package io.trino.metadata; -import static io.prestosql.spi.StandardErrorCode.INVALID_COLUMN_PROPERTY; +import static io.trino.spi.StandardErrorCode.INVALID_COLUMN_PROPERTY; public class ColumnPropertyManager extends AbstractPropertyManager diff --git a/core/trino-main/src/main/java/io/trino/metadata/DiscoveryNodeManager.java b/core/trino-main/src/main/java/io/trino/metadata/DiscoveryNodeManager.java index bf71c628b655..166411e12318 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/DiscoveryNodeManager.java +++ b/core/trino-main/src/main/java/io/trino/metadata/DiscoveryNodeManager.java @@ -26,11 +26,11 @@ import io.airlift.http.client.HttpClient; import io.airlift.log.Logger; import io.airlift.node.NodeInfo; -import io.prestosql.client.NodeVersion; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.system.GlobalSystemConnector; -import io.prestosql.failuredetector.FailureDetector; -import io.prestosql.server.InternalCommunicationConfig; +import io.trino.client.NodeVersion; +import io.trino.connector.CatalogName; +import io.trino.connector.system.GlobalSystemConnector; +import io.trino.failuredetector.FailureDetector; +import io.trino.server.InternalCommunicationConfig; import org.weakref.jmx.Managed; import javax.annotation.PostConstruct; @@ -56,9 +56,9 @@ import static com.google.common.collect.Sets.difference; import static io.airlift.concurrent.Threads.threadsNamed; import static io.airlift.http.client.HttpUriBuilder.uriBuilderFrom; -import static io.prestosql.metadata.NodeState.ACTIVE; -import static io.prestosql.metadata.NodeState.INACTIVE; -import static io.prestosql.metadata.NodeState.SHUTTING_DOWN; +import static io.trino.metadata.NodeState.ACTIVE; +import static io.trino.metadata.NodeState.INACTIVE; +import static io.trino.metadata.NodeState.SHUTTING_DOWN; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/core/trino-main/src/main/java/io/trino/metadata/FunctionBinding.java b/core/trino-main/src/main/java/io/trino/metadata/FunctionBinding.java index 5568bb5bc559..d8ec689a19f7 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/FunctionBinding.java +++ b/core/trino-main/src/main/java/io/trino/metadata/FunctionBinding.java @@ -14,7 +14,7 @@ package io.trino.metadata; import com.google.common.collect.ImmutableSortedMap; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Map; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/metadata/FunctionDependencies.java b/core/trino-main/src/main/java/io/trino/metadata/FunctionDependencies.java index 4e79eefdf3f0..df51474e3089 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/FunctionDependencies.java +++ b/core/trino-main/src/main/java/io/trino/metadata/FunctionDependencies.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.tree.QualifiedName; import java.util.Collection; import java.util.List; @@ -29,9 +29,9 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.metadata.Signature.isOperatorName; -import static io.prestosql.metadata.Signature.unmangleOperator; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.metadata.Signature.isOperatorName; +import static io.trino.metadata.Signature.unmangleOperator; +import static io.trino.spi.function.OperatorType.CAST; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.function.Function.identity; diff --git a/core/trino-main/src/main/java/io/trino/metadata/FunctionDependencyDeclaration.java b/core/trino-main/src/main/java/io/trino/metadata/FunctionDependencyDeclaration.java index 671dc0b9c582..6a7c8b5c1b7c 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/FunctionDependencyDeclaration.java +++ b/core/trino-main/src/main/java/io/trino/metadata/FunctionDependencyDeclaration.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.tree.QualifiedName; import java.util.LinkedHashSet; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/metadata/FunctionExtractor.java b/core/trino-main/src/main/java/io/trino/metadata/FunctionExtractor.java index 3e448f190bad..94645d730011 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/FunctionExtractor.java +++ b/core/trino-main/src/main/java/io/trino/metadata/FunctionExtractor.java @@ -13,12 +13,12 @@ */ package io.trino.metadata; -import io.prestosql.operator.scalar.annotations.ScalarFromAnnotationsParser; -import io.prestosql.operator.window.WindowAnnotationsParser; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.WindowFunction; +import io.trino.operator.scalar.annotations.ScalarFromAnnotationsParser; +import io.trino.operator.window.WindowAnnotationsParser; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.WindowFunction; import java.util.Collection; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/metadata/FunctionListBuilder.java b/core/trino-main/src/main/java/io/trino/metadata/FunctionListBuilder.java index 5b7147772d2d..2187af225561 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/FunctionListBuilder.java +++ b/core/trino-main/src/main/java/io/trino/metadata/FunctionListBuilder.java @@ -14,9 +14,9 @@ package io.trino.metadata; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.scalar.annotations.ScalarFromAnnotationsParser; -import io.prestosql.operator.window.WindowAnnotationsParser; -import io.prestosql.spi.function.WindowFunction; +import io.trino.operator.scalar.annotations.ScalarFromAnnotationsParser; +import io.trino.operator.window.WindowAnnotationsParser; +import io.trino.spi.function.WindowFunction; import java.util.ArrayList; import java.util.List; 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 9381e083a698..7f3319c43da3 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,243 +21,243 @@ import com.google.common.collect.Maps; import com.google.common.collect.Multimap; import com.google.common.util.concurrent.UncheckedExecutionException; -import io.prestosql.operator.aggregation.ApproximateCountDistinctAggregation; -import io.prestosql.operator.aggregation.ApproximateDoublePercentileAggregations; -import io.prestosql.operator.aggregation.ApproximateDoublePercentileArrayAggregations; -import io.prestosql.operator.aggregation.ApproximateLongPercentileAggregations; -import io.prestosql.operator.aggregation.ApproximateLongPercentileArrayAggregations; -import io.prestosql.operator.aggregation.ApproximateRealPercentileAggregations; -import io.prestosql.operator.aggregation.ApproximateRealPercentileArrayAggregations; -import io.prestosql.operator.aggregation.ApproximateSetAggregation; -import io.prestosql.operator.aggregation.AverageAggregations; -import io.prestosql.operator.aggregation.BigintApproximateMostFrequent; -import io.prestosql.operator.aggregation.BitwiseAndAggregation; -import io.prestosql.operator.aggregation.BitwiseOrAggregation; -import io.prestosql.operator.aggregation.BooleanAndAggregation; -import io.prestosql.operator.aggregation.BooleanOrAggregation; -import io.prestosql.operator.aggregation.CentralMomentsAggregation; -import io.prestosql.operator.aggregation.ChecksumAggregationFunction; -import io.prestosql.operator.aggregation.CountAggregation; -import io.prestosql.operator.aggregation.CountIfAggregation; -import io.prestosql.operator.aggregation.DefaultApproximateCountDistinctAggregation; -import io.prestosql.operator.aggregation.DoubleCorrelationAggregation; -import io.prestosql.operator.aggregation.DoubleCovarianceAggregation; -import io.prestosql.operator.aggregation.DoubleHistogramAggregation; -import io.prestosql.operator.aggregation.DoubleRegressionAggregation; -import io.prestosql.operator.aggregation.DoubleSumAggregation; -import io.prestosql.operator.aggregation.GeometricMeanAggregations; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.aggregation.IntervalDayToSecondAverageAggregation; -import io.prestosql.operator.aggregation.IntervalDayToSecondSumAggregation; -import io.prestosql.operator.aggregation.IntervalYearToMonthAverageAggregation; -import io.prestosql.operator.aggregation.IntervalYearToMonthSumAggregation; -import io.prestosql.operator.aggregation.LongSumAggregation; -import io.prestosql.operator.aggregation.MapAggregationFunction; -import io.prestosql.operator.aggregation.MapUnionAggregation; -import io.prestosql.operator.aggregation.MaxDataSizeForStats; -import io.prestosql.operator.aggregation.MaxNAggregationFunction; -import io.prestosql.operator.aggregation.MergeHyperLogLogAggregation; -import io.prestosql.operator.aggregation.MergeQuantileDigestFunction; -import io.prestosql.operator.aggregation.MergeTDigestAggregation; -import io.prestosql.operator.aggregation.MinNAggregationFunction; -import io.prestosql.operator.aggregation.RealCorrelationAggregation; -import io.prestosql.operator.aggregation.RealCovarianceAggregation; -import io.prestosql.operator.aggregation.RealGeometricMeanAggregations; -import io.prestosql.operator.aggregation.RealHistogramAggregation; -import io.prestosql.operator.aggregation.RealRegressionAggregation; -import io.prestosql.operator.aggregation.RealSumAggregation; -import io.prestosql.operator.aggregation.SumDataSizeForStats; -import io.prestosql.operator.aggregation.TDigestAggregationFunction; -import io.prestosql.operator.aggregation.VarcharApproximateMostFrequent; -import io.prestosql.operator.aggregation.VarianceAggregation; -import io.prestosql.operator.aggregation.histogram.Histogram; -import io.prestosql.operator.aggregation.minmaxby.MaxByNAggregationFunction; -import io.prestosql.operator.aggregation.minmaxby.MinByNAggregationFunction; -import io.prestosql.operator.aggregation.multimapagg.MultimapAggregationFunction; -import io.prestosql.operator.scalar.ArrayAllMatchFunction; -import io.prestosql.operator.scalar.ArrayAnyMatchFunction; -import io.prestosql.operator.scalar.ArrayCardinalityFunction; -import io.prestosql.operator.scalar.ArrayCombinationsFunction; -import io.prestosql.operator.scalar.ArrayContains; -import io.prestosql.operator.scalar.ArrayContainsSequence; -import io.prestosql.operator.scalar.ArrayDistinctFunction; -import io.prestosql.operator.scalar.ArrayElementAtFunction; -import io.prestosql.operator.scalar.ArrayExceptFunction; -import io.prestosql.operator.scalar.ArrayFilterFunction; -import io.prestosql.operator.scalar.ArrayFunctions; -import io.prestosql.operator.scalar.ArrayIntersectFunction; -import io.prestosql.operator.scalar.ArrayMaxFunction; -import io.prestosql.operator.scalar.ArrayMinFunction; -import io.prestosql.operator.scalar.ArrayNgramsFunction; -import io.prestosql.operator.scalar.ArrayNoneMatchFunction; -import io.prestosql.operator.scalar.ArrayPositionFunction; -import io.prestosql.operator.scalar.ArrayRemoveFunction; -import io.prestosql.operator.scalar.ArrayReverseFunction; -import io.prestosql.operator.scalar.ArrayShuffleFunction; -import io.prestosql.operator.scalar.ArraySliceFunction; -import io.prestosql.operator.scalar.ArraySortComparatorFunction; -import io.prestosql.operator.scalar.ArraySortFunction; -import io.prestosql.operator.scalar.ArrayUnionFunction; -import io.prestosql.operator.scalar.ArraysOverlapFunction; -import io.prestosql.operator.scalar.BitwiseFunctions; -import io.prestosql.operator.scalar.CharacterStringCasts; -import io.prestosql.operator.scalar.ColorFunctions; -import io.prestosql.operator.scalar.CombineHashFunction; -import io.prestosql.operator.scalar.ConcatWsFunction; -import io.prestosql.operator.scalar.DataSizeFunctions; -import io.prestosql.operator.scalar.DateTimeFunctions; -import io.prestosql.operator.scalar.EmptyMapConstructor; -import io.prestosql.operator.scalar.FailureFunction; -import io.prestosql.operator.scalar.GenericComparisonOperator; -import io.prestosql.operator.scalar.GenericDistinctFromOperator; -import io.prestosql.operator.scalar.GenericEqualOperator; -import io.prestosql.operator.scalar.GenericHashCodeOperator; -import io.prestosql.operator.scalar.GenericIndeterminateOperator; -import io.prestosql.operator.scalar.GenericLessThanOperator; -import io.prestosql.operator.scalar.GenericLessThanOrEqualOperator; -import io.prestosql.operator.scalar.GenericXxHash64Operator; -import io.prestosql.operator.scalar.HmacFunctions; -import io.prestosql.operator.scalar.HyperLogLogFunctions; -import io.prestosql.operator.scalar.JoniRegexpCasts; -import io.prestosql.operator.scalar.JoniRegexpFunctions; -import io.prestosql.operator.scalar.JoniRegexpReplaceLambdaFunction; -import io.prestosql.operator.scalar.JsonFunctions; -import io.prestosql.operator.scalar.JsonOperators; -import io.prestosql.operator.scalar.LuhnCheckFunction; -import io.prestosql.operator.scalar.MapCardinalityFunction; -import io.prestosql.operator.scalar.MapConcatFunction; -import io.prestosql.operator.scalar.MapEntriesFunction; -import io.prestosql.operator.scalar.MapFromEntriesFunction; -import io.prestosql.operator.scalar.MapKeys; -import io.prestosql.operator.scalar.MapSubscriptOperator; -import io.prestosql.operator.scalar.MapToMapCast; -import io.prestosql.operator.scalar.MapTransformKeysFunction; -import io.prestosql.operator.scalar.MapValues; -import io.prestosql.operator.scalar.MathFunctions; -import io.prestosql.operator.scalar.MultimapFromEntriesFunction; -import io.prestosql.operator.scalar.QuantileDigestFunctions; -import io.prestosql.operator.scalar.Re2JRegexpFunctions; -import io.prestosql.operator.scalar.Re2JRegexpReplaceLambdaFunction; -import io.prestosql.operator.scalar.RepeatFunction; -import io.prestosql.operator.scalar.ScalarFunctionImplementation; -import io.prestosql.operator.scalar.SequenceFunction; -import io.prestosql.operator.scalar.SessionFunctions; -import io.prestosql.operator.scalar.SplitToMapFunction; -import io.prestosql.operator.scalar.SplitToMultimapFunction; -import io.prestosql.operator.scalar.StringFunctions; -import io.prestosql.operator.scalar.TDigestFunctions; -import io.prestosql.operator.scalar.TryFunction; -import io.prestosql.operator.scalar.TypeOfFunction; -import io.prestosql.operator.scalar.UrlFunctions; -import io.prestosql.operator.scalar.VarbinaryFunctions; -import io.prestosql.operator.scalar.WilsonInterval; -import io.prestosql.operator.scalar.WordStemFunction; -import io.prestosql.operator.scalar.time.LocalTimeFunction; -import io.prestosql.operator.scalar.time.TimeFunctions; -import io.prestosql.operator.scalar.time.TimeOperators; -import io.prestosql.operator.scalar.time.TimeToTimeWithTimeZoneCast; -import io.prestosql.operator.scalar.time.TimeToTimestampCast; -import io.prestosql.operator.scalar.time.TimeToTimestampWithTimeZoneCast; -import io.prestosql.operator.scalar.timestamp.DateAdd; -import io.prestosql.operator.scalar.timestamp.DateDiff; -import io.prestosql.operator.scalar.timestamp.DateFormat; -import io.prestosql.operator.scalar.timestamp.DateToTimestampCast; -import io.prestosql.operator.scalar.timestamp.DateTrunc; -import io.prestosql.operator.scalar.timestamp.ExtractDay; -import io.prestosql.operator.scalar.timestamp.ExtractDayOfWeek; -import io.prestosql.operator.scalar.timestamp.ExtractDayOfYear; -import io.prestosql.operator.scalar.timestamp.ExtractHour; -import io.prestosql.operator.scalar.timestamp.ExtractMillisecond; -import io.prestosql.operator.scalar.timestamp.ExtractMinute; -import io.prestosql.operator.scalar.timestamp.ExtractMonth; -import io.prestosql.operator.scalar.timestamp.ExtractQuarter; -import io.prestosql.operator.scalar.timestamp.ExtractSecond; -import io.prestosql.operator.scalar.timestamp.ExtractWeekOfYear; -import io.prestosql.operator.scalar.timestamp.ExtractYear; -import io.prestosql.operator.scalar.timestamp.ExtractYearOfWeek; -import io.prestosql.operator.scalar.timestamp.FormatDateTime; -import io.prestosql.operator.scalar.timestamp.HumanReadableSeconds; -import io.prestosql.operator.scalar.timestamp.LastDayOfMonth; -import io.prestosql.operator.scalar.timestamp.LocalTimestamp; -import io.prestosql.operator.scalar.timestamp.SequenceIntervalDayToSecond; -import io.prestosql.operator.scalar.timestamp.SequenceIntervalYearToMonth; -import io.prestosql.operator.scalar.timestamp.TimeWithTimeZoneToTimestampCast; -import io.prestosql.operator.scalar.timestamp.TimestampOperators; -import io.prestosql.operator.scalar.timestamp.TimestampToDateCast; -import io.prestosql.operator.scalar.timestamp.TimestampToJsonCast; -import io.prestosql.operator.scalar.timestamp.TimestampToTimeCast; -import io.prestosql.operator.scalar.timestamp.TimestampToTimeWithTimeZoneCast; -import io.prestosql.operator.scalar.timestamp.TimestampToTimestampCast; -import io.prestosql.operator.scalar.timestamp.TimestampToTimestampWithTimeZoneCast; -import io.prestosql.operator.scalar.timestamp.TimestampToVarcharCast; -import io.prestosql.operator.scalar.timestamp.ToIso8601; -import io.prestosql.operator.scalar.timestamp.ToUnixTime; -import io.prestosql.operator.scalar.timestamp.VarcharToTimestampCast; -import io.prestosql.operator.scalar.timestamp.WithTimeZone; -import io.prestosql.operator.scalar.timestamptz.AtTimeZone; -import io.prestosql.operator.scalar.timestamptz.AtTimeZoneWithOffset; -import io.prestosql.operator.scalar.timestamptz.CurrentTimestamp; -import io.prestosql.operator.scalar.timestamptz.DateToTimestampWithTimeZoneCast; -import io.prestosql.operator.scalar.timestamptz.TimestampWithTimeZoneOperators; -import io.prestosql.operator.scalar.timestamptz.TimestampWithTimeZoneToDateCast; -import io.prestosql.operator.scalar.timestamptz.TimestampWithTimeZoneToTimeCast; -import io.prestosql.operator.scalar.timestamptz.TimestampWithTimeZoneToTimeWithTimeZoneCast; -import io.prestosql.operator.scalar.timestamptz.TimestampWithTimeZoneToTimestampCast; -import io.prestosql.operator.scalar.timestamptz.TimestampWithTimeZoneToTimestampWithTimeZoneCast; -import io.prestosql.operator.scalar.timestamptz.TimestampWithTimeZoneToVarcharCast; -import io.prestosql.operator.scalar.timestamptz.VarcharToTimestampWithTimeZoneCast; -import io.prestosql.operator.scalar.timetz.CurrentTime; -import io.prestosql.operator.scalar.timetz.TimeWithTimeZoneOperators; -import io.prestosql.operator.scalar.timetz.TimeWithTimeZoneToTimeCast; -import io.prestosql.operator.scalar.timetz.TimeWithTimeZoneToTimeWithTimeZoneCast; -import io.prestosql.operator.scalar.timetz.TimeWithTimeZoneToTimestampWithTimeZoneCast; -import io.prestosql.operator.scalar.timetz.TimeWithTimeZoneToVarcharCast; -import io.prestosql.operator.scalar.timetz.VarcharToTimeWithTimeZoneCast; -import io.prestosql.operator.window.CumulativeDistributionFunction; -import io.prestosql.operator.window.DenseRankFunction; -import io.prestosql.operator.window.FirstValueFunction; -import io.prestosql.operator.window.LagFunction; -import io.prestosql.operator.window.LastValueFunction; -import io.prestosql.operator.window.LeadFunction; -import io.prestosql.operator.window.NTileFunction; -import io.prestosql.operator.window.NthValueFunction; -import io.prestosql.operator.window.PercentRankFunction; -import io.prestosql.operator.window.RankFunction; -import io.prestosql.operator.window.RowNumberFunction; -import io.prestosql.operator.window.SqlWindowFunction; -import io.prestosql.operator.window.WindowFunctionSupplier; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.type.BigintOperators; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BooleanOperators; -import io.prestosql.type.DateOperators; -import io.prestosql.type.DateTimeOperators; -import io.prestosql.type.DecimalOperators; -import io.prestosql.type.DoubleOperators; -import io.prestosql.type.HyperLogLogOperators; -import io.prestosql.type.IntegerOperators; -import io.prestosql.type.IntervalDayTimeOperators; -import io.prestosql.type.IntervalYearMonthOperators; -import io.prestosql.type.IpAddressOperators; -import io.prestosql.type.LikeFunctions; -import io.prestosql.type.QuantileDigestOperators; -import io.prestosql.type.RealOperators; -import io.prestosql.type.SmallintOperators; -import io.prestosql.type.TDigestOperators; -import io.prestosql.type.TinyintOperators; -import io.prestosql.type.UuidOperators; -import io.prestosql.type.VarcharOperators; -import io.prestosql.type.setdigest.BuildSetDigestAggregation; -import io.prestosql.type.setdigest.MergeSetDigestAggregation; -import io.prestosql.type.setdigest.SetDigestFunctions; -import io.prestosql.type.setdigest.SetDigestOperators; +import io.trino.operator.aggregation.ApproximateCountDistinctAggregation; +import io.trino.operator.aggregation.ApproximateDoublePercentileAggregations; +import io.trino.operator.aggregation.ApproximateDoublePercentileArrayAggregations; +import io.trino.operator.aggregation.ApproximateLongPercentileAggregations; +import io.trino.operator.aggregation.ApproximateLongPercentileArrayAggregations; +import io.trino.operator.aggregation.ApproximateRealPercentileAggregations; +import io.trino.operator.aggregation.ApproximateRealPercentileArrayAggregations; +import io.trino.operator.aggregation.ApproximateSetAggregation; +import io.trino.operator.aggregation.AverageAggregations; +import io.trino.operator.aggregation.BigintApproximateMostFrequent; +import io.trino.operator.aggregation.BitwiseAndAggregation; +import io.trino.operator.aggregation.BitwiseOrAggregation; +import io.trino.operator.aggregation.BooleanAndAggregation; +import io.trino.operator.aggregation.BooleanOrAggregation; +import io.trino.operator.aggregation.CentralMomentsAggregation; +import io.trino.operator.aggregation.ChecksumAggregationFunction; +import io.trino.operator.aggregation.CountAggregation; +import io.trino.operator.aggregation.CountIfAggregation; +import io.trino.operator.aggregation.DefaultApproximateCountDistinctAggregation; +import io.trino.operator.aggregation.DoubleCorrelationAggregation; +import io.trino.operator.aggregation.DoubleCovarianceAggregation; +import io.trino.operator.aggregation.DoubleHistogramAggregation; +import io.trino.operator.aggregation.DoubleRegressionAggregation; +import io.trino.operator.aggregation.DoubleSumAggregation; +import io.trino.operator.aggregation.GeometricMeanAggregations; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.aggregation.IntervalDayToSecondAverageAggregation; +import io.trino.operator.aggregation.IntervalDayToSecondSumAggregation; +import io.trino.operator.aggregation.IntervalYearToMonthAverageAggregation; +import io.trino.operator.aggregation.IntervalYearToMonthSumAggregation; +import io.trino.operator.aggregation.LongSumAggregation; +import io.trino.operator.aggregation.MapAggregationFunction; +import io.trino.operator.aggregation.MapUnionAggregation; +import io.trino.operator.aggregation.MaxDataSizeForStats; +import io.trino.operator.aggregation.MaxNAggregationFunction; +import io.trino.operator.aggregation.MergeHyperLogLogAggregation; +import io.trino.operator.aggregation.MergeQuantileDigestFunction; +import io.trino.operator.aggregation.MergeTDigestAggregation; +import io.trino.operator.aggregation.MinNAggregationFunction; +import io.trino.operator.aggregation.RealCorrelationAggregation; +import io.trino.operator.aggregation.RealCovarianceAggregation; +import io.trino.operator.aggregation.RealGeometricMeanAggregations; +import io.trino.operator.aggregation.RealHistogramAggregation; +import io.trino.operator.aggregation.RealRegressionAggregation; +import io.trino.operator.aggregation.RealSumAggregation; +import io.trino.operator.aggregation.SumDataSizeForStats; +import io.trino.operator.aggregation.TDigestAggregationFunction; +import io.trino.operator.aggregation.VarcharApproximateMostFrequent; +import io.trino.operator.aggregation.VarianceAggregation; +import io.trino.operator.aggregation.histogram.Histogram; +import io.trino.operator.aggregation.minmaxby.MaxByNAggregationFunction; +import io.trino.operator.aggregation.minmaxby.MinByNAggregationFunction; +import io.trino.operator.aggregation.multimapagg.MultimapAggregationFunction; +import io.trino.operator.scalar.ArrayAllMatchFunction; +import io.trino.operator.scalar.ArrayAnyMatchFunction; +import io.trino.operator.scalar.ArrayCardinalityFunction; +import io.trino.operator.scalar.ArrayCombinationsFunction; +import io.trino.operator.scalar.ArrayContains; +import io.trino.operator.scalar.ArrayContainsSequence; +import io.trino.operator.scalar.ArrayDistinctFunction; +import io.trino.operator.scalar.ArrayElementAtFunction; +import io.trino.operator.scalar.ArrayExceptFunction; +import io.trino.operator.scalar.ArrayFilterFunction; +import io.trino.operator.scalar.ArrayFunctions; +import io.trino.operator.scalar.ArrayIntersectFunction; +import io.trino.operator.scalar.ArrayMaxFunction; +import io.trino.operator.scalar.ArrayMinFunction; +import io.trino.operator.scalar.ArrayNgramsFunction; +import io.trino.operator.scalar.ArrayNoneMatchFunction; +import io.trino.operator.scalar.ArrayPositionFunction; +import io.trino.operator.scalar.ArrayRemoveFunction; +import io.trino.operator.scalar.ArrayReverseFunction; +import io.trino.operator.scalar.ArrayShuffleFunction; +import io.trino.operator.scalar.ArraySliceFunction; +import io.trino.operator.scalar.ArraySortComparatorFunction; +import io.trino.operator.scalar.ArraySortFunction; +import io.trino.operator.scalar.ArrayUnionFunction; +import io.trino.operator.scalar.ArraysOverlapFunction; +import io.trino.operator.scalar.BitwiseFunctions; +import io.trino.operator.scalar.CharacterStringCasts; +import io.trino.operator.scalar.ColorFunctions; +import io.trino.operator.scalar.CombineHashFunction; +import io.trino.operator.scalar.ConcatWsFunction; +import io.trino.operator.scalar.DataSizeFunctions; +import io.trino.operator.scalar.DateTimeFunctions; +import io.trino.operator.scalar.EmptyMapConstructor; +import io.trino.operator.scalar.FailureFunction; +import io.trino.operator.scalar.GenericComparisonOperator; +import io.trino.operator.scalar.GenericDistinctFromOperator; +import io.trino.operator.scalar.GenericEqualOperator; +import io.trino.operator.scalar.GenericHashCodeOperator; +import io.trino.operator.scalar.GenericIndeterminateOperator; +import io.trino.operator.scalar.GenericLessThanOperator; +import io.trino.operator.scalar.GenericLessThanOrEqualOperator; +import io.trino.operator.scalar.GenericXxHash64Operator; +import io.trino.operator.scalar.HmacFunctions; +import io.trino.operator.scalar.HyperLogLogFunctions; +import io.trino.operator.scalar.JoniRegexpCasts; +import io.trino.operator.scalar.JoniRegexpFunctions; +import io.trino.operator.scalar.JoniRegexpReplaceLambdaFunction; +import io.trino.operator.scalar.JsonFunctions; +import io.trino.operator.scalar.JsonOperators; +import io.trino.operator.scalar.LuhnCheckFunction; +import io.trino.operator.scalar.MapCardinalityFunction; +import io.trino.operator.scalar.MapConcatFunction; +import io.trino.operator.scalar.MapEntriesFunction; +import io.trino.operator.scalar.MapFromEntriesFunction; +import io.trino.operator.scalar.MapKeys; +import io.trino.operator.scalar.MapSubscriptOperator; +import io.trino.operator.scalar.MapToMapCast; +import io.trino.operator.scalar.MapTransformKeysFunction; +import io.trino.operator.scalar.MapValues; +import io.trino.operator.scalar.MathFunctions; +import io.trino.operator.scalar.MultimapFromEntriesFunction; +import io.trino.operator.scalar.QuantileDigestFunctions; +import io.trino.operator.scalar.Re2JRegexpFunctions; +import io.trino.operator.scalar.Re2JRegexpReplaceLambdaFunction; +import io.trino.operator.scalar.RepeatFunction; +import io.trino.operator.scalar.ScalarFunctionImplementation; +import io.trino.operator.scalar.SequenceFunction; +import io.trino.operator.scalar.SessionFunctions; +import io.trino.operator.scalar.SplitToMapFunction; +import io.trino.operator.scalar.SplitToMultimapFunction; +import io.trino.operator.scalar.StringFunctions; +import io.trino.operator.scalar.TDigestFunctions; +import io.trino.operator.scalar.TryFunction; +import io.trino.operator.scalar.TypeOfFunction; +import io.trino.operator.scalar.UrlFunctions; +import io.trino.operator.scalar.VarbinaryFunctions; +import io.trino.operator.scalar.WilsonInterval; +import io.trino.operator.scalar.WordStemFunction; +import io.trino.operator.scalar.time.LocalTimeFunction; +import io.trino.operator.scalar.time.TimeFunctions; +import io.trino.operator.scalar.time.TimeOperators; +import io.trino.operator.scalar.time.TimeToTimeWithTimeZoneCast; +import io.trino.operator.scalar.time.TimeToTimestampCast; +import io.trino.operator.scalar.time.TimeToTimestampWithTimeZoneCast; +import io.trino.operator.scalar.timestamp.DateAdd; +import io.trino.operator.scalar.timestamp.DateDiff; +import io.trino.operator.scalar.timestamp.DateFormat; +import io.trino.operator.scalar.timestamp.DateToTimestampCast; +import io.trino.operator.scalar.timestamp.DateTrunc; +import io.trino.operator.scalar.timestamp.ExtractDay; +import io.trino.operator.scalar.timestamp.ExtractDayOfWeek; +import io.trino.operator.scalar.timestamp.ExtractDayOfYear; +import io.trino.operator.scalar.timestamp.ExtractHour; +import io.trino.operator.scalar.timestamp.ExtractMillisecond; +import io.trino.operator.scalar.timestamp.ExtractMinute; +import io.trino.operator.scalar.timestamp.ExtractMonth; +import io.trino.operator.scalar.timestamp.ExtractQuarter; +import io.trino.operator.scalar.timestamp.ExtractSecond; +import io.trino.operator.scalar.timestamp.ExtractWeekOfYear; +import io.trino.operator.scalar.timestamp.ExtractYear; +import io.trino.operator.scalar.timestamp.ExtractYearOfWeek; +import io.trino.operator.scalar.timestamp.FormatDateTime; +import io.trino.operator.scalar.timestamp.HumanReadableSeconds; +import io.trino.operator.scalar.timestamp.LastDayOfMonth; +import io.trino.operator.scalar.timestamp.LocalTimestamp; +import io.trino.operator.scalar.timestamp.SequenceIntervalDayToSecond; +import io.trino.operator.scalar.timestamp.SequenceIntervalYearToMonth; +import io.trino.operator.scalar.timestamp.TimeWithTimeZoneToTimestampCast; +import io.trino.operator.scalar.timestamp.TimestampOperators; +import io.trino.operator.scalar.timestamp.TimestampToDateCast; +import io.trino.operator.scalar.timestamp.TimestampToJsonCast; +import io.trino.operator.scalar.timestamp.TimestampToTimeCast; +import io.trino.operator.scalar.timestamp.TimestampToTimeWithTimeZoneCast; +import io.trino.operator.scalar.timestamp.TimestampToTimestampCast; +import io.trino.operator.scalar.timestamp.TimestampToTimestampWithTimeZoneCast; +import io.trino.operator.scalar.timestamp.TimestampToVarcharCast; +import io.trino.operator.scalar.timestamp.ToIso8601; +import io.trino.operator.scalar.timestamp.ToUnixTime; +import io.trino.operator.scalar.timestamp.VarcharToTimestampCast; +import io.trino.operator.scalar.timestamp.WithTimeZone; +import io.trino.operator.scalar.timestamptz.AtTimeZone; +import io.trino.operator.scalar.timestamptz.AtTimeZoneWithOffset; +import io.trino.operator.scalar.timestamptz.CurrentTimestamp; +import io.trino.operator.scalar.timestamptz.DateToTimestampWithTimeZoneCast; +import io.trino.operator.scalar.timestamptz.TimestampWithTimeZoneOperators; +import io.trino.operator.scalar.timestamptz.TimestampWithTimeZoneToDateCast; +import io.trino.operator.scalar.timestamptz.TimestampWithTimeZoneToTimeCast; +import io.trino.operator.scalar.timestamptz.TimestampWithTimeZoneToTimeWithTimeZoneCast; +import io.trino.operator.scalar.timestamptz.TimestampWithTimeZoneToTimestampCast; +import io.trino.operator.scalar.timestamptz.TimestampWithTimeZoneToTimestampWithTimeZoneCast; +import io.trino.operator.scalar.timestamptz.TimestampWithTimeZoneToVarcharCast; +import io.trino.operator.scalar.timestamptz.VarcharToTimestampWithTimeZoneCast; +import io.trino.operator.scalar.timetz.CurrentTime; +import io.trino.operator.scalar.timetz.TimeWithTimeZoneOperators; +import io.trino.operator.scalar.timetz.TimeWithTimeZoneToTimeCast; +import io.trino.operator.scalar.timetz.TimeWithTimeZoneToTimeWithTimeZoneCast; +import io.trino.operator.scalar.timetz.TimeWithTimeZoneToTimestampWithTimeZoneCast; +import io.trino.operator.scalar.timetz.TimeWithTimeZoneToVarcharCast; +import io.trino.operator.scalar.timetz.VarcharToTimeWithTimeZoneCast; +import io.trino.operator.window.CumulativeDistributionFunction; +import io.trino.operator.window.DenseRankFunction; +import io.trino.operator.window.FirstValueFunction; +import io.trino.operator.window.LagFunction; +import io.trino.operator.window.LastValueFunction; +import io.trino.operator.window.LeadFunction; +import io.trino.operator.window.NTileFunction; +import io.trino.operator.window.NthValueFunction; +import io.trino.operator.window.PercentRankFunction; +import io.trino.operator.window.RankFunction; +import io.trino.operator.window.RowNumberFunction; +import io.trino.operator.window.SqlWindowFunction; +import io.trino.operator.window.WindowFunctionSupplier; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.function.InvocationConvention; +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; +import io.trino.type.BooleanOperators; +import io.trino.type.DateOperators; +import io.trino.type.DateTimeOperators; +import io.trino.type.DecimalOperators; +import io.trino.type.DoubleOperators; +import io.trino.type.HyperLogLogOperators; +import io.trino.type.IntegerOperators; +import io.trino.type.IntervalDayTimeOperators; +import io.trino.type.IntervalYearMonthOperators; +import io.trino.type.IpAddressOperators; +import io.trino.type.LikeFunctions; +import io.trino.type.QuantileDigestOperators; +import io.trino.type.RealOperators; +import io.trino.type.SmallintOperators; +import io.trino.type.TDigestOperators; +import io.trino.type.TinyintOperators; +import io.trino.type.UuidOperators; +import io.trino.type.VarcharOperators; +import io.trino.type.setdigest.BuildSetDigestAggregation; +import io.trino.type.setdigest.MergeSetDigestAggregation; +import io.trino.type.setdigest.SetDigestFunctions; +import io.trino.type.setdigest.SetDigestOperators; import javax.annotation.concurrent.ThreadSafe; @@ -270,97 +270,97 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Throwables.throwIfInstanceOf; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.isOperatorName; -import static io.prestosql.metadata.Signature.unmangleOperator; -import static io.prestosql.operator.aggregation.ArbitraryAggregationFunction.ARBITRARY_AGGREGATION; -import static io.prestosql.operator.aggregation.CountColumn.COUNT_COLUMN; -import static io.prestosql.operator.aggregation.DecimalAverageAggregation.DECIMAL_AVERAGE_AGGREGATION; -import static io.prestosql.operator.aggregation.DecimalSumAggregation.DECIMAL_SUM_AGGREGATION; -import static io.prestosql.operator.aggregation.MaxAggregationFunction.MAX_AGGREGATION; -import static io.prestosql.operator.aggregation.MinAggregationFunction.MIN_AGGREGATION; -import static io.prestosql.operator.aggregation.QuantileDigestAggregationFunction.QDIGEST_AGG; -import static io.prestosql.operator.aggregation.QuantileDigestAggregationFunction.QDIGEST_AGG_WITH_WEIGHT; -import static io.prestosql.operator.aggregation.QuantileDigestAggregationFunction.QDIGEST_AGG_WITH_WEIGHT_AND_ERROR; -import static io.prestosql.operator.aggregation.RealAverageAggregation.REAL_AVERAGE_AGGREGATION; -import static io.prestosql.operator.aggregation.ReduceAggregationFunction.REDUCE_AGG; -import static io.prestosql.operator.aggregation.arrayagg.ArrayAggregationFunction.ARRAY_AGG; -import static io.prestosql.operator.aggregation.minmaxby.MaxByAggregationFunction.MAX_BY; -import static io.prestosql.operator.aggregation.minmaxby.MinByAggregationFunction.MIN_BY; -import static io.prestosql.operator.scalar.ArrayConcatFunction.ARRAY_CONCAT_FUNCTION; -import static io.prestosql.operator.scalar.ArrayConstructor.ARRAY_CONSTRUCTOR; -import static io.prestosql.operator.scalar.ArrayFlattenFunction.ARRAY_FLATTEN_FUNCTION; -import static io.prestosql.operator.scalar.ArrayJoin.ARRAY_JOIN; -import static io.prestosql.operator.scalar.ArrayJoin.ARRAY_JOIN_WITH_NULL_REPLACEMENT; -import static io.prestosql.operator.scalar.ArrayReduceFunction.ARRAY_REDUCE_FUNCTION; -import static io.prestosql.operator.scalar.ArraySubscriptOperator.ARRAY_SUBSCRIPT; -import static io.prestosql.operator.scalar.ArrayToArrayCast.ARRAY_TO_ARRAY_CAST; -import static io.prestosql.operator.scalar.ArrayToElementConcatFunction.ARRAY_TO_ELEMENT_CONCAT_FUNCTION; -import static io.prestosql.operator.scalar.ArrayToJsonCast.ARRAY_TO_JSON; -import static io.prestosql.operator.scalar.ArrayTransformFunction.ARRAY_TRANSFORM_FUNCTION; -import static io.prestosql.operator.scalar.CastFromUnknownOperator.CAST_FROM_UNKNOWN; -import static io.prestosql.operator.scalar.ConcatFunction.VARBINARY_CONCAT; -import static io.prestosql.operator.scalar.ConcatFunction.VARCHAR_CONCAT; -import static io.prestosql.operator.scalar.ConcatWsFunction.CONCAT_WS; -import static io.prestosql.operator.scalar.ElementToArrayConcatFunction.ELEMENT_TO_ARRAY_CONCAT_FUNCTION; -import static io.prestosql.operator.scalar.FormatFunction.FORMAT_FUNCTION; -import static io.prestosql.operator.scalar.Greatest.GREATEST; -import static io.prestosql.operator.scalar.IdentityCast.IDENTITY_CAST; -import static io.prestosql.operator.scalar.JsonStringToArrayCast.JSON_STRING_TO_ARRAY; -import static io.prestosql.operator.scalar.JsonStringToMapCast.JSON_STRING_TO_MAP; -import static io.prestosql.operator.scalar.JsonStringToRowCast.JSON_STRING_TO_ROW; -import static io.prestosql.operator.scalar.JsonToArrayCast.JSON_TO_ARRAY; -import static io.prestosql.operator.scalar.JsonToMapCast.JSON_TO_MAP; -import static io.prestosql.operator.scalar.JsonToRowCast.JSON_TO_ROW; -import static io.prestosql.operator.scalar.Least.LEAST; -import static io.prestosql.operator.scalar.MapConstructor.MAP_CONSTRUCTOR; -import static io.prestosql.operator.scalar.MapElementAtFunction.MAP_ELEMENT_AT; -import static io.prestosql.operator.scalar.MapFilterFunction.MAP_FILTER_FUNCTION; -import static io.prestosql.operator.scalar.MapToJsonCast.MAP_TO_JSON; -import static io.prestosql.operator.scalar.MapTransformValuesFunction.MAP_TRANSFORM_VALUES_FUNCTION; -import static io.prestosql.operator.scalar.MapZipWithFunction.MAP_ZIP_WITH_FUNCTION; -import static io.prestosql.operator.scalar.MathFunctions.DECIMAL_MOD_FUNCTION; -import static io.prestosql.operator.scalar.Re2JCastToRegexpFunction.castCharToRe2JRegexp; -import static io.prestosql.operator.scalar.Re2JCastToRegexpFunction.castVarcharToRe2JRegexp; -import static io.prestosql.operator.scalar.RowToJsonCast.ROW_TO_JSON; -import static io.prestosql.operator.scalar.RowToRowCast.ROW_TO_ROW_CAST; -import static io.prestosql.operator.scalar.TryCastFunction.TRY_CAST; -import static io.prestosql.operator.scalar.ZipFunction.ZIP_FUNCTIONS; -import static io.prestosql.operator.scalar.ZipWithFunction.ZIP_WITH_FUNCTION; -import static io.prestosql.operator.window.AggregateWindowFunction.supplier; -import static io.prestosql.type.DecimalCasts.BIGINT_TO_DECIMAL_CAST; -import static io.prestosql.type.DecimalCasts.BOOLEAN_TO_DECIMAL_CAST; -import static io.prestosql.type.DecimalCasts.DECIMAL_TO_BIGINT_CAST; -import static io.prestosql.type.DecimalCasts.DECIMAL_TO_BOOLEAN_CAST; -import static io.prestosql.type.DecimalCasts.DECIMAL_TO_DOUBLE_CAST; -import static io.prestosql.type.DecimalCasts.DECIMAL_TO_INTEGER_CAST; -import static io.prestosql.type.DecimalCasts.DECIMAL_TO_JSON_CAST; -import static io.prestosql.type.DecimalCasts.DECIMAL_TO_REAL_CAST; -import static io.prestosql.type.DecimalCasts.DECIMAL_TO_SMALLINT_CAST; -import static io.prestosql.type.DecimalCasts.DECIMAL_TO_TINYINT_CAST; -import static io.prestosql.type.DecimalCasts.DECIMAL_TO_VARCHAR_CAST; -import static io.prestosql.type.DecimalCasts.DOUBLE_TO_DECIMAL_CAST; -import static io.prestosql.type.DecimalCasts.INTEGER_TO_DECIMAL_CAST; -import static io.prestosql.type.DecimalCasts.JSON_TO_DECIMAL_CAST; -import static io.prestosql.type.DecimalCasts.REAL_TO_DECIMAL_CAST; -import static io.prestosql.type.DecimalCasts.SMALLINT_TO_DECIMAL_CAST; -import static io.prestosql.type.DecimalCasts.TINYINT_TO_DECIMAL_CAST; -import static io.prestosql.type.DecimalCasts.VARCHAR_TO_DECIMAL_CAST; -import static io.prestosql.type.DecimalOperators.DECIMAL_ADD_OPERATOR; -import static io.prestosql.type.DecimalOperators.DECIMAL_DIVIDE_OPERATOR; -import static io.prestosql.type.DecimalOperators.DECIMAL_MODULUS_OPERATOR; -import static io.prestosql.type.DecimalOperators.DECIMAL_MULTIPLY_OPERATOR; -import static io.prestosql.type.DecimalOperators.DECIMAL_SUBTRACT_OPERATOR; -import static io.prestosql.type.DecimalSaturatedFloorCasts.BIGINT_TO_DECIMAL_SATURATED_FLOOR_CAST; -import static io.prestosql.type.DecimalSaturatedFloorCasts.DECIMAL_TO_BIGINT_SATURATED_FLOOR_CAST; -import static io.prestosql.type.DecimalSaturatedFloorCasts.DECIMAL_TO_DECIMAL_SATURATED_FLOOR_CAST; -import static io.prestosql.type.DecimalSaturatedFloorCasts.DECIMAL_TO_INTEGER_SATURATED_FLOOR_CAST; -import static io.prestosql.type.DecimalSaturatedFloorCasts.DECIMAL_TO_SMALLINT_SATURATED_FLOOR_CAST; -import static io.prestosql.type.DecimalSaturatedFloorCasts.DECIMAL_TO_TINYINT_SATURATED_FLOOR_CAST; -import static io.prestosql.type.DecimalSaturatedFloorCasts.INTEGER_TO_DECIMAL_SATURATED_FLOOR_CAST; -import static io.prestosql.type.DecimalSaturatedFloorCasts.SMALLINT_TO_DECIMAL_SATURATED_FLOOR_CAST; -import static io.prestosql.type.DecimalSaturatedFloorCasts.TINYINT_TO_DECIMAL_SATURATED_FLOOR_CAST; -import static io.prestosql.type.DecimalToDecimalCasts.DECIMAL_TO_DECIMAL_CAST; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.isOperatorName; +import static io.trino.metadata.Signature.unmangleOperator; +import static io.trino.operator.aggregation.ArbitraryAggregationFunction.ARBITRARY_AGGREGATION; +import static io.trino.operator.aggregation.CountColumn.COUNT_COLUMN; +import static io.trino.operator.aggregation.DecimalAverageAggregation.DECIMAL_AVERAGE_AGGREGATION; +import static io.trino.operator.aggregation.DecimalSumAggregation.DECIMAL_SUM_AGGREGATION; +import static io.trino.operator.aggregation.MaxAggregationFunction.MAX_AGGREGATION; +import static io.trino.operator.aggregation.MinAggregationFunction.MIN_AGGREGATION; +import static io.trino.operator.aggregation.QuantileDigestAggregationFunction.QDIGEST_AGG; +import static io.trino.operator.aggregation.QuantileDigestAggregationFunction.QDIGEST_AGG_WITH_WEIGHT; +import static io.trino.operator.aggregation.QuantileDigestAggregationFunction.QDIGEST_AGG_WITH_WEIGHT_AND_ERROR; +import static io.trino.operator.aggregation.RealAverageAggregation.REAL_AVERAGE_AGGREGATION; +import static io.trino.operator.aggregation.ReduceAggregationFunction.REDUCE_AGG; +import static io.trino.operator.aggregation.arrayagg.ArrayAggregationFunction.ARRAY_AGG; +import static io.trino.operator.aggregation.minmaxby.MaxByAggregationFunction.MAX_BY; +import static io.trino.operator.aggregation.minmaxby.MinByAggregationFunction.MIN_BY; +import static io.trino.operator.scalar.ArrayConcatFunction.ARRAY_CONCAT_FUNCTION; +import static io.trino.operator.scalar.ArrayConstructor.ARRAY_CONSTRUCTOR; +import static io.trino.operator.scalar.ArrayFlattenFunction.ARRAY_FLATTEN_FUNCTION; +import static io.trino.operator.scalar.ArrayJoin.ARRAY_JOIN; +import static io.trino.operator.scalar.ArrayJoin.ARRAY_JOIN_WITH_NULL_REPLACEMENT; +import static io.trino.operator.scalar.ArrayReduceFunction.ARRAY_REDUCE_FUNCTION; +import static io.trino.operator.scalar.ArraySubscriptOperator.ARRAY_SUBSCRIPT; +import static io.trino.operator.scalar.ArrayToArrayCast.ARRAY_TO_ARRAY_CAST; +import static io.trino.operator.scalar.ArrayToElementConcatFunction.ARRAY_TO_ELEMENT_CONCAT_FUNCTION; +import static io.trino.operator.scalar.ArrayToJsonCast.ARRAY_TO_JSON; +import static io.trino.operator.scalar.ArrayTransformFunction.ARRAY_TRANSFORM_FUNCTION; +import static io.trino.operator.scalar.CastFromUnknownOperator.CAST_FROM_UNKNOWN; +import static io.trino.operator.scalar.ConcatFunction.VARBINARY_CONCAT; +import static io.trino.operator.scalar.ConcatFunction.VARCHAR_CONCAT; +import static io.trino.operator.scalar.ConcatWsFunction.CONCAT_WS; +import static io.trino.operator.scalar.ElementToArrayConcatFunction.ELEMENT_TO_ARRAY_CONCAT_FUNCTION; +import static io.trino.operator.scalar.FormatFunction.FORMAT_FUNCTION; +import static io.trino.operator.scalar.Greatest.GREATEST; +import static io.trino.operator.scalar.IdentityCast.IDENTITY_CAST; +import static io.trino.operator.scalar.JsonStringToArrayCast.JSON_STRING_TO_ARRAY; +import static io.trino.operator.scalar.JsonStringToMapCast.JSON_STRING_TO_MAP; +import static io.trino.operator.scalar.JsonStringToRowCast.JSON_STRING_TO_ROW; +import static io.trino.operator.scalar.JsonToArrayCast.JSON_TO_ARRAY; +import static io.trino.operator.scalar.JsonToMapCast.JSON_TO_MAP; +import static io.trino.operator.scalar.JsonToRowCast.JSON_TO_ROW; +import static io.trino.operator.scalar.Least.LEAST; +import static io.trino.operator.scalar.MapConstructor.MAP_CONSTRUCTOR; +import static io.trino.operator.scalar.MapElementAtFunction.MAP_ELEMENT_AT; +import static io.trino.operator.scalar.MapFilterFunction.MAP_FILTER_FUNCTION; +import static io.trino.operator.scalar.MapToJsonCast.MAP_TO_JSON; +import static io.trino.operator.scalar.MapTransformValuesFunction.MAP_TRANSFORM_VALUES_FUNCTION; +import static io.trino.operator.scalar.MapZipWithFunction.MAP_ZIP_WITH_FUNCTION; +import static io.trino.operator.scalar.MathFunctions.DECIMAL_MOD_FUNCTION; +import static io.trino.operator.scalar.Re2JCastToRegexpFunction.castCharToRe2JRegexp; +import static io.trino.operator.scalar.Re2JCastToRegexpFunction.castVarcharToRe2JRegexp; +import static io.trino.operator.scalar.RowToJsonCast.ROW_TO_JSON; +import static io.trino.operator.scalar.RowToRowCast.ROW_TO_ROW_CAST; +import static io.trino.operator.scalar.TryCastFunction.TRY_CAST; +import static io.trino.operator.scalar.ZipFunction.ZIP_FUNCTIONS; +import static io.trino.operator.scalar.ZipWithFunction.ZIP_WITH_FUNCTION; +import static io.trino.operator.window.AggregateWindowFunction.supplier; +import static io.trino.type.DecimalCasts.BIGINT_TO_DECIMAL_CAST; +import static io.trino.type.DecimalCasts.BOOLEAN_TO_DECIMAL_CAST; +import static io.trino.type.DecimalCasts.DECIMAL_TO_BIGINT_CAST; +import static io.trino.type.DecimalCasts.DECIMAL_TO_BOOLEAN_CAST; +import static io.trino.type.DecimalCasts.DECIMAL_TO_DOUBLE_CAST; +import static io.trino.type.DecimalCasts.DECIMAL_TO_INTEGER_CAST; +import static io.trino.type.DecimalCasts.DECIMAL_TO_JSON_CAST; +import static io.trino.type.DecimalCasts.DECIMAL_TO_REAL_CAST; +import static io.trino.type.DecimalCasts.DECIMAL_TO_SMALLINT_CAST; +import static io.trino.type.DecimalCasts.DECIMAL_TO_TINYINT_CAST; +import static io.trino.type.DecimalCasts.DECIMAL_TO_VARCHAR_CAST; +import static io.trino.type.DecimalCasts.DOUBLE_TO_DECIMAL_CAST; +import static io.trino.type.DecimalCasts.INTEGER_TO_DECIMAL_CAST; +import static io.trino.type.DecimalCasts.JSON_TO_DECIMAL_CAST; +import static io.trino.type.DecimalCasts.REAL_TO_DECIMAL_CAST; +import static io.trino.type.DecimalCasts.SMALLINT_TO_DECIMAL_CAST; +import static io.trino.type.DecimalCasts.TINYINT_TO_DECIMAL_CAST; +import static io.trino.type.DecimalCasts.VARCHAR_TO_DECIMAL_CAST; +import static io.trino.type.DecimalOperators.DECIMAL_ADD_OPERATOR; +import static io.trino.type.DecimalOperators.DECIMAL_DIVIDE_OPERATOR; +import static io.trino.type.DecimalOperators.DECIMAL_MODULUS_OPERATOR; +import static io.trino.type.DecimalOperators.DECIMAL_MULTIPLY_OPERATOR; +import static io.trino.type.DecimalOperators.DECIMAL_SUBTRACT_OPERATOR; +import static io.trino.type.DecimalSaturatedFloorCasts.BIGINT_TO_DECIMAL_SATURATED_FLOOR_CAST; +import static io.trino.type.DecimalSaturatedFloorCasts.DECIMAL_TO_BIGINT_SATURATED_FLOOR_CAST; +import static io.trino.type.DecimalSaturatedFloorCasts.DECIMAL_TO_DECIMAL_SATURATED_FLOOR_CAST; +import static io.trino.type.DecimalSaturatedFloorCasts.DECIMAL_TO_INTEGER_SATURATED_FLOOR_CAST; +import static io.trino.type.DecimalSaturatedFloorCasts.DECIMAL_TO_SMALLINT_SATURATED_FLOOR_CAST; +import static io.trino.type.DecimalSaturatedFloorCasts.DECIMAL_TO_TINYINT_SATURATED_FLOOR_CAST; +import static io.trino.type.DecimalSaturatedFloorCasts.INTEGER_TO_DECIMAL_SATURATED_FLOOR_CAST; +import static io.trino.type.DecimalSaturatedFloorCasts.SMALLINT_TO_DECIMAL_SATURATED_FLOOR_CAST; +import static io.trino.type.DecimalSaturatedFloorCasts.TINYINT_TO_DECIMAL_SATURATED_FLOOR_CAST; +import static io.trino.type.DecimalToDecimalCasts.DECIMAL_TO_DECIMAL_CAST; import static java.util.concurrent.TimeUnit.HOURS; @ThreadSafe diff --git a/core/trino-main/src/main/java/io/trino/metadata/FunctionResolver.java b/core/trino-main/src/main/java/io/trino/metadata/FunctionResolver.java index 773cad71690e..14196e11e8a4 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/FunctionResolver.java +++ b/core/trino-main/src/main/java/io/trino/metadata/FunctionResolver.java @@ -16,10 +16,10 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import com.google.common.collect.Ordering; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.TypeSignatureProvider; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Type; +import io.trino.sql.analyzer.TypeSignatureProvider; +import io.trino.sql.tree.QualifiedName; import java.util.ArrayList; import java.util.Collection; @@ -33,12 +33,12 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.spi.StandardErrorCode.AMBIGUOUS_FUNCTION_CALL; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_MISSING; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_NOT_FOUND; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypeSignatures; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.spi.StandardErrorCode.AMBIGUOUS_FUNCTION_CALL; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_MISSING; +import static io.trino.spi.StandardErrorCode.FUNCTION_NOT_FOUND; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypeSignatures; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.String.format; public class FunctionResolver diff --git a/core/trino-main/src/main/java/io/trino/metadata/HandleJsonModule.java b/core/trino-main/src/main/java/io/trino/metadata/HandleJsonModule.java index a9e89e4db123..8ffd3f94a8e8 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/HandleJsonModule.java +++ b/core/trino-main/src/main/java/io/trino/metadata/HandleJsonModule.java @@ -17,15 +17,15 @@ import com.google.inject.Module; import com.google.inject.Scopes; import com.google.inject.multibindings.ProvidesIntoSet; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorIndexHandle; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorIndexHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class HandleJsonModule implements Module diff --git a/core/trino-main/src/main/java/io/trino/metadata/HandleResolver.java b/core/trino-main/src/main/java/io/trino/metadata/HandleResolver.java index b9aa85776fa8..b2b61a372192 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/HandleResolver.java +++ b/core/trino-main/src/main/java/io/trino/metadata/HandleResolver.java @@ -13,19 +13,19 @@ */ package io.trino.metadata; -import io.prestosql.connector.informationschema.InformationSchemaHandleResolver; -import io.prestosql.connector.system.SystemHandleResolver; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorIndexHandle; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.split.EmptySplitHandleResolver; +import io.trino.connector.informationschema.InformationSchemaHandleResolver; +import io.trino.connector.system.SystemHandleResolver; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorIndexHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.split.EmptySplitHandleResolver; import javax.inject.Inject; @@ -39,7 +39,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.ExchangeOperator.REMOTE_CONNECTOR_ID; +import static io.trino.operator.ExchangeOperator.REMOTE_CONNECTOR_ID; import static java.util.Objects.requireNonNull; public final class HandleResolver diff --git a/core/trino-main/src/main/java/io/trino/metadata/InMemoryNodeManager.java b/core/trino-main/src/main/java/io/trino/metadata/InMemoryNodeManager.java index e4686e60d57e..0434e1cf9030 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/InMemoryNodeManager.java +++ b/core/trino-main/src/main/java/io/trino/metadata/InMemoryNodeManager.java @@ -18,8 +18,8 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Multimaps; import com.google.common.collect.SetMultimap; -import io.prestosql.client.NodeVersion; -import io.prestosql.connector.CatalogName; +import io.trino.client.NodeVersion; +import io.trino.connector.CatalogName; import javax.annotation.concurrent.GuardedBy; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/metadata/IndexHandle.java b/core/trino-main/src/main/java/io/trino/metadata/IndexHandle.java index 9abf2c6553c7..caadc8807865 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/IndexHandle.java +++ b/core/trino-main/src/main/java/io/trino/metadata/IndexHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.ConnectorIndexHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.ConnectorIndexHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/metadata/InsertTableHandle.java b/core/trino-main/src/main/java/io/trino/metadata/InsertTableHandle.java index 36c5a05703b1..6a02733b84b0 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/InsertTableHandle.java +++ b/core/trino-main/src/main/java/io/trino/metadata/InsertTableHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/metadata/InternalBlockEncodingSerde.java b/core/trino-main/src/main/java/io/trino/metadata/InternalBlockEncodingSerde.java index e47eb8f749d7..24d53cf1b1ed 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/InternalBlockEncodingSerde.java +++ b/core/trino-main/src/main/java/io/trino/metadata/InternalBlockEncodingSerde.java @@ -15,11 +15,11 @@ import io.airlift.slice.SliceInput; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockEncoding; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockEncoding; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; import java.util.Optional; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/metadata/InternalNode.java b/core/trino-main/src/main/java/io/trino/metadata/InternalNode.java index d1ee7f4b41e6..81bc4f2d0696 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/InternalNode.java +++ b/core/trino-main/src/main/java/io/trino/metadata/InternalNode.java @@ -13,9 +13,9 @@ */ package io.trino.metadata; -import io.prestosql.client.NodeVersion; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.Node; +import io.trino.client.NodeVersion; +import io.trino.spi.HostAddress; +import io.trino.spi.Node; import java.net.URI; diff --git a/core/trino-main/src/main/java/io/trino/metadata/InternalNodeManager.java b/core/trino-main/src/main/java/io/trino/metadata/InternalNodeManager.java index 95adecef7baa..3493786f5f50 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/InternalNodeManager.java +++ b/core/trino-main/src/main/java/io/trino/metadata/InternalNodeManager.java @@ -13,7 +13,7 @@ */ package io.trino.metadata; -import io.prestosql.connector.CatalogName; +import io.trino.connector.CatalogName; import java.util.Set; import java.util.function.Consumer; diff --git a/core/trino-main/src/main/java/io/trino/metadata/InternalTable.java b/core/trino-main/src/main/java/io/trino/metadata/InternalTable.java index 9b575b973cd1..4b19ace8e7a3 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/InternalTable.java +++ b/core/trino-main/src/main/java/io/trino/metadata/InternalTable.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.List; @@ -26,7 +26,7 @@ import java.util.OptionalLong; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; +import static io.trino.spi.type.TypeUtils.writeNativeValue; import static java.util.Objects.requireNonNull; public class InternalTable diff --git a/core/trino-main/src/main/java/io/trino/metadata/LiteralFunction.java b/core/trino-main/src/main/java/io/trino/metadata/LiteralFunction.java index e33adee4f90c..6fd7cdcbcb7c 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/LiteralFunction.java +++ b/core/trino-main/src/main/java/io/trino/metadata/LiteralFunction.java @@ -16,29 +16,29 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Primitives; import io.airlift.slice.Slice; -import io.prestosql.operator.scalar.ChoicesScalarFunctionImplementation; -import io.prestosql.operator.scalar.ScalarFunctionImplementation; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.VarcharType; +import io.trino.operator.scalar.ChoicesScalarFunctionImplementation; +import io.trino.operator.scalar.ScalarFunctionImplementation; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.VarcharType; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.util.function.Supplier; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.block.BlockSerdeUtil.READ_BLOCK; -import static io.prestosql.block.BlockSerdeUtil.READ_BLOCK_VALUE; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.block.BlockSerdeUtil.READ_BLOCK; +import static io.trino.block.BlockSerdeUtil.READ_BLOCK_VALUE; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; public class LiteralFunction extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/metadata/Metadata.java b/core/trino-main/src/main/java/io/trino/metadata/Metadata.java index f5c4a31ba193..d1c21e5e1b1d 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/Metadata.java +++ b/core/trino-main/src/main/java/io/trino/metadata/Metadata.java @@ -14,52 +14,52 @@ package io.trino.metadata; import io.airlift.slice.Slice; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.window.WindowFunctionSupplier; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.AggregationApplicationResult; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorCapabilities; -import io.prestosql.spi.connector.ConnectorMaterializedViewDefinition; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.LimitApplicationResult; -import io.prestosql.spi.connector.MaterializedViewFreshness; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SampleType; -import io.prestosql.spi.connector.SortItem; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.connector.TopNApplicationResult; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.GrantInfo; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.statistics.TableStatisticsMetadata; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.sql.analyzer.TypeSignatureProvider; -import io.prestosql.sql.planner.PartitioningHandle; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.window.WindowFunctionSupplier; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.AggregationApplicationResult; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorCapabilities; +import io.trino.spi.connector.ConnectorMaterializedViewDefinition; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.LimitApplicationResult; +import io.trino.spi.connector.MaterializedViewFreshness; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SampleType; +import io.trino.spi.connector.SortItem; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.connector.TopNApplicationResult; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.OperatorType; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.GrantInfo; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.statistics.TableStatisticsMetadata; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.sql.analyzer.TypeSignatureProvider; +import io.trino.sql.planner.PartitioningHandle; +import io.trino.sql.tree.QualifiedName; import java.util.Collection; import java.util.List; @@ -68,7 +68,7 @@ import java.util.OptionalLong; import java.util.Set; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.CAST; public interface Metadata { diff --git a/core/trino-main/src/main/java/io/trino/metadata/MetadataListing.java b/core/trino-main/src/main/java/io/trino/metadata/MetadataListing.java index 3fe1ac09421b..8af6d86b24c3 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/MetadataListing.java +++ b/core/trino-main/src/main/java/io/trino/metadata/MetadataListing.java @@ -17,14 +17,14 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSortedMap; import com.google.common.collect.ImmutableSortedSet; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.GrantInfo; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.security.AccessControl; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.GrantInfo; import java.util.List; import java.util.Map; 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 98b6f3e111f3..308ce01eade6 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 @@ -21,94 +21,94 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Multimap; import io.airlift.slice.Slice; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.ResolvedFunction.ResolvedFunctionDecoder; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.window.WindowFunctionSupplier; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.block.ArrayBlockEncoding; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockEncoding; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.block.ByteArrayBlockEncoding; -import io.prestosql.spi.block.DictionaryBlockEncoding; -import io.prestosql.spi.block.Int128ArrayBlockEncoding; -import io.prestosql.spi.block.Int96ArrayBlockEncoding; -import io.prestosql.spi.block.IntArrayBlockEncoding; -import io.prestosql.spi.block.LazyBlockEncoding; -import io.prestosql.spi.block.LongArrayBlockEncoding; -import io.prestosql.spi.block.MapBlockEncoding; -import io.prestosql.spi.block.RowBlockEncoding; -import io.prestosql.spi.block.RunLengthBlockEncoding; -import io.prestosql.spi.block.ShortArrayBlockEncoding; -import io.prestosql.spi.block.SingleMapBlockEncoding; -import io.prestosql.spi.block.SingleRowBlockEncoding; -import io.prestosql.spi.block.VariableWidthBlockEncoding; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.AggregationApplicationResult; -import io.prestosql.spi.connector.Assignment; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorCapabilities; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMaterializedViewDefinition; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorResolvedIndex; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayout; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutResult; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.LimitApplicationResult; -import io.prestosql.spi.connector.MaterializedViewFreshness; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SampleType; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.SortItem; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.connector.TopNApplicationResult; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.GrantInfo; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.statistics.TableStatisticsMetadata; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeNotFoundException; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.analyzer.TypeSignatureProvider; -import io.prestosql.sql.planner.ConnectorExpressions; -import io.prestosql.sql.planner.PartitioningHandle; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.transaction.TransactionManager; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.InternalTypeManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.ResolvedFunction.ResolvedFunctionDecoder; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.window.WindowFunctionSupplier; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.spi.block.ArrayBlockEncoding; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockEncoding; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.block.ByteArrayBlockEncoding; +import io.trino.spi.block.DictionaryBlockEncoding; +import io.trino.spi.block.Int128ArrayBlockEncoding; +import io.trino.spi.block.Int96ArrayBlockEncoding; +import io.trino.spi.block.IntArrayBlockEncoding; +import io.trino.spi.block.LazyBlockEncoding; +import io.trino.spi.block.LongArrayBlockEncoding; +import io.trino.spi.block.MapBlockEncoding; +import io.trino.spi.block.RowBlockEncoding; +import io.trino.spi.block.RunLengthBlockEncoding; +import io.trino.spi.block.ShortArrayBlockEncoding; +import io.trino.spi.block.SingleMapBlockEncoding; +import io.trino.spi.block.SingleRowBlockEncoding; +import io.trino.spi.block.VariableWidthBlockEncoding; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.AggregationApplicationResult; +import io.trino.spi.connector.Assignment; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorCapabilities; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMaterializedViewDefinition; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorResolvedIndex; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayout; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTableLayoutResult; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.LimitApplicationResult; +import io.trino.spi.connector.MaterializedViewFreshness; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SampleType; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.SortItem; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.connector.TopNApplicationResult; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Variable; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.spi.function.OperatorType; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.GrantInfo; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.statistics.TableStatisticsMetadata; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +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; +import io.trino.sql.tree.QualifiedName; +import io.trino.transaction.TransactionManager; +import io.trino.type.BlockTypeOperators; +import io.trino.type.InternalTypeManager; import javax.annotation.concurrent.GuardedBy; import javax.inject.Inject; @@ -141,34 +141,34 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.primitives.Primitives.wrap; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.QualifiedObjectName.convertFromSchemaTableName; -import static io.prestosql.metadata.Signature.mangleOperatorName; -import static io.prestosql.metadata.SignatureBinder.applyBoundVariables; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_MISSING; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.INVALID_VIEW; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.SYNTAX_ERROR; -import static io.prestosql.spi.connector.ConnectorViewDefinition.ViewColumn; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.function.OperatorType.IS_DISTINCT_FROM; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypeSignatures; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.QualifiedObjectName.convertFromSchemaTableName; +import static io.trino.metadata.Signature.mangleOperatorName; +import static io.trino.metadata.SignatureBinder.applyBoundVariables; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_MISSING; +import static io.trino.spi.StandardErrorCode.FUNCTION_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.INVALID_VIEW; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.SYNTAX_ERROR; +import static io.trino.spi.connector.ConnectorViewDefinition.ViewColumn; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.function.OperatorType.IS_DISTINCT_FROM; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypeSignatures; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.lang.String.format; import static java.util.Collections.nCopies; import static java.util.Collections.singletonList; diff --git a/core/trino-main/src/main/java/io/trino/metadata/MetadataUtil.java b/core/trino-main/src/main/java/io/trino/metadata/MetadataUtil.java index b35c8a8cf148..4306761fd72b 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/MetadataUtil.java +++ b/core/trino-main/src/main/java/io/trino/metadata/MetadataUtil.java @@ -16,32 +16,32 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; -import io.prestosql.Session; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.GrantorSpecification; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.PrincipalSpecification; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.Session; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.PrincipalType; +import io.trino.spi.type.Type; +import io.trino.sql.tree.GrantorSpecification; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.PrincipalSpecification; +import io.trino.sql.tree.QualifiedName; import java.util.List; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.MISSING_CATALOG_NAME; -import static io.prestosql.spi.StandardErrorCode.MISSING_SCHEMA_NAME; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.SYNTAX_ERROR; -import static io.prestosql.spi.security.PrincipalType.ROLE; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.spi.StandardErrorCode.MISSING_CATALOG_NAME; +import static io.trino.spi.StandardErrorCode.MISSING_SCHEMA_NAME; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.SYNTAX_ERROR; +import static io.trino.spi.security.PrincipalType.ROLE; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/metadata/NewTableLayout.java b/core/trino-main/src/main/java/io/trino/metadata/NewTableLayout.java index f7f3b90804a9..37c9475e49e2 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/NewTableLayout.java +++ b/core/trino-main/src/main/java/io/trino/metadata/NewTableLayout.java @@ -15,10 +15,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.sql.planner.PartitioningHandle; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.sql.planner.PartitioningHandle; import java.util.List; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/metadata/OperatorNotFoundException.java b/core/trino-main/src/main/java/io/trino/metadata/OperatorNotFoundException.java index d0c56c73fbd1..462827a3ef9a 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/OperatorNotFoundException.java +++ b/core/trino-main/src/main/java/io/trino/metadata/OperatorNotFoundException.java @@ -15,15 +15,15 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.PrestoException; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.util.List; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.OPERATOR_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.OPERATOR_NOT_FOUND; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/metadata/OutputTableHandle.java b/core/trino-main/src/main/java/io/trino/metadata/OutputTableHandle.java index ca4dfb2d4d9e..3c659f7786ac 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/OutputTableHandle.java +++ b/core/trino-main/src/main/java/io/trino/metadata/OutputTableHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/metadata/PolymorphicScalarFunction.java b/core/trino-main/src/main/java/io/trino/metadata/PolymorphicScalarFunction.java index 333f72c3e0eb..dc3ad092d1bf 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/PolymorphicScalarFunction.java +++ b/core/trino-main/src/main/java/io/trino/metadata/PolymorphicScalarFunction.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Primitives; -import io.prestosql.metadata.PolymorphicScalarFunctionBuilder.MethodAndNativeContainerTypes; -import io.prestosql.metadata.PolymorphicScalarFunctionBuilder.MethodsGroup; -import io.prestosql.metadata.PolymorphicScalarFunctionBuilder.SpecializeContext; -import io.prestosql.operator.scalar.ChoicesScalarFunctionImplementation; -import io.prestosql.operator.scalar.ChoicesScalarFunctionImplementation.ScalarImplementationChoice; -import io.prestosql.operator.scalar.ScalarFunctionImplementation; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention; -import io.prestosql.spi.type.Type; -import io.prestosql.util.Reflection; +import io.trino.metadata.PolymorphicScalarFunctionBuilder.MethodAndNativeContainerTypes; +import io.trino.metadata.PolymorphicScalarFunctionBuilder.MethodsGroup; +import io.trino.metadata.PolymorphicScalarFunctionBuilder.SpecializeContext; +import io.trino.operator.scalar.ChoicesScalarFunctionImplementation; +import io.trino.operator.scalar.ChoicesScalarFunctionImplementation.ScalarImplementationChoice; +import io.trino.operator.scalar.ScalarFunctionImplementation; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.spi.function.InvocationConvention.InvocationReturnConvention; +import io.trino.spi.type.Type; +import io.trino.util.Reflection; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; diff --git a/core/trino-main/src/main/java/io/trino/metadata/PolymorphicScalarFunctionBuilder.java b/core/trino-main/src/main/java/io/trino/metadata/PolymorphicScalarFunctionBuilder.java index 29f6cac552b2..ce966738e9ec 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/PolymorphicScalarFunctionBuilder.java +++ b/core/trino-main/src/main/java/io/trino/metadata/PolymorphicScalarFunctionBuilder.java @@ -14,11 +14,11 @@ package io.trino.metadata; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.PolymorphicScalarFunction.PolymorphicScalarFunctionChoice; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; +import io.trino.metadata.PolymorphicScalarFunction.PolymorphicScalarFunctionChoice; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.spi.function.InvocationConvention.InvocationReturnConvention; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; import java.lang.reflect.Method; import java.util.ArrayList; @@ -31,11 +31,11 @@ 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.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.mangleOperatorName; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.mangleOperatorName; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; import static java.util.Arrays.asList; import static java.util.Collections.nCopies; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/metadata/ProcedureRegistry.java b/core/trino-main/src/main/java/io/trino/metadata/ProcedureRegistry.java index 394ad84a7bac..f198b672d577 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/ProcedureRegistry.java +++ b/core/trino-main/src/main/java/io/trino/metadata/ProcedureRegistry.java @@ -15,15 +15,15 @@ import com.google.common.collect.Maps; import com.google.common.primitives.Primitives; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; +import io.trino.connector.CatalogName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; import javax.annotation.concurrent.ThreadSafe; @@ -34,12 +34,12 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.StandardErrorCode.PROCEDURE_NOT_FOUND; -import static io.prestosql.spi.procedure.Procedure.Argument; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.PROCEDURE_NOT_FOUND; +import static io.trino.spi.procedure.Procedure.Argument; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/main/java/io/trino/metadata/QualifiedObjectName.java b/core/trino-main/src/main/java/io/trino/metadata/QualifiedObjectName.java index 1719bf72f4e1..3ab21e6c6603 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/QualifiedObjectName.java +++ b/core/trino-main/src/main/java/io/trino/metadata/QualifiedObjectName.java @@ -17,10 +17,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.CatalogSchemaRoutineName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.SchemaRoutineName; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.CatalogSchemaRoutineName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.SchemaRoutineName; +import io.trino.spi.connector.SchemaTableName; import javax.annotation.concurrent.Immutable; @@ -28,7 +28,7 @@ import java.util.function.Function; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.metadata.MetadataUtil.checkObjectName; +import static io.trino.metadata.MetadataUtil.checkObjectName; import static java.util.Objects.requireNonNull; @Immutable diff --git a/core/trino-main/src/main/java/io/trino/metadata/QualifiedTablePrefix.java b/core/trino-main/src/main/java/io/trino/metadata/QualifiedTablePrefix.java index 02a6e2532332..e500720ac777 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/QualifiedTablePrefix.java +++ b/core/trino-main/src/main/java/io/trino/metadata/QualifiedTablePrefix.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.SchemaTablePrefix; import javax.annotation.concurrent.Immutable; @@ -23,9 +23,9 @@ import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.metadata.MetadataUtil.checkCatalogName; -import static io.prestosql.metadata.MetadataUtil.checkSchemaName; -import static io.prestosql.metadata.MetadataUtil.checkTableName; +import static io.trino.metadata.MetadataUtil.checkCatalogName; +import static io.trino.metadata.MetadataUtil.checkSchemaName; +import static io.trino.metadata.MetadataUtil.checkTableName; @Immutable public class QualifiedTablePrefix diff --git a/core/trino-main/src/main/java/io/trino/metadata/RemoteHandleResolver.java b/core/trino-main/src/main/java/io/trino/metadata/RemoteHandleResolver.java index 4c07e96c9865..dc3b00b16fed 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/RemoteHandleResolver.java +++ b/core/trino-main/src/main/java/io/trino/metadata/RemoteHandleResolver.java @@ -13,15 +13,15 @@ */ package io.trino.metadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.split.RemoteSplit; -import io.prestosql.sql.planner.SystemPartitioningHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.split.RemoteSplit; +import io.trino.sql.planner.SystemPartitioningHandle; public class RemoteHandleResolver implements ConnectorHandleResolver diff --git a/core/trino-main/src/main/java/io/trino/metadata/RemoteTransactionHandle.java b/core/trino-main/src/main/java/io/trino/metadata/RemoteTransactionHandle.java index bbd215c39433..9af92300a871 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/RemoteTransactionHandle.java +++ b/core/trino-main/src/main/java/io/trino/metadata/RemoteTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.metadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum RemoteTransactionHandle implements ConnectorTransactionHandle diff --git a/core/trino-main/src/main/java/io/trino/metadata/ResolvedFunction.java b/core/trino-main/src/main/java/io/trino/metadata/ResolvedFunction.java index 943e47230ee5..2ce765b4c09d 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/ResolvedFunction.java +++ b/core/trino-main/src/main/java/io/trino/metadata/ResolvedFunction.java @@ -23,13 +23,13 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.type.TypeDeserializer; -import io.prestosql.type.TypeSignatureDeserializer; -import io.prestosql.type.TypeSignatureKeyDeserializer; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.tree.QualifiedName; +import io.trino.type.TypeDeserializer; +import io.trino.type.TypeSignatureDeserializer; +import io.trino.type.TypeSignatureKeyDeserializer; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/metadata/ResolvedIndex.java b/core/trino-main/src/main/java/io/trino/metadata/ResolvedIndex.java index fffb6fda1a2b..0e042a9ed087 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/ResolvedIndex.java +++ b/core/trino-main/src/main/java/io/trino/metadata/ResolvedIndex.java @@ -13,11 +13,11 @@ */ package io.trino.metadata; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorResolvedIndex; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorResolvedIndex; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.predicate.TupleDomain; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/metadata/SchemaPropertyManager.java b/core/trino-main/src/main/java/io/trino/metadata/SchemaPropertyManager.java index a40a1ccfb96d..fffe8ca55a36 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/SchemaPropertyManager.java +++ b/core/trino-main/src/main/java/io/trino/metadata/SchemaPropertyManager.java @@ -13,7 +13,7 @@ */ package io.trino.metadata; -import static io.prestosql.spi.StandardErrorCode.INVALID_SCHEMA_PROPERTY; +import static io.trino.spi.StandardErrorCode.INVALID_SCHEMA_PROPERTY; public class SchemaPropertyManager extends AbstractPropertyManager diff --git a/core/trino-main/src/main/java/io/trino/metadata/SessionPropertyManager.java b/core/trino-main/src/main/java/io/trino/metadata/SessionPropertyManager.java index eaab8afb7a9f..e6bed098d50a 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/SessionPropertyManager.java +++ b/core/trino-main/src/main/java/io/trino/metadata/SessionPropertyManager.java @@ -17,26 +17,26 @@ import com.google.common.collect.Maps; import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.connector.CatalogName; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.planner.ParameterRewriter; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Parameter; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.connector.CatalogName; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.sql.planner.ParameterRewriter; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Parameter; import javax.annotation.Nullable; import javax.inject.Inject; @@ -51,9 +51,9 @@ import static com.google.common.base.MoreObjects.firstNonNull; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; -import static io.prestosql.sql.planner.ExpressionInterpreter.evaluateConstantExpression; +import static io.trino.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; +import static io.trino.spi.type.TypeUtils.writeNativeValue; +import static io.trino.sql.planner.ExpressionInterpreter.evaluateConstantExpression; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/metadata/Signature.java b/core/trino-main/src/main/java/io/trino/metadata/Signature.java index c5065cd249b3..4c92edf31a13 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/Signature.java +++ b/core/trino-main/src/main/java/io/trino/metadata/Signature.java @@ -19,8 +19,8 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.TypeSignature; import java.util.List; import java.util.Locale; diff --git a/core/trino-main/src/main/java/io/trino/metadata/SignatureBinder.java b/core/trino-main/src/main/java/io/trino/metadata/SignatureBinder.java index 03552077868a..34099cf9ace5 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/SignatureBinder.java +++ b/core/trino-main/src/main/java/io/trino/metadata/SignatureBinder.java @@ -17,18 +17,18 @@ import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.ParameterKind; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.sql.analyzer.TypeSignatureProvider; -import io.prestosql.type.FunctionType; -import io.prestosql.type.JsonType; -import io.prestosql.type.TypeCoercion; -import io.prestosql.type.UnknownType; +import io.trino.spi.PrestoException; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.ParameterKind; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.sql.analyzer.TypeSignatureProvider; +import io.trino.type.FunctionType; +import io.trino.type.JsonType; +import io.trino.type.TypeCoercion; +import io.trino.type.UnknownType; import java.util.Collections; import java.util.HashMap; @@ -43,14 +43,14 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSortedMap.toImmutableSortedMap; -import static io.prestosql.metadata.SignatureBinder.RelationshipType.EXACT; -import static io.prestosql.metadata.SignatureBinder.RelationshipType.EXPLICIT_COERCION_FROM; -import static io.prestosql.metadata.SignatureBinder.RelationshipType.EXPLICIT_COERCION_TO; -import static io.prestosql.metadata.SignatureBinder.RelationshipType.IMPLICIT_COERCION; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.type.TypeCalculation.calculateLiteralValue; -import static io.prestosql.type.TypeCoercion.isCovariantTypeBase; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.metadata.SignatureBinder.RelationshipType.EXACT; +import static io.trino.metadata.SignatureBinder.RelationshipType.EXPLICIT_COERCION_FROM; +import static io.trino.metadata.SignatureBinder.RelationshipType.EXPLICIT_COERCION_TO; +import static io.trino.metadata.SignatureBinder.RelationshipType.IMPLICIT_COERCION; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.type.TypeCalculation.calculateLiteralValue; +import static io.trino.type.TypeCoercion.isCovariantTypeBase; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.String.CASE_INSENSITIVE_ORDER; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/metadata/SignatureBuilder.java b/core/trino-main/src/main/java/io/trino/metadata/SignatureBuilder.java index 797fc7317f1b..97c0face6d42 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/SignatureBuilder.java +++ b/core/trino-main/src/main/java/io/trino/metadata/SignatureBuilder.java @@ -14,12 +14,12 @@ package io.trino.metadata; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.TypeSignature; import java.util.List; -import static io.prestosql.metadata.Signature.mangleOperatorName; +import static io.trino.metadata.Signature.mangleOperatorName; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/metadata/Split.java b/core/trino-main/src/main/java/io/trino/metadata/Split.java index d2f9fcca10ef..a3d586fac72f 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/Split.java +++ b/core/trino-main/src/main/java/io/trino/metadata/Split.java @@ -15,10 +15,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/metadata/SqlAggregationFunction.java b/core/trino-main/src/main/java/io/trino/metadata/SqlAggregationFunction.java index 4478319d2836..1d0e238aa384 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/SqlAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/metadata/SqlAggregationFunction.java @@ -14,11 +14,11 @@ package io.trino.metadata; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.aggregation.AggregationFromAnnotationsParser; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.operator.aggregation.AggregationFromAnnotationsParser; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/metadata/SqlFunction.java b/core/trino-main/src/main/java/io/trino/metadata/SqlFunction.java index 5092d9ab8d9b..690417af5aa2 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/SqlFunction.java +++ b/core/trino-main/src/main/java/io/trino/metadata/SqlFunction.java @@ -13,7 +13,7 @@ */ package io.trino.metadata; -import static io.prestosql.metadata.FunctionDependencyDeclaration.NO_DEPENDENCIES; +import static io.trino.metadata.FunctionDependencyDeclaration.NO_DEPENDENCIES; public interface SqlFunction { diff --git a/core/trino-main/src/main/java/io/trino/metadata/SqlOperator.java b/core/trino-main/src/main/java/io/trino/metadata/SqlOperator.java index 953bba6b83f9..7dc79ecc3222 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/SqlOperator.java +++ b/core/trino-main/src/main/java/io/trino/metadata/SqlOperator.java @@ -13,18 +13,18 @@ */ package io.trino.metadata; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.TypeSignature; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.mangleOperatorName; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.function.OperatorType.IS_DISTINCT_FROM; -import static io.prestosql.spi.function.OperatorType.SUBSCRIPT; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.mangleOperatorName; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.function.OperatorType.IS_DISTINCT_FROM; +import static io.trino.spi.function.OperatorType.SUBSCRIPT; import static java.util.Collections.nCopies; public abstract class SqlOperator diff --git a/core/trino-main/src/main/java/io/trino/metadata/SqlScalarFunction.java b/core/trino-main/src/main/java/io/trino/metadata/SqlScalarFunction.java index 82168548f86a..e5e6b2d3e62e 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/SqlScalarFunction.java +++ b/core/trino-main/src/main/java/io/trino/metadata/SqlScalarFunction.java @@ -13,7 +13,7 @@ */ package io.trino.metadata; -import io.prestosql.operator.scalar.ScalarFunctionImplementation; +import io.trino.operator.scalar.ScalarFunctionImplementation; public abstract class SqlScalarFunction implements SqlFunction diff --git a/core/trino-main/src/main/java/io/trino/metadata/StaticCatalogStore.java b/core/trino-main/src/main/java/io/trino/metadata/StaticCatalogStore.java index e3acd6574a0c..67aac3cb3161 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/StaticCatalogStore.java +++ b/core/trino-main/src/main/java/io/trino/metadata/StaticCatalogStore.java @@ -18,7 +18,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.io.Files; import io.airlift.log.Logger; -import io.prestosql.connector.ConnectorManager; +import io.trino.connector.ConnectorManager; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/metadata/TableHandle.java b/core/trino-main/src/main/java/io/trino/metadata/TableHandle.java index da22dc16b8e4..d6918c2e7c79 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/TableHandle.java +++ b/core/trino-main/src/main/java/io/trino/metadata/TableHandle.java @@ -15,10 +15,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Objects; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/metadata/TableLayoutResult.java b/core/trino-main/src/main/java/io/trino/metadata/TableLayoutResult.java index 708d778d9732..f790a1f2dbda 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/TableLayoutResult.java +++ b/core/trino-main/src/main/java/io/trino/metadata/TableLayoutResult.java @@ -14,9 +14,9 @@ package io.trino.metadata; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/metadata/TableMetadata.java b/core/trino-main/src/main/java/io/trino/metadata/TableMetadata.java index 524c1299d552..c2f94c7a5c72 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/TableMetadata.java +++ b/core/trino-main/src/main/java/io/trino/metadata/TableMetadata.java @@ -13,10 +13,10 @@ */ package io.trino.metadata; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/metadata/TableProperties.java b/core/trino-main/src/main/java/io/trino/metadata/TableProperties.java index 4dec533cc645..4cafe0680dee 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/TableProperties.java +++ b/core/trino-main/src/main/java/io/trino/metadata/TableProperties.java @@ -14,14 +14,14 @@ package io.trino.metadata; import com.google.common.collect.ImmutableList; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DiscretePredicates; -import io.prestosql.spi.connector.LocalProperty; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.sql.planner.PartitioningHandle; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DiscretePredicates; +import io.trino.spi.connector.LocalProperty; +import io.trino.spi.predicate.TupleDomain; +import io.trino.sql.planner.PartitioningHandle; import java.util.List; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/metadata/TablePropertyManager.java b/core/trino-main/src/main/java/io/trino/metadata/TablePropertyManager.java index 70006a5fd7d1..ec4fae8aa3c0 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/TablePropertyManager.java +++ b/core/trino-main/src/main/java/io/trino/metadata/TablePropertyManager.java @@ -13,7 +13,7 @@ */ package io.trino.metadata; -import static io.prestosql.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; +import static io.trino.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; public class TablePropertyManager extends AbstractPropertyManager 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 2e0b8138e95d..7463cbe6a5cf 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,20 +17,20 @@ import com.google.common.cache.CacheBuilder; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.UncheckedExecutionException; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeNotFoundException; -import io.prestosql.spi.type.TypeParameter; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.type.CharParametricType; -import io.prestosql.type.DecimalParametricType; -import io.prestosql.type.Re2JRegexpType; -import io.prestosql.type.VarcharParametricType; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeNotFoundException; +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; +import io.trino.type.Re2JRegexpType; +import io.trino.type.VarcharParametricType; import javax.annotation.concurrent.ThreadSafe; @@ -45,40 +45,40 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.P4HyperLogLogType.P4_HYPER_LOG_LOG; -import static io.prestosql.spi.type.QuantileDigestParametricType.QDIGEST; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeParametricType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneParametricType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampParametricType.TIMESTAMP; -import static io.prestosql.spi.type.TimestampWithTimeZoneParametricType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toTypeSignature; -import static io.prestosql.type.ArrayParametricType.ARRAY; -import static io.prestosql.type.CodePointsType.CODE_POINTS; -import static io.prestosql.type.ColorType.COLOR; -import static io.prestosql.type.FunctionParametricType.FUNCTION; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; -import static io.prestosql.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; -import static io.prestosql.type.IpAddressType.IPADDRESS; -import static io.prestosql.type.JoniRegexpType.JONI_REGEXP; -import static io.prestosql.type.JsonPathType.JSON_PATH; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.type.LikePatternType.LIKE_PATTERN; -import static io.prestosql.type.MapParametricType.MAP; -import static io.prestosql.type.RowParametricType.ROW; -import static io.prestosql.type.TDigestType.TDIGEST; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.type.UuidType.UUID; -import static io.prestosql.type.setdigest.SetDigestType.SET_DIGEST; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.P4HyperLogLogType.P4_HYPER_LOG_LOG; +import static io.trino.spi.type.QuantileDigestParametricType.QDIGEST; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeParametricType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneParametricType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampParametricType.TIMESTAMP; +import static io.trino.spi.type.TimestampWithTimeZoneParametricType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toTypeSignature; +import static io.trino.type.ArrayParametricType.ARRAY; +import static io.trino.type.CodePointsType.CODE_POINTS; +import static io.trino.type.ColorType.COLOR; +import static io.trino.type.FunctionParametricType.FUNCTION; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; +import static io.trino.type.IpAddressType.IPADDRESS; +import static io.trino.type.JoniRegexpType.JONI_REGEXP; +import static io.trino.type.JsonPathType.JSON_PATH; +import static io.trino.type.JsonType.JSON; +import static io.trino.type.LikePatternType.LIKE_PATTERN; +import static io.trino.type.MapParametricType.MAP; +import static io.trino.type.RowParametricType.ROW; +import static io.trino.type.TDigestType.TDIGEST; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.type.UuidType.UUID; +import static io.trino.type.setdigest.SetDigestType.SET_DIGEST; import static java.util.Objects.requireNonNull; @ThreadSafe diff --git a/core/trino-main/src/main/java/io/trino/metadata/TypeVariableConstraint.java b/core/trino-main/src/main/java/io/trino/metadata/TypeVariableConstraint.java index 9973e16216f8..6ffd1873a117 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/TypeVariableConstraint.java +++ b/core/trino-main/src/main/java/io/trino/metadata/TypeVariableConstraint.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Joiner; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignature; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/metadata/TypeVariables.java b/core/trino-main/src/main/java/io/trino/metadata/TypeVariables.java index e8ddb06297e8..47a48d125d08 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/TypeVariables.java +++ b/core/trino-main/src/main/java/io/trino/metadata/TypeVariables.java @@ -13,7 +13,7 @@ */ package io.trino.metadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; interface TypeVariables { diff --git a/core/trino-main/src/main/java/io/trino/metadata/UndeclaredDependencyException.java b/core/trino-main/src/main/java/io/trino/metadata/UndeclaredDependencyException.java index eb6861ad45b3..8b05a426d911 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/UndeclaredDependencyException.java +++ b/core/trino-main/src/main/java/io/trino/metadata/UndeclaredDependencyException.java @@ -13,9 +13,9 @@ */ package io.trino.metadata; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; public class UndeclaredDependencyException extends PrestoException diff --git a/core/trino-main/src/main/java/io/trino/operator/AggregationOperator.java b/core/trino-main/src/main/java/io/trino/operator/AggregationOperator.java index 69b99e7fb415..48290ba4abcb 100644 --- a/core/trino-main/src/main/java/io/trino/operator/AggregationOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/AggregationOperator.java @@ -14,14 +14,14 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.aggregation.AccumulatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.aggregation.AccumulatorFactory; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/Aggregator.java b/core/trino-main/src/main/java/io/trino/operator/Aggregator.java index bdaf1b59d76d..f218afdc8860 100644 --- a/core/trino-main/src/main/java/io/trino/operator/Aggregator.java +++ b/core/trino-main/src/main/java/io/trino/operator/Aggregator.java @@ -13,12 +13,12 @@ */ package io.trino.operator; -import io.prestosql.operator.aggregation.Accumulator; -import io.prestosql.operator.aggregation.AccumulatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.AggregationNode; +import io.trino.operator.aggregation.Accumulator; +import io.trino.operator.aggregation.AccumulatorFactory; +import io.trino.spi.Page; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.AggregationNode; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/trino-main/src/main/java/io/trino/operator/ArrayPositionLinks.java b/core/trino-main/src/main/java/io/trino/operator/ArrayPositionLinks.java index f8acd7ebd73e..5854b7dec4ae 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ArrayPositionLinks.java +++ b/core/trino-main/src/main/java/io/trino/operator/ArrayPositionLinks.java @@ -15,7 +15,7 @@ import io.airlift.slice.Slices; import io.airlift.slice.XxHash64; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import org.openjdk.jol.info.ClassLayout; import java.util.Arrays; diff --git a/core/trino-main/src/main/java/io/trino/operator/AssignUniqueIdOperator.java b/core/trino-main/src/main/java/io/trino/operator/AssignUniqueIdOperator.java index 2501cd8aa3be..8c4484e82733 100644 --- a/core/trino-main/src/main/java/io/trino/operator/AssignUniqueIdOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/AssignUniqueIdOperator.java @@ -13,13 +13,13 @@ */ package io.trino.operator; -import io.prestosql.execution.TaskId; -import io.prestosql.operator.BasicWorkProcessorOperatorAdapter.BasicAdapterWorkProcessorOperatorFactory; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.TaskId; +import io.trino.operator.BasicWorkProcessorOperatorAdapter.BasicAdapterWorkProcessorOperatorFactory; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.Nullable; @@ -27,10 +27,10 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.operator.BasicWorkProcessorOperatorAdapter.createAdapterOperatorFactory; -import static io.prestosql.operator.WorkProcessor.TransformationState.finished; -import static io.prestosql.operator.WorkProcessor.TransformationState.ofResult; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.operator.BasicWorkProcessorOperatorAdapter.createAdapterOperatorFactory; +import static io.trino.operator.WorkProcessor.TransformationState.finished; +import static io.trino.operator.WorkProcessor.TransformationState.ofResult; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; public class AssignUniqueIdOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/BasicWorkProcessorOperatorAdapter.java b/core/trino-main/src/main/java/io/trino/operator/BasicWorkProcessorOperatorAdapter.java index 1e03af8b20dd..4e296c85c252 100644 --- a/core/trino-main/src/main/java/io/trino/operator/BasicWorkProcessorOperatorAdapter.java +++ b/core/trino-main/src/main/java/io/trino/operator/BasicWorkProcessorOperatorAdapter.java @@ -13,11 +13,11 @@ */ package io.trino.operator; -import io.prestosql.execution.Lifespan; -import io.prestosql.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperator; -import io.prestosql.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperator; +import io.trino.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperatorFactory; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/operator/BigintGroupByHash.java b/core/trino-main/src/main/java/io/trino/operator/BigintGroupByHash.java index 508e67923b1f..2c9690530224 100644 --- a/core/trino-main/src/main/java/io/trino/operator/BigintGroupByHash.java +++ b/core/trino-main/src/main/java/io/trino/operator/BigintGroupByHash.java @@ -15,26 +15,26 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; -import io.prestosql.array.IntBigArray; -import io.prestosql.array.LongBigArray; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.AbstractLongType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.Type; +import io.trino.array.IntBigArray; +import io.trino.array.LongBigArray; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.AbstractLongType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.type.TypeUtils.NULL_HASH_CODE; -import static io.prestosql.util.HashCollisionsEstimator.estimateNumberOfHashCollisions; +import static io.trino.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.type.TypeUtils.NULL_HASH_CODE; +import static io.trino.util.HashCollisionsEstimator.estimateNumberOfHashCollisions; import static it.unimi.dsi.fastutil.HashCommon.arraySize; import static it.unimi.dsi.fastutil.HashCommon.murmurHash3; import static java.lang.Math.toIntExact; diff --git a/core/trino-main/src/main/java/io/trino/operator/BucketPartitionFunction.java b/core/trino-main/src/main/java/io/trino/operator/BucketPartitionFunction.java index 9dc218194bfe..2dcd87cde901 100644 --- a/core/trino-main/src/main/java/io/trino/operator/BucketPartitionFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/BucketPartitionFunction.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.BucketFunction; +import io.trino.spi.Page; +import io.trino.spi.connector.BucketFunction; import java.util.stream.IntStream; diff --git a/core/trino-main/src/main/java/io/trino/operator/ChannelSet.java b/core/trino-main/src/main/java/io/trino/operator/ChannelSet.java index 63c473c7e384..dcc9fd9914f3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ChannelSet.java +++ b/core/trino-main/src/main/java/io/trino/operator/ChannelSet.java @@ -15,18 +15,18 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.isDictionaryAggregationEnabled; -import static io.prestosql.operator.GroupByHash.createGroupByHash; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.SystemSessionProperties.isDictionaryAggregationEnabled; +import static io.trino.operator.GroupByHash.createGroupByHash; +import static io.trino.type.UnknownType.UNKNOWN; import static java.util.Objects.requireNonNull; public class ChannelSet diff --git a/core/trino-main/src/main/java/io/trino/operator/DeleteOperator.java b/core/trino-main/src/main/java/io/trino/operator/DeleteOperator.java index 317f4df86508..a700c2b62459 100644 --- a/core/trino-main/src/main/java/io/trino/operator/DeleteOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/DeleteOperator.java @@ -16,13 +16,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Collection; import java.util.List; @@ -32,8 +32,8 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.MoreFutures.toListenableFuture; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.util.Objects.requireNonNull; public class DeleteOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/DevNullOperator.java b/core/trino-main/src/main/java/io/trino/operator/DevNullOperator.java index ca598d09a019..297be0f6385a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/DevNullOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/DevNullOperator.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/DistinctLimitOperator.java b/core/trino-main/src/main/java/io/trino/operator/DistinctLimitOperator.java index 46cc8604d472..ccec3de8146d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/DistinctLimitOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/DistinctLimitOperator.java @@ -16,13 +16,13 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.type.BlockTypeOperators; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; @@ -31,8 +31,8 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verifyNotNull; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.SystemSessionProperties.isDictionaryAggregationEnabled; -import static io.prestosql.operator.GroupByHash.createGroupByHash; +import static io.trino.SystemSessionProperties.isDictionaryAggregationEnabled; +import static io.trino.operator.GroupByHash.createGroupByHash; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/Driver.java b/core/trino-main/src/main/java/io/trino/operator/Driver.java index 56b40d09b8e2..0dcf3968e6ea 100644 --- a/core/trino-main/src/main/java/io/trino/operator/Driver.java +++ b/core/trino-main/src/main/java/io/trino/operator/Driver.java @@ -22,13 +22,13 @@ import com.google.common.util.concurrent.SettableFuture; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.execution.ScheduledSplit; -import io.prestosql.execution.TaskSource; -import io.prestosql.metadata.Split; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.ScheduledSplit; +import io.trino.execution.TaskSource; +import io.trino.metadata.Split; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.concurrent.GuardedBy; @@ -49,8 +49,8 @@ import static com.google.common.base.Throwables.throwIfUnchecked; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.operator.Operator.NOT_BLOCKED; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.operator.Operator.NOT_BLOCKED; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.lang.Boolean.TRUE; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/DriverContext.java b/core/trino-main/src/main/java/io/trino/operator/DriverContext.java index 6b1762f14e0b..45d3d308f1be 100644 --- a/core/trino-main/src/main/java/io/trino/operator/DriverContext.java +++ b/core/trino-main/src/main/java/io/trino/operator/DriverContext.java @@ -19,13 +19,13 @@ import io.airlift.stats.CounterStat; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.TaskId; -import io.prestosql.memory.QueryContextVisitor; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.operator.OperationTimer.OperationTiming; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.execution.Lifespan; +import io.trino.execution.TaskId; +import io.trino.memory.QueryContextVisitor; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.operator.OperationTimer.OperationTiming; +import io.trino.sql.planner.plan.PlanNodeId; import org.joda.time.DateTime; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/DriverFactory.java b/core/trino-main/src/main/java/io/trino/operator/DriverFactory.java index 4ac9ffb855d0..7df8bc810a95 100644 --- a/core/trino-main/src/main/java/io/trino/operator/DriverFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/DriverFactory.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Sets; -import io.prestosql.execution.Lifespan; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.HashSet; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/DriverStats.java b/core/trino-main/src/main/java/io/trino/operator/DriverStats.java index e898427a1e7d..e31ccd827c18 100644 --- a/core/trino-main/src/main/java/io/trino/operator/DriverStats.java +++ b/core/trino-main/src/main/java/io/trino/operator/DriverStats.java @@ -19,7 +19,7 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.Lifespan; +import io.trino.execution.Lifespan; import org.joda.time.DateTime; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/operator/DynamicFilterSourceOperator.java b/core/trino-main/src/main/java/io/trino/operator/DynamicFilterSourceOperator.java index 593f68c6b296..bfeb9333fc8b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/DynamicFilterSourceOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/DynamicFilterSourceOperator.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.units.DataSize; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.operator.aggregation.TypedSet; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; import javax.annotation.Nullable; @@ -36,12 +36,12 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.operator.aggregation.TypedSet.createEqualityTypedSet; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.TypeUtils.isFloatingPointNaN; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; +import static io.trino.operator.aggregation.TypedSet.createEqualityTypedSet; +import static io.trino.spi.predicate.Range.range; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.TypeUtils.isFloatingPointNaN; +import static io.trino.spi.type.TypeUtils.readNativeValue; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toSet; diff --git a/core/trino-main/src/main/java/io/trino/operator/EmptyLookupSource.java b/core/trino-main/src/main/java/io/trino/operator/EmptyLookupSource.java index 0b27e77d30c7..2e8c572bd786 100644 --- a/core/trino-main/src/main/java/io/trino/operator/EmptyLookupSource.java +++ b/core/trino-main/src/main/java/io/trino/operator/EmptyLookupSource.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; final class EmptyLookupSource implements LookupSource diff --git a/core/trino-main/src/main/java/io/trino/operator/EnforceSingleRowOperator.java b/core/trino-main/src/main/java/io/trino/operator/EnforceSingleRowOperator.java index 9a374c21092f..b6e16926f557 100644 --- a/core/trino-main/src/main/java/io/trino/operator/EnforceSingleRowOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/EnforceSingleRowOperator.java @@ -13,15 +13,15 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.ByteArrayBlock; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.ByteArrayBlock; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Optional; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.StandardErrorCode.SUBQUERY_MULTIPLE_ROWS; +import static io.trino.spi.StandardErrorCode.SUBQUERY_MULTIPLE_ROWS; import static java.util.Objects.requireNonNull; public class EnforceSingleRowOperator 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 387893eec731..82929bc8a9fe 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 @@ -20,12 +20,12 @@ import io.airlift.http.client.HttpClient; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.buffer.PageCodecMarker; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.HttpPageBufferClient.ClientCallback; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.sql.analyzer.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 7dfd645fbe55..61160089cec0 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.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.analyzer.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/ExchangeClientStatus.java b/core/trino-main/src/main/java/io/trino/operator/ExchangeClientStatus.java index 4a882de032ae..dac62e6a0f0e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ExchangeClientStatus.java +++ b/core/trino-main/src/main/java/io/trino/operator/ExchangeClientStatus.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.util.Mergeable; +import io.trino.util.Mergeable; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/ExchangeClientSupplier.java b/core/trino-main/src/main/java/io/trino/operator/ExchangeClientSupplier.java index 129b4e8b5c6f..54b9f7802bdf 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ExchangeClientSupplier.java +++ b/core/trino-main/src/main/java/io/trino/operator/ExchangeClientSupplier.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.memory.context.LocalMemoryContext; +import io.trino.memory.context.LocalMemoryContext; public interface ExchangeClientSupplier { diff --git a/core/trino-main/src/main/java/io/trino/operator/ExchangeOperator.java b/core/trino-main/src/main/java/io/trino/operator/ExchangeOperator.java index cf0185dec8c1..7d45a789510e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ExchangeOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/ExchangeOperator.java @@ -14,15 +14,15 @@ package io.trino.operator; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.metadata.Split; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.split.RemoteSplit; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.connector.CatalogName; +import io.trino.execution.buffer.PagesSerde; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.execution.buffer.SerializedPage; +import io.trino.metadata.Split; +import io.trino.spi.Page; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.split.RemoteSplit; +import io.trino.sql.planner.plan.PlanNodeId; import java.net.URI; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/operator/ExplainAnalyzeOperator.java b/core/trino-main/src/main/java/io/trino/operator/ExplainAnalyzeOperator.java index c30fb5d43706..631249ebff05 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ExplainAnalyzeOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/ExplainAnalyzeOperator.java @@ -14,21 +14,21 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryPerformanceFetcher; -import io.prestosql.execution.StageId; -import io.prestosql.execution.StageInfo; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryPerformanceFetcher; +import io.trino.execution.StageId; +import io.trino.execution.StageInfo; +import io.trino.metadata.Metadata; +import io.trino.spi.Page; +import io.trino.spi.block.BlockBuilder; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.concurrent.TimeUnit; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.planprinter.PlanPrinter.textDistributedPlan; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.planprinter.PlanPrinter.textDistributedPlan; import static java.util.Objects.requireNonNull; public class ExplainAnalyzeOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/FilterAndProjectOperator.java b/core/trino-main/src/main/java/io/trino/operator/FilterAndProjectOperator.java index 9c9664eaba78..c419f6e56d8e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/FilterAndProjectOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/FilterAndProjectOperator.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.operator.BasicWorkProcessorOperatorAdapter.BasicAdapterWorkProcessorOperatorFactory; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.operator.BasicWorkProcessorOperatorAdapter.BasicAdapterWorkProcessorOperatorFactory; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.function.Supplier; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.operator.BasicWorkProcessorOperatorAdapter.createAdapterOperatorFactory; -import static io.prestosql.operator.project.MergePages.mergePages; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.operator.BasicWorkProcessorOperatorAdapter.createAdapterOperatorFactory; +import static io.trino.operator.project.MergePages.mergePages; import static java.util.Objects.requireNonNull; public class FilterAndProjectOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/FinishedOperator.java b/core/trino-main/src/main/java/io/trino/operator/FinishedOperator.java index fb4e5d365add..d606eae24453 100644 --- a/core/trino-main/src/main/java/io/trino/operator/FinishedOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/FinishedOperator.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/GroupByHash.java b/core/trino-main/src/main/java/io/trino/operator/GroupByHash.java index 661f01b5adf8..05ba7806e387 100644 --- a/core/trino-main/src/main/java/io/trino/operator/GroupByHash.java +++ b/core/trino-main/src/main/java/io/trino/operator/GroupByHash.java @@ -14,19 +14,19 @@ package io.trino.operator; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.Session; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.isDictionaryAggregationEnabled; -import static io.prestosql.operator.UpdateMemory.NOOP; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.SystemSessionProperties.isDictionaryAggregationEnabled; +import static io.trino.operator.UpdateMemory.NOOP; +import static io.trino.spi.type.BigintType.BIGINT; public interface GroupByHash { diff --git a/core/trino-main/src/main/java/io/trino/operator/GroupByIdBlock.java b/core/trino-main/src/main/java/io/trino/operator/GroupByIdBlock.java index ae7729d27530..2b13b734de1f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/GroupByIdBlock.java +++ b/core/trino-main/src/main/java/io/trino/operator/GroupByIdBlock.java @@ -14,15 +14,15 @@ package io.trino.operator; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import org.openjdk.jol.info.ClassLayout; import java.util.List; import java.util.function.BiConsumer; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Collections.singletonList; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/GroupIdOperator.java b/core/trino-main/src/main/java/io/trino/operator/GroupIdOperator.java index 8f76859f107b..88d4716d9049 100644 --- a/core/trino-main/src/main/java/io/trino/operator/GroupIdOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/GroupIdOperator.java @@ -14,19 +14,19 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Arrays; import java.util.List; import java.util.Map; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; public class GroupIdOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/GroupedTopNBuilder.java b/core/trino-main/src/main/java/io/trino/operator/GroupedTopNBuilder.java index 8f72704f65ee..1be6a190f9d5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/GroupedTopNBuilder.java +++ b/core/trino-main/src/main/java/io/trino/operator/GroupedTopNBuilder.java @@ -15,11 +15,11 @@ import com.google.common.collect.AbstractIterator; import com.google.common.collect.ImmutableList; -import io.prestosql.array.LongBigArray; -import io.prestosql.operator.RowReferencePageManager.LoadCursor; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.Type; +import io.trino.array.LongBigArray; +import io.trino.operator.RowReferencePageManager.LoadCursor; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.Type; import it.unimi.dsi.fastutil.longs.LongComparator; import org.openjdk.jol.info.ClassLayout; @@ -28,7 +28,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Verify.verify; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/GroupedTopNRowNumberAccumulator.java b/core/trino-main/src/main/java/io/trino/operator/GroupedTopNRowNumberAccumulator.java index 9ca468eded19..59e72f551816 100644 --- a/core/trino-main/src/main/java/io/trino/operator/GroupedTopNRowNumberAccumulator.java +++ b/core/trino-main/src/main/java/io/trino/operator/GroupedTopNRowNumberAccumulator.java @@ -14,9 +14,9 @@ package io.trino.operator; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.array.LongBigArray; -import io.prestosql.util.HeapTraversal; -import io.prestosql.util.LongBigArrayFIFOQueue; +import io.trino.array.LongBigArray; +import io.trino.util.HeapTraversal; +import io.trino.util.LongBigArrayFIFOQueue; import it.unimi.dsi.fastutil.longs.LongComparator; import org.openjdk.jol.info.ClassLayout; diff --git a/core/trino-main/src/main/java/io/trino/operator/HashAggregationOperator.java b/core/trino-main/src/main/java/io/trino/operator/HashAggregationOperator.java index 371f8683d75d..bb52869a5a25 100644 --- a/core/trino-main/src/main/java/io/trino/operator/HashAggregationOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/HashAggregationOperator.java @@ -17,22 +17,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.aggregation.Accumulator; -import io.prestosql.operator.aggregation.AccumulatorFactory; -import io.prestosql.operator.aggregation.builder.HashAggregationBuilder; -import io.prestosql.operator.aggregation.builder.InMemoryHashAggregationBuilder; -import io.prestosql.operator.aggregation.builder.SpillableHashAggregationBuilder; -import io.prestosql.operator.scalar.CombineHashFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.SpillerFactory; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.type.BlockTypeOperators; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.aggregation.Accumulator; +import io.trino.operator.aggregation.AccumulatorFactory; +import io.trino.operator.aggregation.builder.HashAggregationBuilder; +import io.trino.operator.aggregation.builder.InMemoryHashAggregationBuilder; +import io.trino.operator.aggregation.builder.SpillableHashAggregationBuilder; +import io.trino.operator.scalar.CombineHashFunction; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.Type; +import io.trino.spiller.SpillerFactory; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; @@ -41,9 +41,9 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.operator.aggregation.builder.InMemoryHashAggregationBuilder.toTypes; -import static io.prestosql.sql.planner.optimizations.HashGenerationOptimizer.INITIAL_HASH_VALUE; -import static io.prestosql.type.TypeUtils.NULL_HASH_CODE; +import static io.trino.operator.aggregation.builder.InMemoryHashAggregationBuilder.toTypes; +import static io.trino.sql.planner.optimizations.HashGenerationOptimizer.INITIAL_HASH_VALUE; +import static io.trino.type.TypeUtils.NULL_HASH_CODE; import static java.util.Objects.requireNonNull; public class HashAggregationOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/HashBuilderOperator.java b/core/trino-main/src/main/java/io/trino/operator/HashBuilderOperator.java index 5f1e35dc7e84..270c43899be3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/HashBuilderOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/HashBuilderOperator.java @@ -17,13 +17,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.Closer; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.execution.Lifespan; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spiller.SingleStreamSpiller; -import io.prestosql.spiller.SingleStreamSpillerFactory; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spiller.SingleStreamSpiller; +import io.trino.spiller.SingleStreamSpillerFactory; +import io.trino.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.Nullable; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/HashCollisionsCounter.java b/core/trino-main/src/main/java/io/trino/operator/HashCollisionsCounter.java index bd7059dcd12b..f42518bc5b25 100644 --- a/core/trino-main/src/main/java/io/trino/operator/HashCollisionsCounter.java +++ b/core/trino-main/src/main/java/io/trino/operator/HashCollisionsCounter.java @@ -15,7 +15,7 @@ import java.util.function.Supplier; -import static io.prestosql.operator.HashCollisionsInfo.createHashCollisionsInfo; +import static io.trino.operator.HashCollisionsInfo.createHashCollisionsInfo; public class HashCollisionsCounter implements Supplier diff --git a/core/trino-main/src/main/java/io/trino/operator/HashCollisionsInfo.java b/core/trino-main/src/main/java/io/trino/operator/HashCollisionsInfo.java index d116340fd426..8c35a8f24835 100644 --- a/core/trino-main/src/main/java/io/trino/operator/HashCollisionsInfo.java +++ b/core/trino-main/src/main/java/io/trino/operator/HashCollisionsInfo.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.util.Mergeable; +import io.trino.util.Mergeable; public class HashCollisionsInfo implements Mergeable, OperatorInfo diff --git a/core/trino-main/src/main/java/io/trino/operator/HashGenerator.java b/core/trino-main/src/main/java/io/trino/operator/HashGenerator.java index 05f73106d3b5..c6fe0e647614 100644 --- a/core/trino-main/src/main/java/io/trino/operator/HashGenerator.java +++ b/core/trino-main/src/main/java/io/trino/operator/HashGenerator.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import static com.google.common.base.Preconditions.checkState; diff --git a/core/trino-main/src/main/java/io/trino/operator/HashSemiJoinOperator.java b/core/trino-main/src/main/java/io/trino/operator/HashSemiJoinOperator.java index cdc6593528f5..c1c67a42f3d3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/HashSemiJoinOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/HashSemiJoinOperator.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.operator.BasicWorkProcessorOperatorAdapter.BasicAdapterWorkProcessorOperatorFactory; -import io.prestosql.operator.SetBuilderOperator.SetSupplier; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.operator.BasicWorkProcessorOperatorAdapter.BasicAdapterWorkProcessorOperatorFactory; +import io.trino.operator.SetBuilderOperator.SetSupplier; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.Nullable; @@ -36,12 +36,12 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.concurrent.MoreFutures.checkSuccess; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.operator.BasicWorkProcessorOperatorAdapter.createAdapterOperatorFactory; -import static io.prestosql.operator.WorkProcessor.TransformationState.blocked; -import static io.prestosql.operator.WorkProcessor.TransformationState.finished; -import static io.prestosql.operator.WorkProcessor.TransformationState.ofResult; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.operator.BasicWorkProcessorOperatorAdapter.createAdapterOperatorFactory; +import static io.trino.operator.WorkProcessor.TransformationState.blocked; +import static io.trino.operator.WorkProcessor.TransformationState.finished; +import static io.trino.operator.WorkProcessor.TransformationState.ofResult; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.util.Objects.requireNonNull; public class HashSemiJoinOperator 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 cf5d44d09c7a..32db7f65d358 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,10 +31,10 @@ import io.airlift.slice.SliceInput; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.server.remotetask.Backoff; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.analyzer.FeaturesConfig.DataIntegrityVerification; +import io.trino.execution.buffer.SerializedPage; +import io.trino.server.remotetask.Backoff; +import io.trino.spi.PrestoException; +import io.trino.sql.analyzer.FeaturesConfig.DataIntegrityVerification; import org.joda.time.DateTime; import javax.annotation.Nullable; @@ -65,24 +65,24 @@ import static io.airlift.http.client.ResponseHandlerUtils.propagate; import static io.airlift.http.client.StatusResponseHandler.StatusResponse; import static io.airlift.http.client.StatusResponseHandler.createStatusResponseHandler; -import static io.prestosql.PrestoMediaTypes.PRESTO_PAGES_TYPE; -import static io.prestosql.client.PrestoHeaders.PRESTO_BUFFER_COMPLETE; -import static io.prestosql.client.PrestoHeaders.PRESTO_MAX_SIZE; -import static io.prestosql.client.PrestoHeaders.PRESTO_PAGE_NEXT_TOKEN; -import static io.prestosql.client.PrestoHeaders.PRESTO_PAGE_TOKEN; -import static io.prestosql.client.PrestoHeaders.PRESTO_TASK_INSTANCE_ID; -import static io.prestosql.execution.buffer.PagesSerdeUtil.NO_CHECKSUM; -import static io.prestosql.execution.buffer.PagesSerdeUtil.calculateChecksum; -import static io.prestosql.execution.buffer.PagesSerdeUtil.readSerializedPages; -import static io.prestosql.operator.HttpPageBufferClient.PagesResponse.createEmptyPagesResponse; -import static io.prestosql.operator.HttpPageBufferClient.PagesResponse.createPagesResponse; -import static io.prestosql.server.PagesResponseWriter.SERIALIZED_PAGES_MAGIC; -import static io.prestosql.spi.HostAddress.fromUri; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.REMOTE_BUFFER_CLOSE_FAILED; -import static io.prestosql.spi.StandardErrorCode.REMOTE_TASK_MISMATCH; -import static io.prestosql.util.Failures.REMOTE_TASK_MISMATCH_ERROR; -import static io.prestosql.util.Failures.WORKER_NODE_ERROR; +import static io.trino.PrestoMediaTypes.PRESTO_PAGES_TYPE; +import static io.trino.client.PrestoHeaders.PRESTO_BUFFER_COMPLETE; +import static io.trino.client.PrestoHeaders.PRESTO_MAX_SIZE; +import static io.trino.client.PrestoHeaders.PRESTO_PAGE_NEXT_TOKEN; +import static io.trino.client.PrestoHeaders.PRESTO_PAGE_TOKEN; +import static io.trino.client.PrestoHeaders.PRESTO_TASK_INSTANCE_ID; +import static io.trino.execution.buffer.PagesSerdeUtil.NO_CHECKSUM; +import static io.trino.execution.buffer.PagesSerdeUtil.calculateChecksum; +import static io.trino.execution.buffer.PagesSerdeUtil.readSerializedPages; +import static io.trino.operator.HttpPageBufferClient.PagesResponse.createEmptyPagesResponse; +import static io.trino.operator.HttpPageBufferClient.PagesResponse.createPagesResponse; +import static io.trino.server.PagesResponseWriter.SERIALIZED_PAGES_MAGIC; +import static io.trino.spi.HostAddress.fromUri; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.REMOTE_BUFFER_CLOSE_FAILED; +import static io.trino.spi.StandardErrorCode.REMOTE_TASK_MISMATCH; +import static io.trino.util.Failures.REMOTE_TASK_MISMATCH_ERROR; +import static io.trino.util.Failures.WORKER_NODE_ERROR; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/InternalJoinFilterFunction.java b/core/trino-main/src/main/java/io/trino/operator/InternalJoinFilterFunction.java index 35d342897687..4dffa74bd6a2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/InternalJoinFilterFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/InternalJoinFilterFunction.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; +import io.trino.spi.Page; public interface InternalJoinFilterFunction { diff --git a/core/trino-main/src/main/java/io/trino/operator/InterpretedHashGenerator.java b/core/trino-main/src/main/java/io/trino/operator/InterpretedHashGenerator.java index 9125376096a2..943b91b30f12 100644 --- a/core/trino-main/src/main/java/io/trino/operator/InterpretedHashGenerator.java +++ b/core/trino-main/src/main/java/io/trino/operator/InterpretedHashGenerator.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.operator.scalar.CombineHashFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.optimizations.HashGenerationOptimizer; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.operator.scalar.CombineHashFunction; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.sql.planner.optimizations.HashGenerationOptimizer; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import java.util.List; import java.util.function.IntFunction; diff --git a/core/trino-main/src/main/java/io/trino/operator/JoinBridgeManager.java b/core/trino-main/src/main/java/io/trino/operator/JoinBridgeManager.java index d41a85d61ea9..312602f367dc 100644 --- a/core/trino-main/src/main/java/io/trino/operator/JoinBridgeManager.java +++ b/core/trino-main/src/main/java/io/trino/operator/JoinBridgeManager.java @@ -17,8 +17,8 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.execution.Lifespan; -import io.prestosql.spi.type.Type; +import io.trino.execution.Lifespan; +import io.trino.spi.type.Type; import java.util.List; import java.util.Map; @@ -30,7 +30,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.util.concurrent.Futures.transform; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; -import static io.prestosql.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; import static java.util.Objects.requireNonNull; public class JoinBridgeManager diff --git a/core/trino-main/src/main/java/io/trino/operator/JoinFilterFunction.java b/core/trino-main/src/main/java/io/trino/operator/JoinFilterFunction.java index 2463a09646c2..785b18db5691 100644 --- a/core/trino-main/src/main/java/io/trino/operator/JoinFilterFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/JoinFilterFunction.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import javax.annotation.concurrent.NotThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/JoinHash.java b/core/trino-main/src/main/java/io/trino/operator/JoinHash.java index a150b92cb374..d9971d8d50f0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/JoinHash.java +++ b/core/trino-main/src/main/java/io/trino/operator/JoinHash.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/operator/JoinHashSupplier.java b/core/trino-main/src/main/java/io/trino/operator/JoinHashSupplier.java index 628d6599d22a..6d9f12e6ea27 100644 --- a/core/trino-main/src/main/java/io/trino/operator/JoinHashSupplier.java +++ b/core/trino-main/src/main/java/io/trino/operator/JoinHashSupplier.java @@ -14,10 +14,10 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; +import io.trino.Session; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; import it.unimi.dsi.fastutil.longs.LongArrayList; import java.util.List; @@ -25,7 +25,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.operator.JoinUtils.channelsToPages; +import static io.trino.operator.JoinUtils.channelsToPages; import static java.util.Objects.requireNonNull; public class JoinHashSupplier diff --git a/core/trino-main/src/main/java/io/trino/operator/JoinOperatorInfo.java b/core/trino-main/src/main/java/io/trino/operator/JoinOperatorInfo.java index ad3ff52a492e..7cf95a9eba19 100644 --- a/core/trino-main/src/main/java/io/trino/operator/JoinOperatorInfo.java +++ b/core/trino-main/src/main/java/io/trino/operator/JoinOperatorInfo.java @@ -15,15 +15,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.operator.LookupJoinOperators.JoinType; -import io.prestosql.util.Mergeable; +import io.trino.operator.LookupJoinOperators.JoinType; +import io.trino.util.Mergeable; import java.util.Optional; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.JoinStatisticsCounter.HISTOGRAM_BUCKETS; +import static io.trino.operator.JoinStatisticsCounter.HISTOGRAM_BUCKETS; public class JoinOperatorInfo implements Mergeable, OperatorInfo diff --git a/core/trino-main/src/main/java/io/trino/operator/JoinProbe.java b/core/trino-main/src/main/java/io/trino/operator/JoinProbe.java index 3dfd96a2ec6a..bacb8c6a07b0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/JoinProbe.java +++ b/core/trino-main/src/main/java/io/trino/operator/JoinProbe.java @@ -13,15 +13,15 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; +import io.trino.spi.Page; +import io.trino.spi.block.Block; import java.util.List; import java.util.Optional; import java.util.OptionalInt; import static com.google.common.base.Verify.verify; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class JoinProbe { diff --git a/core/trino-main/src/main/java/io/trino/operator/JoinStatisticsCounter.java b/core/trino-main/src/main/java/io/trino/operator/JoinStatisticsCounter.java index 6feb64eef112..55f671c53502 100644 --- a/core/trino-main/src/main/java/io/trino/operator/JoinStatisticsCounter.java +++ b/core/trino-main/src/main/java/io/trino/operator/JoinStatisticsCounter.java @@ -13,12 +13,12 @@ */ package io.trino.operator; -import io.prestosql.operator.LookupJoinOperators.JoinType; +import io.trino.operator.LookupJoinOperators.JoinType; import java.util.Optional; import java.util.function.Supplier; -import static io.prestosql.operator.JoinOperatorInfo.createJoinOperatorInfo; +import static io.trino.operator.JoinOperatorInfo.createJoinOperatorInfo; import static java.util.Objects.requireNonNull; public class JoinStatisticsCounter diff --git a/core/trino-main/src/main/java/io/trino/operator/JoinUtils.java b/core/trino-main/src/main/java/io/trino/operator/JoinUtils.java index 7e5a8db79960..201588180161 100644 --- a/core/trino-main/src/main/java/io/trino/operator/JoinUtils.java +++ b/core/trino-main/src/main/java/io/trino/operator/JoinUtils.java @@ -14,26 +14,26 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.sql.planner.optimizations.PlanNodeSearcher; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.util.MorePredicates; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.sql.planner.optimizations.PlanNodeSearcher; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.util.MorePredicates; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPLICATE; -import static io.prestosql.util.MorePredicates.isInstanceOfAny; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPLICATE; +import static io.trino.util.MorePredicates.isInstanceOfAny; /** * This class must be public as it is accessed via join compiler reflection. diff --git a/core/trino-main/src/main/java/io/trino/operator/LimitOperator.java b/core/trino-main/src/main/java/io/trino/operator/LimitOperator.java index 5102a6cab198..5f79b2c1c114 100644 --- a/core/trino-main/src/main/java/io/trino/operator/LimitOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/LimitOperator.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; diff --git a/core/trino-main/src/main/java/io/trino/operator/LookupJoinOperator.java b/core/trino-main/src/main/java/io/trino/operator/LookupJoinOperator.java index 2d74f6b4eabb..bb4daa8b81bd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/LookupJoinOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/LookupJoinOperator.java @@ -16,21 +16,21 @@ import com.google.common.io.Closer; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.operator.JoinProbe.JoinProbeFactory; -import io.prestosql.operator.LookupJoinOperators.JoinType; -import io.prestosql.operator.LookupSourceProvider.LookupSourceLease; -import io.prestosql.operator.PartitionedConsumption.Partition; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.operator.WorkProcessor.Transformation; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperator; -import io.prestosql.operator.exchange.LocalPartitionGenerator; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.PartitioningSpiller; -import io.prestosql.spiller.PartitioningSpiller.PartitioningSpillResult; -import io.prestosql.spiller.PartitioningSpillerFactory; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.operator.JoinProbe.JoinProbeFactory; +import io.trino.operator.LookupJoinOperators.JoinType; +import io.trino.operator.LookupSourceProvider.LookupSourceLease; +import io.trino.operator.PartitionedConsumption.Partition; +import io.trino.operator.WorkProcessor.ProcessState; +import io.trino.operator.WorkProcessor.Transformation; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperator; +import io.trino.operator.exchange.LocalPartitionGenerator; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.spiller.PartitioningSpiller; +import io.trino.spiller.PartitioningSpiller.PartitioningSpillResult; +import io.trino.spiller.PartitioningSpillerFactory; import javax.annotation.Nullable; @@ -54,16 +54,16 @@ import static io.airlift.concurrent.MoreFutures.addSuccessCallback; import static io.airlift.concurrent.MoreFutures.checkSuccess; import static io.airlift.concurrent.MoreFutures.getDone; -import static io.prestosql.operator.LookupJoinOperators.JoinType.FULL_OUTER; -import static io.prestosql.operator.LookupJoinOperators.JoinType.PROBE_OUTER; -import static io.prestosql.operator.Operator.NOT_BLOCKED; -import static io.prestosql.operator.PartitionedLookupSourceFactory.NO_SPILL_EPOCH; -import static io.prestosql.operator.WorkProcessor.TransformationState.blocked; -import static io.prestosql.operator.WorkProcessor.TransformationState.finished; -import static io.prestosql.operator.WorkProcessor.TransformationState.needsMoreData; -import static io.prestosql.operator.WorkProcessor.TransformationState.ofResult; -import static io.prestosql.operator.WorkProcessor.TransformationState.yield; -import static io.prestosql.operator.WorkProcessor.flatten; +import static io.trino.operator.LookupJoinOperators.JoinType.FULL_OUTER; +import static io.trino.operator.LookupJoinOperators.JoinType.PROBE_OUTER; +import static io.trino.operator.Operator.NOT_BLOCKED; +import static io.trino.operator.PartitionedLookupSourceFactory.NO_SPILL_EPOCH; +import static io.trino.operator.WorkProcessor.TransformationState.blocked; +import static io.trino.operator.WorkProcessor.TransformationState.finished; +import static io.trino.operator.WorkProcessor.TransformationState.needsMoreData; +import static io.trino.operator.WorkProcessor.TransformationState.ofResult; +import static io.trino.operator.WorkProcessor.TransformationState.yield; +import static io.trino.operator.WorkProcessor.flatten; import static java.lang.String.format; import static java.util.Collections.emptyIterator; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/LookupJoinOperatorFactory.java b/core/trino-main/src/main/java/io/trino/operator/LookupJoinOperatorFactory.java index 684d38528262..a7711f3ffb02 100644 --- a/core/trino-main/src/main/java/io/trino/operator/LookupJoinOperatorFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/LookupJoinOperatorFactory.java @@ -14,17 +14,17 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.execution.Lifespan; -import io.prestosql.operator.JoinProbe.JoinProbeFactory; -import io.prestosql.operator.LookupJoinOperators.JoinType; -import io.prestosql.operator.LookupOuterOperator.LookupOuterOperatorFactory; -import io.prestosql.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperator; -import io.prestosql.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.PartitioningSpillerFactory; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.type.BlockTypeOperators; +import io.trino.execution.Lifespan; +import io.trino.operator.JoinProbe.JoinProbeFactory; +import io.trino.operator.LookupJoinOperators.JoinType; +import io.trino.operator.LookupOuterOperator.LookupOuterOperatorFactory; +import io.trino.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperator; +import io.trino.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperatorFactory; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.spiller.PartitioningSpillerFactory; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; @@ -33,8 +33,8 @@ 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.prestosql.operator.LookupJoinOperators.JoinType.INNER; -import static io.prestosql.operator.LookupJoinOperators.JoinType.PROBE_OUTER; +import static io.trino.operator.LookupJoinOperators.JoinType.INNER; +import static io.trino.operator.LookupJoinOperators.JoinType.PROBE_OUTER; import static java.util.Objects.requireNonNull; public class LookupJoinOperatorFactory diff --git a/core/trino-main/src/main/java/io/trino/operator/LookupJoinOperators.java b/core/trino-main/src/main/java/io/trino/operator/LookupJoinOperators.java index 4ad26f8d321f..7005ef22b675 100644 --- a/core/trino-main/src/main/java/io/trino/operator/LookupJoinOperators.java +++ b/core/trino-main/src/main/java/io/trino/operator/LookupJoinOperators.java @@ -13,11 +13,11 @@ */ package io.trino.operator; -import io.prestosql.operator.JoinProbe.JoinProbeFactory; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.PartitioningSpillerFactory; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.type.BlockTypeOperators; +import io.trino.operator.JoinProbe.JoinProbeFactory; +import io.trino.spi.type.Type; +import io.trino.spiller.PartitioningSpillerFactory; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.type.BlockTypeOperators; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/operator/LookupJoinPageBuilder.java b/core/trino-main/src/main/java/io/trino/operator/LookupJoinPageBuilder.java index ef08885e0e71..2908769c5fbb 100644 --- a/core/trino-main/src/main/java/io/trino/operator/LookupJoinPageBuilder.java +++ b/core/trino-main/src/main/java/io/trino/operator/LookupJoinPageBuilder.java @@ -13,18 +13,18 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import it.unimi.dsi.fastutil.ints.IntArrayList; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Verify.verify; -import static io.prestosql.operator.project.PageProcessor.MAX_BATCH_SIZE; -import static io.prestosql.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; +import static io.trino.operator.project.PageProcessor.MAX_BATCH_SIZE; +import static io.trino.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/LookupOuterOperator.java b/core/trino-main/src/main/java/io/trino/operator/LookupOuterOperator.java index 70cecae2d720..54f7ee88a42a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/LookupOuterOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/LookupOuterOperator.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.execution.Lifespan; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.HashSet; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/LookupSource.java b/core/trino-main/src/main/java/io/trino/operator/LookupSource.java index b5cc4fdbdef2..ed13f01cbbad 100644 --- a/core/trino-main/src/main/java/io/trino/operator/LookupSource.java +++ b/core/trino-main/src/main/java/io/trino/operator/LookupSource.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; import javax.annotation.concurrent.NotThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/LookupSourceFactory.java b/core/trino-main/src/main/java/io/trino/operator/LookupSourceFactory.java index ceb1a3ba4f4d..9ebb2b47bbe2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/LookupSourceFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/LookupSourceFactory.java @@ -14,7 +14,7 @@ package io.trino.operator; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; import java.util.OptionalInt; diff --git a/core/trino-main/src/main/java/io/trino/operator/MarkDistinctHash.java b/core/trino-main/src/main/java/io/trino/operator/MarkDistinctHash.java index b4fc0a951983..2ace6e974ffc 100644 --- a/core/trino-main/src/main/java/io/trino/operator/MarkDistinctHash.java +++ b/core/trino-main/src/main/java/io/trino/operator/MarkDistinctHash.java @@ -14,20 +14,20 @@ package io.trino.operator; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.Session; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.isDictionaryAggregationEnabled; -import static io.prestosql.operator.GroupByHash.createGroupByHash; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.SystemSessionProperties.isDictionaryAggregationEnabled; +import static io.trino.operator.GroupByHash.createGroupByHash; +import static io.trino.spi.type.BooleanType.BOOLEAN; public class MarkDistinctHash { diff --git a/core/trino-main/src/main/java/io/trino/operator/MarkDistinctOperator.java b/core/trino-main/src/main/java/io/trino/operator/MarkDistinctOperator.java index 60ea45c3710a..e000d6e44faf 100644 --- a/core/trino-main/src/main/java/io/trino/operator/MarkDistinctOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/MarkDistinctOperator.java @@ -16,13 +16,13 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.type.BlockTypeOperators; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.type.BlockTypeOperators; import java.util.Collection; import java.util.List; @@ -30,7 +30,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.util.Objects.requireNonNull; public class MarkDistinctOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/MergeHashSort.java b/core/trino-main/src/main/java/io/trino/operator/MergeHashSort.java index d809ac379f0e..b007e8614e32 100644 --- a/core/trino-main/src/main/java/io/trino/operator/MergeHashSort.java +++ b/core/trino-main/src/main/java/io/trino/operator/MergeHashSort.java @@ -13,12 +13,12 @@ */ package io.trino.operator; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.util.MergeSortedPages.PageWithPosition; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators; +import io.trino.util.MergeSortedPages.PageWithPosition; import java.io.Closeable; import java.util.List; @@ -26,7 +26,7 @@ import java.util.stream.IntStream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.util.MergeSortedPages.mergeSortedPages; +import static io.trino.util.MergeSortedPages.mergeSortedPages; /** * This class performs merge of previously hash sorted pages streams. diff --git a/core/trino-main/src/main/java/io/trino/operator/MergeOperator.java b/core/trino-main/src/main/java/io/trino/operator/MergeOperator.java index 579923793894..1aea84bd9711 100644 --- a/core/trino-main/src/main/java/io/trino/operator/MergeOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/MergeOperator.java @@ -16,16 +16,16 @@ import com.google.common.io.Closer; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.metadata.Split; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.spi.type.Type; -import io.prestosql.split.RemoteSplit; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.buffer.PagesSerde; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.metadata.Split; +import io.trino.spi.Page; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.spi.type.Type; +import io.trino.split.RemoteSplit; +import io.trino.sql.gen.OrderingCompiler; +import io.trino.sql.planner.plan.PlanNodeId; import java.io.IOException; import java.io.UncheckedIOException; @@ -37,8 +37,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.util.MergeSortedPages.mergeSortedPages; -import static io.prestosql.util.MoreLists.mappedCopy; +import static io.trino.util.MergeSortedPages.mergeSortedPages; +import static io.trino.util.MoreLists.mappedCopy; import static java.util.Objects.requireNonNull; public class MergeOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/MultiChannelGroupByHash.java b/core/trino-main/src/main/java/io/trino/operator/MultiChannelGroupByHash.java index b7f69d086f57..4396e8f85941 100644 --- a/core/trino-main/src/main/java/io/trino/operator/MultiChannelGroupByHash.java +++ b/core/trino-main/src/main/java/io/trino/operator/MultiChannelGroupByHash.java @@ -16,17 +16,17 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.array.LongBigArray; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.array.LongBigArray; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import it.unimi.dsi.fastutil.objects.ObjectArrayList; import org.openjdk.jol.info.ClassLayout; @@ -39,13 +39,13 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.operator.SyntheticAddress.decodePosition; -import static io.prestosql.operator.SyntheticAddress.decodeSliceIndex; -import static io.prestosql.operator.SyntheticAddress.encodeSyntheticAddress; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.gen.JoinCompiler.PagesHashStrategyFactory; -import static io.prestosql.util.HashCollisionsEstimator.estimateNumberOfHashCollisions; +import static io.trino.operator.SyntheticAddress.decodePosition; +import static io.trino.operator.SyntheticAddress.decodeSliceIndex; +import static io.trino.operator.SyntheticAddress.encodeSyntheticAddress; +import static io.trino.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.gen.JoinCompiler.PagesHashStrategyFactory; +import static io.trino.util.HashCollisionsEstimator.estimateNumberOfHashCollisions; import static it.unimi.dsi.fastutil.HashCommon.arraySize; import static it.unimi.dsi.fastutil.HashCommon.murmurHash3; import static java.lang.Math.toIntExact; diff --git a/core/trino-main/src/main/java/io/trino/operator/NestedLoopBuildOperator.java b/core/trino-main/src/main/java/io/trino/operator/NestedLoopBuildOperator.java index b59bea600eb3..1dbac0d25ac1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/NestedLoopBuildOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/NestedLoopBuildOperator.java @@ -14,9 +14,9 @@ package io.trino.operator; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Optional; import java.util.concurrent.Future; diff --git a/core/trino-main/src/main/java/io/trino/operator/NestedLoopJoinOperator.java b/core/trino-main/src/main/java/io/trino/operator/NestedLoopJoinOperator.java index de75e887e5c4..e69cdf4446c3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/NestedLoopJoinOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/NestedLoopJoinOperator.java @@ -17,12 +17,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.execution.Lifespan; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Iterator; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/NestedLoopJoinPages.java b/core/trino-main/src/main/java/io/trino/operator/NestedLoopJoinPages.java index 866600b3fdab..b904bb1c9be6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/NestedLoopJoinPages.java +++ b/core/trino-main/src/main/java/io/trino/operator/NestedLoopJoinPages.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/NestedLoopJoinPagesBuilder.java b/core/trino-main/src/main/java/io/trino/operator/NestedLoopJoinPagesBuilder.java index 63a7dacc3fed..12fe1f4b77c7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/NestedLoopJoinPagesBuilder.java +++ b/core/trino-main/src/main/java/io/trino/operator/NestedLoopJoinPagesBuilder.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; import java.util.ArrayList; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/NoChannelGroupByHash.java b/core/trino-main/src/main/java/io/trino/operator/NoChannelGroupByHash.java index bb8a975307e1..98a07d9c5d88 100644 --- a/core/trino-main/src/main/java/io/trino/operator/NoChannelGroupByHash.java +++ b/core/trino-main/src/main/java/io/trino/operator/NoChannelGroupByHash.java @@ -14,15 +14,15 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class NoChannelGroupByHash implements GroupByHash diff --git a/core/trino-main/src/main/java/io/trino/operator/Operator.java b/core/trino-main/src/main/java/io/trino/operator/Operator.java index f5b2ab661d48..c03fbaf4c7fd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/Operator.java +++ b/core/trino-main/src/main/java/io/trino/operator/Operator.java @@ -15,7 +15,7 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.spi.Page; +import io.trino.spi.Page; public interface Operator extends AutoCloseable diff --git a/core/trino-main/src/main/java/io/trino/operator/OperatorContext.java b/core/trino-main/src/main/java/io/trino/operator/OperatorContext.java index 918ad1cef90e..7538f9373032 100644 --- a/core/trino-main/src/main/java/io/trino/operator/OperatorContext.java +++ b/core/trino-main/src/main/java/io/trino/operator/OperatorContext.java @@ -19,15 +19,15 @@ import com.google.common.util.concurrent.SettableFuture; import io.airlift.stats.CounterStat; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.memory.QueryContextVisitor; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.operator.OperationTimer.OperationTiming; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.memory.QueryContextVisitor; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.operator.OperationTimer.OperationTiming; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.Nullable; import javax.annotation.concurrent.GuardedBy; @@ -45,9 +45,9 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.operator.BlockedReason.WAITING_FOR_MEMORY; -import static io.prestosql.operator.Operator.NOT_BLOCKED; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.operator.BlockedReason.WAITING_FOR_MEMORY; +import static io.trino.operator.Operator.NOT_BLOCKED; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.lang.Math.max; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/OperatorFactory.java b/core/trino-main/src/main/java/io/trino/operator/OperatorFactory.java index b2785435834a..6afe12546c0a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/OperatorFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/OperatorFactory.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.execution.Lifespan; +import io.trino.execution.Lifespan; public interface OperatorFactory { diff --git a/core/trino-main/src/main/java/io/trino/operator/OperatorInfo.java b/core/trino-main/src/main/java/io/trino/operator/OperatorInfo.java index 24379226eb6b..304fa34a7589 100644 --- a/core/trino-main/src/main/java/io/trino/operator/OperatorInfo.java +++ b/core/trino-main/src/main/java/io/trino/operator/OperatorInfo.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import io.prestosql.operator.PartitionedOutputOperator.PartitionedOutputInfo; -import io.prestosql.operator.TableWriterOperator.TableWriterInfo; -import io.prestosql.operator.exchange.LocalExchangeBufferInfo; +import io.trino.operator.PartitionedOutputOperator.PartitionedOutputInfo; +import io.trino.operator.TableWriterOperator.TableWriterInfo; +import io.trino.operator.exchange.LocalExchangeBufferInfo; @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, diff --git a/core/trino-main/src/main/java/io/trino/operator/OperatorStats.java b/core/trino-main/src/main/java/io/trino/operator/OperatorStats.java index be6356baceb6..281046274a52 100644 --- a/core/trino-main/src/main/java/io/trino/operator/OperatorStats.java +++ b/core/trino-main/src/main/java/io/trino/operator/OperatorStats.java @@ -18,8 +18,8 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.util.Mergeable; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.util.Mergeable; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/operator/OrderByOperator.java b/core/trino-main/src/main/java/io/trino/operator/OrderByOperator.java index de500c73bc3d..61ca2601685c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/OrderByOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/OrderByOperator.java @@ -16,15 +16,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.Spiller; -import io.prestosql.spiller.SpillerFactory; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spiller.Spiller; +import io.trino.spiller.SpillerFactory; +import io.trino.sql.gen.OrderingCompiler; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Iterator; import java.util.List; @@ -39,7 +39,7 @@ import static com.google.common.util.concurrent.Futures.immediateFuture; import static io.airlift.concurrent.MoreFutures.checkSuccess; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.util.MergeSortedPages.mergeSortedPages; +import static io.trino.util.MergeSortedPages.mergeSortedPages; import static java.util.Objects.requireNonNull; public class OrderByOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/OuterLookupSource.java b/core/trino-main/src/main/java/io/trino/operator/OuterLookupSource.java index 35a59a7419c5..3549726ff372 100644 --- a/core/trino-main/src/main/java/io/trino/operator/OuterLookupSource.java +++ b/core/trino-main/src/main/java/io/trino/operator/OuterLookupSource.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.NotThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/OuterPositionIterator.java b/core/trino-main/src/main/java/io/trino/operator/OuterPositionIterator.java index 7336a5888880..b40defb23dd8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/OuterPositionIterator.java +++ b/core/trino-main/src/main/java/io/trino/operator/OuterPositionIterator.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.spi.PageBuilder; +import io.trino.spi.PageBuilder; public interface OuterPositionIterator { diff --git a/core/trino-main/src/main/java/io/trino/operator/OutputFactory.java b/core/trino-main/src/main/java/io/trino/operator/OutputFactory.java index 3f47862dcd41..196b5537767e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/OutputFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/OutputFactory.java @@ -13,10 +13,10 @@ */ package io.trino.operator; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/operator/PageBuffer.java b/core/trino-main/src/main/java/io/trino/operator/PageBuffer.java index 9a9240af80b7..87a9321472bb 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PageBuffer.java +++ b/core/trino-main/src/main/java/io/trino/operator/PageBuffer.java @@ -14,17 +14,17 @@ package io.trino.operator; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperator; -import io.prestosql.spi.Page; +import io.trino.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperator; +import io.trino.spi.Page; import javax.annotation.Nullable; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.Operator.NOT_BLOCKED; -import static io.prestosql.operator.WorkProcessor.ProcessState.blocked; -import static io.prestosql.operator.WorkProcessor.ProcessState.finished; -import static io.prestosql.operator.WorkProcessor.ProcessState.ofResult; -import static io.prestosql.operator.WorkProcessor.ProcessState.yield; +import static io.trino.operator.Operator.NOT_BLOCKED; +import static io.trino.operator.WorkProcessor.ProcessState.blocked; +import static io.trino.operator.WorkProcessor.ProcessState.finished; +import static io.trino.operator.WorkProcessor.ProcessState.ofResult; +import static io.trino.operator.WorkProcessor.ProcessState.yield; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/PageSourceOperator.java b/core/trino-main/src/main/java/io/trino/operator/PageSourceOperator.java index 3aec5ee7478c..50402736b947 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PageSourceOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/PageSourceOperator.java @@ -14,8 +14,8 @@ package io.trino.operator; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorPageSource; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorPageSource; import java.io.IOException; import java.io.UncheckedIOException; diff --git a/core/trino-main/src/main/java/io/trino/operator/PageTooLargeException.java b/core/trino-main/src/main/java/io/trino/operator/PageTooLargeException.java index c497ad2c873b..1d201edaeca6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PageTooLargeException.java +++ b/core/trino-main/src/main/java/io/trino/operator/PageTooLargeException.java @@ -13,9 +13,9 @@ */ package io.trino.operator; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.PAGE_TOO_LARGE; +import static io.trino.spi.StandardErrorCode.PAGE_TOO_LARGE; public class PageTooLargeException extends PrestoException diff --git a/core/trino-main/src/main/java/io/trino/operator/PageTransportErrorException.java b/core/trino-main/src/main/java/io/trino/operator/PageTransportErrorException.java index 843ce81c9486..8b7194b2c2f8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PageTransportErrorException.java +++ b/core/trino-main/src/main/java/io/trino/operator/PageTransportErrorException.java @@ -13,10 +13,10 @@ */ package io.trino.operator; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.PrestoTransportException; +import io.trino.spi.HostAddress; +import io.trino.spi.PrestoTransportException; -import static io.prestosql.spi.StandardErrorCode.PAGE_TRANSPORT_ERROR; +import static io.trino.spi.StandardErrorCode.PAGE_TRANSPORT_ERROR; public class PageTransportErrorException extends PrestoTransportException diff --git a/core/trino-main/src/main/java/io/trino/operator/PageTransportTimeoutException.java b/core/trino-main/src/main/java/io/trino/operator/PageTransportTimeoutException.java index 48a7d0db15dd..dffa0672eb39 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PageTransportTimeoutException.java +++ b/core/trino-main/src/main/java/io/trino/operator/PageTransportTimeoutException.java @@ -13,10 +13,10 @@ */ package io.trino.operator; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.PrestoTransportException; +import io.trino.spi.HostAddress; +import io.trino.spi.PrestoTransportException; -import static io.prestosql.spi.StandardErrorCode.PAGE_TRANSPORT_TIMEOUT; +import static io.trino.spi.StandardErrorCode.PAGE_TRANSPORT_TIMEOUT; public class PageTransportTimeoutException extends PrestoTransportException diff --git a/core/trino-main/src/main/java/io/trino/operator/PageUtils.java b/core/trino-main/src/main/java/io/trino/operator/PageUtils.java index 1d5fce889da0..ffd0e44a9626 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PageUtils.java +++ b/core/trino-main/src/main/java/io/trino/operator/PageUtils.java @@ -13,13 +13,13 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; +import io.trino.spi.Page; +import io.trino.spi.block.Block; import java.util.function.Consumer; import java.util.function.LongConsumer; -import static io.prestosql.spi.block.LazyBlock.listenForLoads; +import static io.trino.spi.block.LazyBlock.listenForLoads; import static java.util.Objects.requireNonNull; public final class PageUtils diff --git a/core/trino-main/src/main/java/io/trino/operator/PageWithPositionComparator.java b/core/trino-main/src/main/java/io/trino/operator/PageWithPositionComparator.java index c5c9f5f70269..d56708265c3b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PageWithPositionComparator.java +++ b/core/trino-main/src/main/java/io/trino/operator/PageWithPositionComparator.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; +import io.trino.spi.Page; public interface PageWithPositionComparator { diff --git a/core/trino-main/src/main/java/io/trino/operator/PagesHash.java b/core/trino-main/src/main/java/io/trino/operator/PagesHash.java index 558aa4400ac3..67d464d0fa52 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PagesHash.java +++ b/core/trino-main/src/main/java/io/trino/operator/PagesHash.java @@ -14,8 +14,8 @@ package io.trino.operator; import io.airlift.units.DataSize; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; import it.unimi.dsi.fastutil.HashCommon; import it.unimi.dsi.fastutil.longs.LongArrayList; import org.openjdk.jol.info.ClassLayout; @@ -24,9 +24,9 @@ import static io.airlift.slice.SizeOf.sizeOf; import static io.airlift.units.DataSize.Unit.KILOBYTE; -import static io.prestosql.operator.SyntheticAddress.decodePosition; -import static io.prestosql.operator.SyntheticAddress.decodeSliceIndex; -import static io.prestosql.util.HashCollisionsEstimator.estimateNumberOfHashCollisions; +import static io.trino.operator.SyntheticAddress.decodePosition; +import static io.trino.operator.SyntheticAddress.decodeSliceIndex; +import static io.trino.util.HashCollisionsEstimator.estimateNumberOfHashCollisions; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/PagesHashStrategy.java b/core/trino-main/src/main/java/io/trino/operator/PagesHashStrategy.java index 370b60b12408..9fe8002ac646 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PagesHashStrategy.java +++ b/core/trino-main/src/main/java/io/trino/operator/PagesHashStrategy.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; public interface PagesHashStrategy { 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 9edcec857b3a..749cc3ecdf76 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,23 +18,23 @@ import io.airlift.log.Logger; import io.airlift.slice.Slice; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.operator.SpatialIndexBuilderOperator.SpatialPredicate; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.gen.JoinCompiler.LookupSourceSupplierFactory; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.geospatial.Rectangle; +import io.trino.operator.SpatialIndexBuilderOperator.SpatialPredicate; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +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; +import io.trino.sql.gen.OrderingCompiler; +import io.trino.type.BlockTypeOperators; import it.unimi.dsi.fastutil.Swapper; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.longs.LongArrayList; @@ -58,10 +58,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.operator.SyntheticAddress.decodePosition; -import static io.prestosql.operator.SyntheticAddress.decodeSliceIndex; -import static io.prestosql.operator.SyntheticAddress.encodeSyntheticAddress; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; +import static io.trino.operator.SyntheticAddress.decodePosition; +import static io.trino.operator.SyntheticAddress.decodeSliceIndex; +import static io.trino.operator.SyntheticAddress.encodeSyntheticAddress; +import static io.trino.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/PagesRTreeIndex.java b/core/trino-main/src/main/java/io/trino/operator/PagesRTreeIndex.java index bfa39cecf698..461eba1551e8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PagesRTreeIndex.java +++ b/core/trino-main/src/main/java/io/trino/operator/PagesRTreeIndex.java @@ -16,14 +16,14 @@ import com.esri.core.geometry.ogc.OGCGeometry; import com.esri.core.geometry.ogc.OGCPoint; import io.airlift.slice.Slice; -import io.prestosql.Session; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.operator.SpatialIndexBuilderOperator.SpatialPredicate; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; +import io.trino.Session; +import io.trino.geospatial.Rectangle; +import io.trino.operator.SpatialIndexBuilderOperator.SpatialPredicate; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.longs.LongArrayList; import org.locationtech.jts.geom.Envelope; @@ -36,12 +36,12 @@ import java.util.OptionalDouble; import static com.google.common.base.Verify.verifyNotNull; -import static io.prestosql.geospatial.serde.GeometrySerde.deserialize; -import static io.prestosql.operator.JoinUtils.channelsToPages; -import static io.prestosql.operator.SyntheticAddress.decodePosition; -import static io.prestosql.operator.SyntheticAddress.decodeSliceIndex; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.geospatial.serde.GeometrySerde.deserialize; +import static io.trino.operator.JoinUtils.channelsToPages; +import static io.trino.operator.SyntheticAddress.decodePosition; +import static io.trino.operator.SyntheticAddress.decodeSliceIndex; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/PagesSpatialIndex.java b/core/trino-main/src/main/java/io/trino/operator/PagesSpatialIndex.java index 597ca099f9d2..97feb5400fca 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PagesSpatialIndex.java +++ b/core/trino-main/src/main/java/io/trino/operator/PagesSpatialIndex.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/operator/PagesSpatialIndexFactory.java b/core/trino-main/src/main/java/io/trino/operator/PagesSpatialIndexFactory.java index 5e9562d47116..1e736f778e59 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PagesSpatialIndexFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/PagesSpatialIndexFactory.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import javax.annotation.Nullable; import javax.annotation.concurrent.GuardedBy; diff --git a/core/trino-main/src/main/java/io/trino/operator/PagesSpatialIndexSupplier.java b/core/trino-main/src/main/java/io/trino/operator/PagesSpatialIndexSupplier.java index 244d25bbecd3..e839c8d7998e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PagesSpatialIndexSupplier.java +++ b/core/trino-main/src/main/java/io/trino/operator/PagesSpatialIndexSupplier.java @@ -20,13 +20,13 @@ import com.esri.core.geometry.ogc.OGCGeometry; import io.airlift.slice.Slice; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.operator.PagesRTreeIndex.GeometryWithPosition; -import io.prestosql.operator.SpatialIndexBuilderOperator.SpatialPredicate; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler; +import io.trino.Session; +import io.trino.geospatial.Rectangle; +import io.trino.operator.PagesRTreeIndex.GeometryWithPosition; +import io.trino.operator.SpatialIndexBuilderOperator.SpatialPredicate; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinFilterFunctionCompiler; import it.unimi.dsi.fastutil.longs.LongArrayList; import org.locationtech.jts.geom.Envelope; import org.locationtech.jts.index.strtree.AbstractNode; @@ -40,12 +40,12 @@ import java.util.function.Supplier; import static com.google.common.base.Verify.verifyNotNull; -import static io.prestosql.geospatial.serde.GeometrySerde.deserialize; -import static io.prestosql.operator.PagesSpatialIndex.EMPTY_INDEX; -import static io.prestosql.operator.SyntheticAddress.decodePosition; -import static io.prestosql.operator.SyntheticAddress.decodeSliceIndex; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.geospatial.serde.GeometrySerde.deserialize; +import static io.trino.operator.PagesSpatialIndex.EMPTY_INDEX; +import static io.trino.operator.SyntheticAddress.decodePosition; +import static io.trino.operator.SyntheticAddress.decodeSliceIndex; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.lang.Math.toIntExact; public class PagesSpatialIndexSupplier diff --git a/core/trino-main/src/main/java/io/trino/operator/ParametricFunctionHelpers.java b/core/trino-main/src/main/java/io/trino/operator/ParametricFunctionHelpers.java index b5131a049c5d..07acba816e78 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ParametricFunctionHelpers.java +++ b/core/trino-main/src/main/java/io/trino/operator/ParametricFunctionHelpers.java @@ -13,9 +13,9 @@ */ package io.trino.operator; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.operator.annotations.ImplementationDependency; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.operator.annotations.ImplementationDependency; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; diff --git a/core/trino-main/src/main/java/io/trino/operator/ParametricImplementation.java b/core/trino-main/src/main/java/io/trino/operator/ParametricImplementation.java index 41d640c5d10c..24a6f3489850 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ParametricImplementation.java +++ b/core/trino-main/src/main/java/io/trino/operator/ParametricImplementation.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.Signature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.Signature; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/ParametricImplementationsGroup.java b/core/trino-main/src/main/java/io/trino/operator/ParametricImplementationsGroup.java index 26b36ebc9aad..c23d54bf48b8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ParametricImplementationsGroup.java +++ b/core/trino-main/src/main/java/io/trino/operator/ParametricImplementationsGroup.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.Signature; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.Signature; +import io.trino.spi.type.TypeSignature; import java.util.List; import java.util.Map; @@ -25,7 +25,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.operator.annotations.FunctionsParserHelper.validateSignaturesCompatibility; +import static io.trino.operator.annotations.FunctionsParserHelper.validateSignaturesCompatibility; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/PartitionFunction.java b/core/trino-main/src/main/java/io/trino/operator/PartitionFunction.java index aeed7cbec5b8..6f9768affeb8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PartitionFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/PartitionFunction.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; +import io.trino.spi.Page; public interface PartitionFunction { diff --git a/core/trino-main/src/main/java/io/trino/operator/PartitionedLookupSource.java b/core/trino-main/src/main/java/io/trino/operator/PartitionedLookupSource.java index 82db60b4549f..2f970789e2bd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PartitionedLookupSource.java +++ b/core/trino-main/src/main/java/io/trino/operator/PartitionedLookupSource.java @@ -14,11 +14,11 @@ package io.trino.operator; import com.google.common.io.Closer; -import io.prestosql.operator.exchange.LocalPartitionGenerator; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators; +import io.trino.operator.exchange.LocalPartitionGenerator; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators; import javax.annotation.Nullable; import javax.annotation.concurrent.GuardedBy; diff --git a/core/trino-main/src/main/java/io/trino/operator/PartitionedLookupSourceFactory.java b/core/trino-main/src/main/java/io/trino/operator/PartitionedLookupSourceFactory.java index a65df94d5678..50ca998a707d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PartitionedLookupSourceFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/PartitionedLookupSourceFactory.java @@ -17,11 +17,11 @@ import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.operator.LookupSourceProvider.LookupSourceLease; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators; +import io.trino.operator.LookupSourceProvider.LookupSourceLease; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.Immutable; @@ -47,8 +47,8 @@ import static com.google.common.util.concurrent.Futures.nonCancellationPropagating; import static com.google.common.util.concurrent.Futures.transform; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; -import static io.prestosql.operator.OuterLookupSource.createOuterLookupSourceSupplier; -import static io.prestosql.operator.PartitionedLookupSource.createPartitionedLookupSourceSupplier; +import static io.trino.operator.OuterLookupSource.createOuterLookupSourceSupplier; +import static io.trino.operator.PartitionedLookupSource.createPartitionedLookupSourceSupplier; import static java.util.Collections.emptyList; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/PartitionedOutputOperator.java b/core/trino-main/src/main/java/io/trino/operator/PartitionedOutputOperator.java index 970666ad2298..492231e2064b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PartitionedOutputOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/PartitionedOutputOperator.java @@ -19,19 +19,19 @@ import com.google.common.primitives.Ints; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.execution.buffer.OutputBuffer; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.util.Mergeable; +import io.trino.execution.buffer.OutputBuffer; +import io.trino.execution.buffer.PagesSerde; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.execution.buffer.SerializedPage; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.util.Mergeable; import javax.annotation.Nullable; @@ -45,8 +45,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.execution.buffer.PageSplitterUtil.splitPage; -import static io.prestosql.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; +import static io.trino.execution.buffer.PageSplitterUtil.splitPage; +import static io.trino.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; import static java.lang.Math.max; import static java.lang.Math.min; import static java.lang.Math.toIntExact; diff --git a/core/trino-main/src/main/java/io/trino/operator/PipelineContext.java b/core/trino-main/src/main/java/io/trino/operator/PipelineContext.java index fe88dd920e1a..eac33016bfd7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PipelineContext.java +++ b/core/trino-main/src/main/java/io/trino/operator/PipelineContext.java @@ -22,12 +22,12 @@ import io.airlift.stats.CounterStat; import io.airlift.stats.Distribution; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.TaskId; -import io.prestosql.memory.QueryContextVisitor; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.memory.context.MemoryTrackingContext; +import io.trino.Session; +import io.trino.execution.Lifespan; +import io.trino.execution.TaskId; +import io.trino.memory.QueryContextVisitor; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.memory.context.MemoryTrackingContext; import org.joda.time.DateTime; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/PositionLinks.java b/core/trino-main/src/main/java/io/trino/operator/PositionLinks.java index 11cc12532d5f..5b4bf61bbcf3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PositionLinks.java +++ b/core/trino-main/src/main/java/io/trino/operator/PositionLinks.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/PrecomputedHashGenerator.java b/core/trino-main/src/main/java/io/trino/operator/PrecomputedHashGenerator.java index 0fe132baac2c..95c5ec91f2e1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PrecomputedHashGenerator.java +++ b/core/trino-main/src/main/java/io/trino/operator/PrecomputedHashGenerator.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.BigintType; +import io.trino.spi.Page; +import io.trino.spi.type.BigintType; import static com.google.common.base.MoreObjects.toStringHelper; diff --git a/core/trino-main/src/main/java/io/trino/operator/ProcessorContext.java b/core/trino-main/src/main/java/io/trino/operator/ProcessorContext.java index 390049137d96..70a3af7653c8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ProcessorContext.java +++ b/core/trino-main/src/main/java/io/trino/operator/ProcessorContext.java @@ -13,10 +13,10 @@ */ package io.trino.operator; -import io.prestosql.Session; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.TaskId; -import io.prestosql.memory.context.MemoryTrackingContext; +import io.trino.Session; +import io.trino.execution.Lifespan; +import io.trino.execution.TaskId; +import io.trino.memory.context.MemoryTrackingContext; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/RowNumberOperator.java b/core/trino-main/src/main/java/io/trino/operator/RowNumberOperator.java index e04d59bb6cd0..41839bc4400a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/RowNumberOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/RowNumberOperator.java @@ -16,16 +16,16 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.array.LongBigArray; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.type.BlockTypeOperators; +import io.trino.array.LongBigArray; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; @@ -34,9 +34,9 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static com.google.common.base.Verify.verifyNotNull; -import static io.prestosql.SystemSessionProperties.isDictionaryAggregationEnabled; -import static io.prestosql.operator.GroupByHash.createGroupByHash; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.SystemSessionProperties.isDictionaryAggregationEnabled; +import static io.trino.operator.GroupByHash.createGroupByHash; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; public class RowNumberOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/RowReferencePageManager.java b/core/trino-main/src/main/java/io/trino/operator/RowReferencePageManager.java index 2b50bbaffb3d..52fac61b51ec 100644 --- a/core/trino-main/src/main/java/io/trino/operator/RowReferencePageManager.java +++ b/core/trino-main/src/main/java/io/trino/operator/RowReferencePageManager.java @@ -15,9 +15,9 @@ import com.google.common.annotations.VisibleForTesting; import io.airlift.slice.SizeOf; -import io.prestosql.array.IntBigArray; -import io.prestosql.spi.Page; -import io.prestosql.util.LongBigArrayFIFOQueue; +import io.trino.array.IntBigArray; +import io.trino.spi.Page; +import io.trino.util.LongBigArrayFIFOQueue; import it.unimi.dsi.fastutil.ints.IntIterator; import it.unimi.dsi.fastutil.ints.IntOpenHashSet; import it.unimi.dsi.fastutil.longs.LongComparator; diff --git a/core/trino-main/src/main/java/io/trino/operator/ScanFilterAndProjectOperator.java b/core/trino-main/src/main/java/io/trino/operator/ScanFilterAndProjectOperator.java index ca2e8d00445f..9e74f485961c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ScanFilterAndProjectOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/ScanFilterAndProjectOperator.java @@ -16,31 +16,31 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.metadata.Split; -import io.prestosql.metadata.TableHandle; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.operator.WorkProcessorSourceOperatorAdapter.AdapterWorkProcessorSourceOperatorFactory; -import io.prestosql.operator.project.CursorProcessor; -import io.prestosql.operator.project.CursorProcessorOutput; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.EmptyPageSource; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.spi.type.Type; -import io.prestosql.split.EmptySplit; -import io.prestosql.split.PageSourceProvider; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.metadata.Split; +import io.trino.metadata.TableHandle; +import io.trino.operator.WorkProcessor.ProcessState; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.operator.WorkProcessorSourceOperatorAdapter.AdapterWorkProcessorSourceOperatorFactory; +import io.trino.operator.project.CursorProcessor; +import io.trino.operator.project.CursorProcessorOutput; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.EmptyPageSource; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.spi.type.Type; +import io.trino.split.EmptySplit; +import io.trino.split.PageSourceProvider; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.Nullable; @@ -53,11 +53,11 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.concurrent.MoreFutures.toListenableFuture; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.operator.PageUtils.recordMaterializedBytes; -import static io.prestosql.operator.WorkProcessor.TransformationState.finished; -import static io.prestosql.operator.WorkProcessor.TransformationState.ofResult; -import static io.prestosql.operator.project.MergePages.mergePages; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.operator.PageUtils.recordMaterializedBytes; +import static io.trino.operator.WorkProcessor.TransformationState.finished; +import static io.trino.operator.WorkProcessor.TransformationState.ofResult; +import static io.trino.operator.project.MergePages.mergePages; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/main/java/io/trino/operator/SetBuilderOperator.java b/core/trino-main/src/main/java/io/trino/operator/SetBuilderOperator.java index 9f6c36254e04..0485371b8e1c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/SetBuilderOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/SetBuilderOperator.java @@ -16,12 +16,12 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.operator.ChannelSet.ChannelSetBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.type.BlockTypeOperators; +import io.trino.operator.ChannelSet.ChannelSetBuilder; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.type.BlockTypeOperators; import javax.annotation.Nullable; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/SimpleChannelComparator.java b/core/trino-main/src/main/java/io/trino/operator/SimpleChannelComparator.java index 6e16c703a046..234d5988886b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/SimpleChannelComparator.java +++ b/core/trino-main/src/main/java/io/trino/operator/SimpleChannelComparator.java @@ -13,14 +13,14 @@ */ package io.trino.operator; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.operator.SyntheticAddress.decodePosition; -import static io.prestosql.operator.SyntheticAddress.decodeSliceIndex; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.operator.SyntheticAddress.decodePosition; +import static io.trino.operator.SyntheticAddress.decodeSliceIndex; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.util.Objects.requireNonNull; public class SimpleChannelComparator diff --git a/core/trino-main/src/main/java/io/trino/operator/SimplePageWithPositionComparator.java b/core/trino-main/src/main/java/io/trino/operator/SimplePageWithPositionComparator.java index be49cb0fbe0c..e1e7f86ff88a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/SimplePageWithPositionComparator.java +++ b/core/trino-main/src/main/java/io/trino/operator/SimplePageWithPositionComparator.java @@ -14,21 +14,21 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import java.lang.invoke.MethodHandle; import java.util.List; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; import static java.util.Objects.requireNonNull; public class SimplePageWithPositionComparator diff --git a/core/trino-main/src/main/java/io/trino/operator/SimplePagesHashStrategy.java b/core/trino-main/src/main/java/io/trino/operator/SimplePagesHashStrategy.java index 6cd112222dca..be314d077471 100644 --- a/core/trino-main/src/main/java/io/trino/operator/SimplePagesHashStrategy.java +++ b/core/trino-main/src/main/java/io/trino/operator/SimplePagesHashStrategy.java @@ -14,15 +14,15 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; -import io.prestosql.type.BlockTypeOperators.BlockPositionIsDistinctFrom; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.type.BlockTypeOperators.BlockPositionIsDistinctFrom; import org.openjdk.jol.info.ClassLayout; import java.util.List; @@ -31,7 +31,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; public class SimplePagesHashStrategy diff --git a/core/trino-main/src/main/java/io/trino/operator/SimplePagesIndexComparator.java b/core/trino-main/src/main/java/io/trino/operator/SimplePagesIndexComparator.java index 25524ed65f99..8d40bb001ab0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/SimplePagesIndexComparator.java +++ b/core/trino-main/src/main/java/io/trino/operator/SimplePagesIndexComparator.java @@ -14,22 +14,22 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import java.lang.invoke.MethodHandle; import java.util.List; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.operator.SyntheticAddress.decodePosition; -import static io.prestosql.operator.SyntheticAddress.decodeSliceIndex; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; +import static io.trino.operator.SyntheticAddress.decodePosition; +import static io.trino.operator.SyntheticAddress.decodeSliceIndex; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; import static java.util.Objects.requireNonNull; public class SimplePagesIndexComparator diff --git a/core/trino-main/src/main/java/io/trino/operator/SortedPositionLinks.java b/core/trino-main/src/main/java/io/trino/operator/SortedPositionLinks.java index 99da8a5497ef..2e1252cf0c66 100644 --- a/core/trino-main/src/main/java/io/trino/operator/SortedPositionLinks.java +++ b/core/trino-main/src/main/java/io/trino/operator/SortedPositionLinks.java @@ -14,7 +14,7 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import it.unimi.dsi.fastutil.ints.IntArrayList; @@ -26,8 +26,8 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.operator.SyntheticAddress.decodePosition; -import static io.prestosql.operator.SyntheticAddress.decodeSliceIndex; +import static io.trino.operator.SyntheticAddress.decodePosition; +import static io.trino.operator.SyntheticAddress.decodeSliceIndex; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/SourceOperator.java b/core/trino-main/src/main/java/io/trino/operator/SourceOperator.java index 9d6c2ef18001..8e6ca59ad11a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/SourceOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/SourceOperator.java @@ -13,9 +13,9 @@ */ package io.trino.operator; -import io.prestosql.metadata.Split; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.metadata.Split; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Optional; import java.util.function.Supplier; diff --git a/core/trino-main/src/main/java/io/trino/operator/SourceOperatorFactory.java b/core/trino-main/src/main/java/io/trino/operator/SourceOperatorFactory.java index 2a36fb61c9f1..a5a66e2a2aea 100644 --- a/core/trino-main/src/main/java/io/trino/operator/SourceOperatorFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/SourceOperatorFactory.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanNodeId; public interface SourceOperatorFactory extends OperatorFactory diff --git a/core/trino-main/src/main/java/io/trino/operator/SpatialIndexBuilderOperator.java b/core/trino-main/src/main/java/io/trino/operator/SpatialIndexBuilderOperator.java index 7550df9fed58..fafa4ccc59e1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/SpatialIndexBuilderOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/SpatialIndexBuilderOperator.java @@ -16,13 +16,13 @@ import com.esri.core.geometry.ogc.OGCGeometry; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.geospatial.KdbTreeUtils; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.geospatial.KdbTreeUtils; +import io.trino.geospatial.Rectangle; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.HashMap; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/SpatialJoinOperator.java b/core/trino-main/src/main/java/io/trino/operator/SpatialJoinOperator.java index 938d5771229d..1f8d4212537a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/SpatialJoinOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/SpatialJoinOperator.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.SpatialJoinNode; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.SpatialJoinNode; import javax.annotation.Nullable; @@ -35,8 +35,8 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.concurrent.MoreFutures.getDone; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.sql.planner.plan.SpatialJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.SpatialJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.SpatialJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.SpatialJoinNode.Type.LEFT; import static java.util.Objects.requireNonNull; public class SpatialJoinOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/SpillContext.java b/core/trino-main/src/main/java/io/trino/operator/SpillContext.java index 71ffdd96328c..7170e87a6049 100644 --- a/core/trino-main/src/main/java/io/trino/operator/SpillContext.java +++ b/core/trino-main/src/main/java/io/trino/operator/SpillContext.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.spiller.LocalSpillContext; +import io.trino.spiller.LocalSpillContext; import java.io.Closeable; diff --git a/core/trino-main/src/main/java/io/trino/operator/SplitOperatorInfo.java b/core/trino-main/src/main/java/io/trino/operator/SplitOperatorInfo.java index ad44af59857e..d255921efec7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/SplitOperatorInfo.java +++ b/core/trino-main/src/main/java/io/trino/operator/SplitOperatorInfo.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.connector.CatalogName; +import io.trino.connector.CatalogName; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/StageExecutionDescriptor.java b/core/trino-main/src/main/java/io/trino/operator/StageExecutionDescriptor.java index b4920224237a..99300e1b6135 100644 --- a/core/trino-main/src/main/java/io/trino/operator/StageExecutionDescriptor.java +++ b/core/trino-main/src/main/java/io/trino/operator/StageExecutionDescriptor.java @@ -16,15 +16,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.operator.StageExecutionDescriptor.StageExecutionStrategy.DYNAMIC_LIFESPAN_SCHEDULE_GROUPED_EXECUTION; -import static io.prestosql.operator.StageExecutionDescriptor.StageExecutionStrategy.FIXED_LIFESPAN_SCHEDULE_GROUPED_EXECUTION; -import static io.prestosql.operator.StageExecutionDescriptor.StageExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.operator.StageExecutionDescriptor.StageExecutionStrategy.DYNAMIC_LIFESPAN_SCHEDULE_GROUPED_EXECUTION; +import static io.trino.operator.StageExecutionDescriptor.StageExecutionStrategy.FIXED_LIFESPAN_SCHEDULE_GROUPED_EXECUTION; +import static io.trino.operator.StageExecutionDescriptor.StageExecutionStrategy.UNGROUPED_EXECUTION; import static java.util.Objects.requireNonNull; public class StageExecutionDescriptor diff --git a/core/trino-main/src/main/java/io/trino/operator/StandardJoinFilterFunction.java b/core/trino-main/src/main/java/io/trino/operator/StandardJoinFilterFunction.java index 493e0349aabe..a290ea10c298 100644 --- a/core/trino-main/src/main/java/io/trino/operator/StandardJoinFilterFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/StandardJoinFilterFunction.java @@ -14,13 +14,13 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import it.unimi.dsi.fastutil.longs.LongArrayList; import java.util.List; -import static io.prestosql.operator.SyntheticAddress.decodePosition; -import static io.prestosql.operator.SyntheticAddress.decodeSliceIndex; +import static io.trino.operator.SyntheticAddress.decodePosition; +import static io.trino.operator.SyntheticAddress.decodeSliceIndex; import static java.util.Objects.requireNonNull; public class StandardJoinFilterFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/StatisticsWriterOperator.java b/core/trino-main/src/main/java/io/trino/operator/StatisticsWriterOperator.java index 9e34a94ea133..a63e821e04f8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/StatisticsWriterOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/StatisticsWriterOperator.java @@ -14,22 +14,22 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.StatisticAggregationsDescriptor; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.StatisticAggregationsDescriptor; import java.util.Collection; import java.util.List; import java.util.Objects; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.statistics.TableStatisticType.ROW_COUNT; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.statistics.TableStatisticType.ROW_COUNT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; public class StatisticsWriterOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/StreamingAggregationOperator.java b/core/trino-main/src/main/java/io/trino/operator/StreamingAggregationOperator.java index 45c1d7ccd75a..65d4adf20033 100644 --- a/core/trino-main/src/main/java/io/trino/operator/StreamingAggregationOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/StreamingAggregationOperator.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.BasicWorkProcessorOperatorAdapter.BasicAdapterWorkProcessorOperatorFactory; -import io.prestosql.operator.WorkProcessor.Transformation; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.operator.aggregation.AccumulatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.BasicWorkProcessorOperatorAdapter.BasicAdapterWorkProcessorOperatorFactory; +import io.trino.operator.WorkProcessor.Transformation; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.operator.aggregation.AccumulatorFactory; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.Nullable; @@ -38,10 +38,10 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.operator.BasicWorkProcessorOperatorAdapter.createAdapterOperatorFactory; -import static io.prestosql.operator.WorkProcessor.TransformationState.finished; -import static io.prestosql.operator.WorkProcessor.TransformationState.needsMoreData; -import static io.prestosql.operator.WorkProcessor.TransformationState.ofResult; +import static io.trino.operator.BasicWorkProcessorOperatorAdapter.createAdapterOperatorFactory; +import static io.trino.operator.WorkProcessor.TransformationState.finished; +import static io.trino.operator.WorkProcessor.TransformationState.needsMoreData; +import static io.trino.operator.WorkProcessor.TransformationState.ofResult; import static java.util.Objects.requireNonNull; public class StreamingAggregationOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/TableDeleteOperator.java b/core/trino-main/src/main/java/io/trino/operator/TableDeleteOperator.java index aaf0cd21c83b..dbb5a19ffe8b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/TableDeleteOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/TableDeleteOperator.java @@ -14,20 +14,20 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.OptionalLong; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; public class TableDeleteOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/TableFinishInfo.java b/core/trino-main/src/main/java/io/trino/operator/TableFinishInfo.java index 5b8b5b2876f2..ce111938f528 100644 --- a/core/trino-main/src/main/java/io/trino/operator/TableFinishInfo.java +++ b/core/trino-main/src/main/java/io/trino/operator/TableFinishInfo.java @@ -20,7 +20,7 @@ import io.airlift.json.JsonCodec; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputMetadata; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/operator/TableFinishOperator.java b/core/trino-main/src/main/java/io/trino/operator/TableFinishOperator.java index 4dbd7a8bb80c..d836560cb28b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/TableFinishOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/TableFinishOperator.java @@ -18,16 +18,16 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.slice.Slice; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.operator.OperationTimer.OperationTiming; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.StatisticAggregationsDescriptor; +import io.trino.Session; +import io.trino.operator.OperationTimer.OperationTiming; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.StatisticAggregationsDescriptor; import java.util.Collection; import java.util.List; @@ -35,11 +35,11 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.SystemSessionProperties.isStatisticsCpuTimerEnabled; -import static io.prestosql.operator.TableWriterOperator.FRAGMENT_CHANNEL; -import static io.prestosql.operator.TableWriterOperator.ROW_COUNT_CHANNEL; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.SystemSessionProperties.isStatisticsCpuTimerEnabled; +import static io.trino.operator.TableWriterOperator.FRAGMENT_CHANNEL; +import static io.trino.operator.TableWriterOperator.ROW_COUNT_CHANNEL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/main/java/io/trino/operator/TableScanOperator.java b/core/trino-main/src/main/java/io/trino/operator/TableScanOperator.java index 6d2b4941db5b..ba801571a15f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/TableScanOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/TableScanOperator.java @@ -16,20 +16,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.Session; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.metadata.Split; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.EmptyPageSource; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.split.EmptySplit; -import io.prestosql.split.PageSourceProvider; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.metadata.Split; +import io.trino.metadata.TableHandle; +import io.trino.spi.Page; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.EmptyPageSource; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.split.EmptySplit; +import io.trino.split.PageSourceProvider; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/operator/TableScanWorkProcessorOperator.java b/core/trino-main/src/main/java/io/trino/operator/TableScanWorkProcessorOperator.java index 219f311d45dc..8c09c4c4089c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/TableScanWorkProcessorOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/TableScanWorkProcessorOperator.java @@ -16,22 +16,22 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.metadata.Split; -import io.prestosql.metadata.TableHandle; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.EmptyPageSource; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.split.EmptySplit; -import io.prestosql.split.PageSourceProvider; +import io.trino.Session; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.metadata.Split; +import io.trino.metadata.TableHandle; +import io.trino.operator.WorkProcessor.ProcessState; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.spi.Page; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.EmptyPageSource; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.split.EmptySplit; +import io.trino.split.PageSourceProvider; import javax.annotation.Nullable; @@ -43,7 +43,7 @@ import java.util.function.Supplier; import static io.airlift.concurrent.MoreFutures.toListenableFuture; -import static io.prestosql.operator.PageUtils.recordMaterializedBytes; +import static io.trino.operator.PageUtils.recordMaterializedBytes; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/main/java/io/trino/operator/TableWriterOperator.java b/core/trino-main/src/main/java/io/trino/operator/TableWriterOperator.java index 9e48c8f805ba..473ae046b8c6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/TableWriterOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/TableWriterOperator.java @@ -20,23 +20,23 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.slice.Slice; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.OperationTimer.OperationTiming; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.type.Type; -import io.prestosql.split.PageSinkManager; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TableWriterNode.WriterTarget; -import io.prestosql.util.AutoCloseableCloser; -import io.prestosql.util.Mergeable; +import io.trino.Session; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.OperationTimer.OperationTiming; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.type.Type; +import io.trino.split.PageSinkManager; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TableWriterNode.WriterTarget; +import io.trino.util.AutoCloseableCloser; +import io.trino.util.Mergeable; import java.util.Collection; import java.util.List; @@ -49,12 +49,12 @@ import static com.google.common.util.concurrent.Futures.allAsList; import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.MoreFutures.toListenableFuture; -import static io.prestosql.SystemSessionProperties.isStatisticsCpuTimerEnabled; -import static io.prestosql.spi.StandardErrorCode.CONSTRAINT_VIOLATION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.sql.planner.plan.TableWriterNode.CreateTarget; -import static io.prestosql.sql.planner.plan.TableWriterNode.InsertTarget; +import static io.trino.SystemSessionProperties.isStatisticsCpuTimerEnabled; +import static io.trino.spi.StandardErrorCode.CONSTRAINT_VIOLATION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.sql.planner.plan.TableWriterNode.CreateTarget; +import static io.trino.sql.planner.plan.TableWriterNode.InsertTarget; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/main/java/io/trino/operator/TaskContext.java b/core/trino-main/src/main/java/io/trino/operator/TaskContext.java index c20ae91e685e..26557dc0f2e6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/TaskContext.java +++ b/core/trino-main/src/main/java/io/trino/operator/TaskContext.java @@ -22,20 +22,20 @@ import io.airlift.stats.GcMonitor; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.DynamicFiltersCollector; -import io.prestosql.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskState; -import io.prestosql.execution.TaskStateMachine; -import io.prestosql.execution.buffer.LazyOutputBuffer; -import io.prestosql.memory.QueryContext; -import io.prestosql.memory.QueryContextVisitor; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.sql.planner.plan.DynamicFilterId; +import io.trino.Session; +import io.trino.execution.DynamicFiltersCollector; +import io.trino.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; +import io.trino.execution.Lifespan; +import io.trino.execution.TaskId; +import io.trino.execution.TaskState; +import io.trino.execution.TaskStateMachine; +import io.trino.execution.buffer.LazyOutputBuffer; +import io.trino.memory.QueryContext; +import io.trino.memory.QueryContextVisitor; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.spi.predicate.Domain; +import io.trino.sql.planner.plan.DynamicFilterId; import org.joda.time.DateTime; import javax.annotation.concurrent.GuardedBy; diff --git a/core/trino-main/src/main/java/io/trino/operator/TaskOutputOperator.java b/core/trino-main/src/main/java/io/trino/operator/TaskOutputOperator.java index b742e5791d62..e2d3c5485fae 100644 --- a/core/trino-main/src/main/java/io/trino/operator/TaskOutputOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/TaskOutputOperator.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.execution.buffer.OutputBuffer; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.buffer.OutputBuffer; +import io.trino.execution.buffer.PagesSerde; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.execution.buffer.SerializedPage; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.function.Function; -import static io.prestosql.execution.buffer.PageSplitterUtil.splitPage; -import static io.prestosql.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; +import static io.trino.execution.buffer.PageSplitterUtil.splitPage; +import static io.trino.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; import static java.util.Objects.requireNonNull; public class TaskOutputOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/TopNOperator.java b/core/trino-main/src/main/java/io/trino/operator/TopNOperator.java index 8b149edbd78b..95be5d8c0e13 100644 --- a/core/trino-main/src/main/java/io/trino/operator/TopNOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/TopNOperator.java @@ -14,21 +14,21 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperator; -import io.prestosql.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperator; +import io.trino.operator.WorkProcessorOperatorAdapter.AdapterWorkProcessorOperatorFactory; +import io.trino.spi.Page; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.Optional; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.WorkProcessorOperatorAdapter.createAdapterOperatorFactory; +import static io.trino.operator.WorkProcessorOperatorAdapter.createAdapterOperatorFactory; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/TopNProcessor.java b/core/trino-main/src/main/java/io/trino/operator/TopNProcessor.java index 4f70534b7708..f08b8254d0e6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/TopNProcessor.java +++ b/core/trino-main/src/main/java/io/trino/operator/TopNProcessor.java @@ -13,12 +13,12 @@ */ package io.trino.operator; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/operator/TopNRowNumberOperator.java b/core/trino-main/src/main/java/io/trino/operator/TopNRowNumberOperator.java index 9625c4e15998..e0526826b6f7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/TopNRowNumberOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/TopNRowNumberOperator.java @@ -16,14 +16,14 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.type.BlockTypeOperators; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.type.BlockTypeOperators; import java.util.Iterator; import java.util.List; @@ -31,9 +31,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.SystemSessionProperties.isDictionaryAggregationEnabled; -import static io.prestosql.operator.GroupByHash.createGroupByHash; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.SystemSessionProperties.isDictionaryAggregationEnabled; +import static io.trino.operator.GroupByHash.createGroupByHash; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; public class TopNRowNumberOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/ValuesOperator.java b/core/trino-main/src/main/java/io/trino/operator/ValuesOperator.java index 06e5ace61d97..b7b3f3077c0b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ValuesOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/ValuesOperator.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterators; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Iterator; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/WindowFunctionDefinition.java b/core/trino-main/src/main/java/io/trino/operator/WindowFunctionDefinition.java index 9ee0bb343de2..971ba096a233 100644 --- a/core/trino-main/src/main/java/io/trino/operator/WindowFunctionDefinition.java +++ b/core/trino-main/src/main/java/io/trino/operator/WindowFunctionDefinition.java @@ -14,11 +14,11 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.aggregation.LambdaProvider; -import io.prestosql.operator.window.FrameInfo; -import io.prestosql.operator.window.WindowFunctionSupplier; -import io.prestosql.spi.function.WindowFunction; -import io.prestosql.spi.type.Type; +import io.trino.operator.aggregation.LambdaProvider; +import io.trino.operator.window.FrameInfo; +import io.trino.operator.window.WindowFunctionSupplier; +import io.trino.spi.function.WindowFunction; +import io.trino.spi.type.Type; import java.util.Arrays; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/WindowInfo.java b/core/trino-main/src/main/java/io/trino/operator/WindowInfo.java index 7d217ace8b04..f899d60b1fd1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/WindowInfo.java +++ b/core/trino-main/src/main/java/io/trino/operator/WindowInfo.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.window.WindowPartition; -import io.prestosql.util.Mergeable; +import io.trino.operator.window.WindowPartition; +import io.trino.util.Mergeable; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/operator/WindowOperator.java b/core/trino-main/src/main/java/io/trino/operator/WindowOperator.java index f9bb517634de..8993d8ae8d27 100644 --- a/core/trino-main/src/main/java/io/trino/operator/WindowOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/WindowOperator.java @@ -22,21 +22,21 @@ import com.google.common.primitives.Ints; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.operator.WorkProcessor.Transformation; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.operator.window.FrameInfo; -import io.prestosql.operator.window.FramedWindowFunction; -import io.prestosql.operator.window.WindowPartition; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.Spiller; -import io.prestosql.spiller.SpillerFactory; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.WorkProcessor.ProcessState; +import io.trino.operator.WorkProcessor.Transformation; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.operator.window.FrameInfo; +import io.trino.operator.window.FramedWindowFunction; +import io.trino.operator.window.WindowPartition; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spiller.Spiller; +import io.trino.spiller.SpillerFactory; +import io.trino.sql.gen.OrderingCompiler; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.Map; @@ -55,12 +55,12 @@ import static com.google.common.collect.Iterables.concat; import static com.google.common.collect.Iterators.peekingIterator; import static io.airlift.concurrent.MoreFutures.checkSuccess; -import static io.prestosql.operator.WorkProcessor.TransformationState.needsMoreData; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_LAST; -import static io.prestosql.sql.tree.FrameBound.Type.FOLLOWING; -import static io.prestosql.sql.tree.FrameBound.Type.PRECEDING; -import static io.prestosql.sql.tree.WindowFrame.Type.RANGE; -import static io.prestosql.util.MergeSortedPages.mergeSortedPages; +import static io.trino.operator.WorkProcessor.TransformationState.needsMoreData; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_LAST; +import static io.trino.sql.tree.FrameBound.Type.FOLLOWING; +import static io.trino.sql.tree.FrameBound.Type.PRECEDING; +import static io.trino.sql.tree.WindowFrame.Type.RANGE; +import static io.trino.util.MergeSortedPages.mergeSortedPages; import static java.util.Collections.nCopies; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorOperator.java b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorOperator.java index 50a5226b50ef..615d903e597c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorOperator.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorOperatorAdapter.java b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorOperatorAdapter.java index 91fb4f59a429..ed1e1cfdbd9a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorOperatorAdapter.java +++ b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorOperatorAdapter.java @@ -14,10 +14,10 @@ package io.trino.operator; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.execution.Lifespan; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorOperatorFactory.java b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorOperatorFactory.java index 6ea05decab37..63701a74aacb 100644 --- a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorOperatorFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorOperatorFactory.java @@ -13,9 +13,9 @@ */ package io.trino.operator; -import io.prestosql.execution.Lifespan; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; public interface WorkProcessorOperatorFactory { diff --git a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorPipelineSourceOperator.java b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorPipelineSourceOperator.java index e2e1b83ba9fe..69ac16448517 100644 --- a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorPipelineSourceOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorPipelineSourceOperator.java @@ -19,16 +19,16 @@ import io.airlift.log.Logger; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.Lifespan; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.metadata.Split; -import io.prestosql.operator.OperationTimer.OperationTiming; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.metadata.Split; +import io.trino.operator.OperationTimer.OperationTiming; +import io.trino.operator.WorkProcessor.ProcessState; +import io.trino.spi.Page; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.Nullable; @@ -43,10 +43,10 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.operator.BlockedReason.WAITING_FOR_MEMORY; -import static io.prestosql.operator.PageUtils.recordMaterializedBytes; -import static io.prestosql.operator.WorkProcessor.ProcessState.Type.BLOCKED; -import static io.prestosql.operator.WorkProcessor.ProcessState.Type.FINISHED; +import static io.trino.operator.BlockedReason.WAITING_FOR_MEMORY; +import static io.trino.operator.PageUtils.recordMaterializedBytes; +import static io.trino.operator.WorkProcessor.ProcessState.Type.BLOCKED; +import static io.trino.operator.WorkProcessor.ProcessState.Type.FINISHED; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorSourceOperator.java b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorSourceOperator.java index 89dad87c46c0..5dc2d733b015 100644 --- a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorSourceOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorSourceOperator.java @@ -15,7 +15,7 @@ import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.spi.connector.UpdatablePageSource; +import io.trino.spi.connector.UpdatablePageSource; import java.util.Optional; import java.util.function.Supplier; diff --git a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorSourceOperatorAdapter.java b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorSourceOperatorAdapter.java index bed637b35437..d6d8b898ae8d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorSourceOperatorAdapter.java +++ b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorSourceOperatorAdapter.java @@ -15,21 +15,21 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.Session; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.metadata.Split; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.metadata.Split; +import io.trino.spi.Page; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.function.Supplier; -import static io.prestosql.operator.WorkProcessor.ProcessState.blocked; -import static io.prestosql.operator.WorkProcessor.ProcessState.finished; -import static io.prestosql.operator.WorkProcessor.ProcessState.ofResult; +import static io.trino.operator.WorkProcessor.ProcessState.blocked; +import static io.trino.operator.WorkProcessor.ProcessState.finished; +import static io.trino.operator.WorkProcessor.ProcessState.ofResult; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorSourceOperatorFactory.java b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorSourceOperatorFactory.java index 206b2ac7d11d..04b4002f8d9f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorSourceOperatorFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorSourceOperatorFactory.java @@ -13,10 +13,10 @@ */ package io.trino.operator; -import io.prestosql.Session; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.metadata.Split; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.metadata.Split; +import io.trino.sql.planner.plan.PlanNodeId; public interface WorkProcessorSourceOperatorFactory { diff --git a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorUtils.java b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorUtils.java index c1ad14e85eea..ab5300d70270 100644 --- a/core/trino-main/src/main/java/io/trino/operator/WorkProcessorUtils.java +++ b/core/trino-main/src/main/java/io/trino/operator/WorkProcessorUtils.java @@ -15,9 +15,9 @@ import com.google.common.collect.AbstractIterator; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.operator.WorkProcessor.Transformation; -import io.prestosql.operator.WorkProcessor.TransformationState; +import io.trino.operator.WorkProcessor.ProcessState; +import io.trino.operator.WorkProcessor.Transformation; +import io.trino.operator.WorkProcessor.TransformationState; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/AbstractGroupCollectionAggregationState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/AbstractGroupCollectionAggregationState.java index a88a95248277..63eb85a41dd4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/AbstractGroupCollectionAggregationState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/AbstractGroupCollectionAggregationState.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation; -import io.prestosql.array.IntBigArray; -import io.prestosql.array.ShortBigArray; -import io.prestosql.operator.aggregation.state.AbstractGroupedAccumulatorState; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; +import io.trino.array.IntBigArray; +import io.trino.array.ShortBigArray; +import io.trino.operator.aggregation.state.AbstractGroupedAccumulatorState; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; import it.unimi.dsi.fastutil.longs.LongArrayList; import it.unimi.dsi.fastutil.longs.LongList; import org.openjdk.jol.info.ClassLayout; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/AbstractMinMaxAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/AbstractMinMaxAggregationFunction.java index 36b614ea7d0a..d014d139c54e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/AbstractMinMaxAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/AbstractMinMaxAggregationFunction.java @@ -15,51 +15,51 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.state.BlockPositionState; -import io.prestosql.operator.aggregation.state.BlockPositionStateSerializer; -import io.prestosql.operator.aggregation.state.NullableBooleanState; -import io.prestosql.operator.aggregation.state.NullableDoubleState; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.state.BlockPositionState; +import io.trino.operator.aggregation.state.BlockPositionStateSerializer; +import io.trino.operator.aggregation.state.NullableBooleanState; +import io.trino.operator.aggregation.state.NullableDoubleState; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.List; import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.orderableTypeParameter; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.util.Failures.internalError; -import static io.prestosql.util.MinMaxCompare.getMinMaxCompare; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.orderableTypeParameter; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.util.Failures.internalError; +import static io.trino.util.MinMaxCompare.getMinMaxCompare; +import static io.trino.util.Reflection.methodHandle; public abstract class AbstractMinMaxAggregationFunction extends SqlAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/AbstractMinMaxNAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/AbstractMinMaxNAggregationFunction.java index 59a1e279fbf4..80d0fb4c8d05 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/AbstractMinMaxNAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/AbstractMinMaxNAggregationFunction.java @@ -15,22 +15,22 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.state.MinMaxNState; -import io.prestosql.operator.aggregation.state.MinMaxNStateFactory; -import io.prestosql.operator.aggregation.state.MinMaxNStateSerializer; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.state.MinMaxNState; +import io.trino.operator.aggregation.state.MinMaxNStateFactory; +import io.trino.operator.aggregation.state.MinMaxNStateSerializer; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; import java.lang.invoke.MethodHandle; import java.util.List; @@ -38,18 +38,18 @@ import java.util.function.Function; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.orderableTypeParameter; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.orderableTypeParameter; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/Accumulator.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/Accumulator.java index accf6b3a00c5..faee4b000a87 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/Accumulator.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/Accumulator.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.WindowIndex; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.WindowIndex; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorCompiler.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorCompiler.java index c886a2b56507..8f21e28a8bd4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorCompiler.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorCompiler.java @@ -28,20 +28,20 @@ import io.airlift.bytecode.expression.BytecodeExpression; import io.airlift.bytecode.expression.BytecodeExpressions; import io.airlift.slice.Slice; -import io.prestosql.operator.GroupByIdBlock; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ColumnarRow; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.function.WindowIndex; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.Binding; -import io.prestosql.sql.gen.CallSiteBinder; -import io.prestosql.sql.gen.CompilerOperations; +import io.trino.operator.GroupByIdBlock; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ColumnarRow; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.function.WindowIndex; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.gen.Binding; +import io.trino.sql.gen.CallSiteBinder; +import io.trino.sql.gen.CompilerOperations; import java.lang.invoke.MethodHandle; import java.util.ArrayList; @@ -67,13 +67,13 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.invokeDynamic; import static io.airlift.bytecode.expression.BytecodeExpressions.invokeStatic; import static io.airlift.bytecode.expression.BytecodeExpressions.not; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.countInputChannels; -import static io.prestosql.sql.gen.Bootstrap.BOOTSTRAP_METHOD; -import static io.prestosql.sql.gen.BytecodeUtils.invoke; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.countInputChannels; +import static io.trino.sql.gen.Bootstrap.BOOTSTRAP_METHOD; +import static io.trino.sql.gen.BytecodeUtils.invoke; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorFactoryBinder.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorFactoryBinder.java index 274f90227d7a..36539b18111e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorFactoryBinder.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorFactoryBinder.java @@ -13,12 +13,12 @@ */ package io.trino.operator.aggregation; -import io.prestosql.Session; -import io.prestosql.operator.PagesIndex; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.operator.PagesIndex; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationFromAnnotationsParser.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationFromAnnotationsParser.java index 8bad7f51f58b..ada2b605dee8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationFromAnnotationsParser.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationFromAnnotationsParser.java @@ -17,16 +17,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.MoreCollectors; -import io.prestosql.metadata.Signature; -import io.prestosql.operator.ParametricImplementationsGroup; -import io.prestosql.operator.annotations.FunctionsParserHelper; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.RemoveInputFunction; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.Signature; +import io.trino.operator.ParametricImplementationsGroup; +import io.trino.operator.annotations.FunctionsParserHelper; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.RemoveInputFunction; +import io.trino.spi.type.TypeSignature; import javax.annotation.Nullable; @@ -40,8 +40,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.operator.aggregation.AggregationImplementation.Parser.parseImplementation; -import static io.prestosql.operator.annotations.FunctionsParserHelper.parseDescription; +import static io.trino.operator.aggregation.AggregationImplementation.Parser.parseImplementation; +import static io.trino.operator.annotations.FunctionsParserHelper.parseDescription; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationImplementation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationImplementation.java index c3f7fd409f7e..5f4dc5dc6943 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationImplementation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationImplementation.java @@ -15,25 +15,25 @@ import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.LongVariableConstraint; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.TypeVariableConstraint; -import io.prestosql.operator.ParametricImplementation; -import io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType; -import io.prestosql.operator.annotations.FunctionsParserHelper; -import io.prestosql.operator.annotations.ImplementationDependency; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.util.Reflection; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.LongVariableConstraint; +import io.trino.metadata.Signature; +import io.trino.metadata.TypeVariableConstraint; +import io.trino.operator.ParametricImplementation; +import io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType; +import io.trino.operator.annotations.FunctionsParserHelper; +import io.trino.operator.annotations.ImplementationDependency; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.TypeSignature; +import io.trino.util.Reflection; import java.lang.annotation.Annotation; import java.lang.invoke.MethodHandle; @@ -49,19 +49,19 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.inputChannelParameterType; -import static io.prestosql.operator.annotations.FunctionsParserHelper.containsAnnotation; -import static io.prestosql.operator.annotations.FunctionsParserHelper.createTypeVariableConstraints; -import static io.prestosql.operator.annotations.FunctionsParserHelper.parseLiteralParameters; -import static io.prestosql.operator.annotations.ImplementationDependency.Factory.createDependency; -import static io.prestosql.operator.annotations.ImplementationDependency.getImplementationDependencyAnnotation; -import static io.prestosql.operator.annotations.ImplementationDependency.isImplementationDependencyAnnotation; -import static io.prestosql.operator.annotations.ImplementationDependency.validateImplementationDependencyAnnotation; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.inputChannelParameterType; +import static io.trino.operator.annotations.FunctionsParserHelper.containsAnnotation; +import static io.trino.operator.annotations.FunctionsParserHelper.createTypeVariableConstraints; +import static io.trino.operator.annotations.FunctionsParserHelper.parseLiteralParameters; +import static io.trino.operator.annotations.ImplementationDependency.Factory.createDependency; +import static io.trino.operator.annotations.ImplementationDependency.getImplementationDependencyAnnotation; +import static io.trino.operator.annotations.ImplementationDependency.isImplementationDependencyAnnotation; +import static io.trino.operator.annotations.ImplementationDependency.validateImplementationDependencyAnnotation; +import static io.trino.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.util.Reflection.methodHandle; import static java.util.Objects.requireNonNull; public class AggregationImplementation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationMetadata.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationMetadata.java index ebc6fde1f8e3..61f43d244bd0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationMetadata.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationMetadata.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; import java.lang.invoke.MethodHandle; import java.util.Arrays; @@ -28,12 +28,12 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.inputChannelParameterType; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.inputChannelParameterType; import static java.util.Objects.requireNonNull; public class AggregationMetadata diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationUtils.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationUtils.java index a07d0f902d03..982705d9cacb 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationUtils.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/AggregationUtils.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.base.CaseFormat; -import io.prestosql.operator.aggregation.state.CentralMomentsState; -import io.prestosql.operator.aggregation.state.CorrelationState; -import io.prestosql.operator.aggregation.state.CovarianceState; -import io.prestosql.operator.aggregation.state.RegressionState; -import io.prestosql.operator.aggregation.state.VarianceState; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.TypeSignature; +import io.trino.operator.aggregation.state.CentralMomentsState; +import io.trino.operator.aggregation.state.CorrelationState; +import io.trino.operator.aggregation.state.CovarianceState; +import io.trino.operator.aggregation.state.RegressionState; +import io.trino.operator.aggregation.state.VarianceState; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.TypeSignature; import java.util.List; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateCountDistinctAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateCountDistinctAggregation.java index 67cb4242a891..2af311a29714 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateCountDistinctAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateCountDistinctAggregation.java @@ -15,32 +15,32 @@ import com.google.common.annotations.VisibleForTesting; import io.airlift.stats.cardinality.HyperLogLog; -import io.prestosql.operator.aggregation.state.BooleanDistinctState; -import io.prestosql.operator.aggregation.state.HyperLogLogState; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.BooleanDistinctState; +import io.trino.operator.aggregation.state.HyperLogLogState; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.Convention; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; import java.lang.invoke.MethodHandle; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.Failures.internalError; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.Failures.internalError; @AggregationFunction("approx_distinct") public final class ApproximateCountDistinctAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateDoublePercentileAggregations.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateDoublePercentileAggregations.java index 5687064fd361..193d70c22fb6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateDoublePercentileAggregations.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateDoublePercentileAggregations.java @@ -15,25 +15,25 @@ import io.airlift.stats.QuantileDigest; import io.airlift.stats.TDigest; -import io.prestosql.operator.aggregation.state.QuantileDigestAndPercentileState; -import io.prestosql.operator.aggregation.state.TDigestAndPercentileState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.QuantileDigestAndPercentileState; +import io.trino.operator.aggregation.state.TDigestAndPercentileState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.Description; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.aggregation.FloatingPointBitsConverterUtil.doubleToSortableLong; -import static io.prestosql.operator.aggregation.FloatingPointBitsConverterUtil.sortableLongToDouble; -import static io.prestosql.operator.scalar.TDigestFunctions.verifyWeight; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.operator.aggregation.FloatingPointBitsConverterUtil.doubleToSortableLong; +import static io.trino.operator.aggregation.FloatingPointBitsConverterUtil.sortableLongToDouble; +import static io.trino.operator.scalar.TDigestFunctions.verifyWeight; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.util.Failures.checkCondition; @AggregationFunction("approx_percentile") public final class ApproximateDoublePercentileAggregations diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateDoublePercentileArrayAggregations.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateDoublePercentileArrayAggregations.java index eb0e4742aa0f..0abd6c69c19c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateDoublePercentileArrayAggregations.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateDoublePercentileArrayAggregations.java @@ -16,23 +16,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Doubles; import io.airlift.stats.TDigest; -import io.prestosql.operator.aggregation.state.TDigestAndPercentileArrayState; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.TDigestAndPercentileArrayState; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import java.util.List; -import static io.prestosql.operator.scalar.TDigestFunctions.verifyWeight; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.operator.scalar.TDigestFunctions.verifyWeight; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.util.Failures.checkCondition; @AggregationFunction("approx_percentile") public final class ApproximateDoublePercentileArrayAggregations diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateLongPercentileAggregations.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateLongPercentileAggregations.java index 3384af8dfe4f..05e9a96f4936 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateLongPercentileAggregations.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateLongPercentileAggregations.java @@ -15,22 +15,22 @@ import io.airlift.stats.QuantileDigest; import io.airlift.stats.TDigest; -import io.prestosql.operator.aggregation.state.QuantileDigestAndPercentileState; -import io.prestosql.operator.aggregation.state.TDigestAndPercentileState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.QuantileDigestAndPercentileState; +import io.trino.operator.aggregation.state.TDigestAndPercentileState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.Description; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.util.Failures.checkCondition; @AggregationFunction("approx_percentile") public final class ApproximateLongPercentileAggregations diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateLongPercentileArrayAggregations.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateLongPercentileArrayAggregations.java index 06d63541ff5e..3a13d7867a5d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateLongPercentileArrayAggregations.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateLongPercentileArrayAggregations.java @@ -14,22 +14,22 @@ package io.trino.operator.aggregation; import io.airlift.stats.TDigest; -import io.prestosql.operator.aggregation.state.TDigestAndPercentileArrayState; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.TDigestAndPercentileArrayState; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import java.util.List; -import static io.prestosql.operator.aggregation.ApproximateDoublePercentileArrayAggregations.valuesAtPercentiles; -import static io.prestosql.operator.aggregation.ApproximateLongPercentileAggregations.toDoubleExact; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.operator.aggregation.ApproximateDoublePercentileArrayAggregations.valuesAtPercentiles; +import static io.trino.operator.aggregation.ApproximateLongPercentileAggregations.toDoubleExact; +import static io.trino.spi.type.BigintType.BIGINT; @AggregationFunction("approx_percentile") public final class ApproximateLongPercentileArrayAggregations diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateRealPercentileAggregations.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateRealPercentileAggregations.java index bfea385418f3..a8e485f04a8f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateRealPercentileAggregations.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateRealPercentileAggregations.java @@ -15,24 +15,24 @@ import io.airlift.stats.QuantileDigest; import io.airlift.stats.TDigest; -import io.prestosql.operator.aggregation.state.QuantileDigestAndPercentileState; -import io.prestosql.operator.aggregation.state.TDigestAndPercentileState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.QuantileDigestAndPercentileState; +import io.trino.operator.aggregation.state.TDigestAndPercentileState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.Description; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.aggregation.FloatingPointBitsConverterUtil.floatToSortableInt; -import static io.prestosql.operator.aggregation.FloatingPointBitsConverterUtil.sortableIntToFloat; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.operator.aggregation.FloatingPointBitsConverterUtil.floatToSortableInt; +import static io.trino.operator.aggregation.FloatingPointBitsConverterUtil.sortableIntToFloat; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.util.Failures.checkCondition; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateRealPercentileArrayAggregations.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateRealPercentileArrayAggregations.java index 802b7ef67c3e..d3577b86fc6a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateRealPercentileArrayAggregations.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateRealPercentileArrayAggregations.java @@ -14,21 +14,21 @@ package io.trino.operator.aggregation; import io.airlift.stats.TDigest; -import io.prestosql.operator.aggregation.state.TDigestAndPercentileArrayState; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.TDigestAndPercentileArrayState; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import java.util.List; -import static io.prestosql.operator.aggregation.ApproximateDoublePercentileArrayAggregations.valuesAtPercentiles; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.operator.aggregation.ApproximateDoublePercentileArrayAggregations.valuesAtPercentiles; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateSetAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateSetAggregation.java index fb552185c679..1c165993862f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateSetAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/ApproximateSetAggregation.java @@ -15,18 +15,18 @@ import io.airlift.slice.Slice; import io.airlift.stats.cardinality.HyperLogLog; -import io.prestosql.operator.aggregation.state.HyperLogLogState; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.HyperLogLogState; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; @AggregationFunction("approx_set") public final class ApproximateSetAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/ArbitraryAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/ArbitraryAggregationFunction.java index f9f9ca91561f..5548533dc15f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/ArbitraryAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/ArbitraryAggregationFunction.java @@ -15,38 +15,38 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.state.BlockPositionState; -import io.prestosql.operator.aggregation.state.BlockPositionStateSerializer; -import io.prestosql.operator.aggregation.state.NullableBooleanState; -import io.prestosql.operator.aggregation.state.NullableDoubleState; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.state.BlockPositionState; +import io.trino.operator.aggregation.state.BlockPositionStateSerializer; +import io.trino.operator.aggregation.state.NullableBooleanState; +import io.trino.operator.aggregation.state.NullableDoubleState; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.List; import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.util.Reflection.methodHandle; public class ArbitraryAggregationFunction extends SqlAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/AverageAggregations.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/AverageAggregations.java index 3ec6fd88db82..cf223696ecac 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/AverageAggregations.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/AverageAggregations.java @@ -13,18 +13,18 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.LongAndDoubleState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.RemoveInputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.LongAndDoubleState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.RemoveInputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; @AggregationFunction("avg") public final class AverageAggregations diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/BigintApproximateMostFrequent.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/BigintApproximateMostFrequent.java index 5161b6b154e2..ed4c3925233c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/BigintApproximateMostFrequent.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/BigintApproximateMostFrequent.java @@ -13,20 +13,20 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.BigintType; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.BigintType; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.StandardTypes.BIGINT; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.StandardTypes.BIGINT; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.toIntExact; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/BitwiseAndAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/BitwiseAndAggregation.java index 84fbf0524de3..b37e59e4c8bb 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/BitwiseAndAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/BitwiseAndAggregation.java @@ -13,16 +13,16 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.StandardTypes; @AggregationFunction("bitwise_and_agg") public final class BitwiseAndAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/BitwiseOrAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/BitwiseOrAggregation.java index 30391f2f402d..f20c0f827e34 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/BitwiseOrAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/BitwiseOrAggregation.java @@ -13,16 +13,16 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.StandardTypes; @AggregationFunction("bitwise_or_agg") public final class BitwiseOrAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/BooleanAndAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/BooleanAndAggregation.java index 0d2982994bd7..b5f24b717050 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/BooleanAndAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/BooleanAndAggregation.java @@ -13,20 +13,20 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.TriStateBooleanState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.TriStateBooleanState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.aggregation.state.TriStateBooleanState.FALSE_VALUE; -import static io.prestosql.operator.aggregation.state.TriStateBooleanState.NULL_VALUE; -import static io.prestosql.operator.aggregation.state.TriStateBooleanState.TRUE_VALUE; +import static io.trino.operator.aggregation.state.TriStateBooleanState.FALSE_VALUE; +import static io.trino.operator.aggregation.state.TriStateBooleanState.NULL_VALUE; +import static io.trino.operator.aggregation.state.TriStateBooleanState.TRUE_VALUE; @AggregationFunction(value = "bool_and", alias = "every") public final class BooleanAndAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/BooleanOrAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/BooleanOrAggregation.java index b4b7a9086b3e..b950deebd289 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/BooleanOrAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/BooleanOrAggregation.java @@ -13,20 +13,20 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.TriStateBooleanState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.TriStateBooleanState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.aggregation.state.TriStateBooleanState.FALSE_VALUE; -import static io.prestosql.operator.aggregation.state.TriStateBooleanState.NULL_VALUE; -import static io.prestosql.operator.aggregation.state.TriStateBooleanState.TRUE_VALUE; +import static io.trino.operator.aggregation.state.TriStateBooleanState.FALSE_VALUE; +import static io.trino.operator.aggregation.state.TriStateBooleanState.NULL_VALUE; +import static io.trino.operator.aggregation.state.TriStateBooleanState.TRUE_VALUE; @AggregationFunction("bool_or") public final class BooleanOrAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/CentralMomentsAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/CentralMomentsAggregation.java index 21ac2e212893..ea77567fcf6e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/CentralMomentsAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/CentralMomentsAggregation.java @@ -13,20 +13,20 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.CentralMomentsState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.CentralMomentsState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.Description; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.aggregation.AggregationUtils.mergeCentralMomentsState; -import static io.prestosql.operator.aggregation.AggregationUtils.updateCentralMomentsState; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.operator.aggregation.AggregationUtils.mergeCentralMomentsState; +import static io.trino.operator.aggregation.AggregationUtils.updateCentralMomentsState; +import static io.trino.spi.type.DoubleType.DOUBLE; @AggregationFunction @Description("Returns the central moments of the argument as an array") diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/ChecksumAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/ChecksumAggregationFunction.java index 001d7431dc73..3d151e8c708b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/ChecksumAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/ChecksumAggregationFunction.java @@ -16,36 +16,36 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionXxHash64; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionXxHash64; import java.lang.invoke.MethodHandle; import java.util.List; import java.util.Optional; import static io.airlift.slice.Slices.wrappedLongArray; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.util.Reflection.methodHandle; import static java.util.Objects.requireNonNull; public class ChecksumAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/CountAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/CountAggregation.java index 69c0ea9d69de..dbdf3b9556fc 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/CountAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/CountAggregation.java @@ -13,17 +13,17 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.LongState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.RemoveInputFunction; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.LongState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.RemoveInputFunction; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; @AggregationFunction("count") public final class CountAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/CountColumn.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/CountColumn.java index 743a33981675..7a16260d6245 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/CountColumn.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/CountColumn.java @@ -15,35 +15,35 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.state.LongState; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.state.LongState; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.List; import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.util.Reflection.methodHandle; public class CountColumn extends SqlAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/CountIfAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/CountIfAggregation.java index 50a8a0f9db19..bd4e05a50451 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/CountIfAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/CountIfAggregation.java @@ -13,18 +13,18 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.LongState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.RemoveInputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.LongState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.RemoveInputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; @AggregationFunction("count_if") public final class CountIfAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/DecimalAverageAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/DecimalAverageAggregation.java index d0b34bee04fd..e7e0636755e0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/DecimalAverageAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/DecimalAverageAggregation.java @@ -17,24 +17,24 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; import io.airlift.slice.Slice; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.state.LongDecimalWithOverflowAndLongState; -import io.prestosql.operator.aggregation.state.LongDecimalWithOverflowAndLongStateFactory; -import io.prestosql.operator.aggregation.state.LongDecimalWithOverflowAndLongStateSerializer; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.UnscaledDecimal128Arithmetic; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.state.LongDecimalWithOverflowAndLongState; +import io.trino.operator.aggregation.state.LongDecimalWithOverflowAndLongStateFactory; +import io.trino.operator.aggregation.state.LongDecimalWithOverflowAndLongStateSerializer; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.UnscaledDecimal128Arithmetic; import java.lang.invoke.MethodHandle; import java.math.BigDecimal; @@ -45,17 +45,17 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.type.Decimals.writeBigDecimal; -import static io.prestosql.spi.type.Decimals.writeShortDecimal; -import static io.prestosql.spi.type.TypeSignatureParameter.typeVariable; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.UNSCALED_DECIMAL_128_SLICE_LENGTH; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.type.Decimals.writeBigDecimal; +import static io.trino.spi.type.Decimals.writeShortDecimal; +import static io.trino.spi.type.TypeSignatureParameter.typeVariable; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.UNSCALED_DECIMAL_128_SLICE_LENGTH; +import static io.trino.util.Reflection.methodHandle; import static java.math.BigDecimal.ROUND_HALF_UP; public class DecimalAverageAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/DecimalSumAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/DecimalSumAggregation.java index b03d3c92e32b..a2374feaf252 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/DecimalSumAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/DecimalSumAggregation.java @@ -16,24 +16,24 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; import io.airlift.slice.Slice; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.state.LongDecimalWithOverflowAndLongStateSerializer; -import io.prestosql.operator.aggregation.state.LongDecimalWithOverflowState; -import io.prestosql.operator.aggregation.state.LongDecimalWithOverflowStateFactory; -import io.prestosql.operator.aggregation.state.LongDecimalWithOverflowStateSerializer; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.UnscaledDecimal128Arithmetic; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.state.LongDecimalWithOverflowAndLongStateSerializer; +import io.trino.operator.aggregation.state.LongDecimalWithOverflowState; +import io.trino.operator.aggregation.state.LongDecimalWithOverflowStateFactory; +import io.trino.operator.aggregation.state.LongDecimalWithOverflowStateSerializer; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.UnscaledDecimal128Arithmetic; import java.lang.invoke.MethodHandle; import java.util.List; @@ -42,18 +42,18 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.type.TypeSignatureParameter.numericParameter; -import static io.prestosql.spi.type.TypeSignatureParameter.typeVariable; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.throwIfOverflows; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.throwOverflowException; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.type.TypeSignatureParameter.numericParameter; +import static io.trino.spi.type.TypeSignatureParameter.typeVariable; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.throwIfOverflows; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.throwOverflowException; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; +import static io.trino.util.Reflection.methodHandle; public class DecimalSumAggregation extends SqlAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/DefaultApproximateCountDistinctAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/DefaultApproximateCountDistinctAggregation.java index b33894e37d3a..fbb9f9827aba 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/DefaultApproximateCountDistinctAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/DefaultApproximateCountDistinctAggregation.java @@ -13,28 +13,28 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.BooleanDistinctState; -import io.prestosql.operator.aggregation.state.HyperLogLogState; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.BooleanDistinctState; +import io.trino.operator.aggregation.state.HyperLogLogState; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.Convention; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; import java.lang.invoke.MethodHandle; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; @AggregationFunction("approx_distinct") public final class DefaultApproximateCountDistinctAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleCorrelationAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleCorrelationAggregation.java index 6b0370371a70..86e4f33702ae 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleCorrelationAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleCorrelationAggregation.java @@ -13,20 +13,20 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.CorrelationState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.CorrelationState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.aggregation.AggregationUtils.getCorrelation; -import static io.prestosql.operator.aggregation.AggregationUtils.mergeCorrelationState; -import static io.prestosql.operator.aggregation.AggregationUtils.updateCorrelationState; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.operator.aggregation.AggregationUtils.getCorrelation; +import static io.trino.operator.aggregation.AggregationUtils.mergeCorrelationState; +import static io.trino.operator.aggregation.AggregationUtils.updateCorrelationState; +import static io.trino.spi.type.DoubleType.DOUBLE; @AggregationFunction("corr") public final class DoubleCorrelationAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleCovarianceAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleCovarianceAggregation.java index 472a95305f16..bccca85d321c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleCovarianceAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleCovarianceAggregation.java @@ -13,21 +13,21 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.CovarianceState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.CovarianceState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.aggregation.AggregationUtils.getCovariancePopulation; -import static io.prestosql.operator.aggregation.AggregationUtils.getCovarianceSample; -import static io.prestosql.operator.aggregation.AggregationUtils.mergeCovarianceState; -import static io.prestosql.operator.aggregation.AggregationUtils.updateCovarianceState; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.operator.aggregation.AggregationUtils.getCovariancePopulation; +import static io.trino.operator.aggregation.AggregationUtils.getCovarianceSample; +import static io.trino.operator.aggregation.AggregationUtils.mergeCovarianceState; +import static io.trino.operator.aggregation.AggregationUtils.updateCovarianceState; +import static io.trino.spi.type.DoubleType.DOUBLE; @AggregationFunction public final class DoubleCovarianceAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleHistogramAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleHistogramAggregation.java index 2e4677354f56..71688ff75cb7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleHistogramAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleHistogramAggregation.java @@ -13,24 +13,24 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.DoubleHistogramStateSerializer; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.DoubleType; +import io.trino.operator.aggregation.state.DoubleHistogramStateSerializer; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.DoubleType; import java.util.Map; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.StandardTypes.BIGINT; -import static io.prestosql.spi.type.StandardTypes.DOUBLE; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.StandardTypes.BIGINT; +import static io.trino.spi.type.StandardTypes.DOUBLE; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.toIntExact; @AggregationFunction("numeric_histogram") diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleRegressionAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleRegressionAggregation.java index 45299034de7f..dcb0ad826b60 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleRegressionAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleRegressionAggregation.java @@ -13,21 +13,21 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.RegressionState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.RegressionState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.aggregation.AggregationUtils.getRegressionIntercept; -import static io.prestosql.operator.aggregation.AggregationUtils.getRegressionSlope; -import static io.prestosql.operator.aggregation.AggregationUtils.mergeRegressionState; -import static io.prestosql.operator.aggregation.AggregationUtils.updateRegressionState; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.operator.aggregation.AggregationUtils.getRegressionIntercept; +import static io.trino.operator.aggregation.AggregationUtils.getRegressionSlope; +import static io.trino.operator.aggregation.AggregationUtils.mergeRegressionState; +import static io.trino.operator.aggregation.AggregationUtils.updateRegressionState; +import static io.trino.spi.type.DoubleType.DOUBLE; @AggregationFunction public final class DoubleRegressionAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleSumAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleSumAggregation.java index 2351b1b055fd..fbdfa0d77bd6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleSumAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/DoubleSumAggregation.java @@ -13,17 +13,17 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.minmaxby.LongDoubleState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.RemoveInputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.minmaxby.LongDoubleState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.RemoveInputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.StandardTypes; @AggregationFunction("sum") public final class DoubleSumAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/GenericAccumulatorFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/GenericAccumulatorFactory.java index 4ce2814a2fb1..c35c0e52f6d3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/GenericAccumulatorFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/GenericAccumulatorFactory.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.Session; -import io.prestosql.operator.GroupByIdBlock; -import io.prestosql.operator.MarkDistinctHash; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.UpdateMemory; -import io.prestosql.operator.Work; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.function.WindowIndex; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.operator.GroupByIdBlock; +import io.trino.operator.MarkDistinctHash; +import io.trino.operator.PagesIndex; +import io.trino.operator.UpdateMemory; +import io.trino.operator.Work; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.function.WindowIndex; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import javax.annotation.Nullable; @@ -43,8 +43,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.lang.Long.max; import static java.util.Objects.isNull; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/GenericAccumulatorFactoryBinder.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/GenericAccumulatorFactoryBinder.java index 4155df2689b4..074b7932603c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/GenericAccumulatorFactoryBinder.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/GenericAccumulatorFactoryBinder.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.Session; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.operator.PagesIndex; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import java.lang.reflect.Constructor; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/GeometricMeanAggregations.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/GeometricMeanAggregations.java index 519bdef33ee7..0a25f96bdc67 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/GeometricMeanAggregations.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/GeometricMeanAggregations.java @@ -13,17 +13,17 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.LongAndDoubleState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.LongAndDoubleState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; @AggregationFunction("geometric_mean") public final class GeometricMeanAggregations diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/GroupedAccumulator.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/GroupedAccumulator.java index 3ce28d04baf3..3cf6fe7e6276 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/GroupedAccumulator.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/GroupedAccumulator.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.GroupByIdBlock; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.operator.GroupByIdBlock; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public interface GroupedAccumulator { diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/InternalAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/InternalAggregationFunction.java index 83ddd8025225..78eb25786a53 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/InternalAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/InternalAggregationFunction.java @@ -15,13 +15,13 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.operator.PagesIndex; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.operator.PagesIndex; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalDayToSecondAverageAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalDayToSecondAverageAggregation.java index 12464d75e0cb..f55976282de2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalDayToSecondAverageAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalDayToSecondAverageAggregation.java @@ -13,16 +13,16 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.LongAndDoubleState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.LongAndDoubleState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; import static java.lang.Math.round; @AggregationFunction("avg") diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalDayToSecondSumAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalDayToSecondSumAggregation.java index 515218d68c7a..1c777a49ba84 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalDayToSecondSumAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalDayToSecondSumAggregation.java @@ -13,17 +13,17 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.type.BigintOperators; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.type.BigintOperators; -import static io.prestosql.spi.type.StandardTypes.INTERVAL_DAY_TO_SECOND; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.spi.type.StandardTypes.INTERVAL_DAY_TO_SECOND; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; @AggregationFunction("sum") public final class IntervalDayToSecondSumAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalYearToMonthAverageAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalYearToMonthAverageAggregation.java index fd70e29c86a3..9b462e44d9ef 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalYearToMonthAverageAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalYearToMonthAverageAggregation.java @@ -13,16 +13,16 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.LongAndDoubleState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.LongAndDoubleState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; +import static io.trino.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; import static java.lang.Math.round; @AggregationFunction("avg") diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalYearToMonthSumAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalYearToMonthSumAggregation.java index 3db205466db9..e0f6f77c96ed 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalYearToMonthSumAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/IntervalYearToMonthSumAggregation.java @@ -13,17 +13,17 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.type.BigintOperators; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.type.BigintOperators; -import static io.prestosql.spi.type.StandardTypes.INTERVAL_YEAR_TO_MONTH; -import static io.prestosql.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; +import static io.trino.spi.type.StandardTypes.INTERVAL_YEAR_TO_MONTH; +import static io.trino.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; @AggregationFunction("sum") public final class IntervalYearToMonthSumAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/KeyValuePairs.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/KeyValuePairs.java index ea6489a23630..34846dc0ec98 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/KeyValuePairs.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/KeyValuePairs.java @@ -13,20 +13,20 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import org.openjdk.jol.info.ClassLayout; import java.util.Arrays; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; -import static io.prestosql.type.TypeUtils.expectedValueSize; +import static io.trino.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; +import static io.trino.type.TypeUtils.expectedValueSize; import static it.unimi.dsi.fastutil.HashCommon.arraySize; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/LazyAccumulatorFactoryBinder.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/LazyAccumulatorFactoryBinder.java index d53852086353..9a3c02f19f3f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/LazyAccumulatorFactoryBinder.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/LazyAccumulatorFactoryBinder.java @@ -16,12 +16,12 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Suppliers; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.Session; -import io.prestosql.operator.PagesIndex; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.operator.PagesIndex; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/LongApproximateMostFrequentStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/LongApproximateMostFrequentStateFactory.java index 6d1f17d3f967..e0844480bdd1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/LongApproximateMostFrequentStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/LongApproximateMostFrequentStateFactory.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.operator.aggregation.state.AbstractGroupedAccumulatorState; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.ObjectBigArray; +import io.trino.operator.aggregation.state.AbstractGroupedAccumulatorState; +import io.trino.spi.function.AccumulatorStateFactory; public class LongApproximateMostFrequentStateFactory implements AccumulatorStateFactory diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/LongApproximateMostFrequentStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/LongApproximateMostFrequentStateSerializer.java index 345a1a6b66b9..71657cf84016 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/LongApproximateMostFrequentStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/LongApproximateMostFrequentStateSerializer.java @@ -15,12 +15,12 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.SliceInput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarbinaryType.VARBINARY; public class LongApproximateMostFrequentStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/LongSumAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/LongSumAggregation.java index 68786a803f0b..9e92b51c5213 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/LongSumAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/LongSumAggregation.java @@ -13,18 +13,18 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.minmaxby.LongLongState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.RemoveInputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.type.BigintOperators; +import io.trino.operator.aggregation.minmaxby.LongLongState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.RemoveInputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.StandardTypes; +import io.trino.type.BigintOperators; @AggregationFunction("sum") public final class LongSumAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/MapAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/MapAggregationFunction.java index c78e346910fd..08aa37bae266 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/MapAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/MapAggregationFunction.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.state.KeyValuePairStateSerializer; -import io.prestosql.operator.aggregation.state.KeyValuePairsState; -import io.prestosql.operator.aggregation.state.KeyValuePairsStateFactory; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.state.KeyValuePairStateSerializer; +import io.trino.operator.aggregation.state.KeyValuePairsState; +import io.trino.operator.aggregation.state.KeyValuePairsStateFactory; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -39,17 +39,17 @@ import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.util.Reflection.methodHandle; import static java.util.Objects.requireNonNull; public class MapAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/MapUnionAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/MapUnionAggregation.java index 3137da09b411..4c7791cfb9e9 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/MapUnionAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/MapUnionAggregation.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.state.KeyValuePairStateSerializer; -import io.prestosql.operator.aggregation.state.KeyValuePairsState; -import io.prestosql.operator.aggregation.state.KeyValuePairsStateFactory; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.state.KeyValuePairStateSerializer; +import io.trino.operator.aggregation.state.KeyValuePairsState; +import io.trino.operator.aggregation.state.KeyValuePairsStateFactory; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -39,15 +39,15 @@ import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.util.Reflection.methodHandle; import static java.util.Objects.requireNonNull; public class MapUnionAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/MaxDataSizeForStats.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/MaxDataSizeForStats.java index a9c4ec8272b9..2709072788b5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/MaxDataSizeForStats.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/MaxDataSizeForStats.java @@ -13,20 +13,20 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.StandardTypes; import static java.lang.Math.max; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/MaxNAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/MaxNAggregationFunction.java index cdd1cb0f034a..70f655b4e5b0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/MaxNAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/MaxNAggregationFunction.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation; -import io.prestosql.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators; -import static io.prestosql.util.MinMaxCompare.getMaxCompare; +import static io.trino.util.MinMaxCompare.getMaxCompare; public class MaxNAggregationFunction extends AbstractMinMaxNAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/MergeHyperLogLogAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/MergeHyperLogLogAggregation.java index 1a4ecea93ea8..cbd35546fa5c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/MergeHyperLogLogAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/MergeHyperLogLogAggregation.java @@ -15,17 +15,17 @@ import io.airlift.slice.Slice; import io.airlift.stats.cardinality.HyperLogLog; -import io.prestosql.operator.aggregation.state.HyperLogLogState; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.HyperLogLogState; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; @AggregationFunction("merge") public final class MergeHyperLogLogAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/MergeQuantileDigestFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/MergeQuantileDigestFunction.java index 17fde74a5bf7..f11a38027433 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/MergeQuantileDigestFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/MergeQuantileDigestFunction.java @@ -16,39 +16,39 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; import io.airlift.stats.QuantileDigest; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.state.QuantileDigestState; -import io.prestosql.operator.aggregation.state.QuantileDigestStateFactory; -import io.prestosql.operator.aggregation.state.QuantileDigestStateSerializer; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.type.QuantileDigestType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.state.QuantileDigestState; +import io.trino.operator.aggregation.state.QuantileDigestStateFactory; +import io.trino.operator.aggregation.state.QuantileDigestStateSerializer; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.type.QuantileDigestType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.List; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.type.TypeSignature.parametricType; -import static io.prestosql.util.MoreMath.nearlyEqual; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.type.TypeSignature.parametricType; +import static io.trino.util.MoreMath.nearlyEqual; +import static io.trino.util.Reflection.methodHandle; @AggregationFunction("merge") public final class MergeQuantileDigestFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/MergeTDigestAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/MergeTDigestAggregation.java index c7ba69fa7783..f1edd5aa9da9 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/MergeTDigestAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/MergeTDigestAggregation.java @@ -14,17 +14,17 @@ package io.trino.operator.aggregation; import io.airlift.stats.TDigest; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.operator.aggregation.state.TDigestState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.operator.aggregation.state.TDigestState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; @AggregationFunction("merge") public final class MergeTDigestAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/MinNAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/MinNAggregationFunction.java index 80c202b543be..d5cb2d02d145 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/MinNAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/MinNAggregationFunction.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation; -import io.prestosql.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators; public class MinNAggregationFunction extends AbstractMinMaxNAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/NumericHistogramStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/NumericHistogramStateFactory.java index 85b7f82b5ddb..925adecaef29 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/NumericHistogramStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/NumericHistogramStateFactory.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.operator.aggregation.state.AbstractGroupedAccumulatorState; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.ObjectBigArray; +import io.trino.operator.aggregation.state.AbstractGroupedAccumulatorState; +import io.trino.spi.function.AccumulatorStateFactory; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/ParametricAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/ParametricAggregation.java index cca7de0a9cd3..e17fd4fa32dd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/ParametricAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/ParametricAggregation.java @@ -16,25 +16,25 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.ParametricImplementationsGroup; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.operator.annotations.ImplementationDependency; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.ParametricImplementationsGroup; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.operator.annotations.ImplementationDependency; +import io.trino.spi.PrestoException; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.Collection; @@ -43,13 +43,13 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.operator.ParametricFunctionHelpers.bindDependencies; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.operator.aggregation.state.StateCompiler.generateStateSerializer; -import static io.prestosql.operator.aggregation.state.StateCompiler.getSerializedType; -import static io.prestosql.spi.StandardErrorCode.AMBIGUOUS_FUNCTION_CALL; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_MISSING; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.operator.ParametricFunctionHelpers.bindDependencies; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.operator.aggregation.state.StateCompiler.generateStateSerializer; +import static io.trino.operator.aggregation.state.StateCompiler.getSerializedType; +import static io.trino.spi.StandardErrorCode.AMBIGUOUS_FUNCTION_CALL; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_MISSING; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/QuantileDigestAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/QuantileDigestAggregationFunction.java index 7fa577630a4a..b62ad1817d9e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/QuantileDigestAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/QuantileDigestAggregationFunction.java @@ -16,19 +16,19 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; import io.airlift.stats.QuantileDigest; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.state.QuantileDigestState; -import io.prestosql.operator.aggregation.state.QuantileDigestStateFactory; -import io.prestosql.operator.aggregation.state.QuantileDigestStateSerializer; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.QuantileDigestType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.state.QuantileDigestState; +import io.trino.operator.aggregation.state.QuantileDigestStateFactory; +import io.trino.operator.aggregation.state.QuantileDigestStateSerializer; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.QuantileDigestType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.List; @@ -36,23 +36,23 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.operator.aggregation.FloatingPointBitsConverterUtil.doubleToSortableLong; -import static io.prestosql.operator.aggregation.FloatingPointBitsConverterUtil.floatToSortableInt; -import static io.prestosql.operator.scalar.QuantileDigestFunctions.DEFAULT_ACCURACY; -import static io.prestosql.operator.scalar.QuantileDigestFunctions.DEFAULT_WEIGHT; -import static io.prestosql.operator.scalar.QuantileDigestFunctions.verifyAccuracy; -import static io.prestosql.operator.scalar.QuantileDigestFunctions.verifyWeight; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TypeSignature.parametricType; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.operator.aggregation.FloatingPointBitsConverterUtil.doubleToSortableLong; +import static io.trino.operator.aggregation.FloatingPointBitsConverterUtil.floatToSortableInt; +import static io.trino.operator.scalar.QuantileDigestFunctions.DEFAULT_ACCURACY; +import static io.trino.operator.scalar.QuantileDigestFunctions.DEFAULT_WEIGHT; +import static io.trino.operator.scalar.QuantileDigestFunctions.verifyAccuracy; +import static io.trino.operator.scalar.QuantileDigestFunctions.verifyWeight; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TypeSignature.parametricType; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Float.intBitsToFloat; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.insertArguments; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealAverageAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealAverageAggregation.java index 6eb15c870cff..f7b6913b6ea4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealAverageAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealAverageAggregation.java @@ -15,34 +15,34 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.state.DoubleState; -import io.prestosql.operator.aggregation.state.LongState; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.state.DoubleState; +import io.trino.operator.aggregation.state.LongState; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.List; import java.util.Optional; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Float.floatToIntBits; import static java.lang.Float.intBitsToFloat; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealCorrelationAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealCorrelationAggregation.java index cbf6e1edeeb1..763685c4a5e3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealCorrelationAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealCorrelationAggregation.java @@ -13,18 +13,18 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.CorrelationState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.CorrelationState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.aggregation.AggregationUtils.getCorrelation; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.operator.aggregation.AggregationUtils.getCorrelation; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealCovarianceAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealCovarianceAggregation.java index a4e407dcaddc..f743939029eb 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealCovarianceAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealCovarianceAggregation.java @@ -13,19 +13,19 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.CovarianceState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.CovarianceState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.aggregation.AggregationUtils.getCovariancePopulation; -import static io.prestosql.operator.aggregation.AggregationUtils.getCovarianceSample; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.operator.aggregation.AggregationUtils.getCovariancePopulation; +import static io.trino.operator.aggregation.AggregationUtils.getCovarianceSample; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.intBitsToFloat; @AggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealGeometricMeanAggregations.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealGeometricMeanAggregations.java index 1b9029422c5a..d55c7753e06b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealGeometricMeanAggregations.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealGeometricMeanAggregations.java @@ -13,17 +13,17 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.LongAndDoubleState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.LongAndDoubleState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealHistogramAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealHistogramAggregation.java index 579bf60256c2..e4720a9b97f4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealHistogramAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealHistogramAggregation.java @@ -13,18 +13,18 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import java.util.Map; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealRegressionAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealRegressionAggregation.java index a86f5f518ab9..52a478516143 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealRegressionAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealRegressionAggregation.java @@ -13,19 +13,19 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.RegressionState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.RegressionState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.aggregation.AggregationUtils.getRegressionIntercept; -import static io.prestosql.operator.aggregation.AggregationUtils.getRegressionSlope; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.operator.aggregation.AggregationUtils.getRegressionIntercept; +import static io.trino.operator.aggregation.AggregationUtils.getRegressionSlope; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealSumAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealSumAggregation.java index a75014a5920c..1863b1b84bb1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/RealSumAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/RealSumAggregation.java @@ -13,17 +13,17 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.NullableDoubleState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.NullableDoubleState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/ReduceAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/ReduceAggregationFunction.java index 69e01f0c2f74..38fc1d5be213 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/ReduceAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/ReduceAggregationFunction.java @@ -15,35 +15,35 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import io.prestosql.operator.aggregation.state.NullableBooleanState; -import io.prestosql.operator.aggregation.state.NullableDoubleState; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.lambda.BinaryFunctionInterface; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import io.trino.operator.aggregation.state.NullableBooleanState; +import io.trino.operator.aggregation.state.NullableDoubleState; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.lambda.BinaryFunctionInterface; import java.lang.invoke.MethodHandle; import java.util.List; import java.util.Optional; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.TypeSignature.functionType; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.TypeSignature.functionType; +import static io.trino.util.Reflection.methodHandle; import static java.lang.String.format; public class ReduceAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/StringApproximateMostFrequentStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/StringApproximateMostFrequentStateFactory.java index 08169a0bafcc..b1f0e0993ec6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/StringApproximateMostFrequentStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/StringApproximateMostFrequentStateFactory.java @@ -14,9 +14,9 @@ package io.trino.operator.aggregation; import io.airlift.slice.Slice; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.operator.aggregation.state.AbstractGroupedAccumulatorState; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.ObjectBigArray; +import io.trino.operator.aggregation.state.AbstractGroupedAccumulatorState; +import io.trino.spi.function.AccumulatorStateFactory; public class StringApproximateMostFrequentStateFactory implements AccumulatorStateFactory diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/StringApproximateMostFrequentStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/StringApproximateMostFrequentStateSerializer.java index 8a7f9d4cef28..6bab38474bb6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/StringApproximateMostFrequentStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/StringApproximateMostFrequentStateSerializer.java @@ -16,12 +16,12 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.SliceInput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarbinaryType.VARBINARY; public class StringApproximateMostFrequentStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/SumDataSizeForStats.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/SumDataSizeForStats.java index 3df4dd65a881..0951ed5f87de 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/SumDataSizeForStats.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/SumDataSizeForStats.java @@ -13,20 +13,20 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.StandardTypes; @AggregationFunction(value = SumDataSizeForStats.NAME, hidden = true) public final class SumDataSizeForStats diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/TDigestAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/TDigestAggregationFunction.java index ab55b5ec9bc2..894c5f31b961 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/TDigestAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/TDigestAggregationFunction.java @@ -14,19 +14,19 @@ package io.trino.operator.aggregation; import io.airlift.stats.TDigest; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.operator.aggregation.state.TDigestState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.operator.aggregation.state.TDigestState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.scalar.TDigestFunctions.verifyWeight; +import static io.trino.operator.scalar.TDigestFunctions.verifyWeight; @AggregationFunction("tdigest_agg") public final class TDigestAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedHeap.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedHeap.java index f745011d87c7..0d5401c09bc8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedHeap.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedHeap.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; import org.openjdk.jol.info.ClassLayout; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedKeyValueHeap.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedKeyValueHeap.java index 500de5275397..421a9508b8ae 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedKeyValueHeap.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedKeyValueHeap.java @@ -14,17 +14,17 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; import org.openjdk.jol.info.ClassLayout; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.Math.toIntExact; public class TypedKeyValueHeap diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedSet.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedSet.java index 4e4f81ed949a..d8e82e3262fd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedSet.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedSet.java @@ -15,20 +15,20 @@ import com.google.common.annotations.VisibleForTesting; import io.airlift.units.DataSize; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; -import io.prestosql.type.BlockTypeOperators.BlockPositionIsDistinctFrom; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.type.BlockTypeOperators.BlockPositionIsDistinctFrom; import it.unimi.dsi.fastutil.ints.IntArrayList; import org.openjdk.jol.info.ClassLayout; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_FUNCTION_MEMORY_LIMIT; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; +import static io.trino.spi.StandardErrorCode.EXCEEDED_FUNCTION_MEMORY_LIMIT; +import static io.trino.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; import static it.unimi.dsi.fastutil.HashCommon.arraySize; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/VarcharApproximateMostFrequent.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/VarcharApproximateMostFrequent.java index 0bdd2cb21c7c..cb2824069621 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/VarcharApproximateMostFrequent.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/VarcharApproximateMostFrequent.java @@ -14,22 +14,22 @@ package io.trino.operator.aggregation; import io.airlift.slice.Slice; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.VarcharType; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.StandardTypes.BIGINT; -import static io.prestosql.spi.type.StandardTypes.VARCHAR; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.StandardTypes.BIGINT; +import static io.trino.spi.type.StandardTypes.VARCHAR; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.toIntExact; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/VarianceAggregation.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/VarianceAggregation.java index 59bf0b70c45f..a7142ebb81cf 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/VarianceAggregation.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/VarianceAggregation.java @@ -13,20 +13,20 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.VarianceState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.VarianceState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.Description; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.aggregation.AggregationUtils.mergeVarianceState; -import static io.prestosql.operator.aggregation.AggregationUtils.updateVarianceState; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.operator.aggregation.AggregationUtils.mergeVarianceState; +import static io.trino.operator.aggregation.AggregationUtils.updateVarianceState; +import static io.trino.spi.type.DoubleType.DOUBLE; @AggregationFunction public final class VarianceAggregation diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationFunction.java index 13bbe4031a7f..32ae989544b5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationFunction.java @@ -15,38 +15,38 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AccumulatorCompiler; -import io.prestosql.operator.aggregation.AggregationMetadata; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import io.prestosql.operator.aggregation.GenericAccumulatorFactoryBinder; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AccumulatorCompiler; +import io.trino.operator.aggregation.AggregationMetadata; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import io.trino.operator.aggregation.GenericAccumulatorFactoryBinder; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.List; import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.util.Reflection.methodHandle; public class ArrayAggregationFunction extends SqlAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationState.java index 2c9286626c00..88fa53913346 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationState.java @@ -13,8 +13,8 @@ */ package io.trino.operator.aggregation.arrayagg; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.AccumulatorState; +import io.trino.spi.block.Block; +import io.trino.spi.function.AccumulatorState; public interface ArrayAggregationState extends AccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationStateConsumer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationStateConsumer.java index a38edefc4513..a7314f7c40b3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationStateConsumer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationStateConsumer.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.arrayagg; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; public interface ArrayAggregationStateConsumer { diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationStateFactory.java index 311e2440c725..616157da05ca 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationStateFactory.java @@ -13,8 +13,8 @@ */ package io.trino.operator.aggregation.arrayagg; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.type.Type; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.type.Type; public class ArrayAggregationStateFactory implements AccumulatorStateFactory diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationStateSerializer.java index 4306d436238b..4bf5b7bd4e17 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/ArrayAggregationStateSerializer.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation.arrayagg; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; public class ArrayAggregationStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/GroupArrayAggregationState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/GroupArrayAggregationState.java index 07b4de43589d..4a0f982d1602 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/GroupArrayAggregationState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/GroupArrayAggregationState.java @@ -14,10 +14,10 @@ package io.trino.operator.aggregation.arrayagg; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.aggregation.AbstractGroupCollectionAggregationState; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.operator.aggregation.AbstractGroupCollectionAggregationState; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; public final class GroupArrayAggregationState extends AbstractGroupCollectionAggregationState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/SingleArrayAggregationState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/SingleArrayAggregationState.java index c2022efb8e8a..d302cd1933fd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/SingleArrayAggregationState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/arrayagg/SingleArrayAggregationState.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation.arrayagg; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import static com.google.common.base.Verify.verify; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/HashAggregationBuilder.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/HashAggregationBuilder.java index 3b60345cec0c..bc230b141c6b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/HashAggregationBuilder.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/HashAggregationBuilder.java @@ -14,10 +14,10 @@ package io.trino.operator.aggregation.builder; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.operator.HashCollisionsCounter; -import io.prestosql.operator.Work; -import io.prestosql.operator.WorkProcessor; -import io.prestosql.spi.Page; +import io.trino.operator.HashCollisionsCounter; +import io.trino.operator.Work; +import io.trino.operator.WorkProcessor; +import io.trino.spi.Page; public interface HashAggregationBuilder extends AutoCloseable diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/InMemoryHashAggregationBuilder.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/InMemoryHashAggregationBuilder.java index 215dc6d65254..f5ee8584ccdb 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/InMemoryHashAggregationBuilder.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/InMemoryHashAggregationBuilder.java @@ -18,26 +18,26 @@ import com.google.common.primitives.Ints; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.array.IntBigArray; -import io.prestosql.operator.GroupByHash; -import io.prestosql.operator.GroupByIdBlock; -import io.prestosql.operator.HashCollisionsCounter; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.TransformWork; -import io.prestosql.operator.UpdateMemory; -import io.prestosql.operator.Work; -import io.prestosql.operator.WorkProcessor; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.operator.aggregation.AccumulatorFactory; -import io.prestosql.operator.aggregation.GroupedAccumulator; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.type.BlockTypeOperators; +import io.trino.array.IntBigArray; +import io.trino.operator.GroupByHash; +import io.trino.operator.GroupByIdBlock; +import io.trino.operator.HashCollisionsCounter; +import io.trino.operator.OperatorContext; +import io.trino.operator.TransformWork; +import io.trino.operator.UpdateMemory; +import io.trino.operator.Work; +import io.trino.operator.WorkProcessor; +import io.trino.operator.WorkProcessor.ProcessState; +import io.trino.operator.aggregation.AccumulatorFactory; +import io.trino.operator.aggregation.GroupedAccumulator; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.type.BlockTypeOperators; import it.unimi.dsi.fastutil.ints.AbstractIntIterator; import it.unimi.dsi.fastutil.ints.IntIterator; import it.unimi.dsi.fastutil.ints.IntIterators; @@ -48,9 +48,9 @@ import java.util.OptionalLong; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.SystemSessionProperties.isDictionaryAggregationEnabled; -import static io.prestosql.operator.GroupByHash.createGroupByHash; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.SystemSessionProperties.isDictionaryAggregationEnabled; +import static io.trino.operator.GroupByHash.createGroupByHash; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; public class InMemoryHashAggregationBuilder diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/MergingHashAggregationBuilder.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/MergingHashAggregationBuilder.java index 8185f3b646f0..183b48f4fdab 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/MergingHashAggregationBuilder.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/MergingHashAggregationBuilder.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.WorkProcessor; -import io.prestosql.operator.WorkProcessor.Transformation; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.operator.aggregation.AccumulatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.type.BlockTypeOperators; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.OperatorContext; +import io.trino.operator.WorkProcessor; +import io.trino.operator.WorkProcessor.Transformation; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.operator.aggregation.AccumulatorFactory; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.type.BlockTypeOperators; import java.io.Closeable; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/SpillableHashAggregationBuilder.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/SpillableHashAggregationBuilder.java index 16d10d5d2998..b0705a6a4f92 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/SpillableHashAggregationBuilder.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/builder/SpillableHashAggregationBuilder.java @@ -17,20 +17,20 @@ import com.google.common.io.Closer; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.HashCollisionsCounter; -import io.prestosql.operator.MergeHashSort; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.Work; -import io.prestosql.operator.WorkProcessor; -import io.prestosql.operator.aggregation.AccumulatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.Spiller; -import io.prestosql.spiller.SpillerFactory; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.type.BlockTypeOperators; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.HashCollisionsCounter; +import io.trino.operator.MergeHashSort; +import io.trino.operator.OperatorContext; +import io.trino.operator.Work; +import io.trino.operator.WorkProcessor; +import io.trino.operator.aggregation.AccumulatorFactory; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.spiller.Spiller; +import io.trino.spiller.SpillerFactory; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.type.BlockTypeOperators; import java.io.IOException; import java.util.List; @@ -41,7 +41,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.util.concurrent.Futures.immediateFuture; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.operator.Operator.NOT_BLOCKED; +import static io.trino.operator.Operator.NOT_BLOCKED; import static java.lang.Math.max; public class SpillableHashAggregationBuilder diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/GroupedHistogramState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/GroupedHistogramState.java index 00c3292197a0..f47d5c44ef5e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/GroupedHistogramState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/GroupedHistogramState.java @@ -14,11 +14,11 @@ package io.trino.operator.aggregation.histogram; -import io.prestosql.operator.aggregation.state.AbstractGroupedAccumulatorState; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.operator.aggregation.state.AbstractGroupedAccumulatorState; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import org.openjdk.jol.info.ClassLayout; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/GroupedTypedHistogram.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/GroupedTypedHistogram.java index 553f85d6bce4..24dcc76c9273 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/GroupedTypedHistogram.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/GroupedTypedHistogram.java @@ -13,23 +13,23 @@ */ package io.trino.operator.aggregation.histogram; -import io.prestosql.array.IntBigArray; -import io.prestosql.array.LongBigArray; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.array.IntBigArray; +import io.trino.array.LongBigArray; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import org.openjdk.jol.info.ClassLayout; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.aggregation.histogram.HashUtil.calculateMaxFill; -import static io.prestosql.operator.aggregation.histogram.HashUtil.nextBucketId; -import static io.prestosql.operator.aggregation.histogram.HashUtil.nextProbeLinear; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.operator.aggregation.histogram.HashUtil.calculateMaxFill; +import static io.trino.operator.aggregation.histogram.HashUtil.nextBucketId; +import static io.trino.operator.aggregation.histogram.HashUtil.nextProbeLinear; +import static io.trino.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; +import static io.trino.spi.type.BigintType.BIGINT; import static it.unimi.dsi.fastutil.HashCommon.arraySize; import static it.unimi.dsi.fastutil.HashCommon.murmurHash3; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/Histogram.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/Histogram.java index 212825d25df2..ba67f44929e1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/Histogram.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/Histogram.java @@ -15,39 +15,39 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AccumulatorCompiler; -import io.prestosql.operator.aggregation.AggregationMetadata; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.GenericAccumulatorFactoryBinder; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AccumulatorCompiler; +import io.trino.operator.aggregation.AggregationMetadata; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.GenericAccumulatorFactoryBinder; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import java.lang.invoke.MethodHandle; import java.util.List; import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.util.Reflection.methodHandle; import static java.util.Objects.requireNonNull; public class Histogram diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramState.java index 2c4bfa9d027d..2d9f451a0e6b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramState.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation.histogram; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.block.Block; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; @AccumulatorStateMetadata(stateFactoryClass = HistogramStateFactory.class, stateSerializerClass = HistogramStateSerializer.class) public interface HistogramState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramStateFactory.java index 93f6fbee396d..99d7a0bac299 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramStateFactory.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation.histogram; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramStateSerializer.java index 39cf3ed37e44..d0489c0bc9b8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramStateSerializer.java @@ -13,12 +13,12 @@ */ package io.trino.operator.aggregation.histogram; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.operator.aggregation.histogram.Histogram.EXPECTED_SIZE_FOR_HASHING; +import static io.trino.operator.aggregation.histogram.Histogram.EXPECTED_SIZE_FOR_HASHING; public class HistogramStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramValueReader.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramValueReader.java index f64ac37158ad..fe9d65776218 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramValueReader.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/HistogramValueReader.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.histogram; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; public interface HistogramValueReader { diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/SingleHistogramState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/SingleHistogramState.java index 7a1d97a7c9e0..ba3803e16264 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/SingleHistogramState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/SingleHistogramState.java @@ -14,10 +14,10 @@ package io.trino.operator.aggregation.histogram; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import org.openjdk.jol.info.ClassLayout; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/SingleTypedHistogram.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/SingleTypedHistogram.java index 91f0ea04cd34..1f0924bdf309 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/SingleTypedHistogram.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/SingleTypedHistogram.java @@ -13,19 +13,19 @@ */ package io.trino.operator.aggregation.histogram; -import io.prestosql.array.IntBigArray; -import io.prestosql.array.LongBigArray; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.array.IntBigArray; +import io.trino.array.LongBigArray; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import org.openjdk.jol.info.ClassLayout; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; +import static io.trino.spi.type.BigintType.BIGINT; import static it.unimi.dsi.fastutil.HashCommon.arraySize; import static it.unimi.dsi.fastutil.HashCommon.murmurHash3; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/TypedHistogram.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/TypedHistogram.java index 60f0148fc55d..0a9428e09235 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/TypedHistogram.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/TypedHistogram.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation.histogram; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public interface TypedHistogram { diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/ValueStore.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/ValueStore.java index 670142702fae..3ca2a819feb5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/ValueStore.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/histogram/ValueStore.java @@ -14,21 +14,21 @@ package io.trino.operator.aggregation.histogram; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.array.IntBigArray; -import io.prestosql.array.LongBigArray; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.array.IntBigArray; +import io.trino.array.LongBigArray; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; import org.openjdk.jol.info.ClassLayout; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.aggregation.histogram.HashUtil.calculateMaxFill; -import static io.prestosql.operator.aggregation.histogram.HashUtil.computeBucketCount; -import static io.prestosql.operator.aggregation.histogram.HashUtil.nextBucketId; -import static io.prestosql.operator.aggregation.histogram.HashUtil.nextProbeLinear; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; +import static io.trino.operator.aggregation.histogram.HashUtil.calculateMaxFill; +import static io.trino.operator.aggregation.histogram.HashUtil.computeBucketCount; +import static io.trino.operator.aggregation.histogram.HashUtil.nextBucketId; +import static io.trino.operator.aggregation.histogram.HashUtil.nextProbeLinear; +import static io.trino.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/AbstractMinMaxBy.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/AbstractMinMaxBy.java index be7a7f242d86..33de5949252d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/AbstractMinMaxBy.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/AbstractMinMaxBy.java @@ -23,29 +23,29 @@ import io.airlift.bytecode.Parameter; import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.expression.BytecodeExpression; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AccumulatorCompiler; -import io.prestosql.operator.aggregation.AggregationMetadata; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.GenericAccumulatorFactoryBinder; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.CallSiteBinder; -import io.prestosql.sql.gen.SqlTypeBytecodeExpression; -import io.prestosql.util.MinMaxCompare; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AccumulatorCompiler; +import io.trino.operator.aggregation.AggregationMetadata; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.GenericAccumulatorFactoryBinder; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.CallSiteBinder; +import io.trino.sql.gen.SqlTypeBytecodeExpression; +import io.trino.util.MinMaxCompare; import java.lang.invoke.MethodHandle; import java.lang.reflect.Method; @@ -66,26 +66,26 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.constantBoolean; import static io.airlift.bytecode.expression.BytecodeExpressions.not; import static io.airlift.bytecode.expression.BytecodeExpressions.or; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.orderableTypeParameter; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.operator.aggregation.minmaxby.TwoNullableValueStateMapping.getStateClass; -import static io.prestosql.operator.aggregation.minmaxby.TwoNullableValueStateMapping.getStateSerializer; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.sql.gen.BytecodeUtils.loadConstant; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.orderableTypeParameter; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.operator.aggregation.minmaxby.TwoNullableValueStateMapping.getStateClass; +import static io.trino.operator.aggregation.minmaxby.TwoNullableValueStateMapping.getStateSerializer; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.sql.gen.BytecodeUtils.loadConstant; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Reflection.methodHandle; import static java.util.Arrays.stream; public abstract class AbstractMinMaxBy diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/AbstractMinMaxByNAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/AbstractMinMaxByNAggregationFunction.java index 4a55b2a3af3f..1c2db459e751 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/AbstractMinMaxByNAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/AbstractMinMaxByNAggregationFunction.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AbstractMinMaxNAggregationFunction; -import io.prestosql.operator.aggregation.AccumulatorCompiler; -import io.prestosql.operator.aggregation.AggregationMetadata; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.GenericAccumulatorFactoryBinder; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.aggregation.TypedKeyValueHeap; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AbstractMinMaxNAggregationFunction; +import io.trino.operator.aggregation.AccumulatorCompiler; +import io.trino.operator.aggregation.AggregationMetadata; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.GenericAccumulatorFactoryBinder; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.aggregation.TypedKeyValueHeap; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; import java.lang.invoke.MethodHandle; import java.util.List; @@ -41,19 +41,19 @@ import java.util.function.Function; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.orderableTypeParameter; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.orderableTypeParameter; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/BooleanAndBlockPositionStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/BooleanAndBlockPositionStateSerializer.java index 12ad94747d09..8d2f757e3af3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/BooleanAndBlockPositionStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/BooleanAndBlockPositionStateSerializer.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation.minmaxby; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; class BooleanAndBlockPositionStateSerializer extends KeyAndBlockPositionValueStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/DoubleAndBlockPositionStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/DoubleAndBlockPositionStateSerializer.java index f1eb98930112..1667255127f8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/DoubleAndBlockPositionStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/DoubleAndBlockPositionStateSerializer.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation.minmaxby; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; class DoubleAndBlockPositionStateSerializer extends KeyAndBlockPositionValueStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/KeyAndBlockPositionValueState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/KeyAndBlockPositionValueState.java index 82d99d4b8f58..7b1aa5129356 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/KeyAndBlockPositionValueState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/KeyAndBlockPositionValueState.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.minmaxby; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; /** * Used for MinMaxBy aggregation states where value's native container type is Block or Slice. diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/KeyAndBlockPositionValueStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/KeyAndBlockPositionValueStateSerializer.java index e2d2b654fb6e..c29bf680260f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/KeyAndBlockPositionValueStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/KeyAndBlockPositionValueStateSerializer.java @@ -14,17 +14,17 @@ package io.trino.operator.aggregation.minmaxby; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.AbstractRowBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ColumnarRow; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.AbstractRowBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ColumnarRow; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.block.ColumnarRow.toColumnarRow; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.block.ColumnarRow.toColumnarRow; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.util.Objects.requireNonNull; public abstract class KeyAndBlockPositionValueStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/LongAndBlockPositionStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/LongAndBlockPositionStateSerializer.java index c24043f825e4..0fbdfde6b71f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/LongAndBlockPositionStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/LongAndBlockPositionStateSerializer.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation.minmaxby; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; class LongAndBlockPositionStateSerializer extends KeyAndBlockPositionValueStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MaxByNAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MaxByNAggregationFunction.java index 86b9a479c1af..729f710aab78 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MaxByNAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MaxByNAggregationFunction.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation.minmaxby; -import io.prestosql.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators; -import static io.prestosql.util.MinMaxCompare.getMaxCompare; +import static io.trino.util.MinMaxCompare.getMaxCompare; public class MaxByNAggregationFunction extends AbstractMinMaxByNAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinByNAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinByNAggregationFunction.java index 2e0208623210..f4c2c88937a6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinByNAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinByNAggregationFunction.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.minmaxby; -import io.prestosql.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators; public class MinByNAggregationFunction extends AbstractMinMaxByNAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinMaxByNState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinMaxByNState.java index 799e002da355..7dbfa5a7db67 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinMaxByNState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinMaxByNState.java @@ -13,8 +13,8 @@ */ package io.trino.operator.aggregation.minmaxby; -import io.prestosql.operator.aggregation.TypedKeyValueHeap; -import io.prestosql.spi.function.AccumulatorState; +import io.trino.operator.aggregation.TypedKeyValueHeap; +import io.trino.spi.function.AccumulatorState; public interface MinMaxByNState extends AccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinMaxByNStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinMaxByNStateFactory.java index 81d901b5fe84..e62c3b3b3929 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinMaxByNStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinMaxByNStateFactory.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation.minmaxby; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.operator.aggregation.TypedKeyValueHeap; -import io.prestosql.operator.aggregation.state.AbstractGroupedAccumulatorState; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.ObjectBigArray; +import io.trino.operator.aggregation.TypedKeyValueHeap; +import io.trino.operator.aggregation.state.AbstractGroupedAccumulatorState; +import io.trino.spi.function.AccumulatorStateFactory; import org.openjdk.jol.info.ClassLayout; public class MinMaxByNStateFactory diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinMaxByNStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinMaxByNStateSerializer.java index c788da01ed62..c58536f92ad3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinMaxByNStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/MinMaxByNStateSerializer.java @@ -13,12 +13,12 @@ */ package io.trino.operator.aggregation.minmaxby; -import io.prestosql.operator.aggregation.TypedKeyValueHeap; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.operator.aggregation.TypedKeyValueHeap; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; public class MinMaxByNStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/ObjectAndBlockPositionStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/ObjectAndBlockPositionStateSerializer.java index fa6d6f24f018..abcb65c02776 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/ObjectAndBlockPositionStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/ObjectAndBlockPositionStateSerializer.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation.minmaxby; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; class ObjectAndBlockPositionStateSerializer extends KeyAndBlockPositionValueStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/TwoNullableValueState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/TwoNullableValueState.java index 2fe796aeebfc..8081e55a42b4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/TwoNullableValueState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/TwoNullableValueState.java @@ -13,8 +13,8 @@ */ package io.trino.operator.aggregation.minmaxby; -import io.prestosql.operator.aggregation.state.InitialBooleanValue; -import io.prestosql.spi.function.AccumulatorState; +import io.trino.operator.aggregation.state.InitialBooleanValue; +import io.trino.spi.function.AccumulatorState; // TODO: Add multiple aggregation states support to aggregation framework to avoid // cartesian product of types for aggregation functions takes multiple parameters. diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/TwoNullableValueStateMapping.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/TwoNullableValueStateMapping.java index f65aec831dde..0a7429d8e755 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/TwoNullableValueStateMapping.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/minmaxby/TwoNullableValueStateMapping.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/GroupedMultimapAggregationState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/GroupedMultimapAggregationState.java index 0eedd3f3072b..8bf592d425d2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/GroupedMultimapAggregationState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/GroupedMultimapAggregationState.java @@ -14,10 +14,10 @@ package io.trino.operator.aggregation.multimapagg; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.aggregation.AbstractGroupCollectionAggregationState; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.operator.aggregation.AbstractGroupCollectionAggregationState; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; public final class GroupedMultimapAggregationState extends AbstractGroupCollectionAggregationState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationFunction.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationFunction.java index a4816327eab6..1e21ea4d6205 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationFunction.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AccumulatorCompiler; -import io.prestosql.operator.aggregation.AggregationMetadata; -import io.prestosql.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; -import io.prestosql.operator.aggregation.GenericAccumulatorFactoryBinder; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.array.ObjectBigArray; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AccumulatorCompiler; +import io.trino.operator.aggregation.AggregationMetadata; +import io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor; +import io.trino.operator.aggregation.GenericAccumulatorFactoryBinder; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.aggregation.TypedSet; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -42,20 +42,20 @@ import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.operator.aggregation.AggregationUtils.generateAggregationName; -import static io.prestosql.operator.aggregation.TypedSet.createEqualityTypedSet; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.type.TypeUtils.expectedValueSize; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INDEX; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.NULLABLE_BLOCK_INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.operator.aggregation.AggregationUtils.generateAggregationName; +import static io.trino.operator.aggregation.TypedSet.createEqualityTypedSet; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.type.TypeUtils.expectedValueSize; +import static io.trino.util.Reflection.methodHandle; import static java.util.Objects.requireNonNull; public class MultimapAggregationFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationState.java index 484f6722b23f..5aeb0a431b40 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationState.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation.multimapagg; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.block.Block; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; @AccumulatorStateMetadata(stateFactoryClass = MultimapAggregationStateFactory.class, stateSerializerClass = MultimapAggregationStateSerializer.class) public interface MultimapAggregationState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationStateConsumer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationStateConsumer.java index 684a95ae1844..c7ec00216307 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationStateConsumer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationStateConsumer.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.multimapagg; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; public interface MultimapAggregationStateConsumer { diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationStateFactory.java index 860e694eca20..4c9d0ec8b369 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationStateFactory.java @@ -13,8 +13,8 @@ */ package io.trino.operator.aggregation.multimapagg; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.type.Type; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.type.Type; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationStateSerializer.java index 894d3afbf4fc..0c7916656090 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/MultimapAggregationStateSerializer.java @@ -14,17 +14,17 @@ package io.trino.operator.aggregation.multimapagg; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ColumnarRow; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ColumnarRow; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; -import static io.prestosql.operator.aggregation.multimapagg.GroupedMultimapAggregationState.KEY_CHANNEL; -import static io.prestosql.operator.aggregation.multimapagg.GroupedMultimapAggregationState.VALUE_CHANNEL; -import static io.prestosql.spi.block.ColumnarRow.toColumnarRow; +import static io.trino.operator.aggregation.multimapagg.GroupedMultimapAggregationState.KEY_CHANNEL; +import static io.trino.operator.aggregation.multimapagg.GroupedMultimapAggregationState.VALUE_CHANNEL; +import static io.trino.spi.block.ColumnarRow.toColumnarRow; import static java.util.Objects.requireNonNull; public class MultimapAggregationStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/SingleMultimapAggregationState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/SingleMultimapAggregationState.java index d00a4530fa01..29d88cc5b231 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/SingleMultimapAggregationState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/multimapagg/SingleMultimapAggregationState.java @@ -13,12 +13,12 @@ */ package io.trino.operator.aggregation.multimapagg; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; -import static io.prestosql.type.TypeUtils.expectedValueSize; +import static io.trino.type.TypeUtils.expectedValueSize; import static java.util.Objects.requireNonNull; public class SingleMultimapAggregationState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/AbstractGroupedAccumulatorState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/AbstractGroupedAccumulatorState.java index e9472dca7122..dd6f92216334 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/AbstractGroupedAccumulatorState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/AbstractGroupedAccumulatorState.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.function.GroupedAccumulatorState; +import io.trino.spi.function.GroupedAccumulatorState; public abstract class AbstractGroupedAccumulatorState implements GroupedAccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockPositionState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockPositionState.java index 92b1b4a50a12..412c3fe84f83 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockPositionState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockPositionState.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; +import io.trino.spi.type.Type; @AccumulatorStateMetadata(stateSerializerClass = BlockPositionStateSerializer.class) public interface BlockPositionState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockPositionStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockPositionStateSerializer.java index fd76245809ff..dc683f5f73e7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockPositionStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockPositionStateSerializer.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; public class BlockPositionStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockState.java index 96eef3c01c98..5b09d3dec2d7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockState.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; +import io.trino.spi.type.Type; @AccumulatorStateMetadata(stateSerializerClass = BlockStateSerializer.class) public interface BlockState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockStateSerializer.java index 2d0f0b6aafcf..43ac99af249d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BlockStateSerializer.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; public class BlockStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BooleanDistinctState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BooleanDistinctState.java index aeeb4f220629..9f666611d29e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BooleanDistinctState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/BooleanDistinctState.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorState; public interface BooleanDistinctState extends AccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/CentralMomentsState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/CentralMomentsState.java index c7ec2065da93..75f596b034c1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/CentralMomentsState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/CentralMomentsState.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorState; public interface CentralMomentsState extends AccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/CovarianceState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/CovarianceState.java index 647041f0b280..c3a9cdd90560 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/CovarianceState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/CovarianceState.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorState; public interface CovarianceState extends AccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/DoubleHistogramStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/DoubleHistogramStateSerializer.java index 4502974b9b93..fdd2f516842b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/DoubleHistogramStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/DoubleHistogramStateSerializer.java @@ -13,14 +13,14 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.operator.aggregation.DoubleHistogramAggregation; -import io.prestosql.operator.aggregation.NumericHistogram; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.operator.aggregation.DoubleHistogramAggregation; +import io.trino.operator.aggregation.NumericHistogram; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarbinaryType.VARBINARY; public class DoubleHistogramStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/DoubleState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/DoubleState.java index b466fd433085..9d5f4462e2ed 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/DoubleState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/DoubleState.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorState; public interface DoubleState extends AccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/HyperLogLogState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/HyperLogLogState.java index 7925fa965fc6..b43aab578fe4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/HyperLogLogState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/HyperLogLogState.java @@ -14,8 +14,8 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.cardinality.HyperLogLog; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; @AccumulatorStateMetadata(stateSerializerClass = HyperLogLogStateSerializer.class, stateFactoryClass = HyperLogLogStateFactory.class) public interface HyperLogLogState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/HyperLogLogStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/HyperLogLogStateFactory.java index 1e4e34f3e252..5fb1169aec46 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/HyperLogLogStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/HyperLogLogStateFactory.java @@ -14,8 +14,8 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.cardinality.HyperLogLog; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.ObjectBigArray; +import io.trino.spi.function.AccumulatorStateFactory; import org.openjdk.jol.info.ClassLayout; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/HyperLogLogStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/HyperLogLogStateSerializer.java index 2c349c512e69..c3a3549750a4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/HyperLogLogStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/HyperLogLogStateSerializer.java @@ -14,12 +14,12 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.cardinality.HyperLogLog; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; public class HyperLogLogStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/KeyValuePairStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/KeyValuePairStateSerializer.java index 667225a45307..fe0ae2b16b3f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/KeyValuePairStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/KeyValuePairStateSerializer.java @@ -13,14 +13,14 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.operator.aggregation.KeyValuePairs; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.operator.aggregation.KeyValuePairs; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; public class KeyValuePairStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/KeyValuePairsState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/KeyValuePairsState.java index 27dd1d26c5be..f6ddaa065a1c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/KeyValuePairsState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/KeyValuePairsState.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.operator.aggregation.KeyValuePairs; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; -import io.prestosql.spi.type.Type; +import io.trino.operator.aggregation.KeyValuePairs; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; +import io.trino.spi.type.Type; @AccumulatorStateMetadata(stateFactoryClass = KeyValuePairsStateFactory.class, stateSerializerClass = KeyValuePairStateSerializer.class) public interface KeyValuePairsState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/KeyValuePairsStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/KeyValuePairsStateFactory.java index 7cf90b4406be..49300a5aac6f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/KeyValuePairsStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/KeyValuePairsStateFactory.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.operator.aggregation.KeyValuePairs; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.type.Type; +import io.trino.array.ObjectBigArray; +import io.trino.operator.aggregation.KeyValuePairs; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongAndDoubleState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongAndDoubleState.java index 7f3007d8a423..a7e2fd40b92f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongAndDoubleState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongAndDoubleState.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorState; public interface LongAndDoubleState extends AccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowAndLongState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowAndLongState.java index 5157e25aa2e5..21df3dd83fe7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowAndLongState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowAndLongState.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AccumulatorStateMetadata; @AccumulatorStateMetadata(stateFactoryClass = LongDecimalWithOverflowAndLongStateFactory.class, stateSerializerClass = LongDecimalWithOverflowAndLongStateSerializer.class) public interface LongDecimalWithOverflowAndLongState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowAndLongStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowAndLongStateFactory.java index 94c79c830f53..cf441b16f066 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowAndLongStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowAndLongStateFactory.java @@ -14,12 +14,12 @@ package io.trino.operator.aggregation.state; import io.airlift.slice.Slice; -import io.prestosql.array.LongBigArray; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.LongBigArray; +import io.trino.spi.function.AccumulatorStateFactory; import org.openjdk.jol.info.ClassLayout; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.UNSCALED_DECIMAL_128_SLICE_LENGTH; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.UNSCALED_DECIMAL_128_SLICE_LENGTH; public class LongDecimalWithOverflowAndLongStateFactory implements AccumulatorStateFactory diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowAndLongStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowAndLongStateSerializer.java index 135600bfc9e0..9b24e6505b17 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowAndLongStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowAndLongStateSerializer.java @@ -17,13 +17,13 @@ import io.airlift.slice.SliceInput; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.UnscaledDecimal128Arithmetic; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; +import io.trino.spi.type.UnscaledDecimal128Arithmetic; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarbinaryType.VARBINARY; public class LongDecimalWithOverflowAndLongStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowState.java index d69d5da7e046..b65a33f694ff 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowState.java @@ -14,8 +14,8 @@ package io.trino.operator.aggregation.state; import io.airlift.slice.Slice; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; @AccumulatorStateMetadata(stateFactoryClass = LongDecimalWithOverflowStateFactory.class, stateSerializerClass = LongDecimalWithOverflowStateSerializer.class) public interface LongDecimalWithOverflowState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowStateFactory.java index 16e926a2391c..e31c895894ce 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowStateFactory.java @@ -14,12 +14,12 @@ package io.trino.operator.aggregation.state; import io.airlift.slice.Slice; -import io.prestosql.array.LongBigArray; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.LongBigArray; +import io.trino.array.ObjectBigArray; +import io.trino.spi.function.AccumulatorStateFactory; import org.openjdk.jol.info.ClassLayout; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.UNSCALED_DECIMAL_128_SLICE_LENGTH; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.UNSCALED_DECIMAL_128_SLICE_LENGTH; import static java.util.Objects.requireNonNull; public class LongDecimalWithOverflowStateFactory diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowStateSerializer.java index 0e1c545e5b25..d3f7955903bc 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongDecimalWithOverflowStateSerializer.java @@ -17,13 +17,13 @@ import io.airlift.slice.SliceInput; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.UnscaledDecimal128Arithmetic; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; +import io.trino.spi.type.UnscaledDecimal128Arithmetic; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarbinaryType.VARBINARY; public class LongDecimalWithOverflowStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongState.java index 6de1bb34a672..edaf22ae0371 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/LongState.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorState; public interface LongState extends AccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/MinMaxNState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/MinMaxNState.java index 7d5c0e8ede32..6281d39d8688 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/MinMaxNState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/MinMaxNState.java @@ -13,8 +13,8 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.operator.aggregation.TypedHeap; -import io.prestosql.spi.function.AccumulatorState; +import io.trino.operator.aggregation.TypedHeap; +import io.trino.spi.function.AccumulatorState; public interface MinMaxNState extends AccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/MinMaxNStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/MinMaxNStateFactory.java index 84f2e6de36f9..6ad446cc87a3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/MinMaxNStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/MinMaxNStateFactory.java @@ -13,9 +13,9 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.operator.aggregation.TypedHeap; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.ObjectBigArray; +import io.trino.operator.aggregation.TypedHeap; +import io.trino.spi.function.AccumulatorStateFactory; import org.openjdk.jol.info.ClassLayout; public class MinMaxNStateFactory diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/MinMaxNStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/MinMaxNStateSerializer.java index 3c0478364333..38adc42fc621 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/MinMaxNStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/MinMaxNStateSerializer.java @@ -14,16 +14,16 @@ package io.trino.operator.aggregation.state; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.aggregation.TypedHeap; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.operator.aggregation.TypedHeap; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.Math.toIntExact; public class MinMaxNStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableBooleanState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableBooleanState.java index c5faf3c28eaa..f0dc408ba32f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableBooleanState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableBooleanState.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; +import io.trino.spi.type.Type; @AccumulatorStateMetadata(stateSerializerClass = NullableBooleanStateSerializer.class) public interface NullableBooleanState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableBooleanStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableBooleanStateSerializer.java index 826304c55cf6..e78268d5e99b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableBooleanStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableBooleanStateSerializer.java @@ -13,12 +13,12 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BooleanType.BOOLEAN; public class NullableBooleanStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableDoubleState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableDoubleState.java index 7f385ce590a0..6938660c4b10 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableDoubleState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableDoubleState.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; +import io.trino.spi.type.Type; @AccumulatorStateMetadata(stateSerializerClass = NullableDoubleStateSerializer.class) public interface NullableDoubleState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableDoubleStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableDoubleStateSerializer.java index cd5221d118d6..49fa730b47a0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableDoubleStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableDoubleStateSerializer.java @@ -13,12 +13,12 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class NullableDoubleStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableLongState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableLongState.java index 963f95f57e2d..72de373a08d5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableLongState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableLongState.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; +import io.trino.spi.type.Type; @AccumulatorStateMetadata(stateSerializerClass = NullableLongStateSerializer.class) public interface NullableLongState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableLongStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableLongStateSerializer.java index 822c69b3693b..8d8c296fe66f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableLongStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/NullableLongStateSerializer.java @@ -13,12 +13,12 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class NullableLongStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestAndPercentileState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestAndPercentileState.java index 2da48d59b6d2..d5d089e80752 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestAndPercentileState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestAndPercentileState.java @@ -14,8 +14,8 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.QuantileDigest; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; @AccumulatorStateMetadata(stateSerializerClass = QuantileDigestAndPercentileStateSerializer.class, stateFactoryClass = QuantileDigestAndPercentileStateFactory.class) public interface QuantileDigestAndPercentileState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestAndPercentileStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestAndPercentileStateFactory.java index 572388de87e4..5f6755fb4d95 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestAndPercentileStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestAndPercentileStateFactory.java @@ -14,9 +14,9 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.QuantileDigest; -import io.prestosql.array.DoubleBigArray; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.DoubleBigArray; +import io.trino.array.ObjectBigArray; +import io.trino.spi.function.AccumulatorStateFactory; import org.openjdk.jol.info.ClassLayout; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestAndPercentileStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestAndPercentileStateSerializer.java index 229713d0923c..dff194bfbd97 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestAndPercentileStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestAndPercentileStateSerializer.java @@ -18,14 +18,14 @@ import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; import io.airlift.stats.QuantileDigest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; import static io.airlift.slice.SizeOf.SIZE_OF_DOUBLE; import static io.airlift.slice.SizeOf.SIZE_OF_INT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarbinaryType.VARBINARY; public class QuantileDigestAndPercentileStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestState.java index c57b435bc3cd..27224fb75f6e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestState.java @@ -14,7 +14,7 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.QuantileDigest; -import io.prestosql.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorState; public interface QuantileDigestState extends AccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestStateFactory.java index cd12f2edc32c..7297b9434882 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestStateFactory.java @@ -14,8 +14,8 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.QuantileDigest; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.ObjectBigArray; +import io.trino.spi.function.AccumulatorStateFactory; import org.openjdk.jol.info.ClassLayout; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestStateSerializer.java index 0f4b0b3e1c37..b0d657c1ac70 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/QuantileDigestStateSerializer.java @@ -14,11 +14,11 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.QuantileDigest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.QuantileDigestType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.QuantileDigestType; +import io.trino.spi.type.Type; public class QuantileDigestStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/SliceState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/SliceState.java index 17088e93d2dc..18fca40def79 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/SliceState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/SliceState.java @@ -14,9 +14,9 @@ package io.trino.operator.aggregation.state; import io.airlift.slice.Slice; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.type.Type; public interface SliceState extends AccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/StateCompiler.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/StateCompiler.java index 729ba39996d7..e8730519b149 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/StateCompiler.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/StateCompiler.java @@ -28,24 +28,24 @@ import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.expression.BytecodeExpression; import io.airlift.slice.Slice; -import io.prestosql.array.BlockBigArray; -import io.prestosql.array.BooleanBigArray; -import io.prestosql.array.ByteBigArray; -import io.prestosql.array.DoubleBigArray; -import io.prestosql.array.IntBigArray; -import io.prestosql.array.LongBigArray; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.array.SliceBigArray; -import io.prestosql.operator.aggregation.GroupedAccumulator; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.AccumulatorStateMetadata; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.CallSiteBinder; -import io.prestosql.sql.gen.SqlTypeBytecodeExpression; +import io.trino.array.BlockBigArray; +import io.trino.array.BooleanBigArray; +import io.trino.array.ByteBigArray; +import io.trino.array.DoubleBigArray; +import io.trino.array.IntBigArray; +import io.trino.array.LongBigArray; +import io.trino.array.ObjectBigArray; +import io.trino.array.SliceBigArray; +import io.trino.operator.aggregation.GroupedAccumulator; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.gen.CallSiteBinder; +import io.trino.sql.gen.SqlTypeBytecodeExpression; import org.openjdk.jol.info.ClassLayout; import java.lang.annotation.Annotation; @@ -82,16 +82,16 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.equal; import static io.airlift.bytecode.expression.BytecodeExpressions.getStatic; import static io.airlift.bytecode.expression.BytecodeExpressions.newInstance; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; import static java.util.Objects.requireNonNull; public final class StateCompiler diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileArrayState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileArrayState.java index 7b1143819c8d..234f6c3ec1f1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileArrayState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileArrayState.java @@ -14,8 +14,8 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.TDigest; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileArrayStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileArrayStateFactory.java index 685b00bd84d4..9fb0d90e6cbc 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileArrayStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileArrayStateFactory.java @@ -15,8 +15,8 @@ import io.airlift.slice.SizeOf; import io.airlift.stats.TDigest; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.ObjectBigArray; +import io.trino.spi.function.AccumulatorStateFactory; import org.openjdk.jol.info.ClassLayout; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileArrayStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileArrayStateSerializer.java index 3254527c883a..79420902ee8f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileArrayStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileArrayStateSerializer.java @@ -19,16 +19,16 @@ import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; import io.airlift.stats.TDigest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; import java.util.List; import static io.airlift.slice.SizeOf.SIZE_OF_DOUBLE; import static io.airlift.slice.SizeOf.SIZE_OF_INT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarbinaryType.VARBINARY; public class TDigestAndPercentileArrayStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileState.java index d3533845dd47..922694db72e5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileState.java @@ -14,8 +14,8 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.TDigest; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; @AccumulatorStateMetadata(stateSerializerClass = TDigestAndPercentileStateSerializer.class, stateFactoryClass = TDigestAndPercentileStateFactory.class) public interface TDigestAndPercentileState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileStateFactory.java index ee0342ca0fc8..808e88ee7c87 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileStateFactory.java @@ -14,9 +14,9 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.TDigest; -import io.prestosql.array.DoubleBigArray; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.DoubleBigArray; +import io.trino.array.ObjectBigArray; +import io.trino.spi.function.AccumulatorStateFactory; import org.openjdk.jol.info.ClassLayout; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileStateSerializer.java index a409bc831601..cb0f8de66d27 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestAndPercentileStateSerializer.java @@ -18,14 +18,14 @@ import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; import io.airlift.stats.TDigest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; import static io.airlift.slice.SizeOf.SIZE_OF_DOUBLE; import static io.airlift.slice.SizeOf.SIZE_OF_INT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarbinaryType.VARBINARY; public class TDigestAndPercentileStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestState.java index 94f66bfe0192..e8106f7c4540 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestState.java @@ -14,8 +14,8 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.TDigest; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; @AccumulatorStateMetadata(stateSerializerClass = TDigestStateSerializer.class, stateFactoryClass = TDigestStateFactory.class) public interface TDigestState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestStateFactory.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestStateFactory.java index a858bfbfc0cf..72f302464d60 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestStateFactory.java @@ -14,8 +14,8 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.TDigest; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.spi.function.AccumulatorStateFactory; +import io.trino.array.ObjectBigArray; +import io.trino.spi.function.AccumulatorStateFactory; import org.openjdk.jol.info.ClassLayout; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestStateSerializer.java index fdeabc944563..d915667177aa 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TDigestStateSerializer.java @@ -14,12 +14,12 @@ package io.trino.operator.aggregation.state; import io.airlift.stats.TDigest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.type.TDigestType.TDIGEST; +import static io.trino.type.TDigestType.TDIGEST; public class TDigestStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TriStateBooleanState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TriStateBooleanState.java index 333ddb1436bf..f7b626352414 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TriStateBooleanState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TriStateBooleanState.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; +import io.trino.spi.type.Type; @AccumulatorStateMetadata(stateSerializerClass = TriStateBooleanStateSerializer.class) public interface TriStateBooleanState diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TriStateBooleanStateSerializer.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TriStateBooleanStateSerializer.java index f597cbaa3eea..01f48bf0166b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TriStateBooleanStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/TriStateBooleanStateSerializer.java @@ -13,15 +13,15 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.operator.aggregation.state.TriStateBooleanState.FALSE_VALUE; -import static io.prestosql.operator.aggregation.state.TriStateBooleanState.NULL_VALUE; -import static io.prestosql.operator.aggregation.state.TriStateBooleanState.TRUE_VALUE; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.operator.aggregation.state.TriStateBooleanState.FALSE_VALUE; +import static io.trino.operator.aggregation.state.TriStateBooleanState.NULL_VALUE; +import static io.trino.operator.aggregation.state.TriStateBooleanState.TRUE_VALUE; +import static io.trino.spi.type.BooleanType.BOOLEAN; public class TriStateBooleanStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/VarianceState.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/VarianceState.java index 1648cb22b5b6..705f2b5006c5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/state/VarianceState.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/state/VarianceState.java @@ -13,7 +13,7 @@ */ package io.trino.operator.aggregation.state; -import io.prestosql.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorState; public interface VarianceState extends AccumulatorState diff --git a/core/trino-main/src/main/java/io/trino/operator/annotations/CastImplementationDependency.java b/core/trino-main/src/main/java/io/trino/operator/annotations/CastImplementationDependency.java index 7829630cac24..bf8c3839abb2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/annotations/CastImplementationDependency.java +++ b/core/trino-main/src/main/java/io/trino/operator/annotations/CastImplementationDependency.java @@ -13,16 +13,16 @@ */ package io.trino.operator.annotations; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; +import io.trino.metadata.FunctionInvoker; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.TypeSignature; import java.util.Objects; -import static io.prestosql.metadata.SignatureBinder.applyBoundVariables; +import static io.trino.metadata.SignatureBinder.applyBoundVariables; import static java.util.Objects.requireNonNull; public final class CastImplementationDependency diff --git a/core/trino-main/src/main/java/io/trino/operator/annotations/FunctionImplementationDependency.java b/core/trino-main/src/main/java/io/trino/operator/annotations/FunctionImplementationDependency.java index c49f28da1df4..16e1995b278f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/annotations/FunctionImplementationDependency.java +++ b/core/trino-main/src/main/java/io/trino/operator/annotations/FunctionImplementationDependency.java @@ -13,18 +13,18 @@ */ package io.trino.operator.annotations; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; +import io.trino.metadata.FunctionInvoker; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.tree.QualifiedName; import java.util.List; import java.util.Objects; -import static io.prestosql.metadata.SignatureBinder.applyBoundVariables; +import static io.trino.metadata.SignatureBinder.applyBoundVariables; import static java.util.Objects.requireNonNull; public final class FunctionImplementationDependency diff --git a/core/trino-main/src/main/java/io/trino/operator/annotations/FunctionsParserHelper.java b/core/trino-main/src/main/java/io/trino/operator/annotations/FunctionsParserHelper.java index 87a257a902ff..167374e2974b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/annotations/FunctionsParserHelper.java +++ b/core/trino-main/src/main/java/io/trino/operator/annotations/FunctionsParserHelper.java @@ -16,20 +16,20 @@ import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.LongVariableConstraint; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.TypeVariableConstraint; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.IsNull; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.function.TypeParameterSpecialization; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.type.Constraint; +import io.trino.metadata.LongVariableConstraint; +import io.trino.metadata.Signature; +import io.trino.metadata.TypeVariableConstraint; +import io.trino.spi.function.Description; +import io.trino.spi.function.IsNull; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.OperatorType; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.function.TypeParameterSpecialization; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.type.Constraint; import javax.annotation.Nullable; @@ -54,16 +54,16 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet; -import static io.prestosql.operator.annotations.ImplementationDependency.isImplementationDependencyAnnotation; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.function.OperatorType.IS_DISTINCT_FROM; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.operator.annotations.ImplementationDependency.isImplementationDependencyAnnotation; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.function.OperatorType.IS_DISTINCT_FROM; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; import static java.lang.String.CASE_INSENSITIVE_ORDER; public final class FunctionsParserHelper diff --git a/core/trino-main/src/main/java/io/trino/operator/annotations/ImplementationDependency.java b/core/trino-main/src/main/java/io/trino/operator/annotations/ImplementationDependency.java index 82d1da5a1199..be7b931bf845 100644 --- a/core/trino-main/src/main/java/io/trino/operator/annotations/ImplementationDependency.java +++ b/core/trino-main/src/main/java/io/trino/operator/annotations/ImplementationDependency.java @@ -14,20 +14,20 @@ package io.trino.operator.annotations; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; -import io.prestosql.spi.function.CastDependency; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.FunctionDependency; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; +import io.trino.spi.function.CastDependency; +import io.trino.spi.function.Convention; +import io.trino.spi.function.FunctionDependency; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.OperatorType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.sql.tree.QualifiedName; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; @@ -41,8 +41,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.operator.annotations.FunctionsParserHelper.containsImplementationDependencyAnnotation; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.operator.annotations.FunctionsParserHelper.containsImplementationDependencyAnnotation; +import static io.trino.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; public interface ImplementationDependency { diff --git a/core/trino-main/src/main/java/io/trino/operator/annotations/LiteralImplementationDependency.java b/core/trino-main/src/main/java/io/trino/operator/annotations/LiteralImplementationDependency.java index 88d4778ccb06..304b76883386 100644 --- a/core/trino-main/src/main/java/io/trino/operator/annotations/LiteralImplementationDependency.java +++ b/core/trino-main/src/main/java/io/trino/operator/annotations/LiteralImplementationDependency.java @@ -13,9 +13,9 @@ */ package io.trino.operator.annotations; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/annotations/OperatorImplementationDependency.java b/core/trino-main/src/main/java/io/trino/operator/annotations/OperatorImplementationDependency.java index 39130779ebb5..13736365bd82 100644 --- a/core/trino-main/src/main/java/io/trino/operator/annotations/OperatorImplementationDependency.java +++ b/core/trino-main/src/main/java/io/trino/operator/annotations/OperatorImplementationDependency.java @@ -14,21 +14,21 @@ package io.trino.operator.annotations; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; +import io.trino.metadata.FunctionInvoker; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.TypeSignature; import java.util.List; import java.util.Objects; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.metadata.SignatureBinder.applyBoundVariables; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.function.OperatorType.SATURATED_FLOOR_CAST; +import static io.trino.metadata.SignatureBinder.applyBoundVariables; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.SATURATED_FLOOR_CAST; import static java.util.Objects.requireNonNull; public final class OperatorImplementationDependency diff --git a/core/trino-main/src/main/java/io/trino/operator/annotations/ScalarImplementationDependency.java b/core/trino-main/src/main/java/io/trino/operator/annotations/ScalarImplementationDependency.java index 83c10c93611f..9f623318f749 100644 --- a/core/trino-main/src/main/java/io/trino/operator/annotations/ScalarImplementationDependency.java +++ b/core/trino-main/src/main/java/io/trino/operator/annotations/ScalarImplementationDependency.java @@ -13,10 +13,10 @@ */ package io.trino.operator.annotations; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.spi.function.InvocationConvention; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionInvoker; +import io.trino.spi.function.InvocationConvention; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandleProxies; diff --git a/core/trino-main/src/main/java/io/trino/operator/annotations/TypeImplementationDependency.java b/core/trino-main/src/main/java/io/trino/operator/annotations/TypeImplementationDependency.java index 29ec7a2090fd..6447a910ce48 100644 --- a/core/trino-main/src/main/java/io/trino/operator/annotations/TypeImplementationDependency.java +++ b/core/trino-main/src/main/java/io/trino/operator/annotations/TypeImplementationDependency.java @@ -14,15 +14,15 @@ package io.trino.operator.annotations; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; +import io.trino.spi.type.TypeSignature; import java.util.Objects; -import static io.prestosql.metadata.SignatureBinder.applyBoundVariables; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.metadata.SignatureBinder.applyBoundVariables; +import static io.trino.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; import static java.util.Objects.requireNonNull; public final class TypeImplementationDependency diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/BroadcastExchanger.java b/core/trino-main/src/main/java/io/trino/operator/exchange/BroadcastExchanger.java index 03b0baf03dfd..64bc42307fc0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/BroadcastExchanger.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/BroadcastExchanger.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.List; import java.util.function.Consumer; diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchange.java b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchange.java index 660a93051b7f..2aa9eac7d81b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchange.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchange.java @@ -16,11 +16,11 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.execution.Lifespan; -import io.prestosql.operator.PipelineExecutionStrategy; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.PartitioningHandle; -import io.prestosql.type.BlockTypeOperators; +import io.trino.execution.Lifespan; +import io.trino.operator.PipelineExecutionStrategy; +import io.trino.spi.type.Type; +import io.trino.sql.planner.PartitioningHandle; +import io.trino.type.BlockTypeOperators; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; @@ -41,13 +41,13 @@ 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.prestosql.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; -import static io.prestosql.operator.exchange.LocalExchangeSink.finishedLocalExchangeSink; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_BROADCAST_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_PASSTHROUGH_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.operator.exchange.LocalExchangeSink.finishedLocalExchangeSink; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_BROADCAST_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_PASSTHROUGH_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; import static java.util.Objects.requireNonNull; @ThreadSafe diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeBufferInfo.java b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeBufferInfo.java index ab57041fbe6c..dec16c49c7f9 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeBufferInfo.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeBufferInfo.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.operator.OperatorInfo; -import io.prestosql.util.Mergeable; +import io.trino.operator.OperatorInfo; +import io.trino.util.Mergeable; public class LocalExchangeBufferInfo implements Mergeable, OperatorInfo diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSink.java b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSink.java index 0dfa3731e9ca..dd0871f28f86 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSink.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSink.java @@ -14,13 +14,13 @@ package io.trino.operator.exchange; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Consumer; -import static io.prestosql.operator.Operator.NOT_BLOCKED; -import static io.prestosql.operator.exchange.LocalExchanger.FINISHED; +import static io.trino.operator.Operator.NOT_BLOCKED; +import static io.trino.operator.exchange.LocalExchanger.FINISHED; import static java.util.Objects.requireNonNull; public class LocalExchangeSink diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSinkOperator.java b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSinkOperator.java index d2353cc3cbfd..ac6b7b0a392f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSinkOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSinkOperator.java @@ -14,17 +14,17 @@ package io.trino.operator.exchange; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.execution.Lifespan; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.LocalPlannerAware; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.exchange.LocalExchange.LocalExchangeFactory; -import io.prestosql.operator.exchange.LocalExchange.LocalExchangeSinkFactory; -import io.prestosql.operator.exchange.LocalExchange.LocalExchangeSinkFactoryId; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.operator.DriverContext; +import io.trino.operator.LocalPlannerAware; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.OperatorFactory; +import io.trino.operator.exchange.LocalExchange.LocalExchangeFactory; +import io.trino.operator.exchange.LocalExchange.LocalExchangeSinkFactory; +import io.trino.operator.exchange.LocalExchange.LocalExchangeSinkFactoryId; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSource.java b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSource.java index c6ab21194037..ca47327e7c25 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSource.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSource.java @@ -15,9 +15,9 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.operator.WorkProcessor; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.spi.Page; +import io.trino.operator.WorkProcessor; +import io.trino.operator.WorkProcessor.ProcessState; +import io.trino.spi.Page; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSourceOperator.java b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSourceOperator.java index 03e7329d47bf..caa276ba40b0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSourceOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchangeSourceOperator.java @@ -14,13 +14,13 @@ package io.trino.operator.exchange; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.exchange.LocalExchange.LocalExchangeFactory; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.operator.DriverContext; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.OperatorFactory; +import io.trino.operator.exchange.LocalExchange.LocalExchangeFactory; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; import static com.google.common.base.Preconditions.checkState; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchanger.java b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchanger.java index dddec7de7361..eb76757dd80a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchanger.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalExchanger.java @@ -14,9 +14,9 @@ package io.trino.operator.exchange; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.spi.Page; +import io.trino.spi.Page; -import static io.prestosql.operator.Operator.NOT_BLOCKED; +import static io.trino.operator.Operator.NOT_BLOCKED; public interface LocalExchanger { diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalMergeSourceOperator.java b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalMergeSourceOperator.java index 3dcb0cccce17..fafde02ffaef 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalMergeSourceOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalMergeSourceOperator.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.PageWithPositionComparator; -import io.prestosql.operator.WorkProcessor; -import io.prestosql.operator.exchange.LocalExchange.LocalExchangeFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.operator.DriverContext; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.OperatorFactory; +import io.trino.operator.PageWithPositionComparator; +import io.trino.operator.WorkProcessor; +import io.trino.operator.exchange.LocalExchange.LocalExchangeFactory; +import io.trino.spi.Page; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.sql.gen.OrderingCompiler; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.stream.IntStream; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.util.MergeSortedPages.mergeSortedPages; +import static io.trino.util.MergeSortedPages.mergeSortedPages; import static java.util.Objects.requireNonNull; public class LocalMergeSourceOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalPartitionGenerator.java b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalPartitionGenerator.java index 44f87c87bcc8..20a01eb430d6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/LocalPartitionGenerator.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/LocalPartitionGenerator.java @@ -14,9 +14,9 @@ package io.trino.operator.exchange; import io.airlift.slice.XxHash64; -import io.prestosql.operator.HashGenerator; -import io.prestosql.operator.PartitionFunction; -import io.prestosql.spi.Page; +import io.trino.operator.HashGenerator; +import io.trino.operator.PartitionFunction; +import io.trino.spi.Page; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/PageChannelSelector.java b/core/trino-main/src/main/java/io/trino/operator/exchange/PageChannelSelector.java index 11dbdebbf213..aa89f86d5f1f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/PageChannelSelector.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/PageChannelSelector.java @@ -13,7 +13,7 @@ */ package io.trino.operator.exchange; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.function.Function; import java.util.stream.IntStream; diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/PageReference.java b/core/trino-main/src/main/java/io/trino/operator/exchange/PageReference.java index bebca4576a72..086dff2e28e4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/PageReference.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/PageReference.java @@ -13,7 +13,7 @@ */ package io.trino.operator.exchange; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/PartitioningExchanger.java b/core/trino-main/src/main/java/io/trino/operator/exchange/PartitioningExchanger.java index 270a5c88ea63..6b4346ea354d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/PartitioningExchanger.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/PartitioningExchanger.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.operator.HashGenerator; -import io.prestosql.operator.InterpretedHashGenerator; -import io.prestosql.operator.PrecomputedHashGenerator; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators; +import io.trino.operator.HashGenerator; +import io.trino.operator.InterpretedHashGenerator; +import io.trino.operator.PrecomputedHashGenerator; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntList; diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/PassthroughExchanger.java b/core/trino-main/src/main/java/io/trino/operator/exchange/PassthroughExchanger.java index d4442ce31b32..d05eaffedfa1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/PassthroughExchanger.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/PassthroughExchanger.java @@ -14,7 +14,7 @@ package io.trino.operator.exchange; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.function.LongConsumer; diff --git a/core/trino-main/src/main/java/io/trino/operator/exchange/RandomExchanger.java b/core/trino-main/src/main/java/io/trino/operator/exchange/RandomExchanger.java index 190457af734f..d5f4d5c2e3e6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/exchange/RandomExchanger.java +++ b/core/trino-main/src/main/java/io/trino/operator/exchange/RandomExchanger.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.List; import java.util.concurrent.ThreadLocalRandom; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/DynamicTupleFilterFactory.java b/core/trino-main/src/main/java/io/trino/operator/index/DynamicTupleFilterFactory.java index d348e7ea567c..8235f01d33b0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/DynamicTupleFilterFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/DynamicTupleFilterFactory.java @@ -17,17 +17,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; import io.airlift.units.DataSize; -import io.prestosql.operator.FilterAndProjectOperator; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.operator.project.PageProjection; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.relational.Expressions; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.operator.FilterAndProjectOperator; +import io.trino.operator.OperatorFactory; +import io.trino.operator.project.PageProcessor; +import io.trino.operator.project.PageProjection; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.relational.Expressions; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/FieldSetFilteringRecordSet.java b/core/trino-main/src/main/java/io/trino/operator/index/FieldSetFilteringRecordSet.java index 64baa2adff60..08735a079f84 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/FieldSetFilteringRecordSet.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/FieldSetFilteringRecordSet.java @@ -16,10 +16,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import java.lang.invoke.MethodHandle; import java.util.Iterator; @@ -28,9 +28,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; import static java.lang.Boolean.TRUE; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/IndexBuildDriverFactoryProvider.java b/core/trino-main/src/main/java/io/trino/operator/index/IndexBuildDriverFactoryProvider.java index ba94ee3507b3..e089f5bda742 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/IndexBuildDriverFactoryProvider.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/IndexBuildDriverFactoryProvider.java @@ -14,20 +14,20 @@ package io.trino.operator.index; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.DriverFactory; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.operator.DriverFactory; +import io.trino.operator.OperatorFactory; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.Optional; import java.util.OptionalInt; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; -import static io.prestosql.operator.index.PageBufferOperator.PageBufferOperatorFactory; -import static io.prestosql.operator.index.PagesIndexBuilderOperator.PagesIndexBuilderOperatorFactory; +import static io.trino.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.operator.index.PageBufferOperator.PageBufferOperatorFactory; +import static io.trino.operator.index.PagesIndexBuilderOperator.PagesIndexBuilderOperatorFactory; import static java.util.Objects.requireNonNull; public class IndexBuildDriverFactoryProvider diff --git a/core/trino-main/src/main/java/io/trino/operator/index/IndexLoader.java b/core/trino-main/src/main/java/io/trino/operator/index/IndexLoader.java index 667e46c54359..715156714ac2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/IndexLoader.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/IndexLoader.java @@ -17,24 +17,24 @@ import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.ScheduledSplit; -import io.prestosql.execution.TaskSource; -import io.prestosql.metadata.Split; -import io.prestosql.operator.Driver; -import io.prestosql.operator.DriverFactory; -import io.prestosql.operator.LookupSource; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.PipelineContext; -import io.prestosql.operator.TaskContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.execution.ScheduledSplit; +import io.trino.execution.TaskSource; +import io.trino.metadata.Split; +import io.trino.operator.Driver; +import io.trino.operator.DriverFactory; +import io.trino.operator.LookupSource; +import io.trino.operator.PagesIndex; +import io.trino.operator.PipelineContext; +import io.trino.operator.TaskContext; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.NotThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/IndexLookupSource.java b/core/trino-main/src/main/java/io/trino/operator/index/IndexLookupSource.java index 166e935aaf4c..1ee189722dea 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/IndexLookupSource.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/IndexLookupSource.java @@ -13,14 +13,14 @@ */ package io.trino.operator.index; -import io.prestosql.operator.LookupSource; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; +import io.trino.operator.LookupSource; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; import javax.annotation.concurrent.NotThreadSafe; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.index.IndexSnapshot.UNLOADED_INDEX_KEY; +import static io.trino.operator.index.IndexSnapshot.UNLOADED_INDEX_KEY; import static java.util.Objects.requireNonNull; @NotThreadSafe diff --git a/core/trino-main/src/main/java/io/trino/operator/index/IndexLookupSourceFactory.java b/core/trino-main/src/main/java/io/trino/operator/index/IndexLookupSourceFactory.java index 4707eb5d1c98..edac7d45b729 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/IndexLookupSourceFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/IndexLookupSourceFactory.java @@ -18,15 +18,15 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import io.airlift.units.DataSize; -import io.prestosql.operator.LookupSourceFactory; -import io.prestosql.operator.LookupSourceProvider; -import io.prestosql.operator.OuterPositionIterator; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.StaticLookupSourceProvider; -import io.prestosql.operator.TaskContext; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.operator.LookupSourceFactory; +import io.trino.operator.LookupSourceProvider; +import io.trino.operator.OuterPositionIterator; +import io.trino.operator.PagesIndex; +import io.trino.operator.StaticLookupSourceProvider; +import io.trino.operator.TaskContext; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.OptionalInt; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/IndexSnapshot.java b/core/trino-main/src/main/java/io/trino/operator/index/IndexSnapshot.java index fdc4f6aad434..4d254f17c7d8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/IndexSnapshot.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/IndexSnapshot.java @@ -13,9 +13,9 @@ */ package io.trino.operator.index; -import io.prestosql.operator.LookupSource; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; +import io.trino.operator.LookupSource; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/IndexSnapshotBuilder.java b/core/trino-main/src/main/java/io/trino/operator/index/IndexSnapshotBuilder.java index ce43622beabc..614abc053967 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/IndexSnapshotBuilder.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/IndexSnapshotBuilder.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.LookupSource; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.index.UnloadedIndexKeyRecordSet.UnloadedIndexKeyRecordCursor; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.Session; +import io.trino.operator.DriverContext; +import io.trino.operator.LookupSource; +import io.trino.operator.PagesIndex; +import io.trino.operator.index.UnloadedIndexKeyRecordSet.UnloadedIndexKeyRecordCursor; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/IndexSourceOperator.java b/core/trino-main/src/main/java/io/trino/operator/index/IndexSourceOperator.java index 6a2d0d4d7b3d..2a38e9a4669f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/IndexSourceOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/IndexSourceOperator.java @@ -13,21 +13,21 @@ */ package io.trino.operator.index; -import io.prestosql.metadata.Split; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.FinishedOperator; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.PageSourceOperator; -import io.prestosql.operator.SourceOperator; -import io.prestosql.operator.SourceOperatorFactory; -import io.prestosql.operator.SplitOperatorInfo; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorIndex; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.metadata.Split; +import io.trino.operator.DriverContext; +import io.trino.operator.FinishedOperator; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.PageSourceOperator; +import io.trino.operator.SourceOperator; +import io.trino.operator.SourceOperatorFactory; +import io.trino.operator.SplitOperatorInfo; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorIndex; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Optional; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/IndexSplit.java b/core/trino-main/src/main/java/io/trino/operator/index/IndexSplit.java index 0f63c7bccab6..06e95b3a4d66 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/IndexSplit.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/IndexSplit.java @@ -13,9 +13,9 @@ */ package io.trino.operator.index; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.RecordSet; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.RecordSet; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/IndexedData.java b/core/trino-main/src/main/java/io/trino/operator/index/IndexedData.java index 17e7b6517ea2..12069c47eea7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/IndexedData.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/IndexedData.java @@ -13,8 +13,8 @@ */ package io.trino.operator.index; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; import java.io.Closeable; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/PageBuffer.java b/core/trino-main/src/main/java/io/trino/operator/index/PageBuffer.java index 53592c1c358f..2fdafb1d1337 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/PageBuffer.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/PageBuffer.java @@ -16,7 +16,7 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/PageBufferOperator.java b/core/trino-main/src/main/java/io/trino/operator/index/PageBufferOperator.java index f028d3a91314..1da8c090b076 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/PageBufferOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/PageBufferOperator.java @@ -14,12 +14,12 @@ package io.trino.operator.index; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.operator.DriverContext; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.OperatorFactory; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; import static com.google.common.base.Preconditions.checkState; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/PageRecordSet.java b/core/trino-main/src/main/java/io/trino/operator/index/PageRecordSet.java index b790d24c2a46..fee9e0cddf08 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/PageRecordSet.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/PageRecordSet.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/PagesIndexBuilderOperator.java b/core/trino-main/src/main/java/io/trino/operator/index/PagesIndexBuilderOperator.java index b834e34fc989..d3207d51e670 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/PagesIndexBuilderOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/PagesIndexBuilderOperator.java @@ -13,12 +13,12 @@ */ package io.trino.operator.index; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.operator.DriverContext; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.OperatorFactory; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/StreamingIndexedData.java b/core/trino-main/src/main/java/io/trino/operator/index/StreamingIndexedData.java index 29a131dad068..0a245fde7a67 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/StreamingIndexedData.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/StreamingIndexedData.java @@ -14,13 +14,13 @@ package io.trino.operator.index; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.Driver; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.operator.Driver; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; import javax.annotation.concurrent.NotThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/TuplePageFilter.java b/core/trino-main/src/main/java/io/trino/operator/index/TuplePageFilter.java index 2fe3bc48f81d..c4a77023ad1e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/TuplePageFilter.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/TuplePageFilter.java @@ -14,13 +14,13 @@ package io.trino.operator.index; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.project.InputChannels; -import io.prestosql.operator.project.PageFilter; -import io.prestosql.operator.project.SelectedPositions; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.operator.project.InputChannels; +import io.trino.operator.project.PageFilter; +import io.trino.operator.project.SelectedPositions; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/index/UnloadedIndexKeyRecordSet.java b/core/trino-main/src/main/java/io/trino/operator/index/UnloadedIndexKeyRecordSet.java index 713bd6d6988b..25fbcb2f00f9 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/UnloadedIndexKeyRecordSet.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/UnloadedIndexKeyRecordSet.java @@ -16,17 +16,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; import io.airlift.slice.Slice; -import io.prestosql.Session; -import io.prestosql.operator.GroupByHash; -import io.prestosql.operator.GroupByIdBlock; -import io.prestosql.operator.Work; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.operator.GroupByHash; +import io.trino.operator.GroupByIdBlock; +import io.trino.operator.Work; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntList; import it.unimi.dsi.fastutil.ints.IntListIterator; @@ -40,8 +40,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.operator.GroupByHash.createGroupByHash; -import static io.prestosql.operator.index.IndexSnapshot.UNLOADED_INDEX_KEY; +import static io.trino.operator.GroupByHash.createGroupByHash; +import static io.trino.operator.index.IndexSnapshot.UNLOADED_INDEX_KEY; import static java.util.Objects.requireNonNull; public class UnloadedIndexKeyRecordSet diff --git a/core/trino-main/src/main/java/io/trino/operator/index/UpdateRequest.java b/core/trino-main/src/main/java/io/trino/operator/index/UpdateRequest.java index 359f9a69712c..8b4647b16078 100644 --- a/core/trino-main/src/main/java/io/trino/operator/index/UpdateRequest.java +++ b/core/trino-main/src/main/java/io/trino/operator/index/UpdateRequest.java @@ -15,7 +15,7 @@ import com.google.common.util.concurrent.SettableFuture; import io.airlift.concurrent.MoreFutures; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/operator/project/ConstantPageProjection.java b/core/trino-main/src/main/java/io/trino/operator/project/ConstantPageProjection.java index 478c36f0f762..cddc8683a46f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/project/ConstantPageProjection.java +++ b/core/trino-main/src/main/java/io/trino/operator/project/ConstantPageProjection.java @@ -14,17 +14,17 @@ package io.trino.operator.project; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.CompletedWork; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.Work; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.operator.CompletedWork; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.Work; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; +import static io.trino.spi.type.TypeUtils.writeNativeValue; public class ConstantPageProjection implements PageProjection diff --git a/core/trino-main/src/main/java/io/trino/operator/project/CursorProcessor.java b/core/trino-main/src/main/java/io/trino/operator/project/CursorProcessor.java index ed580ca727a2..7ea28dbfda44 100644 --- a/core/trino-main/src/main/java/io/trino/operator/project/CursorProcessor.java +++ b/core/trino-main/src/main/java/io/trino/operator/project/CursorProcessor.java @@ -13,10 +13,10 @@ */ package io.trino.operator.project; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.RecordCursor; +import io.trino.operator.DriverYieldSignal; +import io.trino.spi.PageBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.RecordCursor; public interface CursorProcessor { diff --git a/core/trino-main/src/main/java/io/trino/operator/project/DictionaryAwarePageFilter.java b/core/trino-main/src/main/java/io/trino/operator/project/DictionaryAwarePageFilter.java index 97eadfa8672c..fc136002c56c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/project/DictionaryAwarePageFilter.java +++ b/core/trino-main/src/main/java/io/trino/operator/project/DictionaryAwarePageFilter.java @@ -13,11 +13,11 @@ */ package io.trino.operator.project; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.ConnectorSession; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/operator/project/DictionaryAwarePageProjection.java b/core/trino-main/src/main/java/io/trino/operator/project/DictionaryAwarePageProjection.java index 494e4c59c9d4..dd6b9ef3ceb1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/project/DictionaryAwarePageProjection.java +++ b/core/trino-main/src/main/java/io/trino/operator/project/DictionaryAwarePageProjection.java @@ -13,17 +13,17 @@ */ package io.trino.operator.project; -import io.prestosql.operator.CompletedWork; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.Work; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.DictionaryId; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.operator.CompletedWork; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.Work; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.DictionaryId; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/operator/project/GeneratedPageProjection.java b/core/trino-main/src/main/java/io/trino/operator/project/GeneratedPageProjection.java index c510f2b68945..d3b7520c39d2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/project/GeneratedPageProjection.java +++ b/core/trino-main/src/main/java/io/trino/operator/project/GeneratedPageProjection.java @@ -13,14 +13,14 @@ */ package io.trino.operator.project; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.Work; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.relational.RowExpression; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.Work; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.sql.relational.RowExpression; import java.lang.invoke.MethodHandle; diff --git a/core/trino-main/src/main/java/io/trino/operator/project/InputChannels.java b/core/trino-main/src/main/java/io/trino/operator/project/InputChannels.java index 77e317ec3e89..511398b7732d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/project/InputChannels.java +++ b/core/trino-main/src/main/java/io/trino/operator/project/InputChannels.java @@ -14,7 +14,7 @@ package io.trino.operator.project; import com.google.common.primitives.Ints; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.Arrays; import java.util.Collections; diff --git a/core/trino-main/src/main/java/io/trino/operator/project/InputPageProjection.java b/core/trino-main/src/main/java/io/trino/operator/project/InputPageProjection.java index ef21b60439bb..3c6f4dad2eba 100644 --- a/core/trino-main/src/main/java/io/trino/operator/project/InputPageProjection.java +++ b/core/trino-main/src/main/java/io/trino/operator/project/InputPageProjection.java @@ -13,13 +13,13 @@ */ package io.trino.operator.project; -import io.prestosql.operator.CompletedWork; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.Work; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.operator.CompletedWork; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.Work; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/project/MergePages.java b/core/trino-main/src/main/java/io/trino/operator/project/MergePages.java index 1cea2e860470..07c772fb115c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/project/MergePages.java +++ b/core/trino-main/src/main/java/io/trino/operator/project/MergePages.java @@ -14,22 +14,22 @@ package io.trino.operator.project; import com.google.common.collect.ImmutableList; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.WorkProcessor; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.WorkProcessor; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.operator.WorkProcessor.TransformationState.finished; -import static io.prestosql.operator.WorkProcessor.TransformationState.needsMoreData; -import static io.prestosql.operator.WorkProcessor.TransformationState.ofResult; -import static io.prestosql.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; +import static io.trino.operator.WorkProcessor.TransformationState.finished; +import static io.trino.operator.WorkProcessor.TransformationState.needsMoreData; +import static io.trino.operator.WorkProcessor.TransformationState.ofResult; +import static io.trino.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/project/PageFieldsToInputParametersRewriter.java b/core/trino-main/src/main/java/io/trino/operator/project/PageFieldsToInputParametersRewriter.java index f9cfe3f248cc..4a743a13350c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/project/PageFieldsToInputParametersRewriter.java +++ b/core/trino-main/src/main/java/io/trino/operator/project/PageFieldsToInputParametersRewriter.java @@ -14,14 +14,14 @@ package io.trino.operator.project; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.InputReferenceExpression; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.RowExpressionVisitor; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.sql.relational.VariableReferenceExpression; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.InputReferenceExpression; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.RowExpressionVisitor; +import io.trino.sql.relational.SpecialForm; +import io.trino.sql.relational.VariableReferenceExpression; import java.util.ArrayList; import java.util.HashMap; @@ -29,7 +29,7 @@ import java.util.Map; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.relational.Expressions.field; +import static io.trino.sql.relational.Expressions.field; /** * Rewrite input references from columns in the input page (to the filter/project node) diff --git a/core/trino-main/src/main/java/io/trino/operator/project/PageFilter.java b/core/trino-main/src/main/java/io/trino/operator/project/PageFilter.java index ceb800c37abb..f5fd417e8702 100644 --- a/core/trino-main/src/main/java/io/trino/operator/project/PageFilter.java +++ b/core/trino-main/src/main/java/io/trino/operator/project/PageFilter.java @@ -13,8 +13,8 @@ */ package io.trino.operator.project; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorSession; public interface PageFilter { diff --git a/core/trino-main/src/main/java/io/trino/operator/project/PageProcessor.java b/core/trino-main/src/main/java/io/trino/operator/project/PageProcessor.java index 2a3b8d10dad3..dfa5db3251fb 100644 --- a/core/trino-main/src/main/java/io/trino/operator/project/PageProcessor.java +++ b/core/trino-main/src/main/java/io/trino/operator/project/PageProcessor.java @@ -15,18 +15,18 @@ import com.google.common.annotations.VisibleForTesting; import io.airlift.slice.SizeOf; -import io.prestosql.array.ReferenceCountMap; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.Work; -import io.prestosql.operator.WorkProcessor; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.DictionaryId; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.sql.gen.ExpressionProfiler; +import io.trino.array.ReferenceCountMap; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.Work; +import io.trino.operator.WorkProcessor; +import io.trino.operator.WorkProcessor.ProcessState; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.DictionaryId; +import io.trino.spi.connector.ConnectorSession; +import io.trino.sql.gen.ExpressionProfiler; import javax.annotation.concurrent.NotThreadSafe; @@ -42,12 +42,12 @@ import static com.google.common.base.Verify.verify; import static com.google.common.base.Verify.verifyNotNull; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.operator.PageUtils.recordMaterializedBytes; -import static io.prestosql.operator.WorkProcessor.ProcessState.finished; -import static io.prestosql.operator.WorkProcessor.ProcessState.ofResult; -import static io.prestosql.operator.WorkProcessor.ProcessState.yield; -import static io.prestosql.operator.project.SelectedPositions.positionsRange; -import static io.prestosql.spi.block.DictionaryId.randomDictionaryId; +import static io.trino.operator.PageUtils.recordMaterializedBytes; +import static io.trino.operator.WorkProcessor.ProcessState.finished; +import static io.trino.operator.WorkProcessor.ProcessState.ofResult; +import static io.trino.operator.WorkProcessor.ProcessState.yield; +import static io.trino.operator.project.SelectedPositions.positionsRange; +import static io.trino.spi.block.DictionaryId.randomDictionaryId; import static java.util.Objects.requireNonNull; @NotThreadSafe diff --git a/core/trino-main/src/main/java/io/trino/operator/project/PageProjection.java b/core/trino-main/src/main/java/io/trino/operator/project/PageProjection.java index 86d3445b008d..2d96da62e4f0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/project/PageProjection.java +++ b/core/trino-main/src/main/java/io/trino/operator/project/PageProjection.java @@ -13,12 +13,12 @@ */ package io.trino.operator.project; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.Work; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.Work; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; public interface PageProjection { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/AbstractGreatestLeast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/AbstractGreatestLeast.java index 4bb1f824e104..326b1a4fb3e1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/AbstractGreatestLeast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/AbstractGreatestLeast.java @@ -24,16 +24,16 @@ import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.expression.BytecodeExpression; import io.airlift.bytecode.instruction.LabelNode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.CallSiteBinder; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.CallSiteBinder; import java.lang.invoke.MethodHandle; import java.util.List; @@ -53,21 +53,21 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.invokeDynamic; import static io.airlift.bytecode.expression.BytecodeExpressions.isNull; import static io.airlift.bytecode.expression.BytecodeExpressions.or; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.orderableTypeParameter; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.sql.gen.Bootstrap.BOOTSTRAP_METHOD; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.MinMaxCompare.getMinMaxCompare; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.orderableTypeParameter; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.sql.gen.Bootstrap.BOOTSTRAP_METHOD; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.MinMaxCompare.getMinMaxCompare; +import static io.trino.util.Reflection.methodHandle; import static java.lang.invoke.MethodType.methodType; import static java.util.Collections.nCopies; import static java.util.stream.Collectors.joining; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ApplyFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ApplyFunction.java index 90490a646fdb..c736aa85a8c1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ApplyFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ApplyFunction.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Primitives; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.lambda.UnaryFunctionInterface; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.lambda.UnaryFunctionInterface; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.type.TypeSignature.functionType; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.type.TypeSignature.functionType; +import static io.trino.util.Reflection.methodHandle; /** * This scalar function exists primarily to test lambda expression support. diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayAllMatchFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayAllMatchFunction.java index 9f293e9606db..ef4194b2ff18 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayAllMatchFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayAllMatchFunction.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.function.TypeParameterSpecialization; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.function.TypeParameterSpecialization; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import static java.lang.Boolean.FALSE; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayAnyMatchFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayAnyMatchFunction.java index 2be7052ecb82..dfb72414f15d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayAnyMatchFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayAnyMatchFunction.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.function.TypeParameterSpecialization; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.function.TypeParameterSpecialization; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import static java.lang.Boolean.TRUE; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayCardinalityFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayCardinalityFunction.java index 74a586c2f28a..c194d03b1cc8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayCardinalityFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayCardinalityFunction.java @@ -13,12 +13,12 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.block.Block; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; @Description("Returns the cardinality (length) of the array") @ScalarFunction("cardinality") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayCombinationsFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayCombinationsFunction.java index bf804f00847a..0799d946b255 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayCombinationsFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayCombinationsFunction.java @@ -14,24 +14,24 @@ package io.trino.operator.scalar; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.ArrayBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.block.ArrayBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.StandardTypes.INTEGER; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.StandardTypes.INTEGER; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.multiplyExact; import static java.lang.StrictMath.toIntExact; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayConcatFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayConcatFunction.java index 4682915ca51e..6013b60e19fd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayConcatFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayConcatFunction.java @@ -14,31 +14,31 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.VarArgsToArrayAdapterGenerator; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.VarArgsToArrayAdapterGenerator; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.sql.gen.VarArgsToArrayAdapterGenerator.generateVarArgsToArrayAdapter; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.sql.gen.VarArgsToArrayAdapterGenerator.generateVarArgsToArrayAdapter; +import static io.trino.util.Reflection.methodHandle; import static java.util.Collections.nCopies; public final class ArrayConcatFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayConcatUtils.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayConcatUtils.java index 6046e76997c5..b5b27aeccaa0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayConcatUtils.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayConcatUtils.java @@ -14,10 +14,10 @@ package io.trino.operator.scalar; import io.airlift.slice.Slice; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public final class ArrayConcatUtils { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayConstructor.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayConstructor.java index daa11e975c4d..88f6acc22072 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayConstructor.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayConstructor.java @@ -25,17 +25,17 @@ import io.airlift.bytecode.Variable; import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.expression.BytecodeExpression; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.CallSiteBinder; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.CallSiteBinder; import java.lang.invoke.MethodHandle; import java.lang.reflect.Method; @@ -52,16 +52,16 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.constantInt; import static io.airlift.bytecode.expression.BytecodeExpressions.constantNull; import static io.airlift.bytecode.expression.BytecodeExpressions.equal; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Failures.checkCondition; import static java.lang.invoke.MethodHandles.lookup; import static java.util.Collections.nCopies; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayContains.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayContains.java index bdeb234217a8..1ec615d1bd68 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayContains.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayContains.java @@ -13,25 +13,25 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; import java.lang.invoke.MethodHandle; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.util.Failures.internalError; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.util.Failures.internalError; @Description("Determines whether given value exists in the array") @ScalarFunction("contains") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayContainsSequence.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayContainsSequence.java index edc8355e2804..c3198deda50d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayContainsSequence.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayContainsSequence.java @@ -13,21 +13,21 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.block.Block; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; import java.lang.invoke.MethodHandle; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.IS_DISTINCT_FROM; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.IS_DISTINCT_FROM; @Description("Determines whether an array contains a sequence, with the values in the exact order") @ScalarFunction("contains_sequence") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayDistinctFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayDistinctFunction.java index a928e330d920..e08b3027ee15 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayDistinctFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayDistinctFunction.java @@ -14,28 +14,28 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; -import io.prestosql.type.BlockTypeOperators.BlockPositionIsDistinctFrom; +import io.trino.operator.aggregation.TypedSet; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.type.BlockTypeOperators.BlockPositionIsDistinctFrom; import it.unimi.dsi.fastutil.longs.LongOpenHashSet; import it.unimi.dsi.fastutil.longs.LongSet; -import static io.prestosql.operator.aggregation.TypedSet.createDistinctTypedSet; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.IS_DISTINCT_FROM; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.operator.aggregation.TypedSet.createDistinctTypedSet; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.IS_DISTINCT_FROM; +import static io.trino.spi.type.BigintType.BIGINT; @ScalarFunction("array_distinct") @Description("Remove duplicate values from the given array") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayElementAtFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayElementAtFunction.java index 530775ec8d33..5c44d4d3f038 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayElementAtFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayElementAtFunction.java @@ -13,16 +13,16 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; import static java.lang.Math.toIntExact; @ScalarFunction("element_at") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayExceptFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayExceptFunction.java index ca861137a70c..2ca4b6c8edd8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayExceptFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayExceptFunction.java @@ -13,25 +13,25 @@ */ package io.trino.operator.scalar; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.operator.aggregation.TypedSet; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; -import static io.prestosql.operator.aggregation.TypedSet.createEqualityTypedSet; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; +import static io.trino.operator.aggregation.TypedSet.createEqualityTypedSet; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; @ScalarFunction("array_except") @Description("Returns an array of elements that are in the first array but not the second, without duplicates.") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayFilterFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayFilterFunction.java index bd445497cf42..990f0f84ffb4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayFilterFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayFilterFunction.java @@ -13,14 +13,14 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.function.TypeParameterSpecialization; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.function.TypeParameterSpecialization; +import io.trino.spi.type.Type; import static java.lang.Boolean.TRUE; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayFlattenFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayFlattenFunction.java index baaeec496662..7e852234cf45 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayFlattenFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayFlattenFunction.java @@ -14,24 +14,24 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Math.toIntExact; public class ArrayFlattenFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayFunctions.java index ff317bc63906..3fa98d9ddf99 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayFunctions.java @@ -13,13 +13,13 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.ArrayType; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.type.UnknownType.UNKNOWN; public final class ArrayFunctions { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayIntersectFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayIntersectFunction.java index 4aa0584662eb..fd113424c56c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayIntersectFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayIntersectFunction.java @@ -14,25 +14,25 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; -import io.prestosql.type.BlockTypeOperators.BlockPositionIsDistinctFrom; +import io.trino.operator.aggregation.TypedSet; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.type.BlockTypeOperators.BlockPositionIsDistinctFrom; -import static io.prestosql.operator.aggregation.TypedSet.createDistinctTypedSet; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.IS_DISTINCT_FROM; +import static io.trino.operator.aggregation.TypedSet.createDistinctTypedSet; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.IS_DISTINCT_FROM; @ScalarFunction("array_intersect") @Description("Intersects elements of the two given arrays") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayJoin.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayJoin.java index 068f3ea60133..a56b39b63842 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayJoin.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayJoin.java @@ -15,24 +15,24 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.type.UnknownType; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.type.UnknownType; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -40,18 +40,18 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.castableToTypeParameter; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.castableToTypeParameter; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.Reflection.methodHandle; import static java.lang.String.format; public final class ArrayJoin diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayMaxFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayMaxFunction.java index 4163dbba08b1..4f107202fa71 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayMaxFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayMaxFunction.java @@ -13,24 +13,24 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; import java.lang.invoke.MethodHandle; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.util.Failures.internalError; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.util.Failures.internalError; import static java.lang.Float.intBitsToFloat; @ScalarFunction("array_max") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayMinFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayMinFunction.java index 7ead06eadd0f..fdb49e458dab 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayMinFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayMinFunction.java @@ -13,22 +13,22 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; import java.lang.invoke.MethodHandle; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.util.Failures.internalError; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.util.Failures.internalError; @ScalarFunction("array_min") @Description("Get minimum value of array") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayNgramsFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayNgramsFunction.java index 43bc76ad7452..c5fc84a8b047 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayNgramsFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayNgramsFunction.java @@ -13,18 +13,18 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.ArrayBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; +import io.trino.spi.block.ArrayBlock; +import io.trino.spi.block.Block; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.StandardTypes.INTEGER; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.StandardTypes.INTEGER; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.min; import static java.lang.StrictMath.toIntExact; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayNoneMatchFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayNoneMatchFunction.java index e5cece49776b..51b39e5f351a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayNoneMatchFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayNoneMatchFunction.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.function.TypeParameterSpecialization; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.function.TypeParameterSpecialization; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; @Description("Returns true if all elements of the array don't match the given predicate") @ScalarFunction("none_match") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayPositionFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayPositionFunction.java index 113d13d6da81..d5b100cc6c0c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayPositionFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayPositionFunction.java @@ -13,25 +13,25 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import java.lang.invoke.MethodHandle; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.util.Failures.internalError; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.util.Failures.internalError; @Description("Returns the position of the first occurrence of the given value in array (or 0 if not found)") @ScalarFunction("array_position") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayReduceFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayReduceFunction.java index b755e3439fa5..121089d3262f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayReduceFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayReduceFunction.java @@ -15,30 +15,30 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Primitives; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.lambda.BinaryFunctionInterface; -import io.prestosql.sql.gen.lambda.UnaryFunctionInterface; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.lambda.BinaryFunctionInterface; +import io.trino.sql.gen.lambda.UnaryFunctionInterface; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.TypeSignature.functionType; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.TypeSignature.functionType; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.util.Reflection.methodHandle; public final class ArrayReduceFunction extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayRemoveFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayRemoveFunction.java index 92fbf01a50eb..96a9dbb3acb1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayRemoveFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayRemoveFunction.java @@ -14,28 +14,28 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; import java.lang.invoke.MethodHandle; import java.util.ArrayList; import java.util.List; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.util.Failures.internalError; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.util.Failures.internalError; @ScalarFunction("array_remove") @Description("Remove specified values from the given array") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayReverseFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayReverseFunction.java index a7cf988c796e..e916539cf045 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayReverseFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayReverseFunction.java @@ -14,14 +14,14 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; @ScalarFunction("reverse") @Description("Returns an array which has the reversed order of the given array.") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayShuffleFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayShuffleFunction.java index 02af3204e6f7..81fecc20580f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayShuffleFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayShuffleFunction.java @@ -14,14 +14,14 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; import java.util.concurrent.ThreadLocalRandom; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySliceFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySliceFunction.java index b252a7c86904..4e8699035748 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySliceFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySliceFunction.java @@ -13,16 +13,16 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; - -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.util.Failures.checkCondition; +import io.trino.spi.block.Block; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; + +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.util.Failures.checkCondition; @ScalarFunction("slice") @Description("Subsets an array given an offset (1-indexed) and length") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySortComparatorFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySortComparatorFunction.java index 828fe8268e05..1dca16c7259d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySortComparatorFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySortComparatorFunction.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.function.TypeParameterSpecialization; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.lambda.LambdaFunctionInterface; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.function.TypeParameterSpecialization; +import io.trino.spi.type.Type; +import io.trino.sql.gen.lambda.LambdaFunctionInterface; import java.util.Comparator; import java.util.List; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.util.Failures.checkCondition; @ScalarFunction("array_sort") @Description("Sorts the given array with a lambda comparator.") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySortFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySortFunction.java index ef2fbd5a28ad..c1482f75c4cc 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySortFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySortFunction.java @@ -14,22 +14,22 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; import it.unimi.dsi.fastutil.ints.IntArrayList; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.COMPARISON; @ScalarFunction("array_sort") @Description("Sorts the given array in ascending order according to the natural ordering of its elements.") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySubscriptOperator.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySubscriptOperator.java index 52fe44b2ab39..28101830ff24 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySubscriptOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArraySubscriptOperator.java @@ -15,24 +15,24 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.SqlOperator; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.SUBSCRIPT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.SUBSCRIPT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayToArrayCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayToArrayCast.java index 519f6041861b..9b68dba3a47b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayToArrayCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayToArrayCast.java @@ -21,21 +21,21 @@ import io.airlift.bytecode.Parameter; import io.airlift.bytecode.Scope; import io.airlift.bytecode.Variable; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.ArrayGeneratorUtils; -import io.prestosql.sql.gen.ArrayMapBytecodeExpression; -import io.prestosql.sql.gen.CachedInstanceBinder; -import io.prestosql.sql.gen.CallSiteBinder; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.SqlOperator; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.ArrayGeneratorUtils; +import io.trino.sql.gen.ArrayMapBytecodeExpression; +import io.trino.sql.gen.CachedInstanceBinder; +import io.trino.sql.gen.CallSiteBinder; import java.lang.invoke.MethodHandle; import java.util.function.Function; @@ -48,15 +48,15 @@ import static io.airlift.bytecode.Parameter.arg; import static io.airlift.bytecode.ParameterizedType.type; import static io.airlift.bytecode.expression.BytecodeExpressions.constantBoolean; -import static io.prestosql.metadata.Signature.castableToTypeParameter; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.Signature.castableToTypeParameter; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Reflection.methodHandle; public class ArrayToArrayCast extends SqlOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayToElementConcatFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayToElementConcatFunction.java index 8b0999307865..ac84e00a56a4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayToElementConcatFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayToElementConcatFunction.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.util.Reflection.methodHandle; public class ArrayToElementConcatFunction extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayToJsonCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayToJsonCast.java index 7f73e5b7055e..f41c109e4edf 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayToJsonCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayToJsonCast.java @@ -18,30 +18,30 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.util.JsonUtil.JsonGeneratorWriter; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.SqlOperator; +import io.trino.spi.block.Block; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.util.JsonUtil.JsonGeneratorWriter; import java.io.IOException; import java.lang.invoke.MethodHandle; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.metadata.Signature.castableToTypeParameter; -import static io.prestosql.operator.scalar.JsonOperators.JSON_FACTORY; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.JsonUtil.canCastToJson; -import static io.prestosql.util.JsonUtil.createJsonGenerator; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.Signature.castableToTypeParameter; +import static io.trino.operator.scalar.JsonOperators.JSON_FACTORY; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.JsonUtil.canCastToJson; +import static io.trino.util.JsonUtil.createJsonGenerator; +import static io.trino.util.Reflection.methodHandle; public class ArrayToJsonCast extends SqlOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayTransformFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayTransformFunction.java index ad2342454e3c..ef4265216322 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayTransformFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayTransformFunction.java @@ -24,19 +24,19 @@ import io.airlift.bytecode.Variable; import io.airlift.bytecode.control.ForLoop; import io.airlift.bytecode.control.IfStatement; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.CallSiteBinder; -import io.prestosql.sql.gen.lambda.UnaryFunctionInterface; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.CallSiteBinder; +import io.trino.sql.gen.lambda.UnaryFunctionInterface; import java.util.List; import java.util.Optional; @@ -55,18 +55,18 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.newInstance; import static io.airlift.bytecode.expression.BytecodeExpressions.subtract; import static io.airlift.bytecode.instruction.VariableInstruction.incrementVariable; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.TypeSignature.functionType; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.TypeSignature.functionType; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Reflection.methodHandle; public final class ArrayTransformFunction extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayUnionFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayUnionFunction.java index 076916f212fa..0c9963950e65 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayUnionFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArrayUnionFunction.java @@ -13,30 +13,30 @@ */ package io.trino.operator.scalar; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.operator.aggregation.TypedSet; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import it.unimi.dsi.fastutil.longs.LongOpenHashSet; import it.unimi.dsi.fastutil.longs.LongSet; import java.util.concurrent.atomic.AtomicBoolean; -import static io.prestosql.operator.aggregation.TypedSet.createEqualityTypedSet; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.operator.aggregation.TypedSet.createEqualityTypedSet; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.type.BigintType.BIGINT; @ScalarFunction("array_union") @Description("Union elements of the two given arrays") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ArraysOverlapFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ArraysOverlapFunction.java index ba3f56f40264..01d296d7a5dd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ArraysOverlapFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ArraysOverlapFunction.java @@ -13,26 +13,26 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.function.TypeParameterSpecialization; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.spi.block.Block; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.function.TypeParameterSpecialization; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; import it.unimi.dsi.fastutil.ints.IntArrays; import it.unimi.dsi.fastutil.ints.IntComparator; import it.unimi.dsi.fastutil.longs.LongArrays; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.COMPARISON; @ScalarFunction("arrays_overlap") @Description("Returns true if arrays have common elements") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/BitwiseFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/BitwiseFunctions.java index 5f14c03628f5..b0f8d1ebcc70 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/BitwiseFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/BitwiseFunctions.java @@ -13,13 +13,13 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; public final class BitwiseFunctions { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/BooleanToBooleanFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/BooleanToBooleanFunction.java index 83711df6ff19..e09a584bd8ce 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/BooleanToBooleanFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/BooleanToBooleanFunction.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar; -import io.prestosql.sql.gen.lambda.LambdaFunctionInterface; +import io.trino.sql.gen.lambda.LambdaFunctionInterface; @FunctionalInterface public interface BooleanToBooleanFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/CastFromUnknownOperator.java b/core/trino-main/src/main/java/io/trino/operator/scalar/CastFromUnknownOperator.java index 3eeaca4d4b1b..1a15de159e10 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/CastFromUnknownOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/CastFromUnknownOperator.java @@ -14,20 +14,20 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.SqlOperator; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.Reflection.methodHandle; public final class CastFromUnknownOperator extends SqlOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/CharacterStringCasts.java b/core/trino-main/src/main/java/io/trino/operator/scalar/CharacterStringCasts.java index 2c09a01f970f..6439856b06f5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/CharacterStringCasts.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/CharacterStringCasts.java @@ -17,11 +17,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceUtf8; import io.airlift.slice.Slices; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.OperatorType; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; import java.util.ArrayList; import java.util.List; @@ -31,9 +31,9 @@ import static io.airlift.slice.SliceUtf8.getCodePointAt; import static io.airlift.slice.SliceUtf8.lengthOfCodePoint; import static io.airlift.slice.SliceUtf8.setCodePointAt; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.spi.type.Chars.truncateToLengthAndTrimSpaces; -import static io.prestosql.spi.type.Varchars.truncateToLength; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.spi.type.Chars.truncateToLengthAndTrimSpaces; +import static io.trino.spi.type.Varchars.truncateToLength; import static java.lang.Math.toIntExact; import static java.util.Collections.nCopies; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ChoicesScalarFunctionImplementation.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ChoicesScalarFunctionImplementation.java index f996de6fbdda..6d35abe5d18a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ChoicesScalarFunctionImplementation.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ChoicesScalarFunctionImplementation.java @@ -15,14 +15,14 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention; -import io.prestosql.spi.function.ScalarFunctionAdapter; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionInvoker; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.spi.function.InvocationConvention.InvocationReturnConvention; +import io.trino.spi.function.ScalarFunctionAdapter; import java.lang.invoke.MethodHandle; import java.util.ArrayList; @@ -31,10 +31,10 @@ import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_NOT_FOUND; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; -import static io.prestosql.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.UNSUPPORTED; +import static io.trino.spi.StandardErrorCode.FUNCTION_NOT_FOUND; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; +import static io.trino.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.UNSUPPORTED; import static java.lang.String.format; import static java.util.Comparator.comparingInt; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ColorFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ColorFunctions.java index ce43aa3725f1..16d0bc3e6b76 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ColorFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ColorFunctions.java @@ -15,21 +15,21 @@ import com.google.common.annotations.VisibleForTesting; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.type.ColorType; -import io.prestosql.type.Constraint; +import io.trino.spi.PrestoException; +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.type.ColorType; +import io.trino.type.Constraint; import java.awt.Color; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.operator.scalar.StringFunctions.upper; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.operator.scalar.StringFunctions.upper; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.util.Failures.checkCondition; import static java.lang.String.format; public final class ColorFunctions diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/CombineHashFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/CombineHashFunction.java index a50516416e3a..ed08ebec9bd5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/CombineHashFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/CombineHashFunction.java @@ -13,9 +13,9 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; public final class CombineHashFunction { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ConcatFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ConcatFunction.java index 243f87b1ef7f..f716528c2832 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ConcatFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ConcatFunction.java @@ -16,25 +16,25 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.PrestoException; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Math.addExact; import static java.util.Collections.nCopies; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ConcatWsFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ConcatWsFunction.java index de453bc9fdb3..46d0013e99e9 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ConcatWsFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ConcatWsFunction.java @@ -16,30 +16,30 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; import java.lang.invoke.MethodHandle; import java.util.Collections; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Math.addExact; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/DataSizeFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/DataSizeFunctions.java index 8bbf68f82abb..a882767939d5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/DataSizeFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/DataSizeFunctions.java @@ -14,18 +14,18 @@ package io.trino.operator.scalar; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; import java.math.BigDecimal; import java.math.BigInteger; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.type.Decimals.encodeUnscaledValue; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.type.Decimals.encodeUnscaledValue; import static java.lang.Character.isDigit; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/DateTimeFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/DateTimeFunctions.java index 2cbe9597f949..b6a59c90d4df 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/DateTimeFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/DateTimeFunctions.java @@ -16,19 +16,19 @@ import io.airlift.concurrent.ThreadLocalCache; import io.airlift.slice.Slice; import io.airlift.units.Duration; -import io.prestosql.operator.scalar.timestamptz.CurrentTimestamp; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.type.DateTimes; +import io.trino.operator.scalar.timestamptz.CurrentTimestamp; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TimeZoneKey; +import io.trino.type.DateTimes; import org.joda.time.DateTime; import org.joda.time.DateTimeField; import org.joda.time.DateTimeZone; @@ -49,22 +49,22 @@ import java.util.concurrent.TimeUnit; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.operator.scalar.QuarterOfYearDateTimeField.QUARTER_OF_YEAR; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_SECOND; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.rescale; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToBigInteger; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.scaleEpochMillisToMicros; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.getDateTimeZone; -import static io.prestosql.util.DateTimeZoneIndex.packDateTimeWithZone; +import static io.trino.operator.scalar.QuarterOfYearDateTimeField.QUARTER_OF_YEAR; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_SECOND; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.rescale; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToBigInteger; +import static io.trino.type.DateTimes.MICROSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_NANOSECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.scaleEpochMillisToMicros; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.getDateTimeZone; +import static io.trino.util.DateTimeZoneIndex.packDateTimeWithZone; import static java.lang.Math.floorDiv; import static java.lang.Math.floorMod; import static java.lang.Math.toIntExact; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/DoubleToBooleanFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/DoubleToBooleanFunction.java index 020383a85c84..a223b0cf865f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/DoubleToBooleanFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/DoubleToBooleanFunction.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar; -import io.prestosql.sql.gen.lambda.LambdaFunctionInterface; +import io.trino.sql.gen.lambda.LambdaFunctionInterface; @FunctionalInterface public interface DoubleToBooleanFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ElementToArrayConcatFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ElementToArrayConcatFunction.java index 4da0b4174ecc..1c83fc6f70da 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ElementToArrayConcatFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ElementToArrayConcatFunction.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.util.Reflection.methodHandle; public class ElementToArrayConcatFunction extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/EmptyMapConstructor.java b/core/trino-main/src/main/java/io/trino/operator/scalar/EmptyMapConstructor.java index 54b6c914c09c..d40c6b5cabaa 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/EmptyMapConstructor.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/EmptyMapConstructor.java @@ -13,14 +13,14 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; @Description("Creates an empty map") @ScalarFunction("map") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/FailureFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/FailureFunction.java index 15ea42dd7ad9..6a5e606ee648 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/FailureFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/FailureFunction.java @@ -15,13 +15,13 @@ import io.airlift.json.JsonCodec; import io.airlift.slice.Slice; -import io.prestosql.client.FailureInfo; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.client.FailureInfo; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; public final class FailureFunction { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/FormatFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/FormatFunction.java index 51894be7e2ba..cfd70a362f8f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/FormatFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/FormatFunction.java @@ -15,27 +15,27 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.VarcharType; +import io.trino.sql.tree.QualifiedName; import java.lang.invoke.MethodHandle; import java.math.BigDecimal; @@ -48,33 +48,33 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Streams.mapWithIndex; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.withVariadicBound; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.decodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.isLongDecimal; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.Timestamps.roundDiv; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.type.DateTimes.toLocalDateTime; -import static io.prestosql.type.DateTimes.toZonedDateTime; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.Failures.internalError; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.withVariadicBound; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.decodeUnscaledValue; +import static io.trino.spi.type.Decimals.isLongDecimal; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.Timestamps.roundDiv; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.type.DateTimes.PICOSECONDS_PER_NANOSECOND; +import static io.trino.type.DateTimes.toLocalDateTime; +import static io.trino.type.DateTimes.toZonedDateTime; +import static io.trino.type.JsonType.JSON; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.Failures.internalError; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericComparisonOperator.java b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericComparisonOperator.java index 74aafb0cb1e6..2f2f1ad94490 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericComparisonOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericComparisonOperator.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.SqlOperator; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.Signature.orderableTypeParameter; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.metadata.Signature.orderableTypeParameter; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.util.Objects.requireNonNull; public class GenericComparisonOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericDistinctFromOperator.java b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericDistinctFromOperator.java index 1d92e64198be..5fbf8a014e5e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericDistinctFromOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericDistinctFromOperator.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.SqlOperator; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.util.Objects.requireNonNull; public class GenericDistinctFromOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericEqualOperator.java b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericEqualOperator.java index 1ce0532680b3..5232eeefbc0b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericEqualOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericEqualOperator.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.SqlOperator; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.util.Objects.requireNonNull; public class GenericEqualOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericHashCodeOperator.java b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericHashCodeOperator.java index 7abb48631664..7fb34ad47511 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericHashCodeOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericHashCodeOperator.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.SqlOperator; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; public class GenericHashCodeOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericIndeterminateOperator.java b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericIndeterminateOperator.java index 05e15fdb7c79..5dd27dd026c1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericIndeterminateOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericIndeterminateOperator.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.SqlOperator; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.util.Objects.requireNonNull; public class GenericIndeterminateOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericLessThanOperator.java b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericLessThanOperator.java index bdbfa95c91ad..f054f102d7f5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericLessThanOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericLessThanOperator.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.SqlOperator; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.Signature.orderableTypeParameter; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.metadata.Signature.orderableTypeParameter; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.util.Objects.requireNonNull; public class GenericLessThanOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericLessThanOrEqualOperator.java b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericLessThanOrEqualOperator.java index 41a7dc724dad..fb8846b11308 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericLessThanOrEqualOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericLessThanOrEqualOperator.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.SqlOperator; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.Signature.orderableTypeParameter; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.metadata.Signature.orderableTypeParameter; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.util.Objects.requireNonNull; public class GenericLessThanOrEqualOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericXxHash64Operator.java b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericXxHash64Operator.java index d434bbac3967..9a573e991541 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/GenericXxHash64Operator.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/GenericXxHash64Operator.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.SqlOperator; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; public class GenericXxHash64Operator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/HmacFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/HmacFunctions.java index 97c6bbd395ad..7c9da375a35d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/HmacFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/HmacFunctions.java @@ -17,10 +17,10 @@ import com.google.common.hash.HashFunction; import com.google.common.hash.Hashing; import io.airlift.slice.Slice; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static io.airlift.slice.Slices.wrappedBuffer; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/HyperLogLogFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/HyperLogLogFunctions.java index 2fe6edf803e7..f195dce1a11f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/HyperLogLogFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/HyperLogLogFunctions.java @@ -15,11 +15,11 @@ import io.airlift.slice.Slice; import io.airlift.stats.cardinality.HyperLogLog; -import io.prestosql.operator.aggregation.ApproximateSetAggregation; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.ApproximateSetAggregation; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; public final class HyperLogLogFunctions { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/IdentityCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/IdentityCast.java index d331844b98ca..b0eda999840d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/IdentityCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/IdentityCast.java @@ -14,18 +14,18 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.SqlOperator; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; public class IdentityCast extends SqlOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/InvokeFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/InvokeFunction.java index 6acd10cbd881..30034d9c8302 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/InvokeFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/InvokeFunction.java @@ -16,24 +16,24 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Primitives; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.lambda.LambdaFunctionInterface; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.lambda.LambdaFunctionInterface; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.type.TypeSignature.functionType; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.type.TypeSignature.functionType; +import static io.trino.util.Reflection.methodHandle; /** * This scalar function exists primarily to test lambda expression support. diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JoniRegexpCasts.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JoniRegexpCasts.java index 633355c987c3..fa08ba5ac92e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JoniRegexpCasts.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JoniRegexpCasts.java @@ -18,17 +18,17 @@ import io.airlift.joni.Regex; import io.airlift.joni.Syntax; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.type.JoniRegexp; -import io.prestosql.type.JoniRegexpType; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.OperatorType; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.type.JoniRegexp; +import io.trino.type.JoniRegexpType; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.Chars.padSpaces; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.Chars.padSpaces; public final class JoniRegexpCasts { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JoniRegexpFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JoniRegexpFunctions.java index 32a9de93e508..73f7a6455600 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JoniRegexpFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JoniRegexpFunctions.java @@ -23,24 +23,24 @@ import io.airlift.slice.SliceOutput; import io.airlift.slice.SliceUtf8; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.type.Constraint; -import io.prestosql.type.JoniRegexp; -import io.prestosql.type.JoniRegexpType; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; +import io.trino.type.Constraint; +import io.trino.type.JoniRegexp; +import io.trino.type.JoniRegexpType; import java.nio.charset.StandardCharsets; import static io.airlift.slice.SliceUtf8.lengthOfCodePointFromStartByte; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JoniRegexpReplaceLambdaFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JoniRegexpReplaceLambdaFunction.java index b62627e9548b..863330efc1d2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JoniRegexpReplaceLambdaFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JoniRegexpReplaceLambdaFunction.java @@ -20,20 +20,20 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.sql.gen.lambda.UnaryFunctionInterface; -import io.prestosql.type.JoniRegexp; -import io.prestosql.type.JoniRegexpType; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.sql.gen.lambda.UnaryFunctionInterface; +import io.trino.type.JoniRegexp; +import io.trino.type.JoniRegexpType; import static io.airlift.slice.SliceUtf8.lengthOfCodePointFromStartByte; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; @ScalarFunction("regexp_replace") @Description("Replaces substrings matching a regular expression using a lambda function") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonExtract.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonExtract.java index 01c241e2c10a..d19831488e36 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonExtract.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonExtract.java @@ -22,7 +22,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.io.IOException; import java.io.UncheckedIOException; @@ -35,9 +35,9 @@ import static com.fasterxml.jackson.core.JsonToken.START_OBJECT; import static com.fasterxml.jackson.core.JsonToken.VALUE_NULL; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.util.JsonUtil.createJsonGenerator; -import static io.prestosql.util.JsonUtil.createJsonParser; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.util.JsonUtil.createJsonGenerator; +import static io.trino.util.JsonUtil.createJsonParser; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonFunctions.java index 8f10f73998ab..0015b421d884 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonFunctions.java @@ -19,17 +19,17 @@ import com.fasterxml.jackson.databind.MappingJsonFactory; import com.google.common.primitives.Doubles; import io.airlift.slice.Slice; -import io.prestosql.plugin.base.util.JsonTypeUtil; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.type.JsonPathType; +import io.trino.plugin.base.util.JsonTypeUtil; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.OperatorType; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; +import io.trino.type.JsonPathType; import java.io.IOException; import java.util.LinkedList; @@ -46,10 +46,10 @@ import static com.fasterxml.jackson.core.JsonToken.VALUE_STRING; import static com.fasterxml.jackson.core.JsonToken.VALUE_TRUE; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.util.JsonUtil.createJsonParser; -import static io.prestosql.util.JsonUtil.truncateIfNecessaryForErrorMessage; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.util.JsonUtil.createJsonParser; +import static io.trino.util.JsonUtil.truncateIfNecessaryForErrorMessage; public final class JsonFunctions { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonOperators.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonOperators.java index 14e4790b4814..f25e9bc354a2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonOperators.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonOperators.java @@ -19,42 +19,42 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.util.JsonCastException; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.util.JsonCastException; import java.io.IOException; import static com.fasterxml.jackson.core.JsonFactory.Feature.CANONICALIZE_FIELD_NAMES; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.StandardTypes.BIGINT; -import static io.prestosql.spi.type.StandardTypes.BOOLEAN; -import static io.prestosql.spi.type.StandardTypes.DATE; -import static io.prestosql.spi.type.StandardTypes.DOUBLE; -import static io.prestosql.spi.type.StandardTypes.INTEGER; -import static io.prestosql.spi.type.StandardTypes.JSON; -import static io.prestosql.spi.type.StandardTypes.REAL; -import static io.prestosql.spi.type.StandardTypes.SMALLINT; -import static io.prestosql.spi.type.StandardTypes.TINYINT; -import static io.prestosql.spi.type.StandardTypes.VARCHAR; -import static io.prestosql.util.DateTimeUtils.printDate; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.JsonUtil.createJsonGenerator; -import static io.prestosql.util.JsonUtil.createJsonParser; -import static io.prestosql.util.JsonUtil.currentTokenAsBigint; -import static io.prestosql.util.JsonUtil.currentTokenAsBoolean; -import static io.prestosql.util.JsonUtil.currentTokenAsDouble; -import static io.prestosql.util.JsonUtil.currentTokenAsInteger; -import static io.prestosql.util.JsonUtil.currentTokenAsReal; -import static io.prestosql.util.JsonUtil.currentTokenAsSmallint; -import static io.prestosql.util.JsonUtil.currentTokenAsTinyint; -import static io.prestosql.util.JsonUtil.currentTokenAsVarchar; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.StandardTypes.BIGINT; +import static io.trino.spi.type.StandardTypes.BOOLEAN; +import static io.trino.spi.type.StandardTypes.DATE; +import static io.trino.spi.type.StandardTypes.DOUBLE; +import static io.trino.spi.type.StandardTypes.INTEGER; +import static io.trino.spi.type.StandardTypes.JSON; +import static io.trino.spi.type.StandardTypes.REAL; +import static io.trino.spi.type.StandardTypes.SMALLINT; +import static io.trino.spi.type.StandardTypes.TINYINT; +import static io.trino.spi.type.StandardTypes.VARCHAR; +import static io.trino.util.DateTimeUtils.printDate; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.JsonUtil.createJsonGenerator; +import static io.trino.util.JsonUtil.createJsonParser; +import static io.trino.util.JsonUtil.currentTokenAsBigint; +import static io.trino.util.JsonUtil.currentTokenAsBoolean; +import static io.trino.util.JsonUtil.currentTokenAsDouble; +import static io.trino.util.JsonUtil.currentTokenAsInteger; +import static io.trino.util.JsonUtil.currentTokenAsReal; +import static io.trino.util.JsonUtil.currentTokenAsSmallint; +import static io.trino.util.JsonUtil.currentTokenAsTinyint; +import static io.trino.util.JsonUtil.currentTokenAsVarchar; import static java.lang.Float.intBitsToFloat; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonPathTokenizer.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonPathTokenizer.java index e0a0e9cf5908..a221cf0174af 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonPathTokenizer.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonPathTokenizer.java @@ -15,10 +15,10 @@ import com.google.common.base.VerifyException; import com.google.common.collect.AbstractIterator; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import static com.google.common.base.Verify.verify; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; import static java.lang.Character.isLetterOrDigit; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonStringToArrayCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonStringToArrayCast.java index 650a088480f2..623f575e418f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonStringToArrayCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonStringToArrayCast.java @@ -14,18 +14,18 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.type.TypeSignature; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.scalar.JsonToArrayCast.JSON_TO_ARRAY; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.scalar.JsonToArrayCast.JSON_TO_ARRAY; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.VarcharType.VARCHAR; public final class JsonStringToArrayCast extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonStringToMapCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonStringToMapCast.java index eacd2a48c5d8..29cc32812737 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonStringToMapCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonStringToMapCast.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.type.TypeSignature; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.scalar.JsonToMapCast.JSON_TO_MAP; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.scalar.JsonToMapCast.JSON_TO_MAP; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarcharType.VARCHAR; public final class JsonStringToMapCast extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonStringToRowCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonStringToRowCast.java index 9ff362f4676e..0dde05136856 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonStringToRowCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonStringToRowCast.java @@ -14,17 +14,17 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.type.TypeSignature; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.withVariadicBound; -import static io.prestosql.operator.scalar.JsonToRowCast.JSON_TO_ROW; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.withVariadicBound; +import static io.trino.operator.scalar.JsonToRowCast.JSON_TO_ROW; +import static io.trino.spi.type.VarcharType.VARCHAR; public final class JsonStringToRowCast extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonToArrayCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonToArrayCast.java index a09745c6f568..bd52bfe4b2ad 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonToArrayCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonToArrayCast.java @@ -17,34 +17,34 @@ import com.fasterxml.jackson.core.JsonToken; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.util.JsonCastException; -import io.prestosql.util.JsonUtil.BlockBuilderAppender; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.SqlOperator; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.TypeSignature; +import io.trino.util.JsonCastException; +import io.trino.util.JsonUtil.BlockBuilderAppender; import java.lang.invoke.MethodHandle; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.metadata.Signature.castableFromTypeParameter; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.JsonUtil.JSON_FACTORY; -import static io.prestosql.util.JsonUtil.canCastFromJson; -import static io.prestosql.util.JsonUtil.createJsonParser; -import static io.prestosql.util.JsonUtil.truncateIfNecessaryForErrorMessage; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.Signature.castableFromTypeParameter; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.JsonUtil.JSON_FACTORY; +import static io.trino.util.JsonUtil.canCastFromJson; +import static io.trino.util.JsonUtil.createJsonParser; +import static io.trino.util.JsonUtil.truncateIfNecessaryForErrorMessage; +import static io.trino.util.Reflection.methodHandle; import static java.lang.String.format; public class JsonToArrayCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonToMapCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonToMapCast.java index 2b7125b51c8e..63b97c4230c2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonToMapCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonToMapCast.java @@ -17,36 +17,36 @@ import com.fasterxml.jackson.core.JsonToken; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.util.JsonCastException; -import io.prestosql.util.JsonUtil.BlockBuilderAppender; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.SqlOperator; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.TypeSignature; +import io.trino.util.JsonCastException; +import io.trino.util.JsonUtil.BlockBuilderAppender; import java.lang.invoke.MethodHandle; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.metadata.Signature.castableFromTypeParameter; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.JsonUtil.BlockBuilderAppender.createBlockBuilderAppender; -import static io.prestosql.util.JsonUtil.JSON_FACTORY; -import static io.prestosql.util.JsonUtil.canCastFromJson; -import static io.prestosql.util.JsonUtil.createJsonParser; -import static io.prestosql.util.JsonUtil.truncateIfNecessaryForErrorMessage; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.Signature.castableFromTypeParameter; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.JsonUtil.BlockBuilderAppender.createBlockBuilderAppender; +import static io.trino.util.JsonUtil.JSON_FACTORY; +import static io.trino.util.JsonUtil.canCastFromJson; +import static io.trino.util.JsonUtil.createJsonParser; +import static io.trino.util.JsonUtil.truncateIfNecessaryForErrorMessage; +import static io.trino.util.Reflection.methodHandle; import static java.lang.String.format; public class JsonToMapCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonToRowCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonToRowCast.java index e7af43820c54..cf1c4d335a82 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/JsonToRowCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/JsonToRowCast.java @@ -18,34 +18,34 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.metadata.TypeVariableConstraint; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.util.JsonCastException; -import io.prestosql.util.JsonUtil.BlockBuilderAppender; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.SqlOperator; +import io.trino.metadata.TypeVariableConstraint; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TypeSignature; +import io.trino.util.JsonCastException; +import io.trino.util.JsonUtil.BlockBuilderAppender; import java.lang.invoke.MethodHandle; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.JsonUtil.BlockBuilderAppender.createBlockBuilderAppender; -import static io.prestosql.util.JsonUtil.JSON_FACTORY; -import static io.prestosql.util.JsonUtil.canCastFromJson; -import static io.prestosql.util.JsonUtil.createJsonParser; -import static io.prestosql.util.JsonUtil.truncateIfNecessaryForErrorMessage; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.JsonUtil.BlockBuilderAppender.createBlockBuilderAppender; +import static io.trino.util.JsonUtil.JSON_FACTORY; +import static io.trino.util.JsonUtil.canCastFromJson; +import static io.trino.util.JsonUtil.createJsonParser; +import static io.trino.util.JsonUtil.truncateIfNecessaryForErrorMessage; +import static io.trino.util.Reflection.methodHandle; import static java.lang.String.format; public class JsonToRowCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/LongToBooleanFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/LongToBooleanFunction.java index cd2fe625235d..32fe17c3f9ca 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/LongToBooleanFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/LongToBooleanFunction.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar; -import io.prestosql.sql.gen.lambda.LambdaFunctionInterface; +import io.trino.sql.gen.lambda.LambdaFunctionInterface; @FunctionalInterface public interface LongToBooleanFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/LuhnCheckFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/LuhnCheckFunction.java index f02911eb304a..227745cec1c4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/LuhnCheckFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/LuhnCheckFunction.java @@ -14,13 +14,13 @@ package io.trino.operator.scalar; import io.airlift.slice.Slice; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.util.Failures.checkCondition; public final class LuhnCheckFunction { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapCardinalityFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapCardinalityFunction.java index 944d2fcc4abd..686038866dd5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapCardinalityFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapCardinalityFunction.java @@ -13,12 +13,12 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.block.Block; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; @ScalarFunction("cardinality") @Description("Returns the cardinality (the number of key-value pairs) of the map") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapConcatFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapConcatFunction.java index 1c91423ee1b9..5c313b4c2c6d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapConcatFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapConcatFunction.java @@ -14,38 +14,38 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.VarArgsToArrayAdapterGenerator.MethodHandleAndConstructor; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.operator.aggregation.TypedSet; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.VarArgsToArrayAdapterGenerator.MethodHandleAndConstructor; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.util.Optional; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.aggregation.TypedSet.createEqualityTypedSet; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.sql.gen.VarArgsToArrayAdapterGenerator.generateVarArgsToArrayAdapter; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.aggregation.TypedSet.createEqualityTypedSet; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.sql.gen.VarArgsToArrayAdapterGenerator.generateVarArgsToArrayAdapter; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Math.min; import static java.util.Collections.nCopies; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapConstructor.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapConstructor.java index 10634ab69cc7..6480d849ec27 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapConstructor.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapConstructor.java @@ -14,44 +14,44 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.DuplicateMapKeyException; -import io.prestosql.spi.block.MapBlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.DuplicateMapKeyException; +import io.trino.spi.block.MapBlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.Failures.internalError; -import static io.prestosql.util.Reflection.constructorMethodHandle; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.Failures.internalError; +import static io.trino.util.Reflection.constructorMethodHandle; +import static io.trino.util.Reflection.methodHandle; public final class MapConstructor extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapElementAtFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapElementAtFunction.java index 682e19dc3f09..a205ef44fb9b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapElementAtFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapElementAtFunction.java @@ -15,29 +15,29 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Primitives; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.SingleMapBlock; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.block.Block; +import io.trino.spi.block.SingleMapBlock; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.util.Reflection.methodHandle; public class MapElementAtFunction extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapEntriesFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapEntriesFunction.java index f8389c5b5210..46281427fd76 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapEntriesFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapEntriesFunction.java @@ -14,16 +14,16 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; import static com.google.common.base.Verify.verify; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapFilterFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapFilterFunction.java index 8c76983d802e..b198df14a59c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapFilterFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapFilterFunction.java @@ -24,21 +24,21 @@ import io.airlift.bytecode.Variable; import io.airlift.bytecode.control.ForLoop; import io.airlift.bytecode.control.IfStatement; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.CallSiteBinder; -import io.prestosql.sql.gen.SqlTypeBytecodeExpression; -import io.prestosql.sql.gen.lambda.BinaryFunctionInterface; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.CallSiteBinder; +import io.trino.sql.gen.SqlTypeBytecodeExpression; +import io.trino.sql.gen.lambda.BinaryFunctionInterface; import java.lang.invoke.MethodHandle; import java.util.Optional; @@ -58,19 +58,19 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.notEqual; import static io.airlift.bytecode.expression.BytecodeExpressions.subtract; import static io.airlift.bytecode.instruction.VariableInstruction.incrementVariable; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.TypeSignature.functionType; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.TypeSignature.functionType; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Reflection.methodHandle; public final class MapFilterFunction extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapFromEntriesFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapFromEntriesFunction.java index e233c4fd0be0..7763a5da6a91 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapFromEntriesFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapFromEntriesFunction.java @@ -14,32 +14,32 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.operator.aggregation.TypedSet; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; -import static io.prestosql.operator.aggregation.TypedSet.createEqualityTypedSet; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; +import static io.trino.operator.aggregation.TypedSet.createEqualityTypedSet; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; import static java.lang.String.format; @ScalarFunction("map_from_entries") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapKeys.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapKeys.java index 05e01f439e23..b48e6c97a775 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapKeys.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapKeys.java @@ -13,13 +13,13 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; @ScalarFunction("map_keys") @Description("Returns the keys of the given map(K,V) as an array") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapSubscriptOperator.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapSubscriptOperator.java index 83d7dd2cf6d6..f41bf44f93e2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapSubscriptOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapSubscriptOperator.java @@ -16,34 +16,34 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Primitives; import io.airlift.slice.Slice; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.SingleMapBlock; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.InterpretedFunctionInvoker; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.SqlOperator; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.SingleMapBlock; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.InterpretedFunctionInvoker; import java.lang.invoke.MethodHandle; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.function.OperatorType.SUBSCRIPT; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.OperatorType.SUBSCRIPT; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.Reflection.methodHandle; import static java.lang.String.format; public class MapSubscriptOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapToJsonCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapToJsonCast.java index 39855326a74d..0129fda9fbb7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapToJsonCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapToJsonCast.java @@ -18,13 +18,13 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.SqlOperator; +import io.trino.spi.block.Block; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.io.IOException; import java.lang.invoke.MethodHandle; @@ -33,20 +33,20 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.metadata.Signature.castableToTypeParameter; -import static io.prestosql.operator.scalar.JsonOperators.JSON_FACTORY; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.JsonUtil.JsonGeneratorWriter; -import static io.prestosql.util.JsonUtil.ObjectKeyProvider; -import static io.prestosql.util.JsonUtil.canCastToJson; -import static io.prestosql.util.JsonUtil.createJsonGenerator; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.Signature.castableToTypeParameter; +import static io.trino.operator.scalar.JsonOperators.JSON_FACTORY; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.JsonUtil.JsonGeneratorWriter; +import static io.trino.util.JsonUtil.ObjectKeyProvider; +import static io.trino.util.JsonUtil.canCastToJson; +import static io.trino.util.JsonUtil.createJsonGenerator; +import static io.trino.util.Reflection.methodHandle; public class MapToJsonCast extends SqlOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapToMapCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapToMapCast.java index db6b2f7f3f23..a560c3d33d89 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapToMapCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapToMapCast.java @@ -15,43 +15,43 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.SqlOperator; +import io.trino.operator.aggregation.TypedSet; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.metadata.Signature.castableToTypeParameter; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.aggregation.TypedSet.createEqualityTypedSet; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.block.MethodHandleUtil.compose; -import static io.prestosql.spi.block.MethodHandleUtil.nativeValueWriter; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.util.Failures.internalError; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.Signature.castableToTypeParameter; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.aggregation.TypedSet.createEqualityTypedSet; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.block.MethodHandleUtil.compose; +import static io.trino.spi.block.MethodHandleUtil.nativeValueWriter; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.util.Failures.internalError; +import static io.trino.util.Reflection.methodHandle; import static java.lang.invoke.MethodHandles.permuteArguments; import static java.lang.invoke.MethodType.methodType; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapTransformKeysFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapTransformKeysFunction.java index 5500ef244bbb..330b76fc29f7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapTransformKeysFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapTransformKeysFunction.java @@ -24,28 +24,28 @@ import io.airlift.bytecode.Variable; import io.airlift.bytecode.control.ForLoop; import io.airlift.bytecode.control.IfStatement; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.CallSiteBinder; -import io.prestosql.sql.gen.SqlTypeBytecodeExpression; -import io.prestosql.sql.gen.lambda.BinaryFunctionInterface; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.operator.aggregation.TypedSet; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.CallSiteBinder; +import io.trino.sql.gen.SqlTypeBytecodeExpression; +import io.trino.sql.gen.lambda.BinaryFunctionInterface; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import java.lang.invoke.MethodHandle; import java.util.Optional; @@ -70,20 +70,20 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.newInstance; import static io.airlift.bytecode.expression.BytecodeExpressions.subtract; import static io.airlift.bytecode.instruction.VariableInstruction.incrementVariable; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.functionType; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.sql.gen.BytecodeUtils.loadConstant; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.functionType; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.sql.gen.BytecodeUtils.loadConstant; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Reflection.methodHandle; import static java.util.Objects.requireNonNull; public final class MapTransformKeysFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapTransformValuesFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapTransformValuesFunction.java index 87dad72bac45..eae2728d1096 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapTransformValuesFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapTransformValuesFunction.java @@ -26,23 +26,23 @@ import io.airlift.bytecode.control.ForLoop; import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.control.TryCatch; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.CallSiteBinder; -import io.prestosql.sql.gen.SqlTypeBytecodeExpression; -import io.prestosql.sql.gen.lambda.BinaryFunctionInterface; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.CallSiteBinder; +import io.trino.sql.gen.SqlTypeBytecodeExpression; +import io.trino.sql.gen.lambda.BinaryFunctionInterface; import java.lang.invoke.MethodHandle; import java.util.Optional; @@ -65,19 +65,19 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.newInstance; import static io.airlift.bytecode.expression.BytecodeExpressions.subtract; import static io.airlift.bytecode.instruction.VariableInstruction.incrementVariable; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.functionType; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.functionType; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Reflection.methodHandle; public final class MapTransformValuesFunction extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapValues.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapValues.java index 22bf50ff4a59..d68e598d9cde 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapValues.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapValues.java @@ -13,13 +13,13 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; @ScalarFunction("map_values") @Description("Returns the values of the given map(K,V) as an array") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MapZipWithFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MapZipWithFunction.java index 58488c96fc95..f27b0f228a2f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MapZipWithFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MapZipWithFunction.java @@ -14,34 +14,34 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.SingleMapBlock; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.lambda.LambdaFunctionInterface; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.SingleMapBlock; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.lambda.LambdaFunctionInterface; import java.lang.invoke.MethodHandle; import java.util.Optional; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.functionType; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.functionType; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.spi.type.TypeUtils.writeNativeValue; +import static io.trino.util.Reflection.methodHandle; public final class MapZipWithFunction extends SqlScalarFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MathFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MathFunctions.java index 64f8249ba002..bc2d87034639 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MathFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MathFunctions.java @@ -18,25 +18,25 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.UnscaledDecimal128Arithmetic; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; -import io.prestosql.type.Constraint; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.operator.aggregation.TypedSet; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.UnscaledDecimal128Arithmetic; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.type.Constraint; import org.apache.commons.math3.distribution.BetaDistribution; import org.apache.commons.math3.special.Erf; @@ -45,30 +45,30 @@ import java.util.concurrent.ThreadLocalRandom; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.operator.aggregation.TypedSet.createEqualityTypedSet; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.type.Decimals.longTenToNth; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.add; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.isNegative; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.isZero; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.negate; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.rescale; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.rescaleTruncate; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.subtract; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.throwIfOverflows; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToUnscaledLong; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.type.DecimalOperators.modulusScalarFunction; -import static io.prestosql.type.DecimalOperators.modulusSignatureBuilder; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.operator.aggregation.TypedSet.createEqualityTypedSet; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.type.Decimals.longTenToNth; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.add; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.isNegative; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.isZero; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.negate; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.rescale; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.rescaleTruncate; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.subtract; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.throwIfOverflows; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToUnscaledLong; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.type.DecimalOperators.modulusScalarFunction; +import static io.trino.type.DecimalOperators.modulusSignatureBuilder; +import static io.trino.util.Failures.checkCondition; import static java.lang.Character.MAX_RADIX; import static java.lang.Character.MIN_RADIX; import static java.lang.Float.floatToRawIntBits; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/MultimapFromEntriesFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/MultimapFromEntriesFunction.java index 1169b1b5d02e..eacec7310c87 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/MultimapFromEntriesFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/MultimapFromEntriesFunction.java @@ -14,35 +14,35 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.operator.aggregation.TypedSet; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntList; import static com.google.common.base.Verify.verify; -import static io.prestosql.operator.aggregation.TypedSet.createEqualityTypedSet; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; +import static io.trino.operator.aggregation.TypedSet.createEqualityTypedSet; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; @ScalarFunction("multimap_from_entries") @Description("Construct a multimap from an array of entries") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ObjectToBooleanFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ObjectToBooleanFunction.java index 4cc39de38a1b..5fbde868a8ac 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ObjectToBooleanFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ObjectToBooleanFunction.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar; -import io.prestosql.sql.gen.lambda.LambdaFunctionInterface; +import io.trino.sql.gen.lambda.LambdaFunctionInterface; @FunctionalInterface public interface ObjectToBooleanFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ParametricScalar.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ParametricScalar.java index 5738007e549e..011c9be7ee23 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ParametricScalar.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ParametricScalar.java @@ -14,27 +14,27 @@ package io.trino.operator.scalar; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.operator.ParametricImplementationsGroup; -import io.prestosql.operator.annotations.ImplementationDependency; -import io.prestosql.operator.scalar.annotations.ParametricScalarImplementation; -import io.prestosql.operator.scalar.annotations.ParametricScalarImplementation.ParametricScalarImplementationChoice; -import io.prestosql.spi.PrestoException; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.operator.ParametricImplementationsGroup; +import io.trino.operator.annotations.ImplementationDependency; +import io.trino.operator.scalar.annotations.ParametricScalarImplementation; +import io.trino.operator.scalar.annotations.ParametricScalarImplementation.ParametricScalarImplementationChoice; +import io.trino.spi.PrestoException; import java.util.Collection; import java.util.Optional; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.spi.StandardErrorCode.AMBIGUOUS_FUNCTION_IMPLEMENTATION; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_MISSING; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.spi.StandardErrorCode.AMBIGUOUS_FUNCTION_IMPLEMENTATION; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_MISSING; +import static io.trino.util.Failures.checkCondition; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/QuantileDigestFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/QuantileDigestFunctions.java index 8064b864550f..43300929deb7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/QuantileDigestFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/QuantileDigestFunctions.java @@ -15,20 +15,20 @@ import io.airlift.slice.Slice; import io.airlift.stats.QuantileDigest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.aggregation.FloatingPointBitsConverterUtil.sortableIntToFloat; -import static io.prestosql.operator.aggregation.FloatingPointBitsConverterUtil.sortableLongToDouble; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.operator.aggregation.FloatingPointBitsConverterUtil.sortableIntToFloat; +import static io.trino.operator.aggregation.FloatingPointBitsConverterUtil.sortableLongToDouble; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.util.Failures.checkCondition; import static java.lang.Float.floatToRawIntBits; public final class QuantileDigestFunctions diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/Re2JCastToRegexpFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/Re2JCastToRegexpFunction.java index 35317857e7fb..c810b4e4f0dd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/Re2JCastToRegexpFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/Re2JCastToRegexpFunction.java @@ -16,22 +16,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.spi.PrestoException; -import io.prestosql.type.Re2JRegexp; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.SqlOperator; +import io.trino.spi.PrestoException; +import io.trino.type.Re2JRegexp; import java.lang.invoke.MethodHandle; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; -import static io.prestosql.type.Re2JRegexpType.RE2J_REGEXP_SIGNATURE; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.type.Re2JRegexpType.RE2J_REGEXP_SIGNATURE; +import static io.trino.util.Reflection.methodHandle; import static java.lang.invoke.MethodHandles.insertArguments; import static java.util.Collections.emptyList; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/Re2JRegexpFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/Re2JRegexpFunctions.java index ed53ab0b02b6..45a27b424c89 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/Re2JRegexpFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/Re2JRegexpFunctions.java @@ -17,19 +17,19 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceUtf8; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.type.Constraint; -import io.prestosql.type.Re2JRegexp; -import io.prestosql.type.Re2JRegexpType; - -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; +import io.trino.type.Constraint; +import io.trino.type.Re2JRegexp; +import io.trino.type.Re2JRegexpType; + +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; public final class Re2JRegexpFunctions { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/Re2JRegexpReplaceLambdaFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/Re2JRegexpReplaceLambdaFunction.java index 0f88a24146a5..7cd6274fa6e1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/Re2JRegexpReplaceLambdaFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/Re2JRegexpReplaceLambdaFunction.java @@ -18,19 +18,19 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.sql.gen.lambda.UnaryFunctionInterface; -import io.prestosql.type.Re2JRegexp; -import io.prestosql.type.Re2JRegexpType; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.sql.gen.lambda.UnaryFunctionInterface; +import io.trino.type.Re2JRegexp; +import io.trino.type.Re2JRegexpType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; @ScalarFunction("regexp_replace") @Description("Replaces substrings matching a regular expression using a lambda function") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/RepeatFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/RepeatFunction.java index fa86d7a348f6..7ab03445ed63 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/RepeatFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/RepeatFunction.java @@ -13,19 +13,19 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.toIntExact; @ScalarFunction("repeat") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/RowToJsonCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/RowToJsonCast.java index 5b5fafe1e1e7..0d653bf91e08 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/RowToJsonCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/RowToJsonCast.java @@ -19,15 +19,15 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.metadata.TypeVariableConstraint; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.util.JsonUtil.JsonGeneratorWriter; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.SqlOperator; +import io.trino.metadata.TypeVariableConstraint; +import io.trino.spi.block.Block; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.util.JsonUtil.JsonGeneratorWriter; import java.io.IOException; import java.lang.invoke.MethodHandle; @@ -36,16 +36,16 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.operator.scalar.JsonOperators.JSON_FACTORY; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.JsonUtil.JsonGeneratorWriter.createJsonGeneratorWriter; -import static io.prestosql.util.JsonUtil.canCastToJson; -import static io.prestosql.util.JsonUtil.createJsonGenerator; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.operator.scalar.JsonOperators.JSON_FACTORY; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.JsonUtil.JsonGeneratorWriter.createJsonGeneratorWriter; +import static io.trino.util.JsonUtil.canCastToJson; +import static io.trino.util.JsonUtil.createJsonGenerator; +import static io.trino.util.Reflection.methodHandle; public class RowToJsonCast extends SqlOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/RowToRowCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/RowToRowCast.java index 0617f45e2ddf..7311969d0967 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/RowToRowCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/RowToRowCast.java @@ -26,25 +26,25 @@ import io.airlift.bytecode.Variable; import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.expression.BytecodeExpression; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.SqlOperator; -import io.prestosql.metadata.TypeVariableConstraint; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.CachedInstanceBinder; -import io.prestosql.sql.gen.CallSiteBinder; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.SqlOperator; +import io.trino.metadata.TypeVariableConstraint; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.CachedInstanceBinder; +import io.trino.sql.gen.CallSiteBinder; import java.lang.invoke.MethodHandle; import java.util.List; @@ -60,16 +60,16 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.constantBoolean; import static io.airlift.bytecode.expression.BytecodeExpressions.constantInt; import static io.airlift.bytecode.expression.BytecodeExpressions.constantNull; -import static io.prestosql.metadata.Signature.withVariadicBound; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.sql.gen.InvokeFunctionBytecodeExpression.invokeFunction; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.Signature.withVariadicBound; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.sql.gen.InvokeFunctionBytecodeExpression.invokeFunction; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Reflection.methodHandle; import static java.nio.charset.StandardCharsets.UTF_8; public class RowToRowCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ScalarFunctionImplementation.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ScalarFunctionImplementation.java index 92a4094f12ef..2a5a72fb0a98 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ScalarFunctionImplementation.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ScalarFunctionImplementation.java @@ -13,8 +13,8 @@ */ package io.trino.operator.scalar; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.spi.function.InvocationConvention; +import io.trino.metadata.FunctionInvoker; +import io.trino.spi.function.InvocationConvention; public interface ScalarFunctionImplementation { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/SequenceFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/SequenceFunction.java index dcdb722baa74..5f596d1dc77a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/SequenceFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/SequenceFunction.java @@ -15,23 +15,23 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.FixedWidthType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.type.DateTimeOperators; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.FixedWidthType; +import io.trino.spi.type.StandardTypes; +import io.trino.type.DateTimeOperators; import java.util.concurrent.TimeUnit; -import static io.prestosql.operator.scalar.DateTimeFunctions.diffDate; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.operator.scalar.DateTimeFunctions.diffDate; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.toIntExact; public final class SequenceFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/SessionFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/SessionFunctions.java index 01ba14bab04c..cedb7053084b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/SessionFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/SessionFunctions.java @@ -14,12 +14,12 @@ package io.trino.operator.scalar; import io.airlift.slice.Slice; -import io.prestosql.FullConnectorSession; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.FullConnectorSession; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static io.airlift.slice.Slices.utf8Slice; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/SplitToMapFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/SplitToMapFunction.java index 71ab8b0bd057..3cfb48e7e06a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/SplitToMapFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/SplitToMapFunction.java @@ -16,23 +16,23 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import java.util.HashMap; import java.util.Map; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.Failures.checkCondition; import static java.lang.String.format; @Description("Creates a map using entryDelimiter and keyValueDelimiter") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/SplitToMultimapFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/SplitToMultimapFunction.java index c9357c7cb959..8fbc27d547d9 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/SplitToMultimapFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/SplitToMultimapFunction.java @@ -18,23 +18,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Multimap; import io.airlift.slice.Slice; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import java.util.Collection; import java.util.Map; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.Failures.checkCondition; @Description("Creates a multimap by splitting a string into key/value pairs") @ScalarFunction("split_to_multimap") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/StringFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/StringFunctions.java index 2ba954aa691e..fb86682d9094 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/StringFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/StringFunctions.java @@ -19,20 +19,20 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceUtf8; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.type.CodePointsType; -import io.prestosql.type.Constraint; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.OperatorType; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; +import io.trino.type.CodePointsType; +import io.trino.type.Constraint; import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; import java.text.Normalizer; @@ -48,12 +48,12 @@ import static io.airlift.slice.SliceUtf8.toUpperCase; import static io.airlift.slice.SliceUtf8.tryGetCodePointAt; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.Chars.byteCountWithoutTrailingSpace; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.spi.type.Chars.trimTrailingSpaces; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.Chars.byteCountWithoutTrailingSpace; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.spi.type.Chars.trimTrailingSpaces; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.Failures.checkCondition; import static java.lang.Character.MAX_CODE_POINT; import static java.lang.Character.SURROGATE; import static java.lang.Math.abs; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/TDigestFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/TDigestFunctions.java index 516d31b7c0a7..18816962c4ae 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/TDigestFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/TDigestFunctions.java @@ -15,20 +15,20 @@ import com.google.common.collect.Ordering; import io.airlift.stats.TDigest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import java.util.List; import java.util.stream.IntStream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.util.Failures.checkCondition; public final class TDigestFunctions { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/TryCastFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/TryCastFunction.java index 48d8f4f37c15..fa08b6b1bd1d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/TryCastFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/TryCastFunction.java @@ -14,25 +14,25 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionDependencyDeclaration; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionDependencyDeclaration; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.lang.invoke.MethodHandle; import static com.google.common.primitives.Primitives.wrap; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.castableToTypeParameter; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.castableToTypeParameter; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; import static java.lang.invoke.MethodHandles.catchException; import static java.lang.invoke.MethodHandles.constant; import static java.lang.invoke.MethodHandles.dropArguments; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/TryFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/TryFunction.java index 1a94cc5f2951..d067765b3ad8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/TryFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/TryFunction.java @@ -13,22 +13,22 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.function.TypeParameterSpecialization; -import io.prestosql.sql.gen.lambda.LambdaFunctionInterface; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.function.TypeParameterSpecialization; +import io.trino.sql.gen.lambda.LambdaFunctionInterface; import java.util.function.Supplier; -import static io.prestosql.operator.scalar.TryFunction.NAME; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.operator.scalar.TryFunction.NAME; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; @Description("Internal try function for desugaring TRY") @ScalarFunction(value = NAME, hidden = true, deterministic = false) diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/TypeOfFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/TypeOfFunction.java index 4b39cb0ac4d5..b277ffa9ff51 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/TypeOfFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/TypeOfFunction.java @@ -14,13 +14,13 @@ package io.trino.operator.scalar; import io.airlift.slice.Slice; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import static io.airlift.slice.Slices.utf8Slice; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/UrlFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/UrlFunctions.java index 38272be0c1f7..df94a6ea4474 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/UrlFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/UrlFunctions.java @@ -18,14 +18,14 @@ import com.google.common.net.UrlEscapers; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.type.Constraint; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; +import io.trino.type.Constraint; import javax.annotation.Nullable; @@ -37,7 +37,7 @@ import static com.google.common.base.Strings.nullToEmpty; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; import static java.nio.charset.StandardCharsets.UTF_8; public final class UrlFunctions diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/VarbinaryFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/VarbinaryFunctions.java index 429d0829bb2e..3445aa855ce9 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/VarbinaryFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/VarbinaryFunctions.java @@ -21,20 +21,20 @@ import io.airlift.slice.Slices; import io.airlift.slice.SpookyHashV2; import io.airlift.slice.XxHash64; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Description; +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 java.util.Base64; import java.util.zip.CRC32; import static io.airlift.slice.Slices.EMPTY_SLICE; -import static io.prestosql.operator.scalar.HmacFunctions.computeHash; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.operator.scalar.HmacFunctions.computeHash; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.util.Failures.checkCondition; public final class VarbinaryFunctions { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/WilsonInterval.java b/core/trino-main/src/main/java/io/trino/operator/scalar/WilsonInterval.java index d1fcb7204297..1bbb02059423 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/WilsonInterval.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/WilsonInterval.java @@ -13,13 +13,13 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.util.Failures.checkCondition; public final class WilsonInterval { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/WordStemFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/WordStemFunction.java index ad561305a2a6..20b2e930abe2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/WordStemFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/WordStemFunction.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; import org.tartarus.snowball.SnowballProgram; import org.tartarus.snowball.ext.ArmenianStemmer; import org.tartarus.snowball.ext.BasqueStemmer; @@ -46,7 +46,7 @@ import java.util.function.Supplier; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; public final class WordStemFunction { diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ZipFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ZipFunction.java index d27230cba390..34326ce09b1c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ZipFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ZipFunction.java @@ -14,30 +14,30 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import java.lang.invoke.MethodHandle; import java.util.List; import java.util.stream.IntStream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.TypeSignature.rowType; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.TypeSignature.rowType; +import static io.trino.util.Reflection.methodHandle; import static java.lang.invoke.MethodType.methodType; import static java.util.Collections.nCopies; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/ZipWithFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/ZipWithFunction.java index 8ac58faef73a..40bcadfc7a42 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/ZipWithFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/ZipWithFunction.java @@ -14,33 +14,33 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.lambda.BinaryFunctionInterface; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.lambda.BinaryFunctionInterface; import java.lang.invoke.MethodHandle; import java.util.Optional; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.TypeSignature.functionType; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.TypeSignature.functionType; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.spi.type.TypeUtils.writeNativeValue; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Math.max; public final class ZipWithFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/OperatorValidator.java b/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/OperatorValidator.java index 148e75bcb65b..365454410d63 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/OperatorValidator.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/OperatorValidator.java @@ -14,10 +14,10 @@ package io.trino.operator.scalar.annotations; import com.google.common.base.Joiner; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.type.UnknownType; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TypeSignature; +import io.trino.type.UnknownType; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/ParametricScalarImplementation.java b/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/ParametricScalarImplementation.java index 162d282bcee9..5cd411bd7592 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/ParametricScalarImplementation.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/ParametricScalarImplementation.java @@ -18,31 +18,31 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.primitives.Primitives; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.LongVariableConstraint; -import io.prestosql.metadata.Signature; -import io.prestosql.operator.ParametricImplementation; -import io.prestosql.operator.annotations.FunctionsParserHelper; -import io.prestosql.operator.annotations.ImplementationDependency; -import io.prestosql.operator.scalar.ChoicesScalarFunctionImplementation; -import io.prestosql.operator.scalar.ChoicesScalarFunctionImplementation.ScalarImplementationChoice; -import io.prestosql.operator.scalar.ScalarFunctionImplementation; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention; -import io.prestosql.spi.function.IsNull; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.type.FunctionType; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.LongVariableConstraint; +import io.trino.metadata.Signature; +import io.trino.operator.ParametricImplementation; +import io.trino.operator.annotations.FunctionsParserHelper; +import io.trino.operator.annotations.ImplementationDependency; +import io.trino.operator.scalar.ChoicesScalarFunctionImplementation; +import io.trino.operator.scalar.ChoicesScalarFunctionImplementation.ScalarImplementationChoice; +import io.trino.operator.scalar.ScalarFunctionImplementation; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.spi.function.InvocationConvention.InvocationReturnConvention; +import io.trino.spi.function.IsNull; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.type.FunctionType; import java.lang.annotation.Annotation; import java.lang.invoke.MethodHandle; @@ -65,29 +65,29 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet; -import static io.prestosql.operator.ParametricFunctionHelpers.bindDependencies; -import static io.prestosql.operator.annotations.FunctionsParserHelper.containsImplementationDependencyAnnotation; -import static io.prestosql.operator.annotations.FunctionsParserHelper.containsLegacyNullable; -import static io.prestosql.operator.annotations.FunctionsParserHelper.createTypeVariableConstraints; -import static io.prestosql.operator.annotations.FunctionsParserHelper.getDeclaredSpecializedTypeParameters; -import static io.prestosql.operator.annotations.FunctionsParserHelper.parseLiteralParameters; -import static io.prestosql.operator.annotations.FunctionsParserHelper.parseLongVariableConstraints; -import static io.prestosql.operator.annotations.ImplementationDependency.Factory.createDependency; -import static io.prestosql.operator.annotations.ImplementationDependency.checkTypeParameters; -import static io.prestosql.operator.annotations.ImplementationDependency.getImplementationDependencyAnnotation; -import static io.prestosql.operator.annotations.ImplementationDependency.validateImplementationDependencyAnnotation; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.Reflection.constructorMethodHandle; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.operator.ParametricFunctionHelpers.bindDependencies; +import static io.trino.operator.annotations.FunctionsParserHelper.containsImplementationDependencyAnnotation; +import static io.trino.operator.annotations.FunctionsParserHelper.containsLegacyNullable; +import static io.trino.operator.annotations.FunctionsParserHelper.createTypeVariableConstraints; +import static io.trino.operator.annotations.FunctionsParserHelper.getDeclaredSpecializedTypeParameters; +import static io.trino.operator.annotations.FunctionsParserHelper.parseLiteralParameters; +import static io.trino.operator.annotations.FunctionsParserHelper.parseLongVariableConstraints; +import static io.trino.operator.annotations.ImplementationDependency.Factory.createDependency; +import static io.trino.operator.annotations.ImplementationDependency.checkTypeParameters; +import static io.trino.operator.annotations.ImplementationDependency.getImplementationDependencyAnnotation; +import static io.trino.operator.annotations.ImplementationDependency.validateImplementationDependencyAnnotation; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.Reflection.constructorMethodHandle; +import static io.trino.util.Reflection.methodHandle; import static java.lang.String.CASE_INSENSITIVE_ORDER; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.permuteArguments; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/ScalarFromAnnotationsParser.java b/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/ScalarFromAnnotationsParser.java index 69e9af5051b0..3faead974a51 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/ScalarFromAnnotationsParser.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/ScalarFromAnnotationsParser.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.operator.ParametricImplementationsGroup; -import io.prestosql.operator.annotations.FunctionsParserHelper; -import io.prestosql.operator.scalar.ParametricScalar; -import io.prestosql.operator.scalar.annotations.ParametricScalarImplementation.SpecializedSignature; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.operator.ParametricImplementationsGroup; +import io.trino.operator.annotations.FunctionsParserHelper; +import io.trino.operator.scalar.ParametricScalar; +import io.trino.operator.scalar.annotations.ParametricScalarImplementation.SpecializedSignature; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; import java.lang.reflect.Constructor; import java.lang.reflect.Method; @@ -34,9 +34,9 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.operator.scalar.annotations.OperatorValidator.validateOperator; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.operator.scalar.annotations.OperatorValidator.validateOperator; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; +import static io.trino.util.Failures.checkCondition; import static java.util.Objects.requireNonNull; public final class ScalarFromAnnotationsParser diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/ScalarImplementationHeader.java b/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/ScalarImplementationHeader.java index c7d89658fcee..15ddb0b23ee0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/ScalarImplementationHeader.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/annotations/ScalarImplementationHeader.java @@ -14,10 +14,10 @@ package io.trino.operator.scalar.annotations; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.scalar.ScalarHeader; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.ScalarOperator; +import io.trino.operator.scalar.ScalarHeader; +import io.trino.spi.function.OperatorType; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.ScalarOperator; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Method; @@ -27,8 +27,8 @@ import static com.google.common.base.CaseFormat.LOWER_CAMEL; import static com.google.common.base.CaseFormat.LOWER_UNDERSCORE; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.metadata.Signature.mangleOperatorName; -import static io.prestosql.operator.annotations.FunctionsParserHelper.parseDescription; +import static io.trino.metadata.Signature.mangleOperatorName; +import static io.trino.operator.annotations.FunctionsParserHelper.parseDescription; import static java.util.Objects.requireNonNull; public class ScalarImplementationHeader diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/time/LocalTimeFunction.java b/core/trino-main/src/main/java/io/trino/operator/scalar/time/LocalTimeFunction.java index 458d8a290f79..28d17efd0116 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/time/LocalTimeFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/time/LocalTimeFunction.java @@ -13,19 +13,19 @@ */ package io.trino.operator.scalar.time; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; import java.time.LocalDateTime; -import static io.prestosql.spi.type.TimeType.MAX_PRECISION; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.type.TimeType.MAX_PRECISION; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_NANOSECOND; +import static io.trino.type.DateTimes.round; @ScalarFunction(value = "$localtime", hidden = true) public final class LocalTimeFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeFunctions.java b/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeFunctions.java index 65ece1992482..bbc801b7353e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeFunctions.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeFunctions.java @@ -14,28 +14,28 @@ package io.trino.operator.scalar.time; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameter; +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 static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.TimeType.MAX_PRECISION; -import static io.prestosql.type.DateTimes.HOURS_PER_DAY; -import static io.prestosql.type.DateTimes.MILLISECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.MILLISECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.MINUTES_PER_HOUR; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_HOUR; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.SECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.SECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.TimeType.MAX_PRECISION; +import static io.trino.type.DateTimes.HOURS_PER_DAY; +import static io.trino.type.DateTimes.MILLISECONDS_PER_DAY; +import static io.trino.type.DateTimes.MILLISECONDS_PER_SECOND; +import static io.trino.type.DateTimes.MINUTES_PER_HOUR; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_HOUR; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.SECONDS_PER_DAY; +import static io.trino.type.DateTimes.SECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.round; import static java.util.Locale.ENGLISH; import static org.joda.time.DateTimeConstants.MINUTES_PER_DAY; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeOperators.java b/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeOperators.java index 6762cfef66c2..1ffb7dac18b6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeOperators.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeOperators.java @@ -15,30 +15,30 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.type.Constraint; - -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; -import static io.prestosql.spi.type.TimeType.MAX_PRECISION; -import static io.prestosql.type.DateTimes.MINUTES_PER_HOUR; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_HOUR; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.SECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.parseTime; -import static io.prestosql.type.DateTimes.rescaleWithRounding; -import static io.prestosql.type.DateTimes.round; -import static io.prestosql.type.DateTimes.scaleFactor; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; +import io.trino.type.Constraint; + +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.type.TimeType.MAX_PRECISION; +import static io.trino.type.DateTimes.MINUTES_PER_HOUR; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_HOUR; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.SECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.parseTime; +import static io.trino.type.DateTimes.rescaleWithRounding; +import static io.trino.type.DateTimes.round; +import static io.trino.type.DateTimes.scaleFactor; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeToTimeWithTimeZoneCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeToTimeWithTimeZoneCast.java index 345d756188d1..2aa682dce9f6 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeToTimeWithTimeZoneCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeToTimeWithTimeZoneCast.java @@ -13,20 +13,20 @@ */ package io.trino.operator.scalar.time; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.getOffsetMinutes; -import static io.prestosql.type.DateTimes.rescale; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.type.DateTimes.NANOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.getOffsetMinutes; +import static io.trino.type.DateTimes.rescale; +import static io.trino.type.DateTimes.round; @ScalarOperator(CAST) public final class TimeToTimeWithTimeZoneCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeToTimestampCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeToTimestampCast.java index b2853157c4ec..4bb6dd9f6e10 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeToTimestampCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeToTimestampCast.java @@ -13,21 +13,21 @@ */ package io.trino.operator.scalar.time; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; import java.time.LocalDate; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.SECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.type.DateTimes.MICROSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MICROSECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.SECONDS_PER_DAY; +import static io.trino.type.DateTimes.round; import static java.lang.Math.multiplyExact; @ScalarOperator(CAST) diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeToTimestampWithTimeZoneCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeToTimestampWithTimeZoneCast.java index d0b1c791e9fa..c82cfcf271db 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeToTimestampWithTimeZoneCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/time/TimeToTimestampWithTimeZoneCast.java @@ -13,25 +13,25 @@ */ package io.trino.operator.scalar.time; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.TimeType; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.TimeType; import java.time.LocalDate; import java.time.ZoneId; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.type.DateTimes.MILLISECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.SECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.rescale; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.type.DateTimes.MILLISECONDS_PER_SECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.SECONDS_PER_DAY; +import static io.trino.type.DateTimes.rescale; +import static io.trino.type.DateTimes.round; import static java.lang.Math.multiplyExact; @ScalarOperator(CAST) diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateAdd.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateAdd.java index 4b4d0d4f55bb..eab2af4c8fbe 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateAdd.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateAdd.java @@ -14,20 +14,20 @@ package io.trino.operator.scalar.timestamp; import io.airlift.slice.Slice; -import io.prestosql.operator.scalar.DateTimeFunctions; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.scalar.DateTimeFunctions; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.getMicrosOfMilli; -import static io.prestosql.type.DateTimes.round; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; -import static io.prestosql.type.DateTimes.scaleEpochMillisToMicros; +import static io.trino.type.DateTimes.getMicrosOfMilli; +import static io.trino.type.DateTimes.round; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMillisToMicros; import static java.lang.Math.toIntExact; @Description("Add the specified amount of time to the given timestamp") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateDiff.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateDiff.java index 084c8246de62..6ca066fb5869 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateDiff.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateDiff.java @@ -14,16 +14,16 @@ package io.trino.operator.scalar.timestamp; import io.airlift.slice.Slice; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.operator.scalar.DateTimeFunctions.getTimestampField; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.operator.scalar.DateTimeFunctions.getTimestampField; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Difference of the given times in the given unit") @ScalarFunction("date_diff") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateFormat.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateFormat.java index 2e4eabfbfb79..73a5454508fb 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateFormat.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateFormat.java @@ -14,18 +14,18 @@ package io.trino.operator.scalar.timestamp; import io.airlift.slice.Slice; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.operator.scalar.DateTimeFunctions.dateFormat; -import static io.prestosql.type.DateTimes.epochMicrosToMillisWithRounding; +import static io.trino.operator.scalar.DateTimeFunctions.dateFormat; +import static io.trino.type.DateTimes.epochMicrosToMillisWithRounding; @ScalarFunction @Description("Formats the given timestamp by the given format") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateToTimestampCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateToTimestampCast.java index 932a3668c9e5..72b8bc087997 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateToTimestampCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateToTimestampCast.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.CAST; @ScalarOperator(CAST) public final class DateToTimestampCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateTrunc.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateTrunc.java index 74fc672fd612..467cad23b051 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateTrunc.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/DateTrunc.java @@ -14,16 +14,16 @@ package io.trino.operator.scalar.timestamp; import io.airlift.slice.Slice; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.operator.scalar.DateTimeFunctions.getTimestampField; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; -import static io.prestosql.type.DateTimes.scaleEpochMillisToMicros; +import static io.trino.operator.scalar.DateTimeFunctions.getTimestampField; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMillisToMicros; @Description("Truncate to the specified precision in the session timezone") @ScalarFunction("date_trunc") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractDay.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractDay.java index 55c77591fab9..aa79379d3d17 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractDay.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractDay.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Day of the month of the given timestamp") @ScalarFunction(value = "day", alias = "day_of_month") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractDayOfWeek.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractDayOfWeek.java index 682773cf98e2..010f7685276a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractDayOfWeek.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractDayOfWeek.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Day of the week of the given timestamp") @ScalarFunction(value = "day_of_week", alias = "dow") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractDayOfYear.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractDayOfYear.java index 670767205ea6..a4cbe38feaac 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractDayOfYear.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractDayOfYear.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Day of the year of the given timestamp") @ScalarFunction(value = "day_of_year", alias = "doy") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractHour.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractHour.java index 6c220a3294a7..3b3e26d6a244 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractHour.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractHour.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Hour of the day of the given timestamp") @ScalarFunction("hour") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractMillisecond.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractMillisecond.java index c0db446e9ffe..f75a22bd75e4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractMillisecond.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractMillisecond.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Millisecond of the second of the given timestamp") @ScalarFunction("millisecond") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractMinute.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractMinute.java index 24381b902d43..6fa9369a5c35 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractMinute.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractMinute.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Minute of the hour of the given timestamp") @ScalarFunction("minute") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractMonth.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractMonth.java index 64218dba5e55..9c3310c3a39c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractMonth.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractMonth.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Month of the year of the given timestamp") @ScalarFunction("month") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractQuarter.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractQuarter.java index 4195f3f43a5c..729070225645 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractQuarter.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractQuarter.java @@ -13,16 +13,16 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.operator.scalar.QuarterOfYearDateTimeField.QUARTER_OF_YEAR; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.operator.scalar.QuarterOfYearDateTimeField.QUARTER_OF_YEAR; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Quarter of the year of the given timestamp") @ScalarFunction("quarter") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractSecond.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractSecond.java index 5422efdfef12..141661fc4d04 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractSecond.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractSecond.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Second of the minute of the given timestamp") @ScalarFunction("second") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractWeekOfYear.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractWeekOfYear.java index 1b3b0400a6ec..ed0a2d5179e7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractWeekOfYear.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractWeekOfYear.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Week of the year of the given timestamp") @ScalarFunction(value = "week", alias = "week_of_year") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractYear.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractYear.java index cc08800daae2..e62065dfe66b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractYear.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractYear.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Year of the given timestamp") @ScalarFunction("year") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractYearOfWeek.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractYearOfWeek.java index 369a9eff5a93..4f7638ddba8d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractYearOfWeek.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ExtractYearOfWeek.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Year of the ISO week of the given timestamp") @ScalarFunction(value = "year_of_week", alias = "yow") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/FormatDateTime.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/FormatDateTime.java index e34ac6ac25bd..a11790b7c40b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/FormatDateTime.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/FormatDateTime.java @@ -14,22 +14,22 @@ package io.trino.operator.scalar.timestamp; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; import org.joda.time.format.DateTimeFormat; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.type.DateTimes.round; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.type.DateTimes.round; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; @Description("Formats the given time by the given format") @ScalarFunction("format_datetime") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/HumanReadableSeconds.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/HumanReadableSeconds.java index 46c5734be1ea..69c4e922291c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/HumanReadableSeconds.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/HumanReadableSeconds.java @@ -15,17 +15,17 @@ import com.google.common.base.Strings; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import java.util.StringJoiner; import java.util.concurrent.TimeUnit; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; import static java.lang.String.format; import static org.joda.time.DateTimeConstants.SECONDS_PER_DAY; import static org.joda.time.DateTimeConstants.SECONDS_PER_HOUR; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/LastDayOfMonth.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/LastDayOfMonth.java index eab4076b7a0a..8e2e2cc9a7b5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/LastDayOfMonth.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/LastDayOfMonth.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; import static java.util.concurrent.TimeUnit.MILLISECONDS; @Description("Last day of the month of the given timestamp") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/LocalTimestamp.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/LocalTimestamp.java index 2cd1c3f5cc5a..ce7e72bdbfc4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/LocalTimestamp.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/LocalTimestamp.java @@ -13,23 +13,23 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.type.DateTimes; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.type.DateTimes; import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneOffset; -import static io.prestosql.spi.type.TimestampType.MAX_SHORT_PRECISION; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.type.DateTimes.epochSecondToMicrosWithRounding; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.type.TimestampType.MAX_SHORT_PRECISION; +import static io.trino.type.DateTimes.PICOSECONDS_PER_NANOSECOND; +import static io.trino.type.DateTimes.epochSecondToMicrosWithRounding; +import static io.trino.type.DateTimes.round; @ScalarFunction(value = "$localtimestamp", hidden = true) public final class LocalTimestamp diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/SequenceIntervalDayToSecond.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/SequenceIntervalDayToSecond.java index 757ef1269e2c..a2fcdd0c3e7c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/SequenceIntervalDayToSecond.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/SequenceIntervalDayToSecond.java @@ -13,21 +13,21 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TimestampType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TimestampType; -import static io.prestosql.operator.scalar.SequenceFunction.checkMaxEntry; -import static io.prestosql.operator.scalar.SequenceFunction.checkValidStep; -import static io.prestosql.spi.type.TimestampType.MAX_SHORT_PRECISION; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TimestampTypes.writeLongTimestamp; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_MILLISECOND; +import static io.trino.operator.scalar.SequenceFunction.checkMaxEntry; +import static io.trino.operator.scalar.SequenceFunction.checkValidStep; +import static io.trino.spi.type.TimestampType.MAX_SHORT_PRECISION; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TimestampTypes.writeLongTimestamp; +import static io.trino.type.DateTimes.MICROSECONDS_PER_MILLISECOND; import static java.lang.Math.multiplyExact; import static java.lang.Math.toIntExact; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/SequenceIntervalYearToMonth.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/SequenceIntervalYearToMonth.java index 7eb599fcbc4e..67830d83d169 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/SequenceIntervalYearToMonth.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/SequenceIntervalYearToMonth.java @@ -15,21 +15,21 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.operator.scalar.timestamp.TimestampOperators.TimestampPlusIntervalYearToMonth; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TimestampType; +import io.trino.operator.scalar.timestamp.TimestampOperators.TimestampPlusIntervalYearToMonth; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TimestampType; -import static io.prestosql.operator.scalar.SequenceFunction.checkMaxEntry; -import static io.prestosql.operator.scalar.SequenceFunction.checkValidStep; -import static io.prestosql.spi.type.TimestampType.MAX_SHORT_PRECISION; -import static io.prestosql.spi.type.TimestampType.createTimestampType; +import static io.trino.operator.scalar.SequenceFunction.checkMaxEntry; +import static io.trino.operator.scalar.SequenceFunction.checkValidStep; +import static io.trino.spi.type.TimestampType.MAX_SHORT_PRECISION; +import static io.trino.spi.type.TimestampType.createTimestampType; import static java.lang.Math.toIntExact; @ScalarFunction("sequence") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimeWithTimeZoneToTimestampCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimeWithTimeZoneToTimestampCast.java index fe2948306a9a..30f39af05f56 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimeWithTimeZoneToTimestampCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimeWithTimeZoneToTimestampCast.java @@ -13,24 +13,24 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.LongTimestamp; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.LongTimestamp; import java.time.LocalDate; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.SECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.rescale; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.type.DateTimes.MICROSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MICROSECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.SECONDS_PER_DAY; +import static io.trino.type.DateTimes.rescale; +import static io.trino.type.DateTimes.round; import static java.lang.Math.multiplyExact; @ScalarOperator(CAST) diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampOperators.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampOperators.java index 7af82ccb2f86..aadd4e61cabe 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampOperators.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampOperators.java @@ -13,25 +13,25 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.type.Constraint; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; +import io.trino.type.Constraint; import org.joda.time.DateTimeField; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; -import static io.prestosql.spi.type.TimestampType.MAX_SHORT_PRECISION; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.getMicrosOfMilli; -import static io.prestosql.type.DateTimes.rescale; -import static io.prestosql.type.DateTimes.round; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; -import static io.prestosql.type.DateTimes.scaleEpochMillisToMicros; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.type.TimestampType.MAX_SHORT_PRECISION; +import static io.trino.type.DateTimes.MICROSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.getMicrosOfMilli; +import static io.trino.type.DateTimes.rescale; +import static io.trino.type.DateTimes.round; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.type.DateTimes.scaleEpochMillisToMicros; import static java.lang.Math.multiplyExact; @SuppressWarnings("UtilityClassWithoutPrivateConstructor") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToDateCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToDateCast.java index e79bd78dd648..b188b466cfb2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToDateCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToDateCast.java @@ -13,16 +13,16 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_DAY; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.type.DateTimes.MICROSECONDS_PER_DAY; import static java.lang.Math.floorDiv; @ScalarOperator(CAST) diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToJsonCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToJsonCast.java index fe20f7d62e41..d398635e281c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToJsonCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToJsonCast.java @@ -17,23 +17,23 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; import java.io.IOException; import java.time.format.DateTimeFormatter; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.StandardTypes.JSON; -import static io.prestosql.type.DateTimes.formatTimestamp; -import static io.prestosql.util.JsonUtil.JSON_FACTORY; -import static io.prestosql.util.JsonUtil.createJsonGenerator; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.StandardTypes.JSON; +import static io.trino.type.DateTimes.formatTimestamp; +import static io.trino.util.JsonUtil.JSON_FACTORY; +import static io.trino.util.JsonUtil.createJsonGenerator; import static java.lang.String.format; import static java.time.ZoneOffset.UTC; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimeCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimeCast.java index 425cb3b41505..cb99cdb56b32 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimeCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimeCast.java @@ -13,23 +13,23 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; import java.time.LocalDateTime; import java.time.ZoneOffset; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.rescale; -import static io.prestosql.type.DateTimes.round; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToSeconds; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.type.DateTimes.MICROSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MICROSECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.rescale; +import static io.trino.type.DateTimes.round; +import static io.trino.type.DateTimes.scaleEpochMicrosToSeconds; import static java.lang.Math.multiplyExact; @ScalarOperator(CAST) diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimeWithTimeZoneCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimeWithTimeZoneCast.java index a4ddf110692c..346932b19585 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimeWithTimeZoneCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimeWithTimeZoneCast.java @@ -13,24 +13,24 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.LongTimestamp; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.LongTimestamp; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_MICROSECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.type.DateTimes.getOffsetMinutes; -import static io.prestosql.type.DateTimes.rescale; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.type.DateTimes.MICROSECONDS_PER_DAY; +import static io.trino.type.DateTimes.NANOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.NANOSECONDS_PER_MICROSECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MICROSECOND; +import static io.trino.type.DateTimes.getOffsetMinutes; +import static io.trino.type.DateTimes.rescale; +import static io.trino.type.DateTimes.round; import static java.lang.Math.floorMod; @ScalarOperator(CAST) diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimestampCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimestampCast.java index bbc750671061..bd7453408c62 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimestampCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimestampCast.java @@ -13,18 +13,18 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.TimestampType.MAX_PRECISION; -import static io.prestosql.spi.type.TimestampType.MAX_SHORT_PRECISION; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.type.DateTimes.round; -import static io.prestosql.type.DateTimes.roundToNearest; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.TimestampType.MAX_PRECISION; +import static io.trino.spi.type.TimestampType.MAX_SHORT_PRECISION; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MICROSECOND; +import static io.trino.type.DateTimes.round; +import static io.trino.type.DateTimes.roundToNearest; @ScalarOperator(CAST) public final class TimestampToTimestampCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimestampWithTimeZoneCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimestampWithTimeZoneCast.java index 5a1f1a392785..5e65c55fc939 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimestampWithTimeZoneCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToTimestampWithTimeZoneCast.java @@ -13,24 +13,24 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.type.DateTimes.getMicrosOfMilli; -import static io.prestosql.type.DateTimes.round; -import static io.prestosql.type.DateTimes.roundToNearest; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MICROSECOND; +import static io.trino.type.DateTimes.getMicrosOfMilli; +import static io.trino.type.DateTimes.round; +import static io.trino.type.DateTimes.roundToNearest; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.util.DateTimeZoneIndex.getChronology; @ScalarOperator(CAST) public final class TimestampToTimestampWithTimeZoneCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToVarcharCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToVarcharCast.java index 34c63bcc122d..1e9ed3a80eb0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToVarcharCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/TimestampToVarcharCast.java @@ -14,17 +14,17 @@ package io.trino.operator.scalar.timestamp; import io.airlift.slice.Slice; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.type.DateTimes; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.type.DateTimes; import java.time.format.DateTimeFormatter; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.CAST; import static java.time.ZoneOffset.UTC; @ScalarOperator(CAST) diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ToIso8601.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ToIso8601.java index 679d0893311f..1707f4fe6113 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ToIso8601.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ToIso8601.java @@ -14,17 +14,17 @@ package io.trino.operator.scalar.timestamp; import io.airlift.slice.Slice; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.type.Constraint; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.type.Constraint; import java.time.format.DateTimeFormatter; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.type.DateTimes.formatTimestamp; +import static io.trino.type.DateTimes.formatTimestamp; import static java.time.ZoneOffset.UTC; @ScalarFunction("to_iso8601") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ToUnixTime.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ToUnixTime.java index b443aa2f484e..22db5bd4b81e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ToUnixTime.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/ToUnixTime.java @@ -13,14 +13,14 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.MICROSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; @ScalarFunction("to_unixtime") public final class ToUnixTime diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/VarcharToTimestampCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/VarcharToTimestampCast.java index 718488e6df2e..11a08bdae156 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/VarcharToTimestampCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/VarcharToTimestampCast.java @@ -15,27 +15,27 @@ import com.google.common.annotations.VisibleForTesting; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.type.DateTimes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.type.DateTimes; import java.time.ZonedDateTime; import java.util.regex.Matcher; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.operator.scalar.StringFunctions.trim; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.TimestampType.MAX_PRECISION; -import static io.prestosql.spi.type.TimestampType.MAX_SHORT_PRECISION; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.longTimestamp; -import static io.prestosql.type.DateTimes.rescale; -import static io.prestosql.type.DateTimes.round; +import static io.trino.operator.scalar.StringFunctions.trim; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.TimestampType.MAX_PRECISION; +import static io.trino.spi.type.TimestampType.MAX_SHORT_PRECISION; +import static io.trino.type.DateTimes.MICROSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.longTimestamp; +import static io.trino.type.DateTimes.rescale; +import static io.trino.type.DateTimes.round; import static java.time.ZoneOffset.UTC; @ScalarOperator(CAST) diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/WithTimeZone.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/WithTimeZone.java index 882346eb2054..a5c0bceef114 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/WithTimeZone.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/WithTimeZone.java @@ -14,25 +14,25 @@ package io.trino.operator.scalar.timestamp; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.TimeZoneNotSupportedException; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.TimeZoneNotSupportedException; import org.joda.time.DateTimeZone; import static com.google.common.base.Verify.verify; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.type.DateTimes.getMicrosOfMilli; -import static io.prestosql.type.DateTimes.scaleEpochMicrosToMillis; -import static io.prestosql.util.DateTimeZoneIndex.getDateTimeZone; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MICROSECOND; +import static io.trino.type.DateTimes.getMicrosOfMilli; +import static io.trino.type.DateTimes.scaleEpochMicrosToMillis; +import static io.trino.util.DateTimeZoneIndex.getDateTimeZone; import static java.lang.String.format; import static org.joda.time.DateTimeZone.UTC; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/AtTimeZone.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/AtTimeZone.java index 97b712866b48..355ef0839c7f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/AtTimeZone.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/AtTimeZone.java @@ -14,17 +14,17 @@ package io.trino.operator.scalar.timestamptz; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneNotSupportedException; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneNotSupportedException; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; import static java.lang.String.format; @ScalarFunction("at_timezone") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/AtTimeZoneWithOffset.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/AtTimeZoneWithOffset.java index d5ab7283b2b4..7a2d6b47da92 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/AtTimeZoneWithOffset.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/AtTimeZoneWithOffset.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; +import static io.trino.util.Failures.checkCondition; @ScalarFunction(value = "at_timezone", hidden = true) public class AtTimeZoneWithOffset diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/CurrentTimestamp.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/CurrentTimestamp.java index 1ecb39695e53..5993e0547e1b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/CurrentTimestamp.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/CurrentTimestamp.java @@ -13,22 +13,22 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.type.DateTimes; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.type.DateTimes; import java.time.Instant; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.MAX_SHORT_PRECISION; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.round; -import static io.prestosql.type.DateTimes.roundToNearest; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimestampWithTimeZoneType.MAX_SHORT_PRECISION; +import static io.trino.type.DateTimes.NANOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.round; +import static io.trino.type.DateTimes.roundToNearest; @ScalarFunction(value = "$current_timestamp", hidden = true) public final class CurrentTimestamp diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateAdd.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateAdd.java index 1a82aaadaf12..15ce4dcb50c2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateAdd.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateAdd.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar.timestamptz; import io.airlift.slice.Slice; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.scalar.DateTimeFunctions.getTimestampField; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.updateMillisUtc; -import static io.prestosql.type.DateTimes.round; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.operator.scalar.DateTimeFunctions.getTimestampField; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.updateMillisUtc; +import static io.trino.type.DateTimes.round; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; import static java.lang.Math.toIntExact; @Description("Add the specified amount of time to the given timestamp") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateDiff.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateDiff.java index 7413a40bc75d..7cde03878370 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateDiff.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateDiff.java @@ -14,17 +14,17 @@ package io.trino.operator.scalar.timestamptz; import io.airlift.slice.Slice; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.operator.scalar.DateTimeFunctions.getTimestampField; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.operator.scalar.DateTimeFunctions.getTimestampField; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Difference of the given times in the given unit") @ScalarFunction("date_diff") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateFormat.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateFormat.java index b28ccb89682f..bcae86e988e3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateFormat.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateFormat.java @@ -14,20 +14,20 @@ package io.trino.operator.scalar.timestamptz; import io.airlift.slice.Slice; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.scalar.DateTimeFunctions.dateFormat; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.type.DateTimes.roundToEpochMillis; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.operator.scalar.DateTimeFunctions.dateFormat; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.type.DateTimes.roundToEpochMillis; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @ScalarFunction @Description("Formats the given timestamp by the given format") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateToTimestampWithTimeZoneCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateToTimestampWithTimeZoneCast.java index 091127524bdd..46ed782d9a26 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateToTimestampWithTimeZoneCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateToTimestampWithTimeZoneCast.java @@ -13,19 +13,19 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.util.DateTimeZoneIndex.getChronology; @ScalarOperator(CAST) public final class DateToTimestampWithTimeZoneCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateTrunc.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateTrunc.java index 19332d171fbf..a61d9867cb14 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateTrunc.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/DateTrunc.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar.timestamptz; import io.airlift.slice.Slice; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.operator.scalar.DateTimeFunctions.getTimestampField; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.updateMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.operator.scalar.DateTimeFunctions.getTimestampField; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.updateMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Truncate to the specified precision") @ScalarFunction("date_trunc") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractDay.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractDay.java index 33c5c78c29a9..12010c041505 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractDay.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractDay.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Day of the month of the given timestamp") @ScalarFunction(value = "day", alias = "day_of_month") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractDayOfWeek.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractDayOfWeek.java index 3f82374ddae8..16903140bb64 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractDayOfWeek.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractDayOfWeek.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Day of the week of the given timestamp") @ScalarFunction(value = "day_of_week", alias = "dow") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractDayOfYear.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractDayOfYear.java index ad9c8d817df4..ed7d9818ab35 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractDayOfYear.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractDayOfYear.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Day of the year of the given timestamp") @ScalarFunction(value = "day_of_year", alias = "doy") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractHour.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractHour.java index 63ba6ffe4485..eab35cb22afd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractHour.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractHour.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Hour of the day of the given timestamp") @ScalarFunction("hour") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractMillisecond.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractMillisecond.java index 0dcde3c07a73..0b95386bbb79 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractMillisecond.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractMillisecond.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Millisecond of the second of the given timestamp") @ScalarFunction("millisecond") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractMinute.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractMinute.java index f9ce8ad6b3eb..b3ffa139fb60 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractMinute.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractMinute.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Minute of the hour of the given timestamp") @ScalarFunction("minute") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractMonth.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractMonth.java index 1753c30051ef..68773dff6821 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractMonth.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractMonth.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Month of the year of the given timestamp") @ScalarFunction("month") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractQuarter.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractQuarter.java index ecc7aa7a5028..f8bac31522c3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractQuarter.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractQuarter.java @@ -13,18 +13,18 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.scalar.QuarterOfYearDateTimeField.QUARTER_OF_YEAR; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.operator.scalar.QuarterOfYearDateTimeField.QUARTER_OF_YEAR; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Quarter of the year of the given timestamp") @ScalarFunction("quarter") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractSecond.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractSecond.java index 8c5de809296e..a496e0ffcd81 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractSecond.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractSecond.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Second of the minute of the given timestamp") @ScalarFunction("second") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractWeekOfYear.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractWeekOfYear.java index 2552978c1390..8f127c9b3fe4 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractWeekOfYear.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractWeekOfYear.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Week of the year of the given timestamp") @ScalarFunction(value = "week", alias = "week_of_year") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractYear.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractYear.java index 8542ffd133ca..f82e5e89865d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractYear.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractYear.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Year of the given timestamp") @ScalarFunction("year") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractYearOfWeek.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractYearOfWeek.java index dfaa0283c064..2da8c0891f04 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractYearOfWeek.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ExtractYearOfWeek.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Year of the ISO week of the given timestamp") @ScalarFunction(value = "year_of_week", alias = "yow") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/FormatDateTime.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/FormatDateTime.java index 400f688fd84a..c2d7b257b490 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/FormatDateTime.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/FormatDateTime.java @@ -14,24 +14,24 @@ package io.trino.operator.scalar.timestamptz; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; import org.joda.time.format.DateTimeFormat; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.type.DateTimes.roundToEpochMillis; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.type.DateTimes.roundToEpochMillis; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; @Description("Formats the given time by the given format") @ScalarFunction("format_datetime") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/LastDayOfMonth.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/LastDayOfMonth.java index 8ec03af87c34..b9292bf7974d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/LastDayOfMonth.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/LastDayOfMonth.java @@ -13,18 +13,18 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; import static java.util.concurrent.TimeUnit.MILLISECONDS; @Description("Last day of the month of the given timestamp") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimeZoneHour.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimeZoneHour.java index 3e2abffafeea..a1c7d92e3c37 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimeZoneHour.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimeZoneHour.java @@ -13,14 +13,14 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.util.DateTimeZoneIndex.extractZoneOffsetMinutes; +import static io.trino.util.DateTimeZoneIndex.extractZoneOffsetMinutes; @Description("Time zone hour of the given timestamp") @ScalarFunction("timezone_hour") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimeZoneMinute.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimeZoneMinute.java index 04e9f3d49c6b..d66b6f212cc8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimeZoneMinute.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimeZoneMinute.java @@ -13,14 +13,14 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.util.DateTimeZoneIndex.extractZoneOffsetMinutes; +import static io.trino.util.DateTimeZoneIndex.extractZoneOffsetMinutes; @Description("Time zone minute of the given timestamp") @ScalarFunction("timezone_minute") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneOperators.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneOperators.java index 753685ceee29..779bab0e64d1 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneOperators.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneOperators.java @@ -13,23 +13,23 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.type.Constraint; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; +import io.trino.type.Constraint; import org.joda.time.DateTimeField; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.roundToNearest; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.roundToNearest; @SuppressWarnings("UtilityClassWithoutPrivateConstructor") public final class TimestampWithTimeZoneOperators diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToDateCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToDateCast.java index 96c5c25228d9..a02aae154138 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToDateCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToDateCast.java @@ -13,22 +13,22 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TimeZoneKey; import org.joda.time.chrono.ISOChronology; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.util.DateTimeZoneIndex.getChronology; @ScalarOperator(CAST) @ScalarFunction("date") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimeCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimeCast.java index 8330ecd54579..c63577fef9fc 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimeCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimeCast.java @@ -13,23 +13,23 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; import java.time.Instant; import java.time.ZoneId; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TimeType.MAX_PRECISION; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.rescale; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TimeType.MAX_PRECISION; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.rescale; +import static io.trino.type.DateTimes.round; @ScalarOperator(CAST) public final class TimestampWithTimeZoneToTimeCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimeWithTimeZoneCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimeWithTimeZoneCast.java index 249c3d2871be..930b58982246 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimeWithTimeZoneCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimeWithTimeZoneCast.java @@ -13,28 +13,28 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.type.DateTimes; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; +import io.trino.type.DateTimes; import java.time.Instant; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.type.DateTimes.MILLISECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.rescale; -import static io.prestosql.type.DateTimes.round; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.type.DateTimes.MILLISECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.rescale; +import static io.trino.type.DateTimes.round; +import static io.trino.util.DateTimeZoneIndex.getChronology; import static java.lang.Math.floorMod; @ScalarOperator(CAST) diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimestampCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimestampCast.java index f8bd33adcab2..581e41fcc718 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimestampCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimestampCast.java @@ -13,23 +13,23 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.type.DateTimes.round; -import static io.prestosql.type.DateTimes.roundToNearest; -import static io.prestosql.type.DateTimes.scaleEpochMillisToMicros; -import static io.prestosql.type.DateTimes.toEpochMicros; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MICROSECOND; +import static io.trino.type.DateTimes.round; +import static io.trino.type.DateTimes.roundToNearest; +import static io.trino.type.DateTimes.scaleEpochMillisToMicros; +import static io.trino.type.DateTimes.toEpochMicros; +import static io.trino.util.DateTimeZoneIndex.getChronology; @ScalarOperator(CAST) public final class TimestampWithTimeZoneToTimestampCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimestampWithTimeZoneCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimestampWithTimeZoneCast.java index 91a25b51dbdb..bc9453d96a25 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimestampWithTimeZoneCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToTimestampWithTimeZoneCast.java @@ -13,21 +13,21 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.MAX_PRECISION; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.MAX_SHORT_PRECISION; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.round; -import static io.prestosql.type.DateTimes.roundToNearest; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TimestampWithTimeZoneType.MAX_PRECISION; +import static io.trino.spi.type.TimestampWithTimeZoneType.MAX_SHORT_PRECISION; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.round; +import static io.trino.type.DateTimes.roundToNearest; @ScalarOperator(CAST) public final class TimestampWithTimeZoneToTimestampWithTimeZoneCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToVarcharCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToVarcharCast.java index c41899df9eb2..d96c86ae1957 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToVarcharCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/TimestampWithTimeZoneToVarcharCast.java @@ -14,21 +14,21 @@ package io.trino.operator.scalar.timestamptz; import io.airlift.slice.Slice; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.type.DateTimes; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.type.DateTimes; import java.time.ZoneId; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.type.DateTimes.formatTimestampWithTimeZone; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.type.DateTimes.formatTimestampWithTimeZone; @ScalarOperator(CAST) public final class TimestampWithTimeZoneToVarcharCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ToIso8601.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ToIso8601.java index 28d674ec4cce..c5370dacf7a9 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ToIso8601.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ToIso8601.java @@ -14,14 +14,14 @@ package io.trino.operator.scalar.timestamptz; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.type.Constraint; -import io.prestosql.type.DateTimes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.type.Constraint; +import io.trino.type.DateTimes; import java.time.Instant; import java.time.LocalDateTime; @@ -30,12 +30,12 @@ import java.time.format.DateTimeFormatter; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_ARGUMENTS; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.getMillisOfSecond; +import static io.trino.spi.StandardErrorCode.INVALID_ARGUMENTS; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.getMillisOfSecond; @ScalarFunction("to_iso8601") public final class ToIso8601 diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ToUnixTime.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ToUnixTime.java index 606c1ec75b40..7d8c0cc4930b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ToUnixTime.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/ToUnixTime.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.MILLISECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.type.DateTimes.MICROSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.MILLISECONDS_PER_SECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; @ScalarFunction("to_unixtime") public final class ToUnixTime 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 cb567ac6f937..162138e5ff0f 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 @@ -14,14 +14,14 @@ package io.trino.operator.scalar.timestamptz; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.type.DateTimes; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.type.DateTimes; import java.time.ZoneId; import java.time.ZonedDateTime; @@ -29,17 +29,17 @@ import java.util.regex.Matcher; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.operator.scalar.StringFunctions.trim; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.MAX_PRECISION; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.MAX_SHORT_PRECISION; -import static io.prestosql.type.DateTimes.MILLISECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.longTimestampWithTimeZone; -import static io.prestosql.type.DateTimes.rescale; -import static io.prestosql.type.DateTimes.round; +import static io.trino.operator.scalar.StringFunctions.trim; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimestampWithTimeZoneType.MAX_PRECISION; +import static io.trino.spi.type.TimestampWithTimeZoneType.MAX_SHORT_PRECISION; +import static io.trino.type.DateTimes.MILLISECONDS_PER_SECOND; +import static io.trino.type.DateTimes.longTimestampWithTimeZone; +import static io.trino.type.DateTimes.rescale; +import static io.trino.type.DateTimes.round; @ScalarOperator(CAST) public final class VarcharToTimestampWithTimeZoneCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/AtTimeZone.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/AtTimeZone.java index e53e4279d311..7f28235de54a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/AtTimeZone.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/AtTimeZone.java @@ -14,25 +14,25 @@ package io.trino.operator.scalar.timetz; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.TimeZoneNotSupportedException; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.TimeZoneNotSupportedException; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.getOffsetMinutes; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.type.DateTimes.NANOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.NANOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.getOffsetMinutes; import static java.lang.Math.floorMod; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/AtTimeZoneWithOffset.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/AtTimeZoneWithOffset.java index 7fb9319805f5..c360702eb79b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/AtTimeZoneWithOffset.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/AtTimeZoneWithOffset.java @@ -13,21 +13,21 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MINUTE; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.type.DateTimes.NANOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.NANOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MINUTE; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.floorMod; import static java.lang.Math.toIntExact; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/CurrentTime.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/CurrentTime.java index 7e7d85704d74..75c6c5f8be72 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/CurrentTime.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/CurrentTime.java @@ -13,23 +13,23 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; import java.time.Instant; import java.time.ZoneId; import java.time.ZonedDateTime; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_NANOSECOND; +import static io.trino.type.DateTimes.round; import static java.lang.Math.floorMod; @ScalarFunction(value = "$current_time", hidden = true) diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/DateAdd.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/DateAdd.java index 14f9370c05f5..decbdc1173fc 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/DateAdd.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/DateAdd.java @@ -14,31 +14,31 @@ package io.trino.operator.scalar.timetz; import io.airlift.slice.Slice; -import io.prestosql.operator.scalar.time.TimeOperators; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.scalar.time.TimeOperators; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.spi.type.TimeWithTimeZoneType.MAX_PRECISION; -import static io.prestosql.type.DateTimes.HOURS_PER_DAY; -import static io.prestosql.type.DateTimes.MILLISECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_HOUR; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.SECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.spi.type.TimeWithTimeZoneType.MAX_PRECISION; +import static io.trino.type.DateTimes.HOURS_PER_DAY; +import static io.trino.type.DateTimes.MILLISECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_HOUR; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.PICOSECONDS_PER_NANOSECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.SECONDS_PER_DAY; +import static io.trino.type.DateTimes.round; import static java.util.Locale.ENGLISH; import static org.joda.time.DateTimeConstants.MINUTES_PER_DAY; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/DateDiff.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/DateDiff.java index 0aa9648b0205..8d195943892c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/DateDiff.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/DateDiff.java @@ -14,24 +14,24 @@ package io.trino.operator.scalar.timetz; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.operator.scalar.timetz.TimeWithTimeZoneOperators.normalize; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_HOUR; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_HOUR; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.operator.scalar.timetz.TimeWithTimeZoneOperators.normalize; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.type.DateTimes.NANOSECONDS_PER_HOUR; +import static io.trino.type.DateTimes.NANOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.NANOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.NANOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_HOUR; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; import static java.util.Locale.ENGLISH; @Description("Difference of the given times in the given unit") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/DateTrunc.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/DateTrunc.java index 37f60600564c..5cec17e6100b 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/DateTrunc.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/DateTrunc.java @@ -14,22 +14,22 @@ package io.trino.operator.scalar.timetz; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_HOUR; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.type.DateTimes.PICOSECONDS_PER_HOUR; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.PICOSECONDS_PER_NANOSECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; import static java.util.Locale.ENGLISH; @Description("Truncate to the specified precision") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractHour.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractHour.java index 201019a5bdc7..81a4eea8038a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractHour.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractHour.java @@ -13,16 +13,16 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_HOUR; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_HOUR; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.type.DateTimes.NANOSECONDS_PER_HOUR; +import static io.trino.type.DateTimes.PICOSECONDS_PER_HOUR; @Description("Hour of the day of the given time") @ScalarFunction("hour") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractMillisecond.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractMillisecond.java index bc6a92286526..5017cbbd1bf7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractMillisecond.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractMillisecond.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.type.DateTimes.MILLISECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.type.DateTimes.MILLISECONDS_PER_SECOND; +import static io.trino.type.DateTimes.NANOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; @Description("Millisecond of the second of the given time") @ScalarFunction("millisecond") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractMinute.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractMinute.java index 2005341611da..1dbc5537ea75 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractMinute.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractMinute.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.type.DateTimes.MINUTES_PER_HOUR; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MINUTE; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.type.DateTimes.MINUTES_PER_HOUR; +import static io.trino.type.DateTimes.NANOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MINUTE; @Description("Minute of the hour of the given time") @ScalarFunction("minute") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractSecond.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractSecond.java index 2a9a03c5302f..68f42adac3cd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractSecond.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/ExtractSecond.java @@ -13,17 +13,17 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.SECONDS_PER_MINUTE; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.type.DateTimes.NANOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.SECONDS_PER_MINUTE; @Description("Second of the minute of the given time") @ScalarFunction("second") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneOperators.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneOperators.java index 4babbdebdb8b..957cf8868072 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneOperators.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneOperators.java @@ -13,26 +13,26 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.operator.scalar.time.TimeOperators; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.type.Constraint; +import io.trino.operator.scalar.time.TimeOperators; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.StandardTypes; +import io.trino.type.Constraint; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.type.DateTimes.rescaleWithRounding; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.type.DateTimes.NANOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.NANOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.PICOSECONDS_PER_NANOSECOND; +import static io.trino.type.DateTimes.rescaleWithRounding; import static java.lang.Math.floorMod; @SuppressWarnings("UtilityClassWithoutPrivateConstructor") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToTimeCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToTimeCast.java index f0912c3dadb3..c6e6b2fdedfb 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToTimeCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToTimeCast.java @@ -13,18 +13,18 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.spi.type.TimeType.MAX_PRECISION; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.spi.type.TimeType.MAX_PRECISION; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_NANOSECOND; +import static io.trino.type.DateTimes.round; @ScalarOperator(CAST) public final class TimeWithTimeZoneToTimeCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToTimeWithTimeZoneCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToTimeWithTimeZoneCast.java index ac6ae62334ba..d3f69133bbff 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToTimeWithTimeZoneCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToTimeWithTimeZoneCast.java @@ -13,22 +13,22 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.spi.type.TimeWithTimeZoneType.MAX_PRECISION; -import static io.prestosql.spi.type.TimeWithTimeZoneType.MAX_SHORT_PRECISION; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.spi.type.TimeWithTimeZoneType.MAX_PRECISION; +import static io.trino.spi.type.TimeWithTimeZoneType.MAX_SHORT_PRECISION; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_NANOSECOND; +import static io.trino.type.DateTimes.round; @ScalarOperator(CAST) public final class TimeWithTimeZoneToTimeWithTimeZoneCast diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToTimestampWithTimeZoneCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToTimestampWithTimeZoneCast.java index fddd8d7bf2aa..2237ff80a5e0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToTimestampWithTimeZoneCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToTimestampWithTimeZoneCast.java @@ -13,27 +13,27 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.LongTimestampWithTimeZone; import java.time.LocalDate; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; -import static io.prestosql.type.DateTimes.MILLISECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.rescale; -import static io.prestosql.type.DateTimes.round; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; +import static io.trino.type.DateTimes.MILLISECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.rescale; +import static io.trino.type.DateTimes.round; import static java.lang.Math.floorMod; import static java.lang.Math.multiplyExact; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToVarcharCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToVarcharCast.java index 1609d8cafe85..52923332c46f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToVarcharCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeWithTimeZoneToVarcharCast.java @@ -15,23 +15,23 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.spi.type.TimeType.MAX_PRECISION; -import static io.prestosql.type.DateTimes.MINUTES_PER_HOUR; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_HOUR; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.SECONDS_PER_MINUTE; -import static io.prestosql.type.DateTimes.scaleFactor; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.spi.type.TimeType.MAX_PRECISION; +import static io.trino.type.DateTimes.MINUTES_PER_HOUR; +import static io.trino.type.DateTimes.PICOSECONDS_PER_HOUR; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.PICOSECONDS_PER_NANOSECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.SECONDS_PER_MINUTE; +import static io.trino.type.DateTimes.scaleFactor; import static java.lang.Math.abs; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeZoneHour.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeZoneHour.java index 82c40ff2f329..1564355dfb19 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeZoneHour.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeZoneHour.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.type.DateTimes.MINUTES_PER_HOUR; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.type.DateTimes.MINUTES_PER_HOUR; @Description("Time zone hour of the given time") @ScalarFunction("timezone_hour") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeZoneMinute.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeZoneMinute.java index a757fd4c2b3b..678f40850f8d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeZoneMinute.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/TimeZoneMinute.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.type.DateTimes.MINUTES_PER_HOUR; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.type.DateTimes.MINUTES_PER_HOUR; @Description("Time zone minute of the given time") @ScalarFunction("timezone_minute") diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/VarcharToTimeWithTimeZoneCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/VarcharToTimeWithTimeZoneCast.java index ea536e85322a..75a7af099f7d 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/VarcharToTimeWithTimeZoneCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timetz/VarcharToTimeWithTimeZoneCast.java @@ -14,33 +14,33 @@ package io.trino.operator.scalar.timetz; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.type.DateTimes; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.type.DateTimes; import java.util.regex.Matcher; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.operator.scalar.StringFunctions.trim; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.TimeWithTimeZoneType.MAX_PRECISION; -import static io.prestosql.spi.type.TimeWithTimeZoneType.MAX_SHORT_PRECISION; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_DAY; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.calculateOffsetMinutes; -import static io.prestosql.type.DateTimes.getOffsetMinutes; -import static io.prestosql.type.DateTimes.isValidOffset; -import static io.prestosql.type.DateTimes.rescale; -import static io.prestosql.type.DateTimes.round; +import static io.trino.operator.scalar.StringFunctions.trim; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.TimeWithTimeZoneType.MAX_PRECISION; +import static io.trino.spi.type.TimeWithTimeZoneType.MAX_SHORT_PRECISION; +import static io.trino.type.DateTimes.NANOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.NANOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_DAY; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.calculateOffsetMinutes; +import static io.trino.type.DateTimes.getOffsetMinutes; +import static io.trino.type.DateTimes.isValidOffset; +import static io.trino.type.DateTimes.rescale; +import static io.trino.type.DateTimes.round; @ScalarOperator(CAST) public final class VarcharToTimeWithTimeZoneCast diff --git a/core/trino-main/src/main/java/io/trino/operator/unnest/ArrayOfRowsUnnester.java b/core/trino-main/src/main/java/io/trino/operator/unnest/ArrayOfRowsUnnester.java index 2a12653f441a..e63fa3340ab3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/unnest/ArrayOfRowsUnnester.java +++ b/core/trino-main/src/main/java/io/trino/operator/unnest/ArrayOfRowsUnnester.java @@ -14,15 +14,15 @@ package io.trino.operator.unnest; import com.google.common.collect.Iterables; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ColumnarArray; -import io.prestosql.spi.block.ColumnarRow; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.ColumnarArray; +import io.trino.spi.block.ColumnarRow; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.block.ColumnarArray.toColumnarArray; -import static io.prestosql.spi.block.ColumnarRow.toColumnarRow; +import static io.trino.spi.block.ColumnarArray.toColumnarArray; +import static io.trino.spi.block.ColumnarRow.toColumnarRow; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/unnest/ArrayUnnester.java b/core/trino-main/src/main/java/io/trino/operator/unnest/ArrayUnnester.java index f1044acf4601..0aede139fc5c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/unnest/ArrayUnnester.java +++ b/core/trino-main/src/main/java/io/trino/operator/unnest/ArrayUnnester.java @@ -13,12 +13,12 @@ */ package io.trino.operator.unnest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ColumnarArray; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.ColumnarArray; +import io.trino.spi.type.Type; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.block.ColumnarArray.toColumnarArray; +import static io.trino.spi.block.ColumnarArray.toColumnarArray; /** * Unnester for a nested column with array type, only when array elements are NOT of type {@code RowType}. diff --git a/core/trino-main/src/main/java/io/trino/operator/unnest/MapUnnester.java b/core/trino-main/src/main/java/io/trino/operator/unnest/MapUnnester.java index f6edf3fb5864..d6c3f2c88485 100644 --- a/core/trino-main/src/main/java/io/trino/operator/unnest/MapUnnester.java +++ b/core/trino-main/src/main/java/io/trino/operator/unnest/MapUnnester.java @@ -13,12 +13,12 @@ */ package io.trino.operator.unnest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ColumnarMap; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.ColumnarMap; +import io.trino.spi.type.Type; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.block.ColumnarMap.toColumnarMap; +import static io.trino.spi.block.ColumnarMap.toColumnarMap; /** * Unnester for a nested column with map type. diff --git a/core/trino-main/src/main/java/io/trino/operator/unnest/ReplicatedBlockBuilder.java b/core/trino-main/src/main/java/io/trino/operator/unnest/ReplicatedBlockBuilder.java index b49272073803..97a50e567026 100644 --- a/core/trino-main/src/main/java/io/trino/operator/unnest/ReplicatedBlockBuilder.java +++ b/core/trino-main/src/main/java/io/trino/operator/unnest/ReplicatedBlockBuilder.java @@ -13,15 +13,15 @@ */ package io.trino.operator.unnest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; import java.util.Arrays; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkElementIndex; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.unnest.UnnestOperatorBlockUtil.calculateNewArraySize; +import static io.trino.operator.unnest.UnnestOperatorBlockUtil.calculateNewArraySize; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/unnest/UnnestBlockBuilder.java b/core/trino-main/src/main/java/io/trino/operator/unnest/UnnestBlockBuilder.java index 37a6dbb14354..a6802aad7fd8 100644 --- a/core/trino-main/src/main/java/io/trino/operator/unnest/UnnestBlockBuilder.java +++ b/core/trino-main/src/main/java/io/trino/operator/unnest/UnnestBlockBuilder.java @@ -14,18 +14,18 @@ package io.trino.operator.unnest; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.type.Type; import java.util.Arrays; import static com.google.common.base.Preconditions.checkElementIndex; import static com.google.common.base.Preconditions.checkPositionIndexes; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.unnest.UnnestOperatorBlockUtil.calculateNewArraySize; +import static io.trino.operator.unnest.UnnestOperatorBlockUtil.calculateNewArraySize; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/operator/unnest/UnnestOperator.java b/core/trino-main/src/main/java/io/trino/operator/unnest/UnnestOperator.java index 4fb64034d68b..d2223351942a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/unnest/UnnestOperator.java +++ b/core/trino-main/src/main/java/io/trino/operator/unnest/UnnestOperator.java @@ -14,26 +14,26 @@ package io.trino.operator.unnest; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.operator.DriverContext; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.OperatorFactory; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; 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.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; public class UnnestOperator diff --git a/core/trino-main/src/main/java/io/trino/operator/unnest/Unnester.java b/core/trino-main/src/main/java/io/trino/operator/unnest/Unnester.java index 4934f10d34f0..b7ab3e8202fd 100644 --- a/core/trino-main/src/main/java/io/trino/operator/unnest/Unnester.java +++ b/core/trino-main/src/main/java/io/trino/operator/unnest/Unnester.java @@ -13,9 +13,9 @@ */ package io.trino.operator.unnest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.type.Type; import static com.google.common.base.Preconditions.checkState; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/window/AbstractWindowFunctionSupplier.java b/core/trino-main/src/main/java/io/trino/operator/window/AbstractWindowFunctionSupplier.java index f869519b8e7e..5b9aa9a78cad 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/AbstractWindowFunctionSupplier.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/AbstractWindowFunctionSupplier.java @@ -13,10 +13,10 @@ */ package io.trino.operator.window; -import io.prestosql.metadata.Signature; -import io.prestosql.operator.aggregation.LambdaProvider; -import io.prestosql.spi.function.WindowFunction; -import io.prestosql.type.FunctionType; +import io.trino.metadata.Signature; +import io.trino.operator.aggregation.LambdaProvider; +import io.trino.spi.function.WindowFunction; +import io.trino.type.FunctionType; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/window/AggregateWindowFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/AggregateWindowFunction.java index f14fb507ddd8..8ec645ed3553 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/AggregateWindowFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/AggregateWindowFunction.java @@ -14,14 +14,14 @@ package io.trino.operator.window; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Signature; -import io.prestosql.operator.aggregation.Accumulator; -import io.prestosql.operator.aggregation.AccumulatorFactory; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.aggregation.LambdaProvider; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.WindowFunction; -import io.prestosql.spi.function.WindowIndex; +import io.trino.metadata.Signature; +import io.trino.operator.aggregation.Accumulator; +import io.trino.operator.aggregation.AccumulatorFactory; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.aggregation.LambdaProvider; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.WindowFunction; +import io.trino.spi.function.WindowIndex; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/operator/window/CumulativeDistributionFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/CumulativeDistributionFunction.java index dcb0fe9091e0..874bd3a50afb 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/CumulativeDistributionFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/CumulativeDistributionFunction.java @@ -13,11 +13,11 @@ */ package io.trino.operator.window; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.RankingWindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.RankingWindowFunction; +import io.trino.spi.function.WindowFunctionSignature; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; @WindowFunctionSignature(name = "cume_dist", returnType = "double") public class CumulativeDistributionFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/window/DenseRankFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/DenseRankFunction.java index fa25936bf5fa..575026514014 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/DenseRankFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/DenseRankFunction.java @@ -13,11 +13,11 @@ */ package io.trino.operator.window; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.RankingWindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.RankingWindowFunction; +import io.trino.spi.function.WindowFunctionSignature; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; @WindowFunctionSignature(name = "dense_rank", returnType = "bigint") public class DenseRankFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/window/FirstValueFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/FirstValueFunction.java index 453b91b3b392..dd3f430d2103 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/FirstValueFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/FirstValueFunction.java @@ -13,9 +13,9 @@ */ package io.trino.operator.window; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.ValueWindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.ValueWindowFunction; +import io.trino.spi.function.WindowFunctionSignature; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/window/FrameInfo.java b/core/trino-main/src/main/java/io/trino/operator/window/FrameInfo.java index 687ae39414a0..092feff33b05 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/FrameInfo.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/FrameInfo.java @@ -13,9 +13,9 @@ */ package io.trino.operator.window; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.SortItem.Ordering; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.SortItem.Ordering; +import io.trino.sql.tree.WindowFrame; import java.util.Objects; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/operator/window/FramedWindowFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/FramedWindowFunction.java index 0529a7ead422..627c5d36783f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/FramedWindowFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/FramedWindowFunction.java @@ -13,7 +13,7 @@ */ package io.trino.operator.window; -import io.prestosql.spi.function.WindowFunction; +import io.trino.spi.function.WindowFunction; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/window/LagFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/LagFunction.java index 750c62b9d1d5..1d6f2ca1c3e2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/LagFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/LagFunction.java @@ -13,14 +13,14 @@ */ package io.trino.operator.window; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.ValueWindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.ValueWindowFunction; +import io.trino.spi.function.WindowFunctionSignature; import java.util.List; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.toIntExact; @WindowFunctionSignature(name = "lag", typeVariable = "T", returnType = "T", argumentTypes = "T") diff --git a/core/trino-main/src/main/java/io/trino/operator/window/LastValueFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/LastValueFunction.java index 10b2f39ed3d4..8ddeb0a517b2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/LastValueFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/LastValueFunction.java @@ -13,9 +13,9 @@ */ package io.trino.operator.window; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.ValueWindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.ValueWindowFunction; +import io.trino.spi.function.WindowFunctionSignature; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/window/LeadFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/LeadFunction.java index ba86e695e423..a4a6716b8824 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/LeadFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/LeadFunction.java @@ -13,14 +13,14 @@ */ package io.trino.operator.window; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.ValueWindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.ValueWindowFunction; +import io.trino.spi.function.WindowFunctionSignature; import java.util.List; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.toIntExact; @WindowFunctionSignature(name = "lead", typeVariable = "T", returnType = "T", argumentTypes = "T") diff --git a/core/trino-main/src/main/java/io/trino/operator/window/NTileFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/NTileFunction.java index bd9dc48487c2..343a1e8ca233 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/NTileFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/NTileFunction.java @@ -13,15 +13,15 @@ */ package io.trino.operator.window; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.RankingWindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.RankingWindowFunction; +import io.trino.spi.function.WindowFunctionSignature; import java.util.List; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.util.Failures.checkCondition; @WindowFunctionSignature(name = "ntile", returnType = "bigint", argumentTypes = "bigint") public class NTileFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/window/NthValueFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/NthValueFunction.java index 43a851920ada..249af57a0f16 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/NthValueFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/NthValueFunction.java @@ -13,14 +13,14 @@ */ package io.trino.operator.window; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.ValueWindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.ValueWindowFunction; +import io.trino.spi.function.WindowFunctionSignature; import java.util.List; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.toIntExact; @WindowFunctionSignature(name = "nth_value", typeVariable = "T", returnType = "T", argumentTypes = {"T", "bigint"}) diff --git a/core/trino-main/src/main/java/io/trino/operator/window/PagesWindowIndex.java b/core/trino-main/src/main/java/io/trino/operator/window/PagesWindowIndex.java index f0e9b83e7be2..d422a1cbcdb2 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/PagesWindowIndex.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/PagesWindowIndex.java @@ -14,10 +14,10 @@ package io.trino.operator.window; import io.airlift.slice.Slice; -import io.prestosql.operator.PagesIndex; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.WindowIndex; +import io.trino.operator.PagesIndex; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.WindowIndex; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/trino-main/src/main/java/io/trino/operator/window/PercentRankFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/PercentRankFunction.java index 8ac037fcb9ac..7352a247f8b7 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/PercentRankFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/PercentRankFunction.java @@ -13,11 +13,11 @@ */ package io.trino.operator.window; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.RankingWindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.RankingWindowFunction; +import io.trino.spi.function.WindowFunctionSignature; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; @WindowFunctionSignature(name = "percent_rank", returnType = "double") public class PercentRankFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/window/RankFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/RankFunction.java index 5055c1d1f2e6..d6d2c566b325 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/RankFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/RankFunction.java @@ -13,11 +13,11 @@ */ package io.trino.operator.window; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.RankingWindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.RankingWindowFunction; +import io.trino.spi.function.WindowFunctionSignature; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; @WindowFunctionSignature(name = "rank", returnType = "bigint") public class RankFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/window/ReflectionWindowFunctionSupplier.java b/core/trino-main/src/main/java/io/trino/operator/window/ReflectionWindowFunctionSupplier.java index fd327064c573..32df9940bc1a 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/ReflectionWindowFunctionSupplier.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/ReflectionWindowFunctionSupplier.java @@ -16,12 +16,12 @@ import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; -import io.prestosql.metadata.Signature; -import io.prestosql.operator.aggregation.LambdaProvider; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ValueWindowFunction; -import io.prestosql.spi.function.WindowFunction; -import io.prestosql.spi.type.Type; +import io.trino.metadata.Signature; +import io.trino.operator.aggregation.LambdaProvider; +import io.trino.spi.function.Description; +import io.trino.spi.function.ValueWindowFunction; +import io.trino.spi.function.WindowFunction; +import io.trino.spi.type.Type; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Constructor; diff --git a/core/trino-main/src/main/java/io/trino/operator/window/RowNumberFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/RowNumberFunction.java index da7c5b606a5a..878103cba87e 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/RowNumberFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/RowNumberFunction.java @@ -13,11 +13,11 @@ */ package io.trino.operator.window; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.RankingWindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.RankingWindowFunction; +import io.trino.spi.function.WindowFunctionSignature; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; @WindowFunctionSignature(name = "row_number", returnType = "bigint") public class RowNumberFunction diff --git a/core/trino-main/src/main/java/io/trino/operator/window/SqlWindowFunction.java b/core/trino-main/src/main/java/io/trino/operator/window/SqlWindowFunction.java index 4976c24e83f0..4b392b9cde5c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/SqlWindowFunction.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/SqlWindowFunction.java @@ -13,15 +13,15 @@ */ package io.trino.operator.window; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlFunction; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlFunction; import static com.google.common.base.Strings.nullToEmpty; -import static io.prestosql.metadata.FunctionKind.WINDOW; +import static io.trino.metadata.FunctionKind.WINDOW; import static java.util.Collections.nCopies; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/operator/window/WindowAnnotationsParser.java b/core/trino-main/src/main/java/io/trino/operator/window/WindowAnnotationsParser.java index 6856d3efb4ae..838527caf5d3 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/WindowAnnotationsParser.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/WindowAnnotationsParser.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.TypeVariableConstraint; -import io.prestosql.spi.function.WindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.Signature; +import io.trino.metadata.TypeVariableConstraint; +import io.trino.spi.function.WindowFunction; +import io.trino.spi.function.WindowFunctionSignature; +import io.trino.spi.type.TypeSignature; import java.util.List; import java.util.stream.Stream; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; public final class WindowAnnotationsParser { diff --git a/core/trino-main/src/main/java/io/trino/operator/window/WindowFunctionSupplier.java b/core/trino-main/src/main/java/io/trino/operator/window/WindowFunctionSupplier.java index f45d18a9fff3..e1c10c0e1fda 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/WindowFunctionSupplier.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/WindowFunctionSupplier.java @@ -13,9 +13,9 @@ */ package io.trino.operator.window; -import io.prestosql.metadata.Signature; -import io.prestosql.operator.aggregation.LambdaProvider; -import io.prestosql.spi.function.WindowFunction; +import io.trino.metadata.Signature; +import io.trino.operator.aggregation.LambdaProvider; +import io.trino.spi.function.WindowFunction; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/operator/window/WindowPartition.java b/core/trino-main/src/main/java/io/trino/operator/window/WindowPartition.java index 71e4d18b0150..0c137ba61499 100644 --- a/core/trino-main/src/main/java/io/trino/operator/window/WindowPartition.java +++ b/core/trino-main/src/main/java/io/trino/operator/window/WindowPartition.java @@ -14,15 +14,15 @@ package io.trino.operator.window; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.PagesHashStrategy; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.PagesIndexComparator; -import io.prestosql.operator.WindowOperator.FrameBoundKey; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.function.WindowIndex; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.FrameBound.Type; -import io.prestosql.sql.tree.SortItem.Ordering; +import io.trino.operator.PagesHashStrategy; +import io.trino.operator.PagesIndex; +import io.trino.operator.PagesIndexComparator; +import io.trino.operator.WindowOperator.FrameBoundKey; +import io.trino.spi.PageBuilder; +import io.trino.spi.function.WindowIndex; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.FrameBound.Type; +import io.trino.sql.tree.SortItem.Ordering; import java.util.HashMap; import java.util.List; @@ -31,19 +31,19 @@ import java.util.function.Predicate; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.WindowOperator.FrameBoundKey.Type.END; -import static io.prestosql.operator.WindowOperator.FrameBoundKey.Type.START; -import static io.prestosql.spi.StandardErrorCode.INVALID_WINDOW_FRAME; -import static io.prestosql.sql.tree.FrameBound.Type.CURRENT_ROW; -import static io.prestosql.sql.tree.FrameBound.Type.FOLLOWING; -import static io.prestosql.sql.tree.FrameBound.Type.PRECEDING; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_FOLLOWING; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; -import static io.prestosql.sql.tree.SortItem.Ordering.DESCENDING; -import static io.prestosql.sql.tree.WindowFrame.Type.GROUPS; -import static io.prestosql.sql.tree.WindowFrame.Type.RANGE; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.operator.WindowOperator.FrameBoundKey.Type.END; +import static io.trino.operator.WindowOperator.FrameBoundKey.Type.START; +import static io.trino.spi.StandardErrorCode.INVALID_WINDOW_FRAME; +import static io.trino.sql.tree.FrameBound.Type.CURRENT_ROW; +import static io.trino.sql.tree.FrameBound.Type.FOLLOWING; +import static io.trino.sql.tree.FrameBound.Type.PRECEDING; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_FOLLOWING; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.tree.SortItem.Ordering.DESCENDING; +import static io.trino.sql.tree.WindowFrame.Type.GROUPS; +import static io.trino.sql.tree.WindowFrame.Type.RANGE; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/security/AccessControl.java b/core/trino-main/src/main/java/io/trino/security/AccessControl.java index b9438fcd60db..1dc5938fdadd 100644 --- a/core/trino-main/src/main/java/io/trino/security/AccessControl.java +++ b/core/trino-main/src/main/java/io/trino/security/AccessControl.java @@ -14,23 +14,23 @@ package io.trino.security; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.metadata.QualifiedObjectName; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import java.security.Principal; import java.util.List; import java.util.Optional; import java.util.Set; -import static io.prestosql.spi.security.AccessDeniedException.denySetViewAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetViewAuthorization; public interface AccessControl { diff --git a/core/trino-main/src/main/java/io/trino/security/AccessControlManager.java b/core/trino-main/src/main/java/io/trino/security/AccessControlManager.java index 187aca1c529c..f785a2656948 100644 --- a/core/trino-main/src/main/java/io/trino/security/AccessControlManager.java +++ b/core/trino-main/src/main/java/io/trino/security/AccessControlManager.java @@ -19,33 +19,33 @@ import com.google.common.collect.ImmutableSet; import io.airlift.log.Logger; import io.airlift.stats.CounterStat; -import io.prestosql.connector.CatalogName; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.plugin.base.security.AllowAllSystemAccessControl; -import io.prestosql.plugin.base.security.DefaultSystemAccessControl; -import io.prestosql.plugin.base.security.FileBasedSystemAccessControl; -import io.prestosql.plugin.base.security.ForwardingSystemAccessControl; -import io.prestosql.plugin.base.security.ReadOnlySystemAccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.SystemAccessControl; -import io.prestosql.spi.security.SystemAccessControlFactory; -import io.prestosql.spi.security.SystemSecurityContext; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionManager; +import io.trino.connector.CatalogName; +import io.trino.eventlistener.EventListenerManager; +import io.trino.metadata.QualifiedObjectName; +import io.trino.plugin.base.security.AllowAllSystemAccessControl; +import io.trino.plugin.base.security.DefaultSystemAccessControl; +import io.trino.plugin.base.security.FileBasedSystemAccessControl; +import io.trino.plugin.base.security.ForwardingSystemAccessControl; +import io.trino.plugin.base.security.ReadOnlySystemAccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.PrincipalType; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.SystemAccessControl; +import io.trino.spi.security.SystemAccessControlFactory; +import io.trino.spi.security.SystemSecurityContext; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; +import io.trino.transaction.TransactionId; +import io.trino.transaction.TransactionManager; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -69,7 +69,7 @@ import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.configuration.ConfigurationLoader.loadPropertiesFrom; -import static io.prestosql.spi.StandardErrorCode.SERVER_STARTING_UP; +import static io.trino.spi.StandardErrorCode.SERVER_STARTING_UP; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/security/AccessControlModule.java b/core/trino-main/src/main/java/io/trino/security/AccessControlModule.java index dfecea3d8789..460b7f9dcbdf 100644 --- a/core/trino-main/src/main/java/io/trino/security/AccessControlModule.java +++ b/core/trino-main/src/main/java/io/trino/security/AccessControlModule.java @@ -19,8 +19,8 @@ import com.google.inject.Scopes; import com.google.inject.Singleton; import io.airlift.log.Logger; -import io.prestosql.plugin.base.util.LoggingInvocationHandler; -import io.prestosql.spi.security.GroupProvider; +import io.trino.plugin.base.util.LoggingInvocationHandler; +import io.trino.spi.security.GroupProvider; import static com.google.common.reflect.Reflection.newProxy; import static io.airlift.configuration.ConfigBinder.configBinder; diff --git a/core/trino-main/src/main/java/io/trino/security/AccessControlUtil.java b/core/trino-main/src/main/java/io/trino/security/AccessControlUtil.java index 6b8a88c3ed1a..7cb3754cbd77 100644 --- a/core/trino-main/src/main/java/io/trino/security/AccessControlUtil.java +++ b/core/trino-main/src/main/java/io/trino/security/AccessControlUtil.java @@ -14,9 +14,9 @@ package io.trino.security; import com.google.common.collect.ImmutableSet; -import io.prestosql.SessionRepresentation; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.spi.security.Identity; +import io.trino.SessionRepresentation; +import io.trino.server.BasicQueryInfo; +import io.trino.spi.security.Identity; import java.util.List; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/security/AllowAllAccessControl.java b/core/trino-main/src/main/java/io/trino/security/AllowAllAccessControl.java index 7ec853c868f1..59f98d9944d2 100644 --- a/core/trino-main/src/main/java/io/trino/security/AllowAllAccessControl.java +++ b/core/trino-main/src/main/java/io/trino/security/AllowAllAccessControl.java @@ -13,13 +13,13 @@ */ package io.trino.security; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; +import io.trino.metadata.QualifiedObjectName; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; import java.security.Principal; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/security/DenyAllAccessControl.java b/core/trino-main/src/main/java/io/trino/security/DenyAllAccessControl.java index 23b0fd4eb46e..3d2b8245a07f 100644 --- a/core/trino-main/src/main/java/io/trino/security/DenyAllAccessControl.java +++ b/core/trino-main/src/main/java/io/trino/security/DenyAllAccessControl.java @@ -14,69 +14,69 @@ package io.trino.security; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; +import io.trino.metadata.QualifiedObjectName; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; import java.security.Principal; import java.util.Optional; import java.util.Set; -import static io.prestosql.spi.security.AccessDeniedException.denyAddColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateRole; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateView; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateViewWithSelect; -import static io.prestosql.spi.security.AccessDeniedException.denyDeleteTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyDropRole; -import static io.prestosql.spi.security.AccessDeniedException.denyDropSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyDropTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropView; -import static io.prestosql.spi.security.AccessDeniedException.denyExecuteFunction; -import static io.prestosql.spi.security.AccessDeniedException.denyExecuteProcedure; -import static io.prestosql.spi.security.AccessDeniedException.denyExecuteQuery; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantExecuteFunctionPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantSchemaPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyImpersonateUser; -import static io.prestosql.spi.security.AccessDeniedException.denyInsertTable; -import static io.prestosql.spi.security.AccessDeniedException.denyKillQuery; -import static io.prestosql.spi.security.AccessDeniedException.denyReadSystemInformationAccess; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameView; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeSchemaPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denySelectColumns; -import static io.prestosql.spi.security.AccessDeniedException.denySetCatalogSessionProperty; -import static io.prestosql.spi.security.AccessDeniedException.denySetRole; -import static io.prestosql.spi.security.AccessDeniedException.denySetSchemaAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denySetSystemSessionProperty; -import static io.prestosql.spi.security.AccessDeniedException.denySetTableAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denySetUser; -import static io.prestosql.spi.security.AccessDeniedException.denySetViewAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denyShowColumns; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCurrentRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyShowRoleAuthorizationDescriptors; -import static io.prestosql.spi.security.AccessDeniedException.denyShowRoleGrants; -import static io.prestosql.spi.security.AccessDeniedException.denyShowRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyShowSchemas; -import static io.prestosql.spi.security.AccessDeniedException.denyShowTables; -import static io.prestosql.spi.security.AccessDeniedException.denyViewQuery; -import static io.prestosql.spi.security.AccessDeniedException.denyWriteSystemInformationAccess; +import static io.trino.spi.security.AccessDeniedException.denyAddColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateRole; +import static io.trino.spi.security.AccessDeniedException.denyCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateView; +import static io.trino.spi.security.AccessDeniedException.denyCreateViewWithSelect; +import static io.trino.spi.security.AccessDeniedException.denyDeleteTable; +import static io.trino.spi.security.AccessDeniedException.denyDropColumn; +import static io.trino.spi.security.AccessDeniedException.denyDropRole; +import static io.trino.spi.security.AccessDeniedException.denyDropSchema; +import static io.trino.spi.security.AccessDeniedException.denyDropTable; +import static io.trino.spi.security.AccessDeniedException.denyDropView; +import static io.trino.spi.security.AccessDeniedException.denyExecuteFunction; +import static io.trino.spi.security.AccessDeniedException.denyExecuteProcedure; +import static io.trino.spi.security.AccessDeniedException.denyExecuteQuery; +import static io.trino.spi.security.AccessDeniedException.denyGrantExecuteFunctionPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyGrantRoles; +import static io.trino.spi.security.AccessDeniedException.denyGrantSchemaPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyGrantTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denyImpersonateUser; +import static io.trino.spi.security.AccessDeniedException.denyInsertTable; +import static io.trino.spi.security.AccessDeniedException.denyKillQuery; +import static io.trino.spi.security.AccessDeniedException.denyReadSystemInformationAccess; +import static io.trino.spi.security.AccessDeniedException.denyRenameColumn; +import static io.trino.spi.security.AccessDeniedException.denyRenameSchema; +import static io.trino.spi.security.AccessDeniedException.denyRenameTable; +import static io.trino.spi.security.AccessDeniedException.denyRenameView; +import static io.trino.spi.security.AccessDeniedException.denyRevokeRoles; +import static io.trino.spi.security.AccessDeniedException.denyRevokeSchemaPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyRevokeTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denySelectColumns; +import static io.trino.spi.security.AccessDeniedException.denySetCatalogSessionProperty; +import static io.trino.spi.security.AccessDeniedException.denySetRole; +import static io.trino.spi.security.AccessDeniedException.denySetSchemaAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetSystemSessionProperty; +import static io.trino.spi.security.AccessDeniedException.denySetTableAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetUser; +import static io.trino.spi.security.AccessDeniedException.denySetViewAuthorization; +import static io.trino.spi.security.AccessDeniedException.denyShowColumns; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyShowCurrentRoles; +import static io.trino.spi.security.AccessDeniedException.denyShowRoleAuthorizationDescriptors; +import static io.trino.spi.security.AccessDeniedException.denyShowRoleGrants; +import static io.trino.spi.security.AccessDeniedException.denyShowRoles; +import static io.trino.spi.security.AccessDeniedException.denyShowSchemas; +import static io.trino.spi.security.AccessDeniedException.denyShowTables; +import static io.trino.spi.security.AccessDeniedException.denyViewQuery; +import static io.trino.spi.security.AccessDeniedException.denyWriteSystemInformationAccess; public class DenyAllAccessControl implements AccessControl diff --git a/core/trino-main/src/main/java/io/trino/security/ForwardingAccessControl.java b/core/trino-main/src/main/java/io/trino/security/ForwardingAccessControl.java index 7ac908972ff8..38bf41a55625 100644 --- a/core/trino-main/src/main/java/io/trino/security/ForwardingAccessControl.java +++ b/core/trino-main/src/main/java/io/trino/security/ForwardingAccessControl.java @@ -13,15 +13,15 @@ */ package io.trino.security; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.metadata.QualifiedObjectName; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import java.security.Principal; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/security/GroupProviderManager.java b/core/trino-main/src/main/java/io/trino/security/GroupProviderManager.java index 42ef9e9317d0..f5d84e45feb9 100644 --- a/core/trino-main/src/main/java/io/trino/security/GroupProviderManager.java +++ b/core/trino-main/src/main/java/io/trino/security/GroupProviderManager.java @@ -17,8 +17,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.log.Logger; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.security.GroupProviderFactory; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.security.GroupProviderFactory; import java.io.File; import java.io.IOException; diff --git a/core/trino-main/src/main/java/io/trino/security/InjectedConnectorAccessControl.java b/core/trino-main/src/main/java/io/trino/security/InjectedConnectorAccessControl.java index ec13e15af0c5..dce93daa5e0b 100644 --- a/core/trino-main/src/main/java/io/trino/security/InjectedConnectorAccessControl.java +++ b/core/trino-main/src/main/java/io/trino/security/InjectedConnectorAccessControl.java @@ -13,24 +13,24 @@ */ package io.trino.security; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.SchemaRoutineName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.metadata.QualifiedObjectName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.SchemaRoutineName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import java.util.Optional; import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.util.Objects.requireNonNull; public class InjectedConnectorAccessControl diff --git a/core/trino-main/src/main/java/io/trino/security/SecurityContext.java b/core/trino-main/src/main/java/io/trino/security/SecurityContext.java index 6694a6fd879e..d98e88b0d155 100644 --- a/core/trino-main/src/main/java/io/trino/security/SecurityContext.java +++ b/core/trino-main/src/main/java/io/trino/security/SecurityContext.java @@ -13,11 +13,11 @@ */ package io.trino.security; -import io.prestosql.Session; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.SystemSecurityContext; -import io.prestosql.transaction.TransactionId; +import io.trino.Session; +import io.trino.spi.QueryId; +import io.trino.spi.security.Identity; +import io.trino.spi.security.SystemSecurityContext; +import io.trino.transaction.TransactionId; import java.util.Objects; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/security/ViewAccessControl.java b/core/trino-main/src/main/java/io/trino/security/ViewAccessControl.java index 1de5a89d26e9..ebf2e3535825 100644 --- a/core/trino-main/src/main/java/io/trino/security/ViewAccessControl.java +++ b/core/trino-main/src/main/java/io/trino/security/ViewAccessControl.java @@ -13,11 +13,11 @@ */ package io.trino.security; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.metadata.QualifiedObjectName; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.Identity; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import java.util.List; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/server/BasicQueryInfo.java b/core/trino-main/src/main/java/io/trino/server/BasicQueryInfo.java index 7f90f2f47571..e3f3725e5c0e 100644 --- a/core/trino-main/src/main/java/io/trino/server/BasicQueryInfo.java +++ b/core/trino-main/src/main/java/io/trino/server/BasicQueryInfo.java @@ -15,15 +15,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.SessionRepresentation; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryState; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorType; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.resourcegroups.QueryType; -import io.prestosql.spi.resourcegroups.ResourceGroupId; +import io.trino.SessionRepresentation; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryState; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorType; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.resourcegroups.QueryType; +import io.trino.spi.resourcegroups.ResourceGroupId; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/server/BasicQueryStats.java b/core/trino-main/src/main/java/io/trino/server/BasicQueryStats.java index 77435e08f63c..dd79233820cc 100644 --- a/core/trino-main/src/main/java/io/trino/server/BasicQueryStats.java +++ b/core/trino-main/src/main/java/io/trino/server/BasicQueryStats.java @@ -18,8 +18,8 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.QueryStats; -import io.prestosql.operator.BlockedReason; +import io.trino.execution.QueryStats; +import io.trino.operator.BlockedReason; import org.joda.time.DateTime; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/server/CoordinatorModule.java b/core/trino-main/src/main/java/io/trino/server/CoordinatorModule.java index a2d87ca8b38d..47f3e419a071 100644 --- a/core/trino-main/src/main/java/io/trino/server/CoordinatorModule.java +++ b/core/trino-main/src/main/java/io/trino/server/CoordinatorModule.java @@ -24,70 +24,70 @@ import io.airlift.http.server.HttpServerConfig; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.client.QueryResults; -import io.prestosql.cost.CostCalculator; -import io.prestosql.cost.CostCalculator.EstimatedExchanges; -import io.prestosql.cost.CostCalculatorUsingExchanges; -import io.prestosql.cost.CostCalculatorWithEstimatedExchanges; -import io.prestosql.cost.CostComparator; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.cost.StatsCalculatorModule; -import io.prestosql.cost.TaskCountEstimator; -import io.prestosql.dispatcher.DispatchExecutor; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.dispatcher.DispatchQueryFactory; -import io.prestosql.dispatcher.FailedDispatchQueryFactory; -import io.prestosql.dispatcher.LocalDispatchQueryFactory; -import io.prestosql.dispatcher.QueuedStatementResource; -import io.prestosql.event.QueryMonitor; -import io.prestosql.event.QueryMonitorConfig; -import io.prestosql.execution.ClusterSizeMonitor; -import io.prestosql.execution.ExplainAnalyzeContext; -import io.prestosql.execution.ForQueryExecution; -import io.prestosql.execution.QueryExecution; -import io.prestosql.execution.QueryExecutionMBean; -import io.prestosql.execution.QueryIdGenerator; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryManager; -import io.prestosql.execution.QueryPerformanceFetcher; -import io.prestosql.execution.QueryPreparer; -import io.prestosql.execution.RemoteTaskFactory; -import io.prestosql.execution.SqlQueryManager; -import io.prestosql.execution.TaskInfo; -import io.prestosql.execution.TaskManagerConfig; -import io.prestosql.execution.resourcegroups.InternalResourceGroupManager; -import io.prestosql.execution.resourcegroups.LegacyResourceGroupConfigurationManager; -import io.prestosql.execution.resourcegroups.ResourceGroupManager; -import io.prestosql.execution.scheduler.AllAtOnceExecutionPolicy; -import io.prestosql.execution.scheduler.ExecutionPolicy; -import io.prestosql.execution.scheduler.PhasedExecutionPolicy; -import io.prestosql.execution.scheduler.SplitSchedulerStats; -import io.prestosql.failuredetector.FailureDetectorModule; -import io.prestosql.memory.ClusterMemoryManager; -import io.prestosql.memory.ForMemoryManager; -import io.prestosql.memory.LowMemoryKiller; -import io.prestosql.memory.MemoryManagerConfig; -import io.prestosql.memory.MemoryManagerConfig.LowMemoryKillerPolicy; -import io.prestosql.memory.NoneLowMemoryKiller; -import io.prestosql.memory.TotalReservationLowMemoryKiller; -import io.prestosql.memory.TotalReservationOnBlockedNodesLowMemoryKiller; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.operator.ForScheduler; -import io.prestosql.server.protocol.ExecutingStatementResource; -import io.prestosql.server.remotetask.RemoteTaskStats; -import io.prestosql.server.ui.WebUiModule; -import io.prestosql.server.ui.WorkerResource; -import io.prestosql.spi.memory.ClusterMemoryPoolManager; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.sql.analyzer.QueryExplainer; -import io.prestosql.sql.planner.PlanFragmenter; -import io.prestosql.sql.planner.PlanOptimizers; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.transaction.ForTransactionManager; -import io.prestosql.transaction.InMemoryTransactionManager; -import io.prestosql.transaction.TransactionManager; -import io.prestosql.transaction.TransactionManagerConfig; -import io.prestosql.version.EmbedVersion; +import io.trino.client.QueryResults; +import io.trino.cost.CostCalculator; +import io.trino.cost.CostCalculator.EstimatedExchanges; +import io.trino.cost.CostCalculatorUsingExchanges; +import io.trino.cost.CostCalculatorWithEstimatedExchanges; +import io.trino.cost.CostComparator; +import io.trino.cost.StatsAndCosts; +import io.trino.cost.StatsCalculatorModule; +import io.trino.cost.TaskCountEstimator; +import io.trino.dispatcher.DispatchExecutor; +import io.trino.dispatcher.DispatchManager; +import io.trino.dispatcher.DispatchQueryFactory; +import io.trino.dispatcher.FailedDispatchQueryFactory; +import io.trino.dispatcher.LocalDispatchQueryFactory; +import io.trino.dispatcher.QueuedStatementResource; +import io.trino.event.QueryMonitor; +import io.trino.event.QueryMonitorConfig; +import io.trino.execution.ClusterSizeMonitor; +import io.trino.execution.ExplainAnalyzeContext; +import io.trino.execution.ForQueryExecution; +import io.trino.execution.QueryExecution; +import io.trino.execution.QueryExecutionMBean; +import io.trino.execution.QueryIdGenerator; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryManager; +import io.trino.execution.QueryPerformanceFetcher; +import io.trino.execution.QueryPreparer; +import io.trino.execution.RemoteTaskFactory; +import io.trino.execution.SqlQueryManager; +import io.trino.execution.TaskInfo; +import io.trino.execution.TaskManagerConfig; +import io.trino.execution.resourcegroups.InternalResourceGroupManager; +import io.trino.execution.resourcegroups.LegacyResourceGroupConfigurationManager; +import io.trino.execution.resourcegroups.ResourceGroupManager; +import io.trino.execution.scheduler.AllAtOnceExecutionPolicy; +import io.trino.execution.scheduler.ExecutionPolicy; +import io.trino.execution.scheduler.PhasedExecutionPolicy; +import io.trino.execution.scheduler.SplitSchedulerStats; +import io.trino.failuredetector.FailureDetectorModule; +import io.trino.memory.ClusterMemoryManager; +import io.trino.memory.ForMemoryManager; +import io.trino.memory.LowMemoryKiller; +import io.trino.memory.MemoryManagerConfig; +import io.trino.memory.MemoryManagerConfig.LowMemoryKillerPolicy; +import io.trino.memory.NoneLowMemoryKiller; +import io.trino.memory.TotalReservationLowMemoryKiller; +import io.trino.memory.TotalReservationOnBlockedNodesLowMemoryKiller; +import io.trino.metadata.CatalogManager; +import io.trino.operator.ForScheduler; +import io.trino.server.protocol.ExecutingStatementResource; +import io.trino.server.remotetask.RemoteTaskStats; +import io.trino.server.ui.WebUiModule; +import io.trino.server.ui.WorkerResource; +import io.trino.spi.memory.ClusterMemoryPoolManager; +import io.trino.spi.security.SelectedRole; +import io.trino.sql.analyzer.QueryExplainer; +import io.trino.sql.planner.PlanFragmenter; +import io.trino.sql.planner.PlanOptimizers; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.transaction.ForTransactionManager; +import io.trino.transaction.InMemoryTransactionManager; +import io.trino.transaction.TransactionManager; +import io.trino.transaction.TransactionManagerConfig; +import io.trino.version.EmbedVersion; import javax.annotation.PreDestroy; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/server/DynamicFilterService.java b/core/trino-main/src/main/java/io/trino/server/DynamicFilterService.java index 93aed3b25218..e9e597d0a3f2 100644 --- a/core/trino-main/src/main/java/io/trino/server/DynamicFilterService.java +++ b/core/trino-main/src/main/java/io/trino/server/DynamicFilterService.java @@ -23,32 +23,32 @@ import com.google.common.util.concurrent.SettableFuture; import com.google.inject.Inject; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.DynamicFilterConfig; -import io.prestosql.execution.SqlQueryExecution; -import io.prestosql.execution.StageId; -import io.prestosql.execution.TaskId; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.JoinUtils; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.predicate.DiscreteValues; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Ranges; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.SubPlan; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.optimizations.PlanNodeSearcher; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; +import io.trino.Session; +import io.trino.execution.DynamicFilterConfig; +import io.trino.execution.SqlQueryExecution; +import io.trino.execution.StageId; +import io.trino.execution.TaskId; +import io.trino.metadata.Metadata; +import io.trino.operator.JoinUtils; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.predicate.DiscreteValues; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Ranges; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.DynamicFilters; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.SubPlan; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.optimizations.PlanNodeSearcher; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SemiJoinNode; import javax.annotation.PreDestroy; import javax.annotation.concurrent.ThreadSafe; @@ -79,14 +79,14 @@ import static io.airlift.concurrent.MoreFutures.whenAnyComplete; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.Duration.succinctNanos; -import static io.prestosql.spi.connector.DynamicFilter.EMPTY; -import static io.prestosql.spi.predicate.Domain.union; -import static io.prestosql.sql.DynamicFilters.extractDynamicFilters; -import static io.prestosql.sql.DynamicFilters.extractSourceSymbols; -import static io.prestosql.sql.planner.DomainCoercer.applySaturatedCasts; -import static io.prestosql.sql.planner.ExpressionExtractor.extractExpressions; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; -import static io.prestosql.util.MorePredicates.isInstanceOfAny; +import static io.trino.spi.connector.DynamicFilter.EMPTY; +import static io.trino.spi.predicate.Domain.union; +import static io.trino.sql.DynamicFilters.extractDynamicFilters; +import static io.trino.sql.DynamicFilters.extractSourceSymbols; +import static io.trino.sql.planner.DomainCoercer.applySaturatedCasts; +import static io.trino.sql.planner.ExpressionExtractor.extractExpressions; +import static io.trino.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; +import static io.trino.util.MorePredicates.isInstanceOfAny; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newFixedThreadPool; diff --git a/core/trino-main/src/main/java/io/trino/server/ExchangeExecutionMBean.java b/core/trino-main/src/main/java/io/trino/server/ExchangeExecutionMBean.java index b112c85eac46..b1fa486518a8 100644 --- a/core/trino-main/src/main/java/io/trino/server/ExchangeExecutionMBean.java +++ b/core/trino-main/src/main/java/io/trino/server/ExchangeExecutionMBean.java @@ -14,7 +14,7 @@ package io.trino.server; import io.airlift.concurrent.ThreadPoolExecutorMBean; -import io.prestosql.operator.ForExchange; +import io.trino.operator.ForExchange; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; diff --git a/core/trino-main/src/main/java/io/trino/server/ExpressionSerialization.java b/core/trino-main/src/main/java/io/trino/server/ExpressionSerialization.java index 19bf118e47f2..e2149a34ce3f 100644 --- a/core/trino-main/src/main/java/io/trino/server/ExpressionSerialization.java +++ b/core/trino-main/src/main/java/io/trino/server/ExpressionSerialization.java @@ -19,16 +19,16 @@ import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; -import io.prestosql.sql.ExpressionFormatter; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.Expression; +import io.trino.sql.ExpressionFormatter; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.Expression; import javax.inject.Inject; import java.io.IOException; -import static io.prestosql.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; +import static io.trino.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; public final class ExpressionSerialization { diff --git a/core/trino-main/src/main/java/io/trino/server/GracefulShutdownHandler.java b/core/trino-main/src/main/java/io/trino/server/GracefulShutdownHandler.java index 6878c727dd87..749f20c2c477 100644 --- a/core/trino-main/src/main/java/io/trino/server/GracefulShutdownHandler.java +++ b/core/trino-main/src/main/java/io/trino/server/GracefulShutdownHandler.java @@ -16,8 +16,8 @@ import io.airlift.bootstrap.LifeCycleManager; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.execution.TaskInfo; -import io.prestosql.execution.TaskManager; +import io.trino.execution.TaskInfo; +import io.trino.execution.TaskManager; import javax.annotation.concurrent.GuardedBy; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/server/HttpRemoteTaskFactory.java b/core/trino-main/src/main/java/io/trino/server/HttpRemoteTaskFactory.java index 13de12d21c55..07fdf48ebb0a 100644 --- a/core/trino-main/src/main/java/io/trino/server/HttpRemoteTaskFactory.java +++ b/core/trino-main/src/main/java/io/trino/server/HttpRemoteTaskFactory.java @@ -19,25 +19,25 @@ import io.airlift.http.client.HttpClient; import io.airlift.json.JsonCodec; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; -import io.prestosql.execution.LocationFactory; -import io.prestosql.execution.NodeTaskMap.PartitionedSplitCountTracker; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.execution.RemoteTask; -import io.prestosql.execution.RemoteTaskFactory; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskInfo; -import io.prestosql.execution.TaskManagerConfig; -import io.prestosql.execution.TaskStatus; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; -import io.prestosql.operator.ForScheduler; -import io.prestosql.server.remotetask.HttpRemoteTask; -import io.prestosql.server.remotetask.RemoteTaskStats; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; +import io.trino.execution.LocationFactory; +import io.trino.execution.NodeTaskMap.PartitionedSplitCountTracker; +import io.trino.execution.QueryManagerConfig; +import io.trino.execution.RemoteTask; +import io.trino.execution.RemoteTaskFactory; +import io.trino.execution.TaskId; +import io.trino.execution.TaskInfo; +import io.trino.execution.TaskManagerConfig; +import io.trino.execution.TaskStatus; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; +import io.trino.operator.ForScheduler; +import io.trino.server.remotetask.HttpRemoteTask; +import io.trino.server.remotetask.RemoteTaskStats; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.PlanNodeId; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; diff --git a/core/trino-main/src/main/java/io/trino/server/HttpRequestSessionContext.java b/core/trino-main/src/main/java/io/trino/server/HttpRequestSessionContext.java index ceea8edd3704..47ea503600d5 100644 --- a/core/trino-main/src/main/java/io/trino/server/HttpRequestSessionContext.java +++ b/core/trino-main/src/main/java/io/trino/server/HttpRequestSessionContext.java @@ -19,17 +19,17 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session.ResourceEstimateBuilder; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.spi.session.ResourceEstimates; -import io.prestosql.sql.parser.ParsingException; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.transaction.TransactionId; +import io.trino.Session.ResourceEstimateBuilder; +import io.trino.security.AccessControl; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.security.Identity; +import io.trino.spi.security.SelectedRole; +import io.trino.spi.session.ResourceEstimates; +import io.trino.sql.parser.ParsingException; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.transaction.TransactionId; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.WebApplicationException; @@ -55,24 +55,24 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.net.HttpHeaders.USER_AGENT; -import static io.prestosql.client.PrestoHeaders.PRESTO_CATALOG; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLIENT_CAPABILITIES; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLIENT_INFO; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLIENT_TAGS; -import static io.prestosql.client.PrestoHeaders.PRESTO_EXTRA_CREDENTIAL; -import static io.prestosql.client.PrestoHeaders.PRESTO_LANGUAGE; -import static io.prestosql.client.PrestoHeaders.PRESTO_PATH; -import static io.prestosql.client.PrestoHeaders.PRESTO_PREPARED_STATEMENT; -import static io.prestosql.client.PrestoHeaders.PRESTO_RESOURCE_ESTIMATE; -import static io.prestosql.client.PrestoHeaders.PRESTO_ROLE; -import static io.prestosql.client.PrestoHeaders.PRESTO_SCHEMA; -import static io.prestosql.client.PrestoHeaders.PRESTO_SESSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_SOURCE; -import static io.prestosql.client.PrestoHeaders.PRESTO_TIME_ZONE; -import static io.prestosql.client.PrestoHeaders.PRESTO_TRACE_TOKEN; -import static io.prestosql.client.PrestoHeaders.PRESTO_TRANSACTION_ID; -import static io.prestosql.client.PrestoHeaders.PRESTO_USER; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; +import static io.trino.client.PrestoHeaders.PRESTO_CATALOG; +import static io.trino.client.PrestoHeaders.PRESTO_CLIENT_CAPABILITIES; +import static io.trino.client.PrestoHeaders.PRESTO_CLIENT_INFO; +import static io.trino.client.PrestoHeaders.PRESTO_CLIENT_TAGS; +import static io.trino.client.PrestoHeaders.PRESTO_EXTRA_CREDENTIAL; +import static io.trino.client.PrestoHeaders.PRESTO_LANGUAGE; +import static io.trino.client.PrestoHeaders.PRESTO_PATH; +import static io.trino.client.PrestoHeaders.PRESTO_PREPARED_STATEMENT; +import static io.trino.client.PrestoHeaders.PRESTO_RESOURCE_ESTIMATE; +import static io.trino.client.PrestoHeaders.PRESTO_ROLE; +import static io.trino.client.PrestoHeaders.PRESTO_SCHEMA; +import static io.trino.client.PrestoHeaders.PRESTO_SESSION; +import static io.trino.client.PrestoHeaders.PRESTO_SOURCE; +import static io.trino.client.PrestoHeaders.PRESTO_TIME_ZONE; +import static io.trino.client.PrestoHeaders.PRESTO_TRACE_TOKEN; +import static io.trino.client.PrestoHeaders.PRESTO_TRANSACTION_ID; +import static io.trino.client.PrestoHeaders.PRESTO_USER; +import static io.trino.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/server/InternalAuthenticationManager.java b/core/trino-main/src/main/java/io/trino/server/InternalAuthenticationManager.java index 665df0e889d3..d113dbb8b8d3 100644 --- a/core/trino-main/src/main/java/io/trino/server/InternalAuthenticationManager.java +++ b/core/trino-main/src/main/java/io/trino/server/InternalAuthenticationManager.java @@ -21,8 +21,8 @@ import io.jsonwebtoken.JwtException; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; -import io.prestosql.server.security.InternalPrincipal; -import io.prestosql.spi.security.Identity; +import io.trino.server.security.InternalPrincipal; +import io.trino.spi.security.Identity; import javax.inject.Inject; import javax.ws.rs.container.ContainerRequestContext; @@ -32,7 +32,7 @@ import java.util.Date; import static io.airlift.http.client.Request.Builder.fromRequest; -import static io.prestosql.server.ServletSecurityUtils.setAuthenticatedIdentity; +import static io.trino.server.ServletSecurityUtils.setAuthenticatedIdentity; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.MediaType.TEXT_PLAIN_TYPE; diff --git a/core/trino-main/src/main/java/io/trino/server/NoOpSessionSupplier.java b/core/trino-main/src/main/java/io/trino/server/NoOpSessionSupplier.java index a8345c8cf92a..291c6e0ba3f7 100644 --- a/core/trino-main/src/main/java/io/trino/server/NoOpSessionSupplier.java +++ b/core/trino-main/src/main/java/io/trino/server/NoOpSessionSupplier.java @@ -13,8 +13,8 @@ */ package io.trino.server; -import io.prestosql.Session; -import io.prestosql.spi.QueryId; +import io.trino.Session; +import io.trino.spi.QueryId; /** * Used on workers. diff --git a/core/trino-main/src/main/java/io/trino/server/NodeResource.java b/core/trino-main/src/main/java/io/trino/server/NodeResource.java index 60e7c944db54..7a0807b41626 100644 --- a/core/trino-main/src/main/java/io/trino/server/NodeResource.java +++ b/core/trino-main/src/main/java/io/trino/server/NodeResource.java @@ -14,8 +14,8 @@ package io.trino.server; import com.google.common.collect.Maps; -import io.prestosql.failuredetector.HeartbeatFailureDetector; -import io.prestosql.server.security.ResourceSecurity; +import io.trino.failuredetector.HeartbeatFailureDetector; +import io.trino.server.security.ResourceSecurity; import javax.inject.Inject; import javax.ws.rs.GET; @@ -24,7 +24,7 @@ import java.util.Collection; import static com.google.common.base.Predicates.in; -import static io.prestosql.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; +import static io.trino.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; @Path("/v1/node") public class NodeResource diff --git a/core/trino-main/src/main/java/io/trino/server/NodeStatus.java b/core/trino-main/src/main/java/io/trino/server/NodeStatus.java index 3f19121fa1ea..cce607262301 100644 --- a/core/trino-main/src/main/java/io/trino/server/NodeStatus.java +++ b/core/trino-main/src/main/java/io/trino/server/NodeStatus.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import io.airlift.units.Duration; -import io.prestosql.client.NodeVersion; -import io.prestosql.memory.MemoryInfo; +import io.trino.client.NodeVersion; +import io.trino.memory.MemoryInfo; import static java.util.Objects.requireNonNull; 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 b952ce0edd21..ddd2c4b547d7 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.prestosql.execution.buffer.SerializedPage; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.analyzer.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; @@ -36,10 +36,10 @@ import java.lang.reflect.Type; import java.util.List; -import static io.prestosql.PrestoMediaTypes.PRESTO_PAGES; -import static io.prestosql.execution.buffer.PagesSerdeUtil.NO_CHECKSUM; -import static io.prestosql.execution.buffer.PagesSerdeUtil.calculateChecksum; -import static io.prestosql.execution.buffer.PagesSerdeUtil.writeSerializedPages; +import static io.trino.PrestoMediaTypes.PRESTO_PAGES; +import static io.trino.execution.buffer.PagesSerdeUtil.NO_CHECKSUM; +import static io.trino.execution.buffer.PagesSerdeUtil.calculateChecksum; +import static io.trino.execution.buffer.PagesSerdeUtil.writeSerializedPages; import static java.util.Objects.requireNonNull; @Provider diff --git a/core/trino-main/src/main/java/io/trino/server/PluginDiscovery.java b/core/trino-main/src/main/java/io/trino/server/PluginDiscovery.java index acab58da96e4..4b6f93e8114a 100644 --- a/core/trino-main/src/main/java/io/trino/server/PluginDiscovery.java +++ b/core/trino-main/src/main/java/io/trino/server/PluginDiscovery.java @@ -14,7 +14,7 @@ package io.trino.server; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; +import io.trino.spi.Plugin; import org.objectweb.asm.ClassReader; import org.sonatype.aether.artifact.Artifact; diff --git a/core/trino-main/src/main/java/io/trino/server/PluginManager.java b/core/trino-main/src/main/java/io/trino/server/PluginManager.java index 18a3d90e7db1..547750235ec7 100644 --- a/core/trino-main/src/main/java/io/trino/server/PluginManager.java +++ b/core/trino-main/src/main/java/io/trino/server/PluginManager.java @@ -19,27 +19,27 @@ import io.airlift.node.NodeInfo; import io.airlift.resolver.ArtifactResolver; import io.airlift.resolver.DefaultArtifact; -import io.prestosql.connector.ConnectorManager; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.execution.resourcegroups.ResourceGroupManager; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.security.AccessControlManager; -import io.prestosql.security.GroupProviderManager; -import io.prestosql.server.security.CertificateAuthenticatorManager; -import io.prestosql.server.security.PasswordAuthenticatorManager; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.block.BlockEncoding; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.eventlistener.EventListenerFactory; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; -import io.prestosql.spi.security.CertificateAuthenticatorFactory; -import io.prestosql.spi.security.GroupProviderFactory; -import io.prestosql.spi.security.PasswordAuthenticatorFactory; -import io.prestosql.spi.security.SystemAccessControlFactory; -import io.prestosql.spi.session.SessionPropertyConfigurationManagerFactory; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.Type; +import io.trino.connector.ConnectorManager; +import io.trino.eventlistener.EventListenerManager; +import io.trino.execution.resourcegroups.ResourceGroupManager; +import io.trino.metadata.MetadataManager; +import io.trino.security.AccessControlManager; +import io.trino.security.GroupProviderManager; +import io.trino.server.security.CertificateAuthenticatorManager; +import io.trino.server.security.PasswordAuthenticatorManager; +import io.trino.spi.Plugin; +import io.trino.spi.block.BlockEncoding; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.eventlistener.EventListenerFactory; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; +import io.trino.spi.security.CertificateAuthenticatorFactory; +import io.trino.spi.security.GroupProviderFactory; +import io.trino.spi.security.PasswordAuthenticatorFactory; +import io.trino.spi.security.SystemAccessControlFactory; +import io.trino.spi.session.SessionPropertyConfigurationManagerFactory; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.Type; import org.sonatype.aether.artifact.Artifact; import javax.annotation.concurrent.ThreadSafe; @@ -57,9 +57,9 @@ import java.util.function.Supplier; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.metadata.FunctionExtractor.extractFunctions; -import static io.prestosql.server.PluginDiscovery.discoverPlugins; -import static io.prestosql.server.PluginDiscovery.writePluginServices; +import static io.trino.metadata.FunctionExtractor.extractFunctions; +import static io.trino.server.PluginDiscovery.discoverPlugins; +import static io.trino.server.PluginDiscovery.writePluginServices; import static java.util.Objects.requireNonNull; @ThreadSafe diff --git a/core/trino-main/src/main/java/io/trino/server/QueryExecutionFactoryModule.java b/core/trino-main/src/main/java/io/trino/server/QueryExecutionFactoryModule.java index 66dc14a2bf81..ffffffda74e8 100644 --- a/core/trino-main/src/main/java/io/trino/server/QueryExecutionFactoryModule.java +++ b/core/trino-main/src/main/java/io/trino/server/QueryExecutionFactoryModule.java @@ -18,88 +18,88 @@ import com.google.inject.Scopes; import com.google.inject.TypeLiteral; import com.google.inject.multibindings.MapBinder; -import io.prestosql.execution.AddColumnTask; -import io.prestosql.execution.CallTask; -import io.prestosql.execution.CommentTask; -import io.prestosql.execution.CommitTask; -import io.prestosql.execution.CreateMaterializedViewTask; -import io.prestosql.execution.CreateRoleTask; -import io.prestosql.execution.CreateSchemaTask; -import io.prestosql.execution.CreateTableTask; -import io.prestosql.execution.CreateViewTask; -import io.prestosql.execution.DataDefinitionExecution.DataDefinitionExecutionFactory; -import io.prestosql.execution.DataDefinitionTask; -import io.prestosql.execution.DeallocateTask; -import io.prestosql.execution.DropColumnTask; -import io.prestosql.execution.DropMaterializedViewTask; -import io.prestosql.execution.DropRoleTask; -import io.prestosql.execution.DropSchemaTask; -import io.prestosql.execution.DropTableTask; -import io.prestosql.execution.DropViewTask; -import io.prestosql.execution.GrantRolesTask; -import io.prestosql.execution.GrantTask; -import io.prestosql.execution.PrepareTask; -import io.prestosql.execution.QueryExecution.QueryExecutionFactory; -import io.prestosql.execution.RenameColumnTask; -import io.prestosql.execution.RenameSchemaTask; -import io.prestosql.execution.RenameTableTask; -import io.prestosql.execution.RenameViewTask; -import io.prestosql.execution.ResetSessionTask; -import io.prestosql.execution.RevokeRolesTask; -import io.prestosql.execution.RevokeTask; -import io.prestosql.execution.RollbackTask; -import io.prestosql.execution.SetPathTask; -import io.prestosql.execution.SetRoleTask; -import io.prestosql.execution.SetSchemaAuthorizationTask; -import io.prestosql.execution.SetSessionTask; -import io.prestosql.execution.SetTableAuthorizationTask; -import io.prestosql.execution.SetViewAuthorizationTask; -import io.prestosql.execution.SqlQueryExecution.SqlQueryExecutionFactory; -import io.prestosql.execution.StartTransactionTask; -import io.prestosql.execution.UseTask; -import io.prestosql.spi.resourcegroups.QueryType; -import io.prestosql.sql.tree.AddColumn; -import io.prestosql.sql.tree.Call; -import io.prestosql.sql.tree.Comment; -import io.prestosql.sql.tree.Commit; -import io.prestosql.sql.tree.CreateMaterializedView; -import io.prestosql.sql.tree.CreateRole; -import io.prestosql.sql.tree.CreateSchema; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.CreateView; -import io.prestosql.sql.tree.Deallocate; -import io.prestosql.sql.tree.DropColumn; -import io.prestosql.sql.tree.DropMaterializedView; -import io.prestosql.sql.tree.DropRole; -import io.prestosql.sql.tree.DropSchema; -import io.prestosql.sql.tree.DropTable; -import io.prestosql.sql.tree.DropView; -import io.prestosql.sql.tree.Grant; -import io.prestosql.sql.tree.GrantRoles; -import io.prestosql.sql.tree.Prepare; -import io.prestosql.sql.tree.RenameColumn; -import io.prestosql.sql.tree.RenameSchema; -import io.prestosql.sql.tree.RenameTable; -import io.prestosql.sql.tree.RenameView; -import io.prestosql.sql.tree.ResetSession; -import io.prestosql.sql.tree.Revoke; -import io.prestosql.sql.tree.RevokeRoles; -import io.prestosql.sql.tree.Rollback; -import io.prestosql.sql.tree.SetPath; -import io.prestosql.sql.tree.SetRole; -import io.prestosql.sql.tree.SetSchemaAuthorization; -import io.prestosql.sql.tree.SetSession; -import io.prestosql.sql.tree.SetTableAuthorization; -import io.prestosql.sql.tree.SetViewAuthorization; -import io.prestosql.sql.tree.StartTransaction; -import io.prestosql.sql.tree.Statement; -import io.prestosql.sql.tree.Use; +import io.trino.execution.AddColumnTask; +import io.trino.execution.CallTask; +import io.trino.execution.CommentTask; +import io.trino.execution.CommitTask; +import io.trino.execution.CreateMaterializedViewTask; +import io.trino.execution.CreateRoleTask; +import io.trino.execution.CreateSchemaTask; +import io.trino.execution.CreateTableTask; +import io.trino.execution.CreateViewTask; +import io.trino.execution.DataDefinitionExecution.DataDefinitionExecutionFactory; +import io.trino.execution.DataDefinitionTask; +import io.trino.execution.DeallocateTask; +import io.trino.execution.DropColumnTask; +import io.trino.execution.DropMaterializedViewTask; +import io.trino.execution.DropRoleTask; +import io.trino.execution.DropSchemaTask; +import io.trino.execution.DropTableTask; +import io.trino.execution.DropViewTask; +import io.trino.execution.GrantRolesTask; +import io.trino.execution.GrantTask; +import io.trino.execution.PrepareTask; +import io.trino.execution.QueryExecution.QueryExecutionFactory; +import io.trino.execution.RenameColumnTask; +import io.trino.execution.RenameSchemaTask; +import io.trino.execution.RenameTableTask; +import io.trino.execution.RenameViewTask; +import io.trino.execution.ResetSessionTask; +import io.trino.execution.RevokeRolesTask; +import io.trino.execution.RevokeTask; +import io.trino.execution.RollbackTask; +import io.trino.execution.SetPathTask; +import io.trino.execution.SetRoleTask; +import io.trino.execution.SetSchemaAuthorizationTask; +import io.trino.execution.SetSessionTask; +import io.trino.execution.SetTableAuthorizationTask; +import io.trino.execution.SetViewAuthorizationTask; +import io.trino.execution.SqlQueryExecution.SqlQueryExecutionFactory; +import io.trino.execution.StartTransactionTask; +import io.trino.execution.UseTask; +import io.trino.spi.resourcegroups.QueryType; +import io.trino.sql.tree.AddColumn; +import io.trino.sql.tree.Call; +import io.trino.sql.tree.Comment; +import io.trino.sql.tree.Commit; +import io.trino.sql.tree.CreateMaterializedView; +import io.trino.sql.tree.CreateRole; +import io.trino.sql.tree.CreateSchema; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.CreateView; +import io.trino.sql.tree.Deallocate; +import io.trino.sql.tree.DropColumn; +import io.trino.sql.tree.DropMaterializedView; +import io.trino.sql.tree.DropRole; +import io.trino.sql.tree.DropSchema; +import io.trino.sql.tree.DropTable; +import io.trino.sql.tree.DropView; +import io.trino.sql.tree.Grant; +import io.trino.sql.tree.GrantRoles; +import io.trino.sql.tree.Prepare; +import io.trino.sql.tree.RenameColumn; +import io.trino.sql.tree.RenameSchema; +import io.trino.sql.tree.RenameTable; +import io.trino.sql.tree.RenameView; +import io.trino.sql.tree.ResetSession; +import io.trino.sql.tree.Revoke; +import io.trino.sql.tree.RevokeRoles; +import io.trino.sql.tree.Rollback; +import io.trino.sql.tree.SetPath; +import io.trino.sql.tree.SetRole; +import io.trino.sql.tree.SetSchemaAuthorization; +import io.trino.sql.tree.SetSession; +import io.trino.sql.tree.SetTableAuthorization; +import io.trino.sql.tree.SetViewAuthorization; +import io.trino.sql.tree.StartTransaction; +import io.trino.sql.tree.Statement; +import io.trino.sql.tree.Use; import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; import static com.google.inject.multibindings.MapBinder.newMapBinder; -import static io.prestosql.util.StatementUtils.getAllQueryTypes; +import static io.trino.util.StatementUtils.getAllQueryTypes; public class QueryExecutionFactoryModule implements Module diff --git a/core/trino-main/src/main/java/io/trino/server/QueryResource.java b/core/trino-main/src/main/java/io/trino/server/QueryResource.java index 3e785889f613..fac47608f03e 100644 --- a/core/trino-main/src/main/java/io/trino/server/QueryResource.java +++ b/core/trino-main/src/main/java/io/trino/server/QueryResource.java @@ -14,15 +14,15 @@ package io.trino.server; import com.google.common.collect.ImmutableList; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryState; -import io.prestosql.security.AccessControl; -import io.prestosql.server.security.ResourceSecurity; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.GroupProvider; +import io.trino.dispatcher.DispatchManager; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryState; +import io.trino.security.AccessControl; +import io.trino.server.security.ResourceSecurity; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.GroupProvider; import javax.inject.Inject; import javax.servlet.http.HttpServletRequest; @@ -43,13 +43,13 @@ import java.util.NoSuchElementException; import java.util.Optional; -import static io.prestosql.connector.system.KillQueryProcedure.createKillQueryException; -import static io.prestosql.connector.system.KillQueryProcedure.createPreemptQueryException; -import static io.prestosql.security.AccessControlUtil.checkCanKillQueryOwnedBy; -import static io.prestosql.security.AccessControlUtil.checkCanViewQueryOwnedBy; -import static io.prestosql.security.AccessControlUtil.filterQueries; -import static io.prestosql.server.HttpRequestSessionContext.extractAuthorizedIdentity; -import static io.prestosql.server.security.ResourceSecurity.AccessType.AUTHENTICATED_USER; +import static io.trino.connector.system.KillQueryProcedure.createKillQueryException; +import static io.trino.connector.system.KillQueryProcedure.createPreemptQueryException; +import static io.trino.security.AccessControlUtil.checkCanKillQueryOwnedBy; +import static io.trino.security.AccessControlUtil.checkCanViewQueryOwnedBy; +import static io.trino.security.AccessControlUtil.filterQueries; +import static io.trino.server.HttpRequestSessionContext.extractAuthorizedIdentity; +import static io.trino.server.security.ResourceSecurity.AccessType.AUTHENTICATED_USER; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/server/QuerySessionSupplier.java b/core/trino-main/src/main/java/io/trino/server/QuerySessionSupplier.java index 513369b6e7b3..866086ade52c 100644 --- a/core/trino-main/src/main/java/io/trino/server/QuerySessionSupplier.java +++ b/core/trino-main/src/main/java/io/trino/server/QuerySessionSupplier.java @@ -13,15 +13,15 @@ */ package io.trino.server; -import io.prestosql.Session; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.sql.SqlEnvironmentConfig; -import io.prestosql.sql.SqlPath; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.metadata.SessionPropertyManager; +import io.trino.security.AccessControl; +import io.trino.spi.QueryId; +import io.trino.spi.security.Identity; +import io.trino.spi.type.TimeZoneKey; +import io.trino.sql.SqlEnvironmentConfig; +import io.trino.sql.SqlPath; +import io.trino.transaction.TransactionManager; import javax.annotation.concurrent.ThreadSafe; import javax.inject.Inject; @@ -31,8 +31,8 @@ import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.Session.SessionBuilder; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.Session.SessionBuilder; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; import static java.util.Map.Entry; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/server/QueryStateInfo.java b/core/trino-main/src/main/java/io/trino/server/QueryStateInfo.java index 4a1bc710ea52..19064a3f392c 100644 --- a/core/trino-main/src/main/java/io/trino/server/QueryStateInfo.java +++ b/core/trino-main/src/main/java/io/trino/server/QueryStateInfo.java @@ -16,16 +16,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.execution.QueryState; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.resourcegroups.ResourceGroupId; +import io.trino.execution.QueryState; +import io.trino.spi.QueryId; +import io.trino.spi.resourcegroups.ResourceGroupId; import org.joda.time.DateTime; import java.util.List; import java.util.Optional; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.server.QueryProgressStats.createQueryProgressStats; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.server.QueryProgressStats.createQueryProgressStats; import static java.util.Objects.requireNonNull; public class QueryStateInfo diff --git a/core/trino-main/src/main/java/io/trino/server/QueryStateInfoResource.java b/core/trino-main/src/main/java/io/trino/server/QueryStateInfoResource.java index 9e687a28fd11..a97ed781acbb 100644 --- a/core/trino-main/src/main/java/io/trino/server/QueryStateInfoResource.java +++ b/core/trino-main/src/main/java/io/trino/server/QueryStateInfoResource.java @@ -13,14 +13,14 @@ */ package io.trino.server; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.execution.resourcegroups.ResourceGroupManager; -import io.prestosql.security.AccessControl; -import io.prestosql.server.security.ResourceSecurity; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.GroupProvider; +import io.trino.dispatcher.DispatchManager; +import io.trino.execution.resourcegroups.ResourceGroupManager; +import io.trino.security.AccessControl; +import io.trino.server.security.ResourceSecurity; +import io.trino.spi.QueryId; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.GroupProvider; import javax.inject.Inject; import javax.servlet.http.HttpServletRequest; @@ -42,13 +42,13 @@ import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.security.AccessControlUtil.checkCanViewQueryOwnedBy; -import static io.prestosql.security.AccessControlUtil.filterQueries; -import static io.prestosql.server.HttpRequestSessionContext.extractAuthorizedIdentity; -import static io.prestosql.server.QueryStateInfo.createQueryStateInfo; -import static io.prestosql.server.QueryStateInfo.createQueuedQueryStateInfo; -import static io.prestosql.server.security.ResourceSecurity.AccessType.AUTHENTICATED_USER; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.security.AccessControlUtil.checkCanViewQueryOwnedBy; +import static io.trino.security.AccessControlUtil.filterQueries; +import static io.trino.server.HttpRequestSessionContext.extractAuthorizedIdentity; +import static io.trino.server.QueryStateInfo.createQueryStateInfo; +import static io.trino.server.QueryStateInfo.createQueuedQueryStateInfo; +import static io.trino.server.security.ResourceSecurity.AccessType.AUTHENTICATED_USER; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.Response.Status.NOT_FOUND; diff --git a/core/trino-main/src/main/java/io/trino/server/RangeJsonSerde.java b/core/trino-main/src/main/java/io/trino/server/RangeJsonSerde.java index 68675c81cb6b..86011eee00c1 100644 --- a/core/trino-main/src/main/java/io/trino/server/RangeJsonSerde.java +++ b/core/trino-main/src/main/java/io/trino/server/RangeJsonSerde.java @@ -19,15 +19,15 @@ import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.predicate.Marker; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.predicate.Marker; +import io.trino.spi.predicate.Range; +import io.trino.spi.type.Type; import java.io.IOException; import java.util.Optional; -import static io.prestosql.spi.predicate.Marker.Bound.EXACTLY; +import static io.trino.spi.predicate.Marker.Bound.EXACTLY; public class RangeJsonSerde { diff --git a/core/trino-main/src/main/java/io/trino/server/ResourceGroupInfo.java b/core/trino-main/src/main/java/io/trino/server/ResourceGroupInfo.java index 1a8e1716bf68..8c4d6971f462 100644 --- a/core/trino-main/src/main/java/io/trino/server/ResourceGroupInfo.java +++ b/core/trino-main/src/main/java/io/trino/server/ResourceGroupInfo.java @@ -17,9 +17,9 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.ResourceGroupState; -import io.prestosql.spi.resourcegroups.SchedulingPolicy; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.ResourceGroupState; +import io.trino.spi.resourcegroups.SchedulingPolicy; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/server/ResourceGroupStateInfoResource.java b/core/trino-main/src/main/java/io/trino/server/ResourceGroupStateInfoResource.java index a481c26add4b..7e32f02c46df 100644 --- a/core/trino-main/src/main/java/io/trino/server/ResourceGroupStateInfoResource.java +++ b/core/trino-main/src/main/java/io/trino/server/ResourceGroupStateInfoResource.java @@ -13,9 +13,9 @@ */ package io.trino.server; -import io.prestosql.execution.resourcegroups.ResourceGroupManager; -import io.prestosql.server.security.ResourceSecurity; -import io.prestosql.spi.resourcegroups.ResourceGroupId; +import io.trino.execution.resourcegroups.ResourceGroupManager; +import io.trino.server.security.ResourceSecurity; +import io.trino.spi.resourcegroups.ResourceGroupId; import javax.inject.Inject; import javax.ws.rs.Encoded; @@ -32,7 +32,7 @@ import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; +import static io.trino.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.Response.Status.BAD_REQUEST; import static javax.ws.rs.core.Response.Status.NOT_FOUND; diff --git a/core/trino-main/src/main/java/io/trino/server/Server.java b/core/trino-main/src/main/java/io/trino/server/Server.java index 74d959461ebc..4056e6a3a55c 100644 --- a/core/trino-main/src/main/java/io/trino/server/Server.java +++ b/core/trino-main/src/main/java/io/trino/server/Server.java @@ -34,21 +34,21 @@ import io.airlift.log.Logger; import io.airlift.node.NodeModule; import io.airlift.tracetoken.TraceTokenModule; -import io.prestosql.client.NodeVersion; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.eventlistener.EventListenerModule; -import io.prestosql.execution.resourcegroups.ResourceGroupManager; -import io.prestosql.execution.warnings.WarningCollectorModule; -import io.prestosql.metadata.Catalog; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.StaticCatalogStore; -import io.prestosql.security.AccessControlManager; -import io.prestosql.security.AccessControlModule; -import io.prestosql.security.GroupProviderManager; -import io.prestosql.server.security.CertificateAuthenticatorManager; -import io.prestosql.server.security.PasswordAuthenticatorManager; -import io.prestosql.server.security.ServerSecurityModule; -import io.prestosql.version.EmbedVersion; +import io.trino.client.NodeVersion; +import io.trino.eventlistener.EventListenerManager; +import io.trino.eventlistener.EventListenerModule; +import io.trino.execution.resourcegroups.ResourceGroupManager; +import io.trino.execution.warnings.WarningCollectorModule; +import io.trino.metadata.Catalog; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.StaticCatalogStore; +import io.trino.security.AccessControlManager; +import io.trino.security.AccessControlModule; +import io.trino.security.GroupProviderManager; +import io.trino.server.security.CertificateAuthenticatorManager; +import io.trino.server.security.PasswordAuthenticatorManager; +import io.trino.server.security.ServerSecurityModule; +import io.trino.version.EmbedVersion; import org.weakref.jmx.guice.MBeanModule; import java.io.IOException; @@ -61,8 +61,8 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static io.airlift.discovery.client.ServiceAnnouncement.ServiceAnnouncementBuilder; import static io.airlift.discovery.client.ServiceAnnouncement.serviceAnnouncement; -import static io.prestosql.server.PrestoSystemRequirements.verifyJvmRequirements; -import static io.prestosql.server.PrestoSystemRequirements.verifySystemTimeIsReasonable; +import static io.trino.server.PrestoSystemRequirements.verifyJvmRequirements; +import static io.trino.server.PrestoSystemRequirements.verifySystemTimeIsReasonable; import static java.lang.String.format; import static java.nio.file.LinkOption.NOFOLLOW_LINKS; diff --git a/core/trino-main/src/main/java/io/trino/server/ServerInfoResource.java b/core/trino-main/src/main/java/io/trino/server/ServerInfoResource.java index 360adf0d6ab9..ccad2957a14a 100644 --- a/core/trino-main/src/main/java/io/trino/server/ServerInfoResource.java +++ b/core/trino-main/src/main/java/io/trino/server/ServerInfoResource.java @@ -14,10 +14,10 @@ package io.trino.server; import io.airlift.node.NodeInfo; -import io.prestosql.client.NodeVersion; -import io.prestosql.client.ServerInfo; -import io.prestosql.metadata.NodeState; -import io.prestosql.server.security.ResourceSecurity; +import io.trino.client.NodeVersion; +import io.trino.client.ServerInfo; +import io.trino.metadata.NodeState; +import io.trino.server.security.ResourceSecurity; import javax.inject.Inject; import javax.ws.rs.Consumes; @@ -34,10 +34,10 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.metadata.NodeState.ACTIVE; -import static io.prestosql.metadata.NodeState.SHUTTING_DOWN; -import static io.prestosql.server.security.ResourceSecurity.AccessType.MANAGEMENT_WRITE; -import static io.prestosql.server.security.ResourceSecurity.AccessType.PUBLIC; +import static io.trino.metadata.NodeState.ACTIVE; +import static io.trino.metadata.NodeState.SHUTTING_DOWN; +import static io.trino.server.security.ResourceSecurity.AccessType.MANAGEMENT_WRITE; +import static io.trino.server.security.ResourceSecurity.AccessType.PUBLIC; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.MediaType.APPLICATION_JSON; 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 1f9e1e61d1db..4c2a9f89dcba 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 @@ -28,116 +28,116 @@ import io.airlift.stats.PauseMeter; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.GroupByHashPageIndexerFactory; -import io.prestosql.PagesIndexPageSorter; -import io.prestosql.SystemSessionProperties; -import io.prestosql.block.BlockJsonSerde; -import io.prestosql.client.NodeVersion; -import io.prestosql.client.ServerInfo; -import io.prestosql.connector.ConnectorManager; -import io.prestosql.connector.system.SystemConnectorModule; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.event.SplitMonitor; -import io.prestosql.execution.DynamicFilterConfig; -import io.prestosql.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; -import io.prestosql.execution.ExecutionFailureInfo; -import io.prestosql.execution.ExplainAnalyzeContext; -import io.prestosql.execution.LocationFactory; -import io.prestosql.execution.MemoryRevokingScheduler; -import io.prestosql.execution.NodeTaskMap; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.execution.SqlTaskManager; -import io.prestosql.execution.StageInfo; -import io.prestosql.execution.TaskInfo; -import io.prestosql.execution.TaskManagementExecutor; -import io.prestosql.execution.TaskManager; -import io.prestosql.execution.TaskManagerConfig; -import io.prestosql.execution.TaskStatus; -import io.prestosql.execution.executor.MultilevelSplitQueue; -import io.prestosql.execution.executor.TaskExecutor; -import io.prestosql.execution.scheduler.NodeScheduler; -import io.prestosql.execution.scheduler.NodeSchedulerConfig; -import io.prestosql.execution.scheduler.TopologyAwareNodeSelectorModule; -import io.prestosql.execution.scheduler.UniformNodeSelectorModule; -import io.prestosql.index.IndexManager; -import io.prestosql.memory.LocalMemoryManager; -import io.prestosql.memory.LocalMemoryManagerExporter; -import io.prestosql.memory.MemoryInfo; -import io.prestosql.memory.MemoryManagerConfig; -import io.prestosql.memory.MemoryPoolAssignmentsRequest; -import io.prestosql.memory.MemoryResource; -import io.prestosql.memory.NodeMemoryConfig; -import io.prestosql.metadata.AnalyzePropertyManager; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.ColumnPropertyManager; -import io.prestosql.metadata.DiscoveryNodeManager; -import io.prestosql.metadata.ForNodeManager; -import io.prestosql.metadata.HandleJsonModule; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.metadata.SchemaPropertyManager; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.metadata.StaticCatalogStore; -import io.prestosql.metadata.StaticCatalogStoreConfig; -import io.prestosql.metadata.TablePropertyManager; -import io.prestosql.operator.ExchangeClientConfig; -import io.prestosql.operator.ExchangeClientFactory; -import io.prestosql.operator.ExchangeClientSupplier; -import io.prestosql.operator.ForExchange; -import io.prestosql.operator.LookupJoinOperators; -import io.prestosql.operator.OperatorStats; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.index.IndexJoinLookupStats; -import io.prestosql.server.ExpressionSerialization.ExpressionDeserializer; -import io.prestosql.server.ExpressionSerialization.ExpressionSerializer; -import io.prestosql.server.SliceSerialization.SliceDeserializer; -import io.prestosql.server.SliceSerialization.SliceSerializer; -import io.prestosql.server.remotetask.HttpLocationFactory; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spiller.FileSingleStreamSpillerFactory; -import io.prestosql.spiller.GenericPartitioningSpillerFactory; -import io.prestosql.spiller.GenericSpillerFactory; -import io.prestosql.spiller.LocalSpillManager; -import io.prestosql.spiller.NodeSpillConfig; -import io.prestosql.spiller.PartitioningSpillerFactory; -import io.prestosql.spiller.SingleStreamSpillerFactory; -import io.prestosql.spiller.SpillerFactory; -import io.prestosql.spiller.SpillerStats; -import io.prestosql.split.PageSinkManager; -import io.prestosql.split.PageSinkProvider; -import io.prestosql.split.PageSourceManager; -import io.prestosql.split.PageSourceProvider; -import io.prestosql.split.SplitManager; -import io.prestosql.sql.SqlEnvironmentConfig; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.CompilerConfig; -import io.prestosql.sql.planner.LocalExecutionPlanner; -import io.prestosql.sql.planner.NodePartitioningManager; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TransactionManagerConfig; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.TypeDeserializer; -import io.prestosql.type.TypeOperatorsCache; -import io.prestosql.type.TypeSignatureDeserializer; -import io.prestosql.type.TypeSignatureKeyDeserializer; -import io.prestosql.util.FinalizerService; -import io.prestosql.version.EmbedVersion; +import io.trino.GroupByHashPageIndexerFactory; +import io.trino.PagesIndexPageSorter; +import io.trino.SystemSessionProperties; +import io.trino.block.BlockJsonSerde; +import io.trino.client.NodeVersion; +import io.trino.client.ServerInfo; +import io.trino.connector.ConnectorManager; +import io.trino.connector.system.SystemConnectorModule; +import io.trino.dispatcher.DispatchManager; +import io.trino.event.SplitMonitor; +import io.trino.execution.DynamicFilterConfig; +import io.trino.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; +import io.trino.execution.ExecutionFailureInfo; +import io.trino.execution.ExplainAnalyzeContext; +import io.trino.execution.LocationFactory; +import io.trino.execution.MemoryRevokingScheduler; +import io.trino.execution.NodeTaskMap; +import io.trino.execution.QueryManagerConfig; +import io.trino.execution.SqlTaskManager; +import io.trino.execution.StageInfo; +import io.trino.execution.TaskInfo; +import io.trino.execution.TaskManagementExecutor; +import io.trino.execution.TaskManager; +import io.trino.execution.TaskManagerConfig; +import io.trino.execution.TaskStatus; +import io.trino.execution.executor.MultilevelSplitQueue; +import io.trino.execution.executor.TaskExecutor; +import io.trino.execution.scheduler.NodeScheduler; +import io.trino.execution.scheduler.NodeSchedulerConfig; +import io.trino.execution.scheduler.TopologyAwareNodeSelectorModule; +import io.trino.execution.scheduler.UniformNodeSelectorModule; +import io.trino.index.IndexManager; +import io.trino.memory.LocalMemoryManager; +import io.trino.memory.LocalMemoryManagerExporter; +import io.trino.memory.MemoryInfo; +import io.trino.memory.MemoryManagerConfig; +import io.trino.memory.MemoryPoolAssignmentsRequest; +import io.trino.memory.MemoryResource; +import io.trino.memory.NodeMemoryConfig; +import io.trino.metadata.AnalyzePropertyManager; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.ColumnPropertyManager; +import io.trino.metadata.DiscoveryNodeManager; +import io.trino.metadata.ForNodeManager; +import io.trino.metadata.HandleJsonModule; +import io.trino.metadata.InternalNodeManager; +import io.trino.metadata.Metadata; +import io.trino.metadata.MetadataManager; +import io.trino.metadata.SchemaPropertyManager; +import io.trino.metadata.SessionPropertyManager; +import io.trino.metadata.StaticCatalogStore; +import io.trino.metadata.StaticCatalogStoreConfig; +import io.trino.metadata.TablePropertyManager; +import io.trino.operator.ExchangeClientConfig; +import io.trino.operator.ExchangeClientFactory; +import io.trino.operator.ExchangeClientSupplier; +import io.trino.operator.ForExchange; +import io.trino.operator.LookupJoinOperators; +import io.trino.operator.OperatorStats; +import io.trino.operator.PagesIndex; +import io.trino.operator.index.IndexJoinLookupStats; +import io.trino.server.ExpressionSerialization.ExpressionDeserializer; +import io.trino.server.ExpressionSerialization.ExpressionSerializer; +import io.trino.server.SliceSerialization.SliceDeserializer; +import io.trino.server.SliceSerialization.SliceSerializer; +import io.trino.server.remotetask.HttpLocationFactory; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.PageSorter; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.predicate.Range; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; +import io.trino.spiller.FileSingleStreamSpillerFactory; +import io.trino.spiller.GenericPartitioningSpillerFactory; +import io.trino.spiller.GenericSpillerFactory; +import io.trino.spiller.LocalSpillManager; +import io.trino.spiller.NodeSpillConfig; +import io.trino.spiller.PartitioningSpillerFactory; +import io.trino.spiller.SingleStreamSpillerFactory; +import io.trino.spiller.SpillerFactory; +import io.trino.spiller.SpillerStats; +import io.trino.split.PageSinkManager; +import io.trino.split.PageSinkProvider; +import io.trino.split.PageSourceManager; +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; +import io.trino.sql.gen.OrderingCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.CompilerConfig; +import io.trino.sql.planner.LocalExecutionPlanner; +import io.trino.sql.planner.NodePartitioningManager; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TransactionManagerConfig; +import io.trino.type.BlockTypeOperators; +import io.trino.type.TypeDeserializer; +import io.trino.type.TypeOperatorsCache; +import io.trino.type.TypeSignatureDeserializer; +import io.trino.type.TypeSignatureKeyDeserializer; +import io.trino.util.FinalizerService; +import io.trino.version.EmbedVersion; import javax.annotation.PreDestroy; import javax.inject.Inject; @@ -158,8 +158,8 @@ import static io.airlift.json.JsonBinder.jsonBinder; import static io.airlift.json.JsonCodecBinder.jsonCodecBinder; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.execution.scheduler.NodeSchedulerConfig.NodeSchedulerPolicy.TOPOLOGY; -import static io.prestosql.execution.scheduler.NodeSchedulerConfig.NodeSchedulerPolicy.UNIFORM; +import static io.trino.execution.scheduler.NodeSchedulerConfig.NodeSchedulerPolicy.TOPOLOGY; +import static io.trino.execution.scheduler.NodeSchedulerConfig.NodeSchedulerPolicy.UNIFORM; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/main/java/io/trino/server/ServletSecurityUtils.java b/core/trino-main/src/main/java/io/trino/server/ServletSecurityUtils.java index fb9d3fe7f482..b5f734611ed4 100644 --- a/core/trino-main/src/main/java/io/trino/server/ServletSecurityUtils.java +++ b/core/trino-main/src/main/java/io/trino/server/ServletSecurityUtils.java @@ -13,8 +13,8 @@ */ package io.trino.server; -import io.prestosql.spi.security.BasicPrincipal; -import io.prestosql.spi.security.Identity; +import io.trino.spi.security.BasicPrincipal; +import io.trino.spi.security.Identity; import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.core.Response; @@ -26,7 +26,7 @@ import java.util.Collection; import static com.google.common.net.MediaType.PLAIN_TEXT_UTF_8; -import static io.prestosql.server.HttpRequestSessionContext.AUTHENTICATED_IDENTITY; +import static io.trino.server.HttpRequestSessionContext.AUTHENTICATED_IDENTITY; import static javax.ws.rs.core.HttpHeaders.WWW_AUTHENTICATE; import static javax.ws.rs.core.Response.Status.UNAUTHORIZED; diff --git a/core/trino-main/src/main/java/io/trino/server/SessionContext.java b/core/trino-main/src/main/java/io/trino/server/SessionContext.java index e5511c9453e6..94b014803882 100644 --- a/core/trino-main/src/main/java/io/trino/server/SessionContext.java +++ b/core/trino-main/src/main/java/io/trino/server/SessionContext.java @@ -13,9 +13,9 @@ */ package io.trino.server; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.session.ResourceEstimates; -import io.prestosql.transaction.TransactionId; +import io.trino.spi.security.Identity; +import io.trino.spi.session.ResourceEstimates; +import io.trino.transaction.TransactionId; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/server/SessionPropertyConfigurationManagerContextInstance.java b/core/trino-main/src/main/java/io/trino/server/SessionPropertyConfigurationManagerContextInstance.java index 1ba19bb088a9..3c23aeaf0f4b 100644 --- a/core/trino-main/src/main/java/io/trino/server/SessionPropertyConfigurationManagerContextInstance.java +++ b/core/trino-main/src/main/java/io/trino/server/SessionPropertyConfigurationManagerContextInstance.java @@ -13,7 +13,7 @@ */ package io.trino.server; -import io.prestosql.spi.resourcegroups.SessionPropertyConfigurationManagerContext; +import io.trino.spi.resourcegroups.SessionPropertyConfigurationManagerContext; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/server/SessionPropertyDefaults.java b/core/trino-main/src/main/java/io/trino/server/SessionPropertyDefaults.java index 2222d1f9a391..a8ed13926601 100644 --- a/core/trino-main/src/main/java/io/trino/server/SessionPropertyDefaults.java +++ b/core/trino-main/src/main/java/io/trino/server/SessionPropertyDefaults.java @@ -16,12 +16,12 @@ import com.google.common.annotations.VisibleForTesting; import io.airlift.log.Logger; import io.airlift.node.NodeInfo; -import io.prestosql.Session; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SessionPropertyConfigurationManagerContext; -import io.prestosql.spi.session.SessionConfigurationContext; -import io.prestosql.spi.session.SessionPropertyConfigurationManager; -import io.prestosql.spi.session.SessionPropertyConfigurationManagerFactory; +import io.trino.Session; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SessionPropertyConfigurationManagerContext; +import io.trino.spi.session.SessionConfigurationContext; +import io.trino.spi.session.SessionPropertyConfigurationManager; +import io.trino.spi.session.SessionPropertyConfigurationManagerFactory; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/server/SessionSupplier.java b/core/trino-main/src/main/java/io/trino/server/SessionSupplier.java index f6cbd09fb31b..9837b8a9c24d 100644 --- a/core/trino-main/src/main/java/io/trino/server/SessionSupplier.java +++ b/core/trino-main/src/main/java/io/trino/server/SessionSupplier.java @@ -13,8 +13,8 @@ */ package io.trino.server; -import io.prestosql.Session; -import io.prestosql.spi.QueryId; +import io.trino.Session; +import io.trino.spi.QueryId; public interface SessionSupplier { diff --git a/core/trino-main/src/main/java/io/trino/server/StatusResource.java b/core/trino-main/src/main/java/io/trino/server/StatusResource.java index 190bd19fe443..16c4e04a546c 100644 --- a/core/trino-main/src/main/java/io/trino/server/StatusResource.java +++ b/core/trino-main/src/main/java/io/trino/server/StatusResource.java @@ -15,9 +15,9 @@ import com.sun.management.OperatingSystemMXBean; import io.airlift.node.NodeInfo; -import io.prestosql.client.NodeVersion; -import io.prestosql.memory.LocalMemoryManager; -import io.prestosql.server.security.ResourceSecurity; +import io.trino.client.NodeVersion; +import io.trino.memory.LocalMemoryManager; +import io.trino.server.security.ResourceSecurity; import javax.inject.Inject; import javax.ws.rs.GET; @@ -30,7 +30,7 @@ import java.lang.management.MemoryMXBean; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.server.security.ResourceSecurity.AccessType.PUBLIC; +import static io.trino.server.security.ResourceSecurity.AccessType.PUBLIC; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.MediaType.APPLICATION_JSON; diff --git a/core/trino-main/src/main/java/io/trino/server/TaskExecutorResource.java b/core/trino-main/src/main/java/io/trino/server/TaskExecutorResource.java index ffc0c20fb65f..11ff77eafe01 100644 --- a/core/trino-main/src/main/java/io/trino/server/TaskExecutorResource.java +++ b/core/trino-main/src/main/java/io/trino/server/TaskExecutorResource.java @@ -13,8 +13,8 @@ */ package io.trino.server; -import io.prestosql.execution.executor.TaskExecutor; -import io.prestosql.server.security.ResourceSecurity; +import io.trino.execution.executor.TaskExecutor; +import io.trino.server.security.ResourceSecurity; import javax.inject.Inject; import javax.ws.rs.GET; @@ -22,7 +22,7 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; -import static io.prestosql.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; +import static io.trino.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; import static java.util.Objects.requireNonNull; @Path("/v1/maxActiveSplits") diff --git a/core/trino-main/src/main/java/io/trino/server/TaskResource.java b/core/trino-main/src/main/java/io/trino/server/TaskResource.java index adc2c7d14efd..14dc1cb5fc55 100644 --- a/core/trino-main/src/main/java/io/trino/server/TaskResource.java +++ b/core/trino-main/src/main/java/io/trino/server/TaskResource.java @@ -21,17 +21,17 @@ import io.airlift.stats.TimeStat; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskInfo; -import io.prestosql.execution.TaskManager; -import io.prestosql.execution.TaskStatus; -import io.prestosql.execution.buffer.BufferResult; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.server.security.ResourceSecurity; +import io.trino.Session; +import io.trino.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; +import io.trino.execution.TaskId; +import io.trino.execution.TaskInfo; +import io.trino.execution.TaskManager; +import io.trino.execution.TaskStatus; +import io.trino.execution.buffer.BufferResult; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.SerializedPage; +import io.trino.metadata.SessionPropertyManager; +import io.trino.server.security.ResourceSecurity; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -65,15 +65,15 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.concurrent.MoreFutures.addTimeout; import static io.airlift.jaxrs.AsyncResponseHandler.bindAsyncResponse; -import static io.prestosql.PrestoMediaTypes.PRESTO_PAGES; -import static io.prestosql.client.PrestoHeaders.PRESTO_BUFFER_COMPLETE; -import static io.prestosql.client.PrestoHeaders.PRESTO_CURRENT_VERSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_MAX_SIZE; -import static io.prestosql.client.PrestoHeaders.PRESTO_MAX_WAIT; -import static io.prestosql.client.PrestoHeaders.PRESTO_PAGE_NEXT_TOKEN; -import static io.prestosql.client.PrestoHeaders.PRESTO_PAGE_TOKEN; -import static io.prestosql.client.PrestoHeaders.PRESTO_TASK_INSTANCE_ID; -import static io.prestosql.server.security.ResourceSecurity.AccessType.INTERNAL_ONLY; +import static io.trino.PrestoMediaTypes.PRESTO_PAGES; +import static io.trino.client.PrestoHeaders.PRESTO_BUFFER_COMPLETE; +import static io.trino.client.PrestoHeaders.PRESTO_CURRENT_VERSION; +import static io.trino.client.PrestoHeaders.PRESTO_MAX_SIZE; +import static io.trino.client.PrestoHeaders.PRESTO_MAX_WAIT; +import static io.trino.client.PrestoHeaders.PRESTO_PAGE_NEXT_TOKEN; +import static io.trino.client.PrestoHeaders.PRESTO_PAGE_TOKEN; +import static io.trino.client.PrestoHeaders.PRESTO_TASK_INSTANCE_ID; +import static io.trino.server.security.ResourceSecurity.AccessType.INTERNAL_ONLY; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/trino-main/src/main/java/io/trino/server/TaskUpdateRequest.java b/core/trino-main/src/main/java/io/trino/server/TaskUpdateRequest.java index 397d904ad948..ae0cc0c68c10 100644 --- a/core/trino-main/src/main/java/io/trino/server/TaskUpdateRequest.java +++ b/core/trino-main/src/main/java/io/trino/server/TaskUpdateRequest.java @@ -16,10 +16,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.SessionRepresentation; -import io.prestosql.execution.TaskSource; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.sql.planner.PlanFragment; +import io.trino.SessionRepresentation; +import io.trino.execution.TaskSource; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.sql.planner.PlanFragment; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/server/ThreadResource.java b/core/trino-main/src/main/java/io/trino/server/ThreadResource.java index 092e09b3924b..713ea89dfee2 100644 --- a/core/trino-main/src/main/java/io/trino/server/ThreadResource.java +++ b/core/trino-main/src/main/java/io/trino/server/ThreadResource.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Ordering; -import io.prestosql.server.security.ResourceSecurity; +import io.trino.server.security.ResourceSecurity; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -33,8 +33,8 @@ import java.util.Objects; import java.util.stream.Collectors; -import static io.prestosql.server.ThreadResource.Info.byName; -import static io.prestosql.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; +import static io.trino.server.ThreadResource.Info.byName; +import static io.trino.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; import static java.util.Comparator.comparing; @Path("/v1/thread") diff --git a/core/trino-main/src/main/java/io/trino/server/WorkerModule.java b/core/trino-main/src/main/java/io/trino/server/WorkerModule.java index 26111ca5c27e..71adcfce208b 100644 --- a/core/trino-main/src/main/java/io/trino/server/WorkerModule.java +++ b/core/trino-main/src/main/java/io/trino/server/WorkerModule.java @@ -17,15 +17,15 @@ import com.google.inject.Module; import com.google.inject.Provides; import com.google.inject.Scopes; -import io.prestosql.execution.QueryManager; -import io.prestosql.execution.resourcegroups.NoOpResourceGroupManager; -import io.prestosql.execution.resourcegroups.ResourceGroupManager; -import io.prestosql.failuredetector.FailureDetector; -import io.prestosql.failuredetector.NoOpFailureDetector; -import io.prestosql.server.ui.NoWebUiAuthenticationFilter; -import io.prestosql.server.ui.WebUiAuthenticationFilter; -import io.prestosql.transaction.NoOpTransactionManager; -import io.prestosql.transaction.TransactionManager; +import io.trino.execution.QueryManager; +import io.trino.execution.resourcegroups.NoOpResourceGroupManager; +import io.trino.execution.resourcegroups.ResourceGroupManager; +import io.trino.failuredetector.FailureDetector; +import io.trino.failuredetector.NoOpFailureDetector; +import io.trino.server.ui.NoWebUiAuthenticationFilter; +import io.trino.server.ui.WebUiAuthenticationFilter; +import io.trino.transaction.NoOpTransactionManager; +import io.trino.transaction.TransactionManager; import javax.inject.Singleton; diff --git a/core/trino-main/src/main/java/io/trino/server/protocol/ExecutingStatementResource.java b/core/trino-main/src/main/java/io/trino/server/protocol/ExecutingStatementResource.java index 256d48a698a8..a56e7537408e 100644 --- a/core/trino-main/src/main/java/io/trino/server/protocol/ExecutingStatementResource.java +++ b/core/trino-main/src/main/java/io/trino/server/protocol/ExecutingStatementResource.java @@ -20,17 +20,17 @@ import io.airlift.log.Logger; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.client.QueryResults; -import io.prestosql.execution.QueryManager; -import io.prestosql.memory.context.SimpleLocalMemoryContext; -import io.prestosql.operator.ExchangeClient; -import io.prestosql.operator.ExchangeClientSupplier; -import io.prestosql.server.ForStatementResource; -import io.prestosql.server.ServerConfig; -import io.prestosql.server.security.ResourceSecurity; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.block.BlockEncodingSerde; +import io.trino.Session; +import io.trino.client.QueryResults; +import io.trino.execution.QueryManager; +import io.trino.memory.context.SimpleLocalMemoryContext; +import io.trino.operator.ExchangeClient; +import io.trino.operator.ExchangeClientSupplier; +import io.trino.server.ForStatementResource; +import io.trino.server.ServerConfig; +import io.trino.server.security.ResourceSecurity; +import io.trino.spi.QueryId; +import io.trino.spi.block.BlockEncodingSerde; import javax.annotation.PreDestroy; import javax.inject.Inject; @@ -62,19 +62,19 @@ import static io.airlift.concurrent.Threads.threadsNamed; import static io.airlift.jaxrs.AsyncResponseHandler.bindAsyncResponse; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.client.PrestoHeaders.PRESTO_ADDED_PREPARE; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLEAR_SESSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLEAR_TRANSACTION_ID; -import static io.prestosql.client.PrestoHeaders.PRESTO_DEALLOCATED_PREPARE; -import static io.prestosql.client.PrestoHeaders.PRESTO_SET_CATALOG; -import static io.prestosql.client.PrestoHeaders.PRESTO_SET_PATH; -import static io.prestosql.client.PrestoHeaders.PRESTO_SET_ROLE; -import static io.prestosql.client.PrestoHeaders.PRESTO_SET_SCHEMA; -import static io.prestosql.client.PrestoHeaders.PRESTO_SET_SESSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_STARTED_TRANSACTION_ID; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.server.protocol.Slug.Context.EXECUTING_QUERY; -import static io.prestosql.server.security.ResourceSecurity.AccessType.PUBLIC; +import static io.trino.client.PrestoHeaders.PRESTO_ADDED_PREPARE; +import static io.trino.client.PrestoHeaders.PRESTO_CLEAR_SESSION; +import static io.trino.client.PrestoHeaders.PRESTO_CLEAR_TRANSACTION_ID; +import static io.trino.client.PrestoHeaders.PRESTO_DEALLOCATED_PREPARE; +import static io.trino.client.PrestoHeaders.PRESTO_SET_CATALOG; +import static io.trino.client.PrestoHeaders.PRESTO_SET_PATH; +import static io.trino.client.PrestoHeaders.PRESTO_SET_ROLE; +import static io.trino.client.PrestoHeaders.PRESTO_SET_SCHEMA; +import static io.trino.client.PrestoHeaders.PRESTO_SET_SESSION; +import static io.trino.client.PrestoHeaders.PRESTO_STARTED_TRANSACTION_ID; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.server.protocol.Slug.Context.EXECUTING_QUERY; +import static io.trino.server.security.ResourceSecurity.AccessType.PUBLIC; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/main/java/io/trino/server/protocol/Query.java b/core/trino-main/src/main/java/io/trino/server/protocol/Query.java index 2b21b365e9d3..ac6ee2e10616 100644 --- a/core/trino-main/src/main/java/io/trino/server/protocol/Query.java +++ b/core/trino-main/src/main/java/io/trino/server/protocol/Query.java @@ -22,54 +22,54 @@ import io.airlift.log.Logger; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.client.ClientCapabilities; -import io.prestosql.client.ClientTypeSignature; -import io.prestosql.client.ClientTypeSignatureParameter; -import io.prestosql.client.Column; -import io.prestosql.client.FailureInfo; -import io.prestosql.client.NamedClientTypeSignature; -import io.prestosql.client.QueryError; -import io.prestosql.client.QueryResults; -import io.prestosql.client.RowFieldName; -import io.prestosql.client.StageStats; -import io.prestosql.client.StatementStats; -import io.prestosql.client.Warning; -import io.prestosql.execution.ExecutionFailureInfo; -import io.prestosql.execution.QueryExecution; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryManager; -import io.prestosql.execution.QueryState; -import io.prestosql.execution.QueryStats; -import io.prestosql.execution.StageId; -import io.prestosql.execution.StageInfo; -import io.prestosql.execution.TaskInfo; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.operator.ExchangeClient; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoWarning; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.WarningCode; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.sql.ExpressionFormatter; -import io.prestosql.sql.analyzer.TypeSignatureTranslator; -import io.prestosql.sql.tree.DataType; -import io.prestosql.sql.tree.DateTimeDataType; -import io.prestosql.sql.tree.GenericDataType; -import io.prestosql.sql.tree.IntervalDayTimeDataType; -import io.prestosql.sql.tree.NumericParameter; -import io.prestosql.sql.tree.RowDataType; -import io.prestosql.sql.tree.TypeParameter; -import io.prestosql.transaction.TransactionId; -import io.prestosql.util.Failures; +import io.trino.Session; +import io.trino.client.ClientCapabilities; +import io.trino.client.ClientTypeSignature; +import io.trino.client.ClientTypeSignatureParameter; +import io.trino.client.Column; +import io.trino.client.FailureInfo; +import io.trino.client.NamedClientTypeSignature; +import io.trino.client.QueryError; +import io.trino.client.QueryResults; +import io.trino.client.RowFieldName; +import io.trino.client.StageStats; +import io.trino.client.StatementStats; +import io.trino.client.Warning; +import io.trino.execution.ExecutionFailureInfo; +import io.trino.execution.QueryExecution; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryManager; +import io.trino.execution.QueryState; +import io.trino.execution.QueryStats; +import io.trino.execution.StageId; +import io.trino.execution.StageInfo; +import io.trino.execution.TaskInfo; +import io.trino.execution.buffer.PagesSerde; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.execution.buffer.SerializedPage; +import io.trino.operator.ExchangeClient; +import io.trino.spi.ErrorCode; +import io.trino.spi.Page; +import io.trino.spi.PrestoWarning; +import io.trino.spi.QueryId; +import io.trino.spi.WarningCode; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.security.SelectedRole; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.sql.ExpressionFormatter; +import io.trino.sql.analyzer.TypeSignatureTranslator; +import io.trino.sql.tree.DataType; +import io.trino.sql.tree.DateTimeDataType; +import io.trino.sql.tree.GenericDataType; +import io.trino.sql.tree.IntervalDayTimeDataType; +import io.trino.sql.tree.NumericParameter; +import io.trino.sql.tree.RowDataType; +import io.trino.sql.tree.TypeParameter; +import io.trino.transaction.TransactionId; +import io.trino.util.Failures; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; @@ -96,19 +96,19 @@ import static com.google.common.util.concurrent.Futures.immediateFuture; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.concurrent.MoreFutures.addTimeout; -import static io.prestosql.SystemSessionProperties.isExchangeCompressionEnabled; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.server.protocol.QueryResultRows.queryResultRowsBuilder; -import static io.prestosql.server.protocol.Slug.Context.EXECUTING_QUERY; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.SERIALIZATION_ERROR; -import static io.prestosql.spi.type.StandardTypes.ROW; -import static io.prestosql.spi.type.StandardTypes.TIME; -import static io.prestosql.spi.type.StandardTypes.TIMESTAMP; -import static io.prestosql.spi.type.StandardTypes.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.StandardTypes.TIME_WITH_TIME_ZONE; -import static io.prestosql.util.Failures.toFailure; -import static io.prestosql.util.MoreLists.mappedCopy; +import static io.trino.SystemSessionProperties.isExchangeCompressionEnabled; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.server.protocol.QueryResultRows.queryResultRowsBuilder; +import static io.trino.server.protocol.Slug.Context.EXECUTING_QUERY; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.SERIALIZATION_ERROR; +import static io.trino.spi.type.StandardTypes.ROW; +import static io.trino.spi.type.StandardTypes.TIME; +import static io.trino.spi.type.StandardTypes.TIMESTAMP; +import static io.trino.spi.type.StandardTypes.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.StandardTypes.TIME_WITH_TIME_ZONE; +import static io.trino.util.Failures.toFailure; +import static io.trino.util.MoreLists.mappedCopy; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/server/protocol/QueryResultRows.java b/core/trino-main/src/main/java/io/trino/server/protocol/QueryResultRows.java index bc6713bbc866..ea4783e7bf36 100644 --- a/core/trino-main/src/main/java/io/trino/server/protocol/QueryResultRows.java +++ b/core/trino-main/src/main/java/io/trino/server/protocol/QueryResultRows.java @@ -16,24 +16,24 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.AbstractIterator; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.client.ClientCapabilities; -import io.prestosql.client.Column; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; +import io.trino.Session; +import io.trino.client.ClientCapabilities; +import io.trino.client.Column; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -52,9 +52,9 @@ import static com.google.common.base.Verify.verify; import static com.google.common.base.Verify.verifyNotNull; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.SERIALIZATION_ERROR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.StandardErrorCode.SERIALIZATION_ERROR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.lang.String.format; import static java.util.Collections.unmodifiableList; import static java.util.Collections.unmodifiableMap; diff --git a/core/trino-main/src/main/java/io/trino/server/remotetask/ContinuousTaskStatusFetcher.java b/core/trino-main/src/main/java/io/trino/server/remotetask/ContinuousTaskStatusFetcher.java index 48c69084f0b9..d3da9005afbd 100644 --- a/core/trino-main/src/main/java/io/trino/server/remotetask/ContinuousTaskStatusFetcher.java +++ b/core/trino-main/src/main/java/io/trino/server/remotetask/ContinuousTaskStatusFetcher.java @@ -22,11 +22,11 @@ import io.airlift.json.JsonCodec; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.execution.StateMachine; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskStatus; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.PrestoException; +import io.trino.execution.StateMachine; +import io.trino.execution.TaskId; +import io.trino.execution.TaskStatus; +import io.trino.spi.HostAddress; +import io.trino.spi.PrestoException; import javax.annotation.concurrent.GuardedBy; @@ -43,10 +43,10 @@ import static io.airlift.http.client.HttpUriBuilder.uriBuilderFrom; import static io.airlift.http.client.Request.Builder.prepareGet; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.client.PrestoHeaders.PRESTO_CURRENT_VERSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_MAX_WAIT; -import static io.prestosql.spi.StandardErrorCode.REMOTE_TASK_MISMATCH; -import static io.prestosql.util.Failures.REMOTE_TASK_MISMATCH_ERROR; +import static io.trino.client.PrestoHeaders.PRESTO_CURRENT_VERSION; +import static io.trino.client.PrestoHeaders.PRESTO_MAX_WAIT; +import static io.trino.spi.StandardErrorCode.REMOTE_TASK_MISMATCH; +import static io.trino.util.Failures.REMOTE_TASK_MISMATCH_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/server/remotetask/DynamicFiltersFetcher.java b/core/trino-main/src/main/java/io/trino/server/remotetask/DynamicFiltersFetcher.java index 6dd7dd89ab7f..d7f2e84414dd 100644 --- a/core/trino-main/src/main/java/io/trino/server/remotetask/DynamicFiltersFetcher.java +++ b/core/trino-main/src/main/java/io/trino/server/remotetask/DynamicFiltersFetcher.java @@ -20,9 +20,9 @@ import io.airlift.http.client.Request; import io.airlift.json.JsonCodec; import io.airlift.units.Duration; -import io.prestosql.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; -import io.prestosql.execution.TaskId; -import io.prestosql.server.DynamicFilterService; +import io.trino.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; +import io.trino.execution.TaskId; +import io.trino.server.DynamicFilterService; import javax.annotation.concurrent.GuardedBy; @@ -39,9 +39,9 @@ import static io.airlift.http.client.HttpUriBuilder.uriBuilderFrom; import static io.airlift.http.client.Request.Builder.prepareGet; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.client.PrestoHeaders.PRESTO_CURRENT_VERSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_MAX_WAIT; -import static io.prestosql.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; +import static io.trino.client.PrestoHeaders.PRESTO_CURRENT_VERSION; +import static io.trino.client.PrestoHeaders.PRESTO_MAX_WAIT; +import static io.trino.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; import static java.util.Objects.requireNonNull; class DynamicFiltersFetcher diff --git a/core/trino-main/src/main/java/io/trino/server/remotetask/HttpLocationFactory.java b/core/trino-main/src/main/java/io/trino/server/remotetask/HttpLocationFactory.java index 161513a43568..20f0ea40a37e 100644 --- a/core/trino-main/src/main/java/io/trino/server/remotetask/HttpLocationFactory.java +++ b/core/trino-main/src/main/java/io/trino/server/remotetask/HttpLocationFactory.java @@ -14,12 +14,12 @@ package io.trino.server.remotetask; import io.airlift.http.server.HttpServerInfo; -import io.prestosql.execution.LocationFactory; -import io.prestosql.execution.TaskId; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.server.InternalCommunicationConfig; -import io.prestosql.spi.QueryId; +import io.trino.execution.LocationFactory; +import io.trino.execution.TaskId; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; +import io.trino.server.InternalCommunicationConfig; +import io.trino.spi.QueryId; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/server/remotetask/HttpRemoteTask.java b/core/trino-main/src/main/java/io/trino/server/remotetask/HttpRemoteTask.java index 5519eee7f6b1..bf0f85df1f92 100644 --- a/core/trino-main/src/main/java/io/trino/server/remotetask/HttpRemoteTask.java +++ b/core/trino-main/src/main/java/io/trino/server/remotetask/HttpRemoteTask.java @@ -31,29 +31,29 @@ import io.airlift.json.JsonCodec; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; -import io.prestosql.execution.FutureStateChange; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.NodeTaskMap.PartitionedSplitCountTracker; -import io.prestosql.execution.RemoteTask; -import io.prestosql.execution.ScheduledSplit; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskInfo; -import io.prestosql.execution.TaskSource; -import io.prestosql.execution.TaskState; -import io.prestosql.execution.TaskStatus; -import io.prestosql.execution.buffer.BufferInfo; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.PageBufferInfo; -import io.prestosql.metadata.Split; -import io.prestosql.operator.TaskStats; -import io.prestosql.server.DynamicFilterService; -import io.prestosql.server.TaskUpdateRequest; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; +import io.trino.execution.FutureStateChange; +import io.trino.execution.Lifespan; +import io.trino.execution.NodeTaskMap.PartitionedSplitCountTracker; +import io.trino.execution.RemoteTask; +import io.trino.execution.ScheduledSplit; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.TaskId; +import io.trino.execution.TaskInfo; +import io.trino.execution.TaskSource; +import io.trino.execution.TaskState; +import io.trino.execution.TaskStatus; +import io.trino.execution.buffer.BufferInfo; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.PageBufferInfo; +import io.trino.metadata.Split; +import io.trino.operator.TaskStats; +import io.trino.server.DynamicFilterService; +import io.trino.server.TaskUpdateRequest; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; import org.joda.time.DateTime; import javax.annotation.concurrent.GuardedBy; @@ -88,12 +88,12 @@ import static io.airlift.http.client.Request.Builder.prepareDelete; import static io.airlift.http.client.Request.Builder.preparePost; import static io.airlift.http.client.StaticBodyGenerator.createStaticBodyGenerator; -import static io.prestosql.execution.TaskInfo.createInitialTask; -import static io.prestosql.execution.TaskState.ABORTED; -import static io.prestosql.execution.TaskState.FAILED; -import static io.prestosql.execution.TaskStatus.failWith; -import static io.prestosql.server.remotetask.RequestErrorTracker.logError; -import static io.prestosql.util.Failures.toFailure; +import static io.trino.execution.TaskInfo.createInitialTask; +import static io.trino.execution.TaskState.ABORTED; +import static io.trino.execution.TaskState.FAILED; +import static io.trino.execution.TaskStatus.failWith; +import static io.trino.server.remotetask.RequestErrorTracker.logError; +import static io.trino.util.Failures.toFailure; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/main/java/io/trino/server/remotetask/RequestErrorTracker.java b/core/trino-main/src/main/java/io/trino/server/remotetask/RequestErrorTracker.java index 7779d6aebbfb..68ba2e0b2eb2 100644 --- a/core/trino-main/src/main/java/io/trino/server/remotetask/RequestErrorTracker.java +++ b/core/trino-main/src/main/java/io/trino/server/remotetask/RequestErrorTracker.java @@ -20,9 +20,9 @@ import io.airlift.event.client.ServiceUnavailableException; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.execution.TaskId; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.PrestoTransportException; +import io.trino.execution.TaskId; +import io.trino.spi.PrestoException; +import io.trino.spi.PrestoTransportException; import javax.annotation.concurrent.ThreadSafe; @@ -37,10 +37,10 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeoutException; -import static io.prestosql.spi.HostAddress.fromUri; -import static io.prestosql.spi.StandardErrorCode.REMOTE_TASK_ERROR; -import static io.prestosql.spi.StandardErrorCode.TOO_MANY_REQUESTS_FAILED; -import static io.prestosql.util.Failures.WORKER_NODE_ERROR; +import static io.trino.spi.HostAddress.fromUri; +import static io.trino.spi.StandardErrorCode.REMOTE_TASK_ERROR; +import static io.trino.spi.StandardErrorCode.TOO_MANY_REQUESTS_FAILED; +import static io.trino.util.Failures.WORKER_NODE_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/main/java/io/trino/server/remotetask/SimpleHttpResponseHandler.java b/core/trino-main/src/main/java/io/trino/server/remotetask/SimpleHttpResponseHandler.java index d2fe8d02b13e..90d03dbbb38f 100644 --- a/core/trino-main/src/main/java/io/trino/server/remotetask/SimpleHttpResponseHandler.java +++ b/core/trino-main/src/main/java/io/trino/server/remotetask/SimpleHttpResponseHandler.java @@ -16,11 +16,11 @@ import com.google.common.util.concurrent.FutureCallback; import io.airlift.http.client.FullJsonResponseHandler; import io.airlift.http.client.HttpStatus; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.net.URI; -import static io.prestosql.spi.StandardErrorCode.REMOTE_TASK_ERROR; +import static io.trino.spi.StandardErrorCode.REMOTE_TASK_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/server/remotetask/TaskInfoFetcher.java b/core/trino-main/src/main/java/io/trino/server/remotetask/TaskInfoFetcher.java index 938c40008b22..fe48d23137f7 100644 --- a/core/trino-main/src/main/java/io/trino/server/remotetask/TaskInfoFetcher.java +++ b/core/trino-main/src/main/java/io/trino/server/remotetask/TaskInfoFetcher.java @@ -22,11 +22,11 @@ import io.airlift.http.client.Request; import io.airlift.json.JsonCodec; import io.airlift.units.Duration; -import io.prestosql.execution.StateMachine; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskInfo; -import io.prestosql.execution.TaskStatus; +import io.trino.execution.StateMachine; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.TaskId; +import io.trino.execution.TaskInfo; +import io.trino.execution.TaskStatus; import javax.annotation.concurrent.GuardedBy; diff --git a/core/trino-main/src/main/java/io/trino/server/security/AnnotatedResourceAccessTypeLoader.java b/core/trino-main/src/main/java/io/trino/server/security/AnnotatedResourceAccessTypeLoader.java index bc2530494cae..e0b8beb1993a 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/AnnotatedResourceAccessTypeLoader.java +++ b/core/trino-main/src/main/java/io/trino/server/security/AnnotatedResourceAccessTypeLoader.java @@ -13,7 +13,7 @@ */ package io.trino.server.security; -import io.prestosql.server.security.ResourceSecurity.AccessType; +import io.trino.server.security.ResourceSecurity.AccessType; import java.lang.reflect.AnnotatedElement; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/server/security/AuthenticationFilter.java b/core/trino-main/src/main/java/io/trino/server/security/AuthenticationFilter.java index c10a61d1cf1b..65d4eae0f16d 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/AuthenticationFilter.java +++ b/core/trino-main/src/main/java/io/trino/server/security/AuthenticationFilter.java @@ -15,8 +15,8 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; -import io.prestosql.server.InternalAuthenticationManager; -import io.prestosql.spi.security.Identity; +import io.trino.server.InternalAuthenticationManager; +import io.trino.spi.security.Identity; import javax.annotation.Priority; import javax.inject.Inject; @@ -29,8 +29,8 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.server.ServletSecurityUtils.sendWwwAuthenticate; -import static io.prestosql.server.ServletSecurityUtils.setAuthenticatedIdentity; +import static io.trino.server.ServletSecurityUtils.sendWwwAuthenticate; +import static io.trino.server.ServletSecurityUtils.setAuthenticatedIdentity; import static java.util.Objects.requireNonNull; import static javax.ws.rs.Priorities.AUTHENTICATION; diff --git a/core/trino-main/src/main/java/io/trino/server/security/Authenticator.java b/core/trino-main/src/main/java/io/trino/server/security/Authenticator.java index 29d9e752aba5..9052e9bffed0 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/Authenticator.java +++ b/core/trino-main/src/main/java/io/trino/server/security/Authenticator.java @@ -13,7 +13,7 @@ */ package io.trino.server.security; -import io.prestosql.spi.security.Identity; +import io.trino.spi.security.Identity; import javax.ws.rs.container.ContainerRequestContext; diff --git a/core/trino-main/src/main/java/io/trino/server/security/CertificateAuthenticator.java b/core/trino-main/src/main/java/io/trino/server/security/CertificateAuthenticator.java index b1b0c14fde57..f3fca6608201 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/CertificateAuthenticator.java +++ b/core/trino-main/src/main/java/io/trino/server/security/CertificateAuthenticator.java @@ -14,7 +14,7 @@ package io.trino.server.security; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.security.Identity; +import io.trino.spi.security.Identity; import javax.inject.Inject; import javax.ws.rs.container.ContainerRequestContext; @@ -23,7 +23,7 @@ import java.security.cert.X509Certificate; import java.util.List; -import static io.prestosql.server.security.UserMapping.createUserMapping; +import static io.trino.server.security.UserMapping.createUserMapping; import static java.util.Objects.requireNonNull; public class CertificateAuthenticator diff --git a/core/trino-main/src/main/java/io/trino/server/security/CertificateAuthenticatorManager.java b/core/trino-main/src/main/java/io/trino/server/security/CertificateAuthenticatorManager.java index 234d763d2f9c..7dc3192bd191 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/CertificateAuthenticatorManager.java +++ b/core/trino-main/src/main/java/io/trino/server/security/CertificateAuthenticatorManager.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; -import io.prestosql.spi.security.CertificateAuthenticator; -import io.prestosql.spi.security.CertificateAuthenticatorFactory; +import io.trino.spi.security.CertificateAuthenticator; +import io.trino.spi.security.CertificateAuthenticatorFactory; import java.io.File; import java.util.HashMap; diff --git a/core/trino-main/src/main/java/io/trino/server/security/InsecureAuthenticator.java b/core/trino-main/src/main/java/io/trino/server/security/InsecureAuthenticator.java index 04187c772b55..4569055bc1bf 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/InsecureAuthenticator.java +++ b/core/trino-main/src/main/java/io/trino/server/security/InsecureAuthenticator.java @@ -13,8 +13,8 @@ */ package io.trino.server.security; -import io.prestosql.spi.security.BasicPrincipal; -import io.prestosql.spi.security.Identity; +import io.trino.spi.security.BasicPrincipal; +import io.trino.spi.security.Identity; import javax.inject.Inject; import javax.ws.rs.container.ContainerRequestContext; @@ -22,9 +22,9 @@ import java.util.Optional; import static com.google.common.base.Strings.emptyToNull; -import static io.prestosql.client.PrestoHeaders.PRESTO_USER; -import static io.prestosql.server.security.BasicAuthCredentials.extractBasicAuthCredentials; -import static io.prestosql.server.security.UserMapping.createUserMapping; +import static io.trino.client.PrestoHeaders.PRESTO_USER; +import static io.trino.server.security.BasicAuthCredentials.extractBasicAuthCredentials; +import static io.trino.server.security.UserMapping.createUserMapping; import static java.util.Objects.requireNonNull; public class InsecureAuthenticator diff --git a/core/trino-main/src/main/java/io/trino/server/security/KerberosAuthenticator.java b/core/trino-main/src/main/java/io/trino/server/security/KerberosAuthenticator.java index 52528217a498..9838868a5cd0 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/KerberosAuthenticator.java +++ b/core/trino-main/src/main/java/io/trino/server/security/KerberosAuthenticator.java @@ -15,7 +15,7 @@ import com.sun.security.auth.module.Krb5LoginModule; import io.airlift.log.Logger; -import io.prestosql.spi.security.Identity; +import io.trino.spi.security.Identity; import org.ietf.jgss.GSSContext; import org.ietf.jgss.GSSCredential; import org.ietf.jgss.GSSException; @@ -46,7 +46,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.net.HttpHeaders.AUTHORIZATION; -import static io.prestosql.server.security.UserMapping.createUserMapping; +import static io.trino.server.security.UserMapping.createUserMapping; import static java.util.Objects.requireNonNull; import static javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag.REQUIRED; import static org.ietf.jgss.GSSCredential.ACCEPT_ONLY; diff --git a/core/trino-main/src/main/java/io/trino/server/security/KerberosConfig.java b/core/trino-main/src/main/java/io/trino/server/security/KerberosConfig.java index 9aef0a2c677b..2c768cefdc7c 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/KerberosConfig.java +++ b/core/trino-main/src/main/java/io/trino/server/security/KerberosConfig.java @@ -22,7 +22,7 @@ import java.io.File; import java.util.Optional; -import static io.prestosql.server.security.KerberosNameType.HOSTBASED_SERVICE; +import static io.trino.server.security.KerberosNameType.HOSTBASED_SERVICE; public class KerberosConfig { diff --git a/core/trino-main/src/main/java/io/trino/server/security/PasswordAuthenticator.java b/core/trino-main/src/main/java/io/trino/server/security/PasswordAuthenticator.java index 17f85d71b278..95f780e7b9e7 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/PasswordAuthenticator.java +++ b/core/trino-main/src/main/java/io/trino/server/security/PasswordAuthenticator.java @@ -13,16 +13,16 @@ */ package io.trino.server.security; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.Identity; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.Identity; import javax.inject.Inject; import javax.ws.rs.container.ContainerRequestContext; import java.security.Principal; -import static io.prestosql.server.security.BasicAuthCredentials.extractBasicAuthCredentials; -import static io.prestosql.server.security.UserMapping.createUserMapping; +import static io.trino.server.security.BasicAuthCredentials.extractBasicAuthCredentials; +import static io.trino.server.security.UserMapping.createUserMapping; import static java.util.Objects.requireNonNull; public class PasswordAuthenticator diff --git a/core/trino-main/src/main/java/io/trino/server/security/PasswordAuthenticatorManager.java b/core/trino-main/src/main/java/io/trino/server/security/PasswordAuthenticatorManager.java index cb3929b87ca3..b11c39b94b51 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/PasswordAuthenticatorManager.java +++ b/core/trino-main/src/main/java/io/trino/server/security/PasswordAuthenticatorManager.java @@ -16,8 +16,8 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; -import io.prestosql.spi.security.PasswordAuthenticator; -import io.prestosql.spi.security.PasswordAuthenticatorFactory; +import io.trino.spi.security.PasswordAuthenticator; +import io.trino.spi.security.PasswordAuthenticatorFactory; import java.io.File; import java.util.HashMap; diff --git a/core/trino-main/src/main/java/io/trino/server/security/ResourceAccessType.java b/core/trino-main/src/main/java/io/trino/server/security/ResourceAccessType.java index 0c0fd31d02c2..582dd3f80d3a 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/ResourceAccessType.java +++ b/core/trino-main/src/main/java/io/trino/server/security/ResourceAccessType.java @@ -14,8 +14,8 @@ package io.trino.server.security; import com.google.common.collect.ImmutableList; -import io.prestosql.server.security.ResourceSecurity.AccessType; -import io.prestosql.server.security.ResourceSecurityBinder.StaticResourceAccessTypeLoader; +import io.trino.server.security.ResourceSecurity.AccessType; +import io.trino.server.security.ResourceSecurityBinder.StaticResourceAccessTypeLoader; import javax.inject.Inject; import javax.ws.rs.container.ResourceInfo; @@ -24,7 +24,7 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; +import static io.trino.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; public class ResourceAccessType { diff --git a/core/trino-main/src/main/java/io/trino/server/security/ResourceAccessTypeLoader.java b/core/trino-main/src/main/java/io/trino/server/security/ResourceAccessTypeLoader.java index 44e1fa483264..bda4db897cdd 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/ResourceAccessTypeLoader.java +++ b/core/trino-main/src/main/java/io/trino/server/security/ResourceAccessTypeLoader.java @@ -13,7 +13,7 @@ */ package io.trino.server.security; -import io.prestosql.server.security.ResourceSecurity.AccessType; +import io.trino.server.security.ResourceSecurity.AccessType; import java.lang.reflect.AnnotatedElement; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/server/security/ResourceSecurityBinder.java b/core/trino-main/src/main/java/io/trino/server/security/ResourceSecurityBinder.java index 7abd6db0ee8e..0fd7b151d894 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/ResourceSecurityBinder.java +++ b/core/trino-main/src/main/java/io/trino/server/security/ResourceSecurityBinder.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableMap; import com.google.inject.Binder; import com.google.inject.multibindings.MapBinder; -import io.prestosql.server.security.ResourceSecurity.AccessType; +import io.trino.server.security.ResourceSecurity.AccessType; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/server/security/ResourceSecurityDynamicFeature.java b/core/trino-main/src/main/java/io/trino/server/security/ResourceSecurityDynamicFeature.java index 15e1c7bda3e3..c588e326e90a 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/ResourceSecurityDynamicFeature.java +++ b/core/trino-main/src/main/java/io/trino/server/security/ResourceSecurityDynamicFeature.java @@ -13,14 +13,14 @@ */ package io.trino.server.security; -import io.prestosql.security.AccessControl; -import io.prestosql.server.InternalAuthenticationManager; -import io.prestosql.server.security.ResourceSecurity.AccessType; -import io.prestosql.server.ui.WebUiAuthenticationFilter; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.security.Identity; +import io.trino.security.AccessControl; +import io.trino.server.InternalAuthenticationManager; +import io.trino.server.security.ResourceSecurity.AccessType; +import io.trino.server.ui.WebUiAuthenticationFilter; +import io.trino.spi.PrestoException; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.security.Identity; import javax.annotation.Priority; import javax.inject.Inject; @@ -37,11 +37,11 @@ import java.util.Optional; -import static io.prestosql.server.HttpRequestSessionContext.AUTHENTICATED_IDENTITY; -import static io.prestosql.server.HttpRequestSessionContext.extractAuthorizedIdentity; -import static io.prestosql.server.ServletSecurityUtils.setAuthenticatedIdentity; -import static io.prestosql.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; -import static io.prestosql.spi.StandardErrorCode.SERVER_STARTING_UP; +import static io.trino.server.HttpRequestSessionContext.AUTHENTICATED_IDENTITY; +import static io.trino.server.HttpRequestSessionContext.extractAuthorizedIdentity; +import static io.trino.server.ServletSecurityUtils.setAuthenticatedIdentity; +import static io.trino.server.security.ResourceSecurity.AccessType.MANAGEMENT_READ; +import static io.trino.spi.StandardErrorCode.SERVER_STARTING_UP; import static java.util.Objects.requireNonNull; public class ResourceSecurityDynamicFeature diff --git a/core/trino-main/src/main/java/io/trino/server/security/ServerSecurityModule.java b/core/trino-main/src/main/java/io/trino/server/security/ServerSecurityModule.java index 6b67c2730611..e71571f8e926 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/ServerSecurityModule.java +++ b/core/trino-main/src/main/java/io/trino/server/security/ServerSecurityModule.java @@ -26,8 +26,8 @@ import io.airlift.http.server.HttpServer.ClientCertificate; import io.airlift.http.server.HttpServerConfig; import io.airlift.jmx.MBeanResource; -import io.prestosql.server.security.jwt.JwtAuthenticator; -import io.prestosql.server.security.jwt.JwtAuthenticatorSupportModule; +import io.trino.server.security.jwt.JwtAuthenticator; +import io.trino.server.security.jwt.JwtAuthenticatorSupportModule; import java.util.List; import java.util.Map; @@ -41,7 +41,7 @@ import static io.airlift.configuration.ConfigurationAwareModule.combine; import static io.airlift.http.server.HttpServer.ClientCertificate.REQUESTED; import static io.airlift.jaxrs.JaxrsBinder.jaxrsBinder; -import static io.prestosql.server.security.ResourceSecurityBinder.resourceSecurityBinder; +import static io.trino.server.security.ResourceSecurityBinder.resourceSecurityBinder; import static java.util.Locale.ENGLISH; public class ServerSecurityModule diff --git a/core/trino-main/src/main/java/io/trino/server/security/UserMapping.java b/core/trino-main/src/main/java/io/trino/server/security/UserMapping.java index a1cd534ae979..1d22491a2d6f 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/UserMapping.java +++ b/core/trino-main/src/main/java/io/trino/server/security/UserMapping.java @@ -25,8 +25,8 @@ import java.util.regex.Pattern; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.base.util.JsonUtils.parseJson; -import static io.prestosql.server.security.UserMapping.Case.KEEP; +import static io.trino.plugin.base.util.JsonUtils.parseJson; +import static io.trino.server.security.UserMapping.Case.KEEP; import static java.lang.Boolean.TRUE; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/server/security/jwt/JwkService.java b/core/trino-main/src/main/java/io/trino/server/security/jwt/JwkService.java index f6f90f554332..fb227fa835f5 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/jwt/JwkService.java +++ b/core/trino-main/src/main/java/io/trino/server/security/jwt/JwkService.java @@ -38,7 +38,7 @@ import static io.airlift.http.client.Request.Builder.prepareGet; import static io.airlift.http.client.StringResponseHandler.createStringResponseHandler; -import static io.prestosql.server.security.jwt.JwkDecoder.decodeKeys; +import static io.trino.server.security.jwt.JwkDecoder.decodeKeys; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; diff --git a/core/trino-main/src/main/java/io/trino/server/security/jwt/JwtAuthenticator.java b/core/trino-main/src/main/java/io/trino/server/security/jwt/JwtAuthenticator.java index 5c166046686f..ec0b865c3924 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/jwt/JwtAuthenticator.java +++ b/core/trino-main/src/main/java/io/trino/server/security/jwt/JwtAuthenticator.java @@ -19,19 +19,19 @@ import io.jsonwebtoken.JwtParser; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SigningKeyResolver; -import io.prestosql.server.security.AuthenticationException; -import io.prestosql.server.security.Authenticator; -import io.prestosql.server.security.UserMapping; -import io.prestosql.server.security.UserMappingException; -import io.prestosql.spi.security.BasicPrincipal; -import io.prestosql.spi.security.Identity; +import io.trino.server.security.AuthenticationException; +import io.trino.server.security.Authenticator; +import io.trino.server.security.UserMapping; +import io.trino.server.security.UserMappingException; +import io.trino.spi.security.BasicPrincipal; +import io.trino.spi.security.Identity; import javax.inject.Inject; import javax.ws.rs.container.ContainerRequestContext; import static com.google.common.base.Strings.nullToEmpty; import static com.google.common.net.HttpHeaders.AUTHORIZATION; -import static io.prestosql.server.security.UserMapping.createUserMapping; +import static io.trino.server.security.UserMapping.createUserMapping; import static java.util.Objects.requireNonNull; public class JwtAuthenticator diff --git a/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2CallbackResource.java b/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2CallbackResource.java index cb7994e0f412..f097dfe6bc69 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2CallbackResource.java +++ b/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2CallbackResource.java @@ -14,9 +14,9 @@ package io.trino.server.security.oauth2; import io.airlift.log.Logger; -import io.prestosql.server.security.ResourceSecurity; -import io.prestosql.server.security.oauth2.OAuth2Service.OAuthResult; -import io.prestosql.server.ui.OAuthWebUiCookie; +import io.trino.server.security.ResourceSecurity; +import io.trino.server.security.oauth2.OAuth2Service.OAuthResult; +import io.trino.server.ui.OAuthWebUiCookie; import javax.inject.Inject; import javax.ws.rs.GET; @@ -30,9 +30,9 @@ import java.net.URI; -import static io.prestosql.server.security.ResourceSecurity.AccessType.PUBLIC; -import static io.prestosql.server.security.oauth2.OAuth2CallbackResource.CALLBACK_ENDPOINT; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.UI_LOCATION; +import static io.trino.server.security.ResourceSecurity.AccessType.PUBLIC; +import static io.trino.server.security.oauth2.OAuth2CallbackResource.CALLBACK_ENDPOINT; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.UI_LOCATION; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.MediaType.TEXT_HTML; diff --git a/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2Service.java b/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2Service.java index 79b6ae1218cb..dc26632cf944 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2Service.java +++ b/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2Service.java @@ -21,7 +21,7 @@ import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import io.jsonwebtoken.SigningKeyResolver; -import io.prestosql.server.security.oauth2.OAuth2Client.AccessToken; +import io.trino.server.security.oauth2.OAuth2Client.AccessToken; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2ServiceModule.java b/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2ServiceModule.java index 3f25268805ac..364f135b413d 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2ServiceModule.java +++ b/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2ServiceModule.java @@ -21,8 +21,8 @@ import io.airlift.http.client.HttpClient; import io.airlift.units.Duration; import io.jsonwebtoken.SigningKeyResolver; -import io.prestosql.server.security.jwt.JwkService; -import io.prestosql.server.security.jwt.JwkSigningKeyResolver; +import io.trino.server.security.jwt.JwkService; +import io.trino.server.security.jwt.JwkSigningKeyResolver; import java.net.URI; import java.util.concurrent.TimeUnit; diff --git a/core/trino-main/src/main/java/io/trino/server/testing/TestingPrestoServer.java b/core/trino-main/src/main/java/io/trino/server/testing/TestingPrestoServer.java index e825a8e730ae..77a2de7adf62 100644 --- a/core/trino-main/src/main/java/io/trino/server/testing/TestingPrestoServer.java +++ b/core/trino-main/src/main/java/io/trino/server/testing/TestingPrestoServer.java @@ -38,49 +38,49 @@ import io.airlift.json.JsonModule; import io.airlift.node.testing.TestingNodeModule; import io.airlift.tracetoken.TraceTokenModule; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.ConnectorManager; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.eventlistener.EventListenerConfig; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryManager; -import io.prestosql.execution.SqlQueryManager; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.execution.TaskManager; -import io.prestosql.execution.resourcegroups.InternalResourceGroupManager; -import io.prestosql.memory.ClusterMemoryManager; -import io.prestosql.memory.LocalMemoryManager; -import io.prestosql.metadata.AllNodes; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.security.AccessControlManager; -import io.prestosql.security.GroupProviderManager; -import io.prestosql.server.GracefulShutdownHandler; -import io.prestosql.server.PluginManager; -import io.prestosql.server.ServerMainModule; -import io.prestosql.server.SessionPropertyDefaults; -import io.prestosql.server.ShutdownAction; -import io.prestosql.server.security.CertificateAuthenticatorManager; -import io.prestosql.server.security.ServerSecurityModule; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.security.SystemAccessControl; -import io.prestosql.split.PageSourceManager; -import io.prestosql.split.SplitManager; -import io.prestosql.sql.planner.NodePartitioningManager; -import io.prestosql.sql.planner.Plan; -import io.prestosql.testing.ProcedureTester; -import io.prestosql.testing.TestingAccessControlManager; -import io.prestosql.testing.TestingEventListenerManager; -import io.prestosql.testing.TestingGroupProvider; -import io.prestosql.testing.TestingWarningCollectorModule; -import io.prestosql.transaction.TransactionManager; +import io.trino.connector.CatalogName; +import io.trino.connector.ConnectorManager; +import io.trino.cost.StatsCalculator; +import io.trino.dispatcher.DispatchManager; +import io.trino.eventlistener.EventListenerConfig; +import io.trino.eventlistener.EventListenerManager; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryManager; +import io.trino.execution.SqlQueryManager; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.execution.TaskManager; +import io.trino.execution.resourcegroups.InternalResourceGroupManager; +import io.trino.memory.ClusterMemoryManager; +import io.trino.memory.LocalMemoryManager; +import io.trino.metadata.AllNodes; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.security.AccessControlManager; +import io.trino.security.GroupProviderManager; +import io.trino.server.GracefulShutdownHandler; +import io.trino.server.PluginManager; +import io.trino.server.ServerMainModule; +import io.trino.server.SessionPropertyDefaults; +import io.trino.server.ShutdownAction; +import io.trino.server.security.CertificateAuthenticatorManager; +import io.trino.server.security.ServerSecurityModule; +import io.trino.spi.Plugin; +import io.trino.spi.QueryId; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.security.SystemAccessControl; +import io.trino.split.PageSourceManager; +import io.trino.split.SplitManager; +import io.trino.sql.planner.NodePartitioningManager; +import io.trino.sql.planner.Plan; +import io.trino.testing.ProcedureTester; +import io.trino.testing.TestingAccessControlManager; +import io.trino.testing.TestingEventListenerManager; +import io.trino.testing.TestingGroupProvider; +import io.trino.testing.TestingWarningCollectorModule; +import io.trino.transaction.TransactionManager; import org.weakref.jmx.guice.MBeanModule; import javax.annotation.concurrent.GuardedBy; diff --git a/core/trino-main/src/main/java/io/trino/server/ui/ClusterResource.java b/core/trino-main/src/main/java/io/trino/server/ui/ClusterResource.java index fd1bc690d636..ed9594bf9155 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/ClusterResource.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/ClusterResource.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import io.airlift.node.NodeInfo; import io.airlift.units.Duration; -import io.prestosql.client.NodeVersion; -import io.prestosql.server.security.ResourceSecurity; +import io.trino.client.NodeVersion; +import io.trino.server.security.ResourceSecurity; import javax.annotation.concurrent.Immutable; import javax.inject.Inject; @@ -26,7 +26,7 @@ import javax.ws.rs.Produces; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.server.security.ResourceSecurity.AccessType.WEB_UI; +import static io.trino.server.security.ResourceSecurity.AccessType.WEB_UI; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.MediaType.APPLICATION_JSON; diff --git a/core/trino-main/src/main/java/io/trino/server/ui/ClusterStatsResource.java b/core/trino-main/src/main/java/io/trino/server/ui/ClusterStatsResource.java index de42b4b5153c..74616e3c8f7c 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/ClusterStatsResource.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/ClusterStatsResource.java @@ -15,15 +15,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.execution.QueryState; -import io.prestosql.execution.scheduler.NodeSchedulerConfig; -import io.prestosql.memory.ClusterMemoryManager; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.metadata.NodeState; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.security.ResourceSecurity; +import io.trino.dispatcher.DispatchManager; +import io.trino.execution.QueryState; +import io.trino.execution.scheduler.NodeSchedulerConfig; +import io.trino.memory.ClusterMemoryManager; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; +import io.trino.metadata.NodeState; +import io.trino.server.BasicQueryInfo; +import io.trino.server.security.ResourceSecurity; import javax.inject.Inject; import javax.ws.rs.GET; @@ -31,7 +31,7 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; -import static io.prestosql.server.security.ResourceSecurity.AccessType.WEB_UI; +import static io.trino.server.security.ResourceSecurity.AccessType.WEB_UI; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/trino-main/src/main/java/io/trino/server/ui/DisabledWebUiAuthenticationFilter.java b/core/trino-main/src/main/java/io/trino/server/ui/DisabledWebUiAuthenticationFilter.java index 76fa02720ded..80316fc9ada9 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/DisabledWebUiAuthenticationFilter.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/DisabledWebUiAuthenticationFilter.java @@ -16,7 +16,7 @@ import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.core.Response; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.DISABLED_LOCATION_URI; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.DISABLED_LOCATION_URI; import static javax.ws.rs.core.Response.Status.UNAUTHORIZED; public class DisabledWebUiAuthenticationFilter diff --git a/core/trino-main/src/main/java/io/trino/server/ui/FixedUserWebUiAuthenticationFilter.java b/core/trino-main/src/main/java/io/trino/server/ui/FixedUserWebUiAuthenticationFilter.java index 2c7244d09bb4..0975132b227a 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/FixedUserWebUiAuthenticationFilter.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/FixedUserWebUiAuthenticationFilter.java @@ -13,14 +13,14 @@ */ package io.trino.server.ui; -import io.prestosql.spi.security.BasicPrincipal; -import io.prestosql.spi.security.Identity; +import io.trino.spi.security.BasicPrincipal; +import io.trino.spi.security.Identity; import javax.inject.Inject; import javax.ws.rs.container.ContainerRequestContext; -import static io.prestosql.server.ServletSecurityUtils.setAuthenticatedIdentity; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.redirectAllFormLoginToUi; +import static io.trino.server.ServletSecurityUtils.setAuthenticatedIdentity; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.redirectAllFormLoginToUi; import static java.util.Objects.requireNonNull; public class FixedUserWebUiAuthenticationFilter diff --git a/core/trino-main/src/main/java/io/trino/server/ui/FormUiAuthenticatorModule.java b/core/trino-main/src/main/java/io/trino/server/ui/FormUiAuthenticatorModule.java index b13647ee2852..7b0b208a2fec 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/FormUiAuthenticatorModule.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/FormUiAuthenticatorModule.java @@ -16,8 +16,8 @@ import com.google.inject.Binder; import com.google.inject.Key; import com.google.inject.Module; -import io.prestosql.server.security.Authenticator; -import io.prestosql.server.security.PasswordAuthenticatorManager; +import io.trino.server.security.Authenticator; +import io.trino.server.security.PasswordAuthenticatorManager; import static com.google.inject.Scopes.SINGLETON; import static com.google.inject.multibindings.OptionalBinder.newOptionalBinder; diff --git a/core/trino-main/src/main/java/io/trino/server/ui/FormWebUiAuthenticationFilter.java b/core/trino-main/src/main/java/io/trino/server/ui/FormWebUiAuthenticationFilter.java index 4de063dc0728..5155dada2cb6 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/FormWebUiAuthenticationFilter.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/FormWebUiAuthenticationFilter.java @@ -18,9 +18,9 @@ import io.jsonwebtoken.JwtException; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; -import io.prestosql.server.security.AuthenticationException; -import io.prestosql.server.security.Authenticator; -import io.prestosql.spi.security.Identity; +import io.trino.server.security.AuthenticationException; +import io.trino.server.security.Authenticator; +import io.trino.spi.security.Identity; import javax.inject.Inject; import javax.ws.rs.container.ContainerRequestContext; @@ -42,8 +42,8 @@ import static com.google.common.base.MoreObjects.firstNonNull; import static com.google.common.base.Strings.emptyToNull; import static com.google.common.base.Strings.isNullOrEmpty; -import static io.prestosql.server.ServletSecurityUtils.sendWwwAuthenticate; -import static io.prestosql.server.ServletSecurityUtils.setAuthenticatedIdentity; +import static io.trino.server.ServletSecurityUtils.sendWwwAuthenticate; +import static io.trino.server.ServletSecurityUtils.setAuthenticatedIdentity; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/main/java/io/trino/server/ui/InsecureFormAuthenticator.java b/core/trino-main/src/main/java/io/trino/server/ui/InsecureFormAuthenticator.java index ddc1744204c9..66d83a236912 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/InsecureFormAuthenticator.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/InsecureFormAuthenticator.java @@ -13,7 +13,7 @@ */ package io.trino.server.ui; -import io.prestosql.server.security.SecurityConfig; +import io.trino.server.security.SecurityConfig; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/server/ui/LoginResource.java b/core/trino-main/src/main/java/io/trino/server/ui/LoginResource.java index f970404c907e..7dd5be2b5eda 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/LoginResource.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/LoginResource.java @@ -14,7 +14,7 @@ package io.trino.server.ui; import com.google.common.io.Resources; -import io.prestosql.server.security.ResourceSecurity; +import io.trino.server.security.ResourceSecurity; import javax.inject.Inject; import javax.ws.rs.FormParam; @@ -34,14 +34,14 @@ import static com.google.common.base.Strings.emptyToNull; import static com.google.common.base.Verify.verify; -import static io.prestosql.server.security.ResourceSecurity.AccessType.WEB_UI; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.DISABLED_LOCATION_URI; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.LOGIN_FORM; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.LOGIN_FORM_URI; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.UI_LOGIN; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.UI_LOGOUT; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.getDeleteCookie; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.redirectFromSuccessfulLoginResponse; +import static io.trino.server.security.ResourceSecurity.AccessType.WEB_UI; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.DISABLED_LOCATION_URI; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.LOGIN_FORM; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.LOGIN_FORM_URI; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.UI_LOGIN; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.UI_LOGOUT; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.getDeleteCookie; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.redirectFromSuccessfulLoginResponse; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.MediaType.TEXT_HTML; diff --git a/core/trino-main/src/main/java/io/trino/server/ui/OAuth2WebUiAuthenticationFilter.java b/core/trino-main/src/main/java/io/trino/server/ui/OAuth2WebUiAuthenticationFilter.java index e07af357e120..c1db4df428d6 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/OAuth2WebUiAuthenticationFilter.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/OAuth2WebUiAuthenticationFilter.java @@ -18,12 +18,12 @@ import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jws; import io.jsonwebtoken.JwtException; -import io.prestosql.server.security.UserMapping; -import io.prestosql.server.security.UserMappingException; -import io.prestosql.server.security.oauth2.OAuth2Config; -import io.prestosql.server.security.oauth2.OAuth2Service; -import io.prestosql.spi.security.BasicPrincipal; -import io.prestosql.spi.security.Identity; +import io.trino.server.security.UserMapping; +import io.trino.server.security.UserMappingException; +import io.trino.server.security.oauth2.OAuth2Config; +import io.trino.server.security.oauth2.OAuth2Service; +import io.trino.spi.security.BasicPrincipal; +import io.trino.spi.security.Identity; import javax.inject.Inject; import javax.ws.rs.container.ContainerRequestContext; @@ -33,12 +33,12 @@ import java.util.Optional; import static com.google.common.base.MoreObjects.firstNonNull; -import static io.prestosql.server.ServletSecurityUtils.sendErrorMessage; -import static io.prestosql.server.ServletSecurityUtils.sendWwwAuthenticate; -import static io.prestosql.server.ServletSecurityUtils.setAuthenticatedIdentity; -import static io.prestosql.server.security.oauth2.OAuth2CallbackResource.CALLBACK_ENDPOINT; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.DISABLED_LOCATION; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.DISABLED_LOCATION_URI; +import static io.trino.server.ServletSecurityUtils.sendErrorMessage; +import static io.trino.server.ServletSecurityUtils.sendWwwAuthenticate; +import static io.trino.server.ServletSecurityUtils.setAuthenticatedIdentity; +import static io.trino.server.security.oauth2.OAuth2CallbackResource.CALLBACK_ENDPOINT; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.DISABLED_LOCATION; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.DISABLED_LOCATION_URI; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.Response.Status.UNAUTHORIZED; diff --git a/core/trino-main/src/main/java/io/trino/server/ui/OAuth2WebUiLogoutResource.java b/core/trino-main/src/main/java/io/trino/server/ui/OAuth2WebUiLogoutResource.java index 3be8348da3be..dd77ad21fe63 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/OAuth2WebUiLogoutResource.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/OAuth2WebUiLogoutResource.java @@ -13,7 +13,7 @@ */ package io.trino.server.ui; -import io.prestosql.server.security.ResourceSecurity; +import io.trino.server.security.ResourceSecurity; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -23,10 +23,10 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.UriInfo; -import static io.prestosql.server.security.ResourceSecurity.AccessType.WEB_UI; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.UI_LOCATION_URI; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.UI_LOGOUT; -import static io.prestosql.server.ui.OAuthWebUiCookie.delete; +import static io.trino.server.security.ResourceSecurity.AccessType.WEB_UI; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.UI_LOCATION_URI; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.UI_LOGOUT; +import static io.trino.server.ui.OAuthWebUiCookie.delete; @Path(UI_LOGOUT) public class OAuth2WebUiLogoutResource diff --git a/core/trino-main/src/main/java/io/trino/server/ui/OAuth2WebUiModule.java b/core/trino-main/src/main/java/io/trino/server/ui/OAuth2WebUiModule.java index e7969b2bfb6a..e130d1c04275 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/OAuth2WebUiModule.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/OAuth2WebUiModule.java @@ -16,7 +16,7 @@ import com.google.inject.Binder; import com.google.inject.Scopes; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.server.security.oauth2.OAuth2ServiceModule; +import io.trino.server.security.oauth2.OAuth2ServiceModule; import static io.airlift.jaxrs.JaxrsBinder.jaxrsBinder; diff --git a/core/trino-main/src/main/java/io/trino/server/ui/OAuthWebUiCookie.java b/core/trino-main/src/main/java/io/trino/server/ui/OAuthWebUiCookie.java index 1ffd56605937..be1b2080f8d6 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/OAuthWebUiCookie.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/OAuthWebUiCookie.java @@ -21,7 +21,7 @@ import java.util.Date; import java.util.Optional; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.UI_LOCATION; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.UI_LOCATION; import static java.util.function.Predicate.not; public final class OAuthWebUiCookie diff --git a/core/trino-main/src/main/java/io/trino/server/ui/PasswordManagerFormAuthenticator.java b/core/trino-main/src/main/java/io/trino/server/ui/PasswordManagerFormAuthenticator.java index fd9f1deda566..be068ea58e70 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/PasswordManagerFormAuthenticator.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/PasswordManagerFormAuthenticator.java @@ -14,10 +14,10 @@ package io.trino.server.ui; import io.airlift.log.Logger; -import io.prestosql.server.security.PasswordAuthenticatorManager; -import io.prestosql.server.security.SecurityConfig; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.PasswordAuthenticator; +import io.trino.server.security.PasswordAuthenticatorManager; +import io.trino.server.security.SecurityConfig; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.PasswordAuthenticator; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/server/ui/UiQueryResource.java b/core/trino-main/src/main/java/io/trino/server/ui/UiQueryResource.java index 1ee5b4da3c3c..277e6dca7867 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/UiQueryResource.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/UiQueryResource.java @@ -14,16 +14,16 @@ package io.trino.server.ui; import com.google.common.collect.ImmutableList; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryState; -import io.prestosql.security.AccessControl; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.security.ResourceSecurity; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.GroupProvider; +import io.trino.dispatcher.DispatchManager; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryState; +import io.trino.security.AccessControl; +import io.trino.server.BasicQueryInfo; +import io.trino.server.security.ResourceSecurity; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.GroupProvider; import javax.inject.Inject; import javax.servlet.http.HttpServletRequest; @@ -43,13 +43,13 @@ import java.util.NoSuchElementException; import java.util.Optional; -import static io.prestosql.connector.system.KillQueryProcedure.createKillQueryException; -import static io.prestosql.connector.system.KillQueryProcedure.createPreemptQueryException; -import static io.prestosql.security.AccessControlUtil.checkCanKillQueryOwnedBy; -import static io.prestosql.security.AccessControlUtil.checkCanViewQueryOwnedBy; -import static io.prestosql.security.AccessControlUtil.filterQueries; -import static io.prestosql.server.HttpRequestSessionContext.extractAuthorizedIdentity; -import static io.prestosql.server.security.ResourceSecurity.AccessType.WEB_UI; +import static io.trino.connector.system.KillQueryProcedure.createKillQueryException; +import static io.trino.connector.system.KillQueryProcedure.createPreemptQueryException; +import static io.trino.security.AccessControlUtil.checkCanKillQueryOwnedBy; +import static io.trino.security.AccessControlUtil.checkCanViewQueryOwnedBy; +import static io.trino.security.AccessControlUtil.filterQueries; +import static io.trino.server.HttpRequestSessionContext.extractAuthorizedIdentity; +import static io.trino.server.security.ResourceSecurity.AccessType.WEB_UI; import static java.util.Objects.requireNonNull; @Path("/ui/api/query") diff --git a/core/trino-main/src/main/java/io/trino/server/ui/WebUiAuthenticationModule.java b/core/trino-main/src/main/java/io/trino/server/ui/WebUiAuthenticationModule.java index da0a4feafec2..4ad6971d917a 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/WebUiAuthenticationModule.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/WebUiAuthenticationModule.java @@ -18,14 +18,14 @@ import com.google.inject.Module; import io.airlift.configuration.AbstractConfigurationAwareModule; import io.airlift.http.server.HttpServer.ClientCertificate; -import io.prestosql.server.security.Authenticator; -import io.prestosql.server.security.CertificateAuthenticator; -import io.prestosql.server.security.CertificateConfig; -import io.prestosql.server.security.KerberosAuthenticator; -import io.prestosql.server.security.KerberosConfig; -import io.prestosql.server.security.SecurityConfig; -import io.prestosql.server.security.jwt.JwtAuthenticator; -import io.prestosql.server.security.jwt.JwtAuthenticatorSupportModule; +import io.trino.server.security.Authenticator; +import io.trino.server.security.CertificateAuthenticator; +import io.trino.server.security.CertificateConfig; +import io.trino.server.security.KerberosAuthenticator; +import io.trino.server.security.KerberosConfig; +import io.trino.server.security.SecurityConfig; +import io.trino.server.security.jwt.JwtAuthenticator; +import io.trino.server.security.jwt.JwtAuthenticatorSupportModule; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/server/ui/WebUiStaticResource.java b/core/trino-main/src/main/java/io/trino/server/ui/WebUiStaticResource.java index d8dcce5fe838..8711e9238444 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/WebUiStaticResource.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/WebUiStaticResource.java @@ -13,7 +13,7 @@ */ package io.trino.server.ui; -import io.prestosql.server.security.ResourceSecurity; +import io.trino.server.security.ResourceSecurity; import javax.servlet.ServletContext; import javax.ws.rs.GET; @@ -28,8 +28,8 @@ import java.net.URISyntaxException; import java.net.URL; -import static io.prestosql.server.security.ResourceSecurity.AccessType.PUBLIC; -import static io.prestosql.server.security.ResourceSecurity.AccessType.WEB_UI; +import static io.trino.server.security.ResourceSecurity.AccessType.PUBLIC; +import static io.trino.server.security.ResourceSecurity.AccessType.WEB_UI; import static javax.ws.rs.core.Response.Status.NOT_FOUND; @Path("") diff --git a/core/trino-main/src/main/java/io/trino/server/ui/WorkerResource.java b/core/trino-main/src/main/java/io/trino/server/ui/WorkerResource.java index f6314abf555e..d36f6d7bddd1 100644 --- a/core/trino-main/src/main/java/io/trino/server/ui/WorkerResource.java +++ b/core/trino-main/src/main/java/io/trino/server/ui/WorkerResource.java @@ -16,18 +16,18 @@ import io.airlift.http.client.HttpClient; import io.airlift.http.client.Request; import io.airlift.http.client.ResponseHandler; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.TaskId; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.metadata.NodeState; -import io.prestosql.security.AccessControl; -import io.prestosql.server.ForWorkerInfo; -import io.prestosql.server.security.ResourceSecurity; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.GroupProvider; +import io.trino.dispatcher.DispatchManager; +import io.trino.execution.QueryInfo; +import io.trino.execution.TaskId; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; +import io.trino.metadata.NodeState; +import io.trino.security.AccessControl; +import io.trino.server.ForWorkerInfo; +import io.trino.server.security.ResourceSecurity; +import io.trino.spi.QueryId; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.GroupProvider; import javax.inject.Inject; import javax.servlet.http.HttpServletRequest; @@ -49,9 +49,9 @@ import static com.google.common.net.HttpHeaders.CONTENT_TYPE; import static io.airlift.http.client.HttpUriBuilder.uriBuilderFrom; import static io.airlift.http.client.Request.Builder.prepareGet; -import static io.prestosql.security.AccessControlUtil.checkCanViewQueryOwnedBy; -import static io.prestosql.server.HttpRequestSessionContext.extractAuthorizedIdentity; -import static io.prestosql.server.security.ResourceSecurity.AccessType.WEB_UI; +import static io.trino.security.AccessControlUtil.checkCanViewQueryOwnedBy; +import static io.trino.server.HttpRequestSessionContext.extractAuthorizedIdentity; +import static io.trino.server.security.ResourceSecurity.AccessType.WEB_UI; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.MediaType.APPLICATION_JSON; import static javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE; diff --git a/core/trino-main/src/main/java/io/trino/spiller/AesSpillCipher.java b/core/trino-main/src/main/java/io/trino/spiller/AesSpillCipher.java index 19a186d48fce..0656264fb172 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/AesSpillCipher.java +++ b/core/trino-main/src/main/java/io/trino/spiller/AesSpillCipher.java @@ -14,7 +14,7 @@ package io.trino.spiller; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import javax.crypto.Cipher; import javax.crypto.KeyGenerator; @@ -26,7 +26,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; @VisibleForTesting public final class AesSpillCipher diff --git a/core/trino-main/src/main/java/io/trino/spiller/FileSingleStreamSpiller.java b/core/trino-main/src/main/java/io/trino/spiller/FileSingleStreamSpiller.java index e74694066c00..991b339cb9d2 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/FileSingleStreamSpiller.java +++ b/core/trino-main/src/main/java/io/trino/spiller/FileSingleStreamSpiller.java @@ -23,13 +23,13 @@ import io.airlift.slice.InputStreamSliceInput; import io.airlift.slice.OutputStreamSliceOutput; import io.airlift.slice.SliceOutput; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.PagesSerdeUtil; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.SpillContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; +import io.trino.execution.buffer.PagesSerde; +import io.trino.execution.buffer.PagesSerdeUtil; +import io.trino.execution.buffer.SerializedPage; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.SpillContext; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; import javax.annotation.concurrent.NotThreadSafe; @@ -44,10 +44,10 @@ import java.util.Optional; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.execution.buffer.PagesSerdeUtil.writeSerializedPage; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spiller.FileSingleStreamSpillerFactory.SPILL_FILE_PREFIX; -import static io.prestosql.spiller.FileSingleStreamSpillerFactory.SPILL_FILE_SUFFIX; +import static io.trino.execution.buffer.PagesSerdeUtil.writeSerializedPage; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spiller.FileSingleStreamSpillerFactory.SPILL_FILE_PREFIX; +import static io.trino.spiller.FileSingleStreamSpillerFactory.SPILL_FILE_SUFFIX; import static java.nio.file.StandardOpenOption.APPEND; import static java.util.Objects.requireNonNull; 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 eba01fdf56bb..0709cf0f4e28 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,15 +21,15 @@ import com.google.common.util.concurrent.ListeningExecutorService; import com.google.inject.Inject; import io.airlift.log.Logger; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.SpillContext; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.FeaturesConfig; +import io.trino.execution.buffer.PagesSerde; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.metadata.Metadata; +import io.trino.operator.SpillContext; +import io.trino.spi.PrestoException; +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.prestosql.spi.StandardErrorCode.OUT_OF_SPILL_SPACE; -import static io.prestosql.sql.analyzer.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/spiller/GenericPartitioningSpiller.java b/core/trino-main/src/main/java/io/trino/spiller/GenericPartitioningSpiller.java index 0ea7e08c1618..7211135baece 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/GenericPartitioningSpiller.java +++ b/core/trino-main/src/main/java/io/trino/spiller/GenericPartitioningSpiller.java @@ -18,12 +18,12 @@ import com.google.common.io.Closer; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.operator.PartitionFunction; -import io.prestosql.operator.SpillContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.operator.PartitionFunction; +import io.trino.operator.SpillContext; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.Type; import it.unimi.dsi.fastutil.ints.IntArrayList; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/spiller/GenericPartitioningSpillerFactory.java b/core/trino-main/src/main/java/io/trino/spiller/GenericPartitioningSpillerFactory.java index 80253c3126f0..13e73d1f7cd2 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/GenericPartitioningSpillerFactory.java +++ b/core/trino-main/src/main/java/io/trino/spiller/GenericPartitioningSpillerFactory.java @@ -14,10 +14,10 @@ package io.trino.spiller; import com.google.inject.Inject; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.operator.PartitionFunction; -import io.prestosql.operator.SpillContext; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.operator.PartitionFunction; +import io.trino.operator.SpillContext; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/spiller/GenericSpiller.java b/core/trino-main/src/main/java/io/trino/spiller/GenericSpiller.java index 03189428e6de..deecc3396095 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/GenericSpiller.java +++ b/core/trino-main/src/main/java/io/trino/spiller/GenericSpiller.java @@ -16,10 +16,10 @@ import com.google.common.io.Closer; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.operator.SpillContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.operator.SpillContext; +import io.trino.spi.Page; +import io.trino.spi.type.Type; import javax.annotation.concurrent.NotThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/spiller/GenericSpillerFactory.java b/core/trino-main/src/main/java/io/trino/spiller/GenericSpillerFactory.java index b216771197d9..45248c0251b7 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/GenericSpillerFactory.java +++ b/core/trino-main/src/main/java/io/trino/spiller/GenericSpillerFactory.java @@ -14,9 +14,9 @@ package io.trino.spiller; import com.google.inject.Inject; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.operator.SpillContext; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.operator.SpillContext; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/spiller/LocalSpillContext.java b/core/trino-main/src/main/java/io/trino/spiller/LocalSpillContext.java index 2d2169384e37..115799c3ed3a 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/LocalSpillContext.java +++ b/core/trino-main/src/main/java/io/trino/spiller/LocalSpillContext.java @@ -13,7 +13,7 @@ */ package io.trino.spiller; -import io.prestosql.operator.SpillContext; +import io.trino.operator.SpillContext; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/spiller/PartitioningSpiller.java b/core/trino-main/src/main/java/io/trino/spiller/PartitioningSpiller.java index c688826edc20..73263d2d2139 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/PartitioningSpiller.java +++ b/core/trino-main/src/main/java/io/trino/spiller/PartitioningSpiller.java @@ -14,7 +14,7 @@ package io.trino.spiller; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.io.Closeable; import java.io.IOException; diff --git a/core/trino-main/src/main/java/io/trino/spiller/PartitioningSpillerFactory.java b/core/trino-main/src/main/java/io/trino/spiller/PartitioningSpillerFactory.java index 06a32bd32d71..8a5c7d6d5736 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/PartitioningSpillerFactory.java +++ b/core/trino-main/src/main/java/io/trino/spiller/PartitioningSpillerFactory.java @@ -13,10 +13,10 @@ */ package io.trino.spiller; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.operator.PartitionFunction; -import io.prestosql.operator.SpillContext; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.operator.PartitionFunction; +import io.trino.operator.SpillContext; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/spiller/SingleStreamSpiller.java b/core/trino-main/src/main/java/io/trino/spiller/SingleStreamSpiller.java index 8e16cb10a3ec..82283a75ef57 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/SingleStreamSpiller.java +++ b/core/trino-main/src/main/java/io/trino/spiller/SingleStreamSpiller.java @@ -14,7 +14,7 @@ package io.trino.spiller; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.io.Closeable; import java.util.Iterator; diff --git a/core/trino-main/src/main/java/io/trino/spiller/SingleStreamSpillerFactory.java b/core/trino-main/src/main/java/io/trino/spiller/SingleStreamSpillerFactory.java index bdb4a1e33f3b..a506744ba61f 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/SingleStreamSpillerFactory.java +++ b/core/trino-main/src/main/java/io/trino/spiller/SingleStreamSpillerFactory.java @@ -13,9 +13,9 @@ */ package io.trino.spiller; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.SpillContext; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.SpillContext; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/spiller/SpillSpaceTracker.java b/core/trino-main/src/main/java/io/trino/spiller/SpillSpaceTracker.java index 154187270cff..024ebe72d87e 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/SpillSpaceTracker.java +++ b/core/trino-main/src/main/java/io/trino/spiller/SpillSpaceTracker.java @@ -15,7 +15,7 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.ExceededSpillLimitException; +import io.trino.ExceededSpillLimitException; import org.weakref.jmx.Managed; import javax.annotation.concurrent.GuardedBy; @@ -24,8 +24,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.ExceededSpillLimitException.exceededLocalLimit; -import static io.prestosql.operator.Operator.NOT_BLOCKED; +import static io.trino.ExceededSpillLimitException.exceededLocalLimit; +import static io.trino.operator.Operator.NOT_BLOCKED; import static java.util.Objects.requireNonNull; @ThreadSafe diff --git a/core/trino-main/src/main/java/io/trino/spiller/Spiller.java b/core/trino-main/src/main/java/io/trino/spiller/Spiller.java index fdf46071b482..c13fc02fa3fb 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/Spiller.java +++ b/core/trino-main/src/main/java/io/trino/spiller/Spiller.java @@ -14,7 +14,7 @@ package io.trino.spiller; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.io.Closeable; import java.util.Iterator; diff --git a/core/trino-main/src/main/java/io/trino/spiller/SpillerFactory.java b/core/trino-main/src/main/java/io/trino/spiller/SpillerFactory.java index b0beb892fe75..38d43d30cc88 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/SpillerFactory.java +++ b/core/trino-main/src/main/java/io/trino/spiller/SpillerFactory.java @@ -13,9 +13,9 @@ */ package io.trino.spiller; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.operator.SpillContext; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.operator.SpillContext; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/split/BufferingSplitSource.java b/core/trino-main/src/main/java/io/trino/split/BufferingSplitSource.java index 77b1833ab7b8..e636aae660aa 100644 --- a/core/trino-main/src/main/java/io/trino/split/BufferingSplitSource.java +++ b/core/trino-main/src/main/java/io/trino/split/BufferingSplitSource.java @@ -15,10 +15,10 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.metadata.Split; -import io.prestosql.spi.connector.ConnectorPartitionHandle; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.metadata.Split; +import io.trino.spi.connector.ConnectorPartitionHandle; import java.util.ArrayList; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/split/ConnectorAwareSplitSource.java b/core/trino-main/src/main/java/io/trino/split/ConnectorAwareSplitSource.java index 076d13dd398d..60ad772bc34b 100644 --- a/core/trino-main/src/main/java/io/trino/split/ConnectorAwareSplitSource.java +++ b/core/trino-main/src/main/java/io/trino/split/ConnectorAwareSplitSource.java @@ -16,13 +16,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.metadata.Split; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorSplitSource.ConnectorSplitBatch; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.metadata.Split; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorSplitSource.ConnectorSplitBatch; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/split/EmptySplit.java b/core/trino-main/src/main/java/io/trino/split/EmptySplit.java index 0ddb7ede52d6..14cb823e4bd6 100644 --- a/core/trino-main/src/main/java/io/trino/split/EmptySplit.java +++ b/core/trino-main/src/main/java/io/trino/split/EmptySplit.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.connector.CatalogName; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/split/EmptySplitHandleResolver.java b/core/trino-main/src/main/java/io/trino/split/EmptySplitHandleResolver.java index 7dde7c209008..a515eb7e92c1 100644 --- a/core/trino-main/src/main/java/io/trino/split/EmptySplitHandleResolver.java +++ b/core/trino-main/src/main/java/io/trino/split/EmptySplitHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.split; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; public class EmptySplitHandleResolver implements ConnectorHandleResolver diff --git a/core/trino-main/src/main/java/io/trino/split/MappedPageSource.java b/core/trino-main/src/main/java/io/trino/split/MappedPageSource.java index 690209f3679a..56f2e352521e 100644 --- a/core/trino-main/src/main/java/io/trino/split/MappedPageSource.java +++ b/core/trino-main/src/main/java/io/trino/split/MappedPageSource.java @@ -14,8 +14,8 @@ package io.trino.split; import com.google.common.primitives.Ints; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorPageSource; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorPageSource; import java.io.IOException; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/split/MappedRecordSet.java b/core/trino-main/src/main/java/io/trino/split/MappedRecordSet.java index 51e0ffe59ffe..1ed519e21142 100644 --- a/core/trino-main/src/main/java/io/trino/split/MappedRecordSet.java +++ b/core/trino-main/src/main/java/io/trino/split/MappedRecordSet.java @@ -15,9 +15,9 @@ import com.google.common.primitives.Ints; import io.airlift.slice.Slice; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/split/PageSinkManager.java b/core/trino-main/src/main/java/io/trino/split/PageSinkManager.java index 9a3f4591071a..1c9f7d62f4e8 100644 --- a/core/trino-main/src/main/java/io/trino/split/PageSinkManager.java +++ b/core/trino-main/src/main/java/io/trino/split/PageSinkManager.java @@ -13,13 +13,13 @@ */ package io.trino.split; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.InsertTableHandle; -import io.prestosql.metadata.OutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.InsertTableHandle; +import io.trino.metadata.OutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; diff --git a/core/trino-main/src/main/java/io/trino/split/PageSinkProvider.java b/core/trino-main/src/main/java/io/trino/split/PageSinkProvider.java index 5c6aa2e72244..8cf84625635a 100644 --- a/core/trino-main/src/main/java/io/trino/split/PageSinkProvider.java +++ b/core/trino-main/src/main/java/io/trino/split/PageSinkProvider.java @@ -13,10 +13,10 @@ */ package io.trino.split; -import io.prestosql.Session; -import io.prestosql.metadata.InsertTableHandle; -import io.prestosql.metadata.OutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; +import io.trino.Session; +import io.trino.metadata.InsertTableHandle; +import io.trino.metadata.OutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; public interface PageSinkProvider { diff --git a/core/trino-main/src/main/java/io/trino/split/PageSourceManager.java b/core/trino-main/src/main/java/io/trino/split/PageSourceManager.java index 633f040e0f51..bfdb9c7f6fc0 100644 --- a/core/trino-main/src/main/java/io/trino/split/PageSourceManager.java +++ b/core/trino-main/src/main/java/io/trino/split/PageSourceManager.java @@ -13,16 +13,16 @@ */ package io.trino.split; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Split; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.EmptyPageSource; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.Split; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.EmptyPageSource; +import io.trino.spi.predicate.TupleDomain; import java.util.List; import java.util.concurrent.ConcurrentHashMap; diff --git a/core/trino-main/src/main/java/io/trino/split/PageSourceProvider.java b/core/trino-main/src/main/java/io/trino/split/PageSourceProvider.java index 676f2f819ed3..5a103103c2ed 100644 --- a/core/trino-main/src/main/java/io/trino/split/PageSourceProvider.java +++ b/core/trino-main/src/main/java/io/trino/split/PageSourceProvider.java @@ -13,12 +13,12 @@ */ package io.trino.split; -import io.prestosql.Session; -import io.prestosql.metadata.Split; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.DynamicFilter; +import io.trino.Session; +import io.trino.metadata.Split; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.DynamicFilter; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/split/RecordPageSourceProvider.java b/core/trino-main/src/main/java/io/trino/split/RecordPageSourceProvider.java index a6236e7db9f8..4ddf6a145e00 100644 --- a/core/trino-main/src/main/java/io/trino/split/RecordPageSourceProvider.java +++ b/core/trino-main/src/main/java/io/trino/split/RecordPageSourceProvider.java @@ -13,16 +13,16 @@ */ package io.trino.split; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.predicate.TupleDomain; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/split/RemoteSplit.java b/core/trino-main/src/main/java/io/trino/split/RemoteSplit.java index 153d7d9f68e8..1a652641d639 100644 --- a/core/trino-main/src/main/java/io/trino/split/RemoteSplit.java +++ b/core/trino-main/src/main/java/io/trino/split/RemoteSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.net.URI; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/split/SampledSplitSource.java b/core/trino-main/src/main/java/io/trino/split/SampledSplitSource.java index 357e93fb8f19..609c9b42bedb 100644 --- a/core/trino-main/src/main/java/io/trino/split/SampledSplitSource.java +++ b/core/trino-main/src/main/java/io/trino/split/SampledSplitSource.java @@ -15,9 +15,9 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.spi.connector.ConnectorPartitionHandle; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.spi.connector.ConnectorPartitionHandle; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/split/SplitManager.java b/core/trino-main/src/main/java/io/trino/split/SplitManager.java index 95538636d950..dd73cc549503 100644 --- a/core/trino-main/src/main/java/io/trino/split/SplitManager.java +++ b/core/trino-main/src/main/java/io/trino/split/SplitManager.java @@ -13,18 +13,18 @@ */ package io.trino.split; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.DynamicFilter; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.execution.QueryManagerConfig; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.DynamicFilter; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/split/SplitSource.java b/core/trino-main/src/main/java/io/trino/split/SplitSource.java index c9851c8d2ed0..20ee3a540195 100644 --- a/core/trino-main/src/main/java/io/trino/split/SplitSource.java +++ b/core/trino-main/src/main/java/io/trino/split/SplitSource.java @@ -14,10 +14,10 @@ package io.trino.split; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.metadata.Split; -import io.prestosql.spi.connector.ConnectorPartitionHandle; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.metadata.Split; +import io.trino.spi.connector.ConnectorPartitionHandle; import java.io.Closeable; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/DynamicFilters.java b/core/trino-main/src/main/java/io/trino/sql/DynamicFilters.java index 4638e611dec0..3fb83b27994b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/DynamicFilters.java +++ b/core/trino-main/src/main/java/io/trino/sql/DynamicFilters.java @@ -17,28 +17,28 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Multimap; import io.airlift.slice.Slice; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Objects; @@ -48,12 +48,12 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableListMultimap.toImmutableListMultimap; -import static io.prestosql.spi.type.StandardTypes.BOOLEAN; -import static io.prestosql.spi.type.StandardTypes.VARCHAR; -import static io.prestosql.sql.ExpressionUtils.extractConjuncts; -import static io.prestosql.sql.tree.BooleanLiteral.FALSE_LITERAL; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.spi.type.StandardTypes.BOOLEAN; +import static io.trino.spi.type.StandardTypes.VARCHAR; +import static io.trino.sql.ExpressionUtils.extractConjuncts; +import static io.trino.sql.tree.BooleanLiteral.FALSE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; import static java.util.Objects.requireNonNull; public final class DynamicFilters diff --git a/core/trino-main/src/main/java/io/trino/sql/ExpressionUtils.java b/core/trino-main/src/main/java/io/trino/sql/ExpressionUtils.java index a7674395c752..e02613c8f1d0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/ExpressionUtils.java +++ b/core/trino-main/src/main/java/io/trino/sql/ExpressionUtils.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.DeterminismEvaluator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.GenericDataType; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.LogicalBinaryExpression.Operator; -import io.prestosql.sql.tree.RowDataType; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.DeterminismEvaluator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.GenericDataType; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.LogicalBinaryExpression.Operator; +import io.trino.sql.tree.RowDataType; +import io.trino.sql.tree.SymbolReference; import java.util.ArrayDeque; import java.util.Arrays; @@ -43,8 +43,8 @@ import static com.google.common.base.Predicates.not; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.tree.BooleanLiteral.FALSE_LITERAL; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.FALSE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/main/java/io/trino/sql/InterpretedFunctionInvoker.java b/core/trino-main/src/main/java/io/trino/sql/InterpretedFunctionInvoker.java index b1d5dd2da8f8..c6a4fe064ee7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/InterpretedFunctionInvoker.java +++ b/core/trino-main/src/main/java/io/trino/sql/InterpretedFunctionInvoker.java @@ -14,14 +14,14 @@ package io.trino.sql; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.type.FunctionType; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.type.FunctionType; import java.lang.invoke.MethodHandle; import java.util.ArrayList; @@ -29,12 +29,12 @@ import java.util.List; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.type.FunctionType.NAME; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.type.FunctionType.NAME; import static java.lang.invoke.MethodHandleProxies.asInterfaceInstance; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/NodeUtils.java b/core/trino-main/src/main/java/io/trino/sql/NodeUtils.java index b4d03127e713..ef12b3ea563d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/NodeUtils.java +++ b/core/trino-main/src/main/java/io/trino/sql/NodeUtils.java @@ -14,10 +14,10 @@ package io.trino.sql; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.Property; -import io.prestosql.sql.tree.SortItem; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.Property; +import io.trino.sql.tree.SortItem; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/ParameterUtils.java b/core/trino-main/src/main/java/io/trino/sql/ParameterUtils.java index bd9d9cb6c88b..a696a930c91d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/ParameterUtils.java +++ b/core/trino-main/src/main/java/io/trino/sql/ParameterUtils.java @@ -14,11 +14,11 @@ package io.trino.sql; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NodeLocation; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.Statement; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NodeLocation; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.Statement; import java.util.Comparator; import java.util.Iterator; @@ -26,7 +26,7 @@ import java.util.Map; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.execution.ParameterExtractor.getParameters; +import static io.trino.execution.ParameterExtractor.getParameters; public class ParameterUtils { diff --git a/core/trino-main/src/main/java/io/trino/sql/ParsingUtil.java b/core/trino-main/src/main/java/io/trino/sql/ParsingUtil.java index 045877821c26..0a46e0854387 100644 --- a/core/trino-main/src/main/java/io/trino/sql/ParsingUtil.java +++ b/core/trino-main/src/main/java/io/trino/sql/ParsingUtil.java @@ -13,12 +13,12 @@ */ package io.trino.sql; -import io.prestosql.Session; -import io.prestosql.sql.parser.ParsingOptions; +import io.trino.Session; +import io.trino.sql.parser.ParsingOptions; -import static io.prestosql.SystemSessionProperties.isParseDecimalLiteralsAsDouble; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DECIMAL; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; +import static io.trino.SystemSessionProperties.isParseDecimalLiteralsAsDouble; +import static io.trino.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DECIMAL; +import static io.trino.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; public final class ParsingUtil { diff --git a/core/trino-main/src/main/java/io/trino/sql/SqlEnvironmentConfig.java b/core/trino-main/src/main/java/io/trino/sql/SqlEnvironmentConfig.java index e3f39c171030..382d2263c445 100644 --- a/core/trino-main/src/main/java/io/trino/sql/SqlEnvironmentConfig.java +++ b/core/trino-main/src/main/java/io/trino/sql/SqlEnvironmentConfig.java @@ -15,7 +15,7 @@ import io.airlift.configuration.Config; import io.airlift.configuration.ConfigDescription; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.spi.type.TimeZoneKey; import javax.annotation.Nullable; import javax.validation.constraints.NotNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/SqlFormatterUtil.java b/core/trino-main/src/main/java/io/trino/sql/SqlFormatterUtil.java index b194a63cb4fe..21b152990fc9 100644 --- a/core/trino-main/src/main/java/io/trino/sql/SqlFormatterUtil.java +++ b/core/trino-main/src/main/java/io/trino/sql/SqlFormatterUtil.java @@ -13,16 +13,16 @@ */ package io.trino.sql; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.parser.ParsingException; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.Statement; +import io.trino.spi.PrestoException; +import io.trino.sql.parser.ParsingException; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.Statement; import javax.annotation.Nullable; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.REJECT; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.sql.parser.ParsingOptions.DecimalLiteralTreatment.REJECT; import static java.lang.String.format; public final class SqlFormatterUtil diff --git a/core/trino-main/src/main/java/io/trino/sql/SqlPath.java b/core/trino-main/src/main/java/io/trino/sql/SqlPath.java index 0db418a09112..9c7a2b2f8032 100644 --- a/core/trino-main/src/main/java/io/trino/sql/SqlPath.java +++ b/core/trino-main/src/main/java/io/trino/sql/SqlPath.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Joiner; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.PathElement; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.PathElement; import java.util.List; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/sql/SqlPathElement.java b/core/trino-main/src/main/java/io/trino/sql/SqlPathElement.java index 1c3a508bd440..8f9c194c8c25 100644 --- a/core/trino-main/src/main/java/io/trino/sql/SqlPathElement.java +++ b/core/trino-main/src/main/java/io/trino/sql/SqlPathElement.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.sql.tree.Identifier; +import io.trino.sql.tree.Identifier; import java.util.Objects; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/AggregationAnalyzer.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/AggregationAnalyzer.java index 1402d2387dc4..9bfd765722f8 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/AggregationAnalyzer.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/AggregationAnalyzer.java @@ -14,54 +14,54 @@ package io.trino.sql.analyzer; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.sql.planner.ScopeAware; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; -import io.prestosql.sql.tree.ArrayConstructor; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.AtTimeZone; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.BindExpression; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.CurrentTime; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Extract; -import io.prestosql.sql.tree.FieldReference; -import io.prestosql.sql.tree.Format; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GroupingOperation; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.InListExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.Literal; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullIfExpression; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.QuantifiedComparisonExpression; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.SubqueryExpression; -import io.prestosql.sql.tree.SubscriptExpression; -import io.prestosql.sql.tree.TryExpression; -import io.prestosql.sql.tree.WhenClause; -import io.prestosql.sql.tree.Window; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.metadata.Metadata; +import io.trino.spi.StandardErrorCode; +import io.trino.sql.planner.ScopeAware; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArithmeticUnaryExpression; +import io.trino.sql.tree.ArrayConstructor; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.AtTimeZone; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.BindExpression; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.CurrentTime; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Extract; +import io.trino.sql.tree.FieldReference; +import io.trino.sql.tree.Format; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GroupingOperation; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.InListExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.Literal; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullIfExpression; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.QuantifiedComparisonExpression; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.SubqueryExpression; +import io.trino.sql.tree.SubscriptExpression; +import io.trino.sql.tree.TryExpression; +import io.trino.sql.tree.WhenClause; +import io.trino.sql.tree.Window; +import io.trino.sql.tree.WindowFrame; import javax.annotation.Nullable; @@ -76,22 +76,22 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.spi.StandardErrorCode.COLUMN_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.EXPRESSION_NOT_AGGREGATE; -import static io.prestosql.spi.StandardErrorCode.EXPRESSION_NOT_IN_DISTINCT; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_NOT_AGGREGATE; -import static io.prestosql.spi.StandardErrorCode.INVALID_ARGUMENTS; -import static io.prestosql.spi.StandardErrorCode.NESTED_AGGREGATION; -import static io.prestosql.spi.StandardErrorCode.NESTED_WINDOW; -import static io.prestosql.sql.NodeUtils.getSortItemsFromOrderBy; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.extractAggregateFunctions; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.extractWindowFunctions; -import static io.prestosql.sql.analyzer.FreeLambdaReferenceExtractor.hasFreeReferencesToLambdaArgument; -import static io.prestosql.sql.analyzer.ScopeReferenceExtractor.getReferencesToScope; -import static io.prestosql.sql.analyzer.ScopeReferenceExtractor.hasReferencesToScope; -import static io.prestosql.sql.analyzer.ScopeReferenceExtractor.isFieldFromScope; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.sql.planner.ScopeAware.scopeAwareKey; +import static io.trino.spi.StandardErrorCode.COLUMN_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.EXPRESSION_NOT_AGGREGATE; +import static io.trino.spi.StandardErrorCode.EXPRESSION_NOT_IN_DISTINCT; +import static io.trino.spi.StandardErrorCode.FUNCTION_NOT_AGGREGATE; +import static io.trino.spi.StandardErrorCode.INVALID_ARGUMENTS; +import static io.trino.spi.StandardErrorCode.NESTED_AGGREGATION; +import static io.trino.spi.StandardErrorCode.NESTED_WINDOW; +import static io.trino.sql.NodeUtils.getSortItemsFromOrderBy; +import static io.trino.sql.analyzer.ExpressionTreeUtils.extractAggregateFunctions; +import static io.trino.sql.analyzer.ExpressionTreeUtils.extractWindowFunctions; +import static io.trino.sql.analyzer.FreeLambdaReferenceExtractor.hasFreeReferencesToLambdaArgument; +import static io.trino.sql.analyzer.ScopeReferenceExtractor.getReferencesToScope; +import static io.trino.sql.analyzer.ScopeReferenceExtractor.hasReferencesToScope; +import static io.trino.sql.analyzer.ScopeReferenceExtractor.isFieldFromScope; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.sql.planner.ScopeAware.scopeAwareKey; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/Analysis.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/Analysis.java index 22041d722fa6..1876f00d46b9 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/Analysis.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/Analysis.java @@ -22,46 +22,46 @@ import com.google.common.collect.Multimap; import com.google.common.collect.Multiset; import com.google.common.collect.Streams; -import io.prestosql.metadata.NewTableLayout; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.metadata.TableHandle; -import io.prestosql.security.AccessControl; -import io.prestosql.security.SecurityContext; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.eventlistener.ColumnInfo; -import io.prestosql.spi.eventlistener.RoutineInfo; -import io.prestosql.spi.eventlistener.TableInfo; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FieldReference; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GroupingOperation; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.Join; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Offset; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.QuantifiedComparisonExpression; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.QuerySpecification; -import io.prestosql.sql.tree.Relation; -import io.prestosql.sql.tree.SampledRelation; -import io.prestosql.sql.tree.Statement; -import io.prestosql.sql.tree.SubqueryExpression; -import io.prestosql.sql.tree.Table; -import io.prestosql.sql.tree.Unnest; -import io.prestosql.transaction.TransactionId; +import io.trino.metadata.NewTableLayout; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.ResolvedFunction; +import io.trino.metadata.TableHandle; +import io.trino.security.AccessControl; +import io.trino.security.SecurityContext; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.eventlistener.ColumnInfo; +import io.trino.spi.eventlistener.RoutineInfo; +import io.trino.spi.eventlistener.TableInfo; +import io.trino.spi.security.Identity; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FieldReference; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GroupingOperation; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.Join; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Offset; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.QuantifiedComparisonExpression; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.QuerySpecification; +import io.trino.sql.tree.Relation; +import io.trino.sql.tree.SampledRelation; +import io.trino.sql.tree.Statement; +import io.trino.sql.tree.SubqueryExpression; +import io.trino.sql.tree.Table; +import io.trino.sql.tree.Unnest; +import io.trino.transaction.TransactionId; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/Analyzer.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/Analyzer.java index 90abb0fbf81e..9021a7d6851f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/Analyzer.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/Analyzer.java @@ -15,30 +15,30 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.Session; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.rewrite.StatementRewrite; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GroupingOperation; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.Statement; +import io.trino.Session; +import io.trino.cost.StatsCalculator; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.security.GroupProvider; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.rewrite.StatementRewrite; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GroupingOperation; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.Statement; import java.util.List; import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.EXPRESSION_NOT_SCALAR; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.extractAggregateFunctions; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.extractExpressions; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.extractWindowFunctions; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.spi.StandardErrorCode.EXPRESSION_NOT_SCALAR; +import static io.trino.sql.analyzer.ExpressionTreeUtils.extractAggregateFunctions; +import static io.trino.sql.analyzer.ExpressionTreeUtils.extractExpressions; +import static io.trino.sql.analyzer.ExpressionTreeUtils.extractWindowFunctions; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; import static java.util.Objects.requireNonNull; public class Analyzer diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/CanonicalizationAware.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/CanonicalizationAware.java index 1f0fdb49002a..ba45c046120c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/CanonicalizationAware.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/CanonicalizationAware.java @@ -13,13 +13,13 @@ */ package io.trino.sql.analyzer; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.Node; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.Node; import java.util.OptionalInt; -import static io.prestosql.sql.util.AstUtils.treeEqual; -import static io.prestosql.sql.util.AstUtils.treeHash; +import static io.trino.sql.util.AstUtils.treeEqual; +import static io.trino.sql.util.AstUtils.treeHash; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/ConstantExpressionVerifier.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/ConstantExpressionVerifier.java index 76b6e9a7f20e..9cdfbc7258d5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/ConstantExpressionVerifier.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/ConstantExpressionVerifier.java @@ -13,17 +13,17 @@ */ package io.trino.sql.analyzer; -import io.prestosql.sql.tree.DefaultTraversalVisitor; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FieldReference; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.NodeRef; +import io.trino.sql.tree.DefaultTraversalVisitor; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FieldReference; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.NodeRef; import java.util.Set; -import static io.prestosql.spi.StandardErrorCode.EXPRESSION_NOT_CONSTANT; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.spi.StandardErrorCode.EXPRESSION_NOT_CONSTANT; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; public final class ConstantExpressionVerifier { diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionAnalysis.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionAnalysis.java index 3e9cac12f10d..f24da066b386 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionAnalysis.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionAnalysis.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.QuantifiedComparisonExpression; -import io.prestosql.sql.tree.SubqueryExpression; +import io.trino.spi.type.Type; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.QuantifiedComparisonExpression; +import io.trino.sql.tree.SubqueryExpression; import java.util.Map; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionAnalyzer.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionAnalyzer.java index 4b3cb67e45cc..d3ef0e9fcd7f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionAnalyzer.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionAnalyzer.java @@ -19,106 +19,106 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Multimap; import io.airlift.slice.SliceUtf8; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.OperatorNotFoundException; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.operator.scalar.FormatFunction; -import io.prestosql.security.AccessControl; -import io.prestosql.security.SecurityContext; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.PrestoWarning; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalParseResult; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeNotFoundException; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; -import io.prestosql.sql.tree.ArrayConstructor; -import io.prestosql.sql.tree.AtTimeZone; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.BinaryLiteral; -import io.prestosql.sql.tree.BindExpression; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CharLiteral; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.CurrentPath; -import io.prestosql.sql.tree.CurrentTime; -import io.prestosql.sql.tree.CurrentUser; -import io.prestosql.sql.tree.DecimalLiteral; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Extract; -import io.prestosql.sql.tree.FieldReference; -import io.prestosql.sql.tree.Format; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.GroupingOperation; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.InListExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.IntervalLiteral; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullIfExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.QuantifiedComparisonExpression; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.SortItem.Ordering; -import io.prestosql.sql.tree.StackableAstVisitor; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SubqueryExpression; -import io.prestosql.sql.tree.SubscriptExpression; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.TimeLiteral; -import io.prestosql.sql.tree.TimestampLiteral; -import io.prestosql.sql.tree.TryExpression; -import io.prestosql.sql.tree.WhenClause; -import io.prestosql.sql.tree.Window; -import io.prestosql.sql.tree.WindowFrame; -import io.prestosql.type.FunctionType; -import io.prestosql.type.TypeCoercion; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.metadata.OperatorNotFoundException; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.ResolvedFunction; +import io.trino.operator.scalar.FormatFunction; +import io.trino.security.AccessControl; +import io.trino.security.SecurityContext; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.PrestoException; +import io.trino.spi.PrestoWarning; +import io.trino.spi.function.OperatorType; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalParseResult; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeNotFoundException; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarcharType; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArithmeticUnaryExpression; +import io.trino.sql.tree.ArrayConstructor; +import io.trino.sql.tree.AtTimeZone; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.BinaryLiteral; +import io.trino.sql.tree.BindExpression; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CharLiteral; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.CurrentPath; +import io.trino.sql.tree.CurrentTime; +import io.trino.sql.tree.CurrentUser; +import io.trino.sql.tree.DecimalLiteral; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Extract; +import io.trino.sql.tree.FieldReference; +import io.trino.sql.tree.Format; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.GroupingOperation; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.InListExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.IntervalLiteral; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullIfExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.QuantifiedComparisonExpression; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.SortItem.Ordering; +import io.trino.sql.tree.StackableAstVisitor; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SubqueryExpression; +import io.trino.sql.tree.SubscriptExpression; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.TimeLiteral; +import io.trino.sql.tree.TimestampLiteral; +import io.trino.sql.tree.TryExpression; +import io.trino.sql.tree.WhenClause; +import io.trino.sql.tree.Window; +import io.trino.sql.tree.WindowFrame; +import io.trino.type.FunctionType; +import io.trino.type.TypeCoercion; import javax.annotation.Nullable; @@ -137,67 +137,67 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.StandardErrorCode.EXPRESSION_NOT_CONSTANT; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_NOT_AGGREGATE; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.INVALID_LITERAL; -import static io.prestosql.spi.StandardErrorCode.INVALID_ORDER_BY; -import static io.prestosql.spi.StandardErrorCode.INVALID_PARAMETER_USAGE; -import static io.prestosql.spi.StandardErrorCode.MISSING_ORDER_BY; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.OPERATOR_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TOO_MANY_ARGUMENTS; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.StandardErrorCode.TYPE_NOT_FOUND; -import static io.prestosql.spi.connector.StandardWarningCode.DEPRECATED_FUNCTION; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.SUBSCRIPT; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeType.createTimeType; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimeWithTimeZoneType.createTimeWithTimeZoneType; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.NodeUtils.getSortItemsFromOrderBy; -import static io.prestosql.sql.analyzer.Analyzer.verifyNoAggregateWindowOrGroupingFunctions; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.extractLocation; -import static io.prestosql.sql.analyzer.SemanticExceptions.missingAttributeException; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toTypeSignature; -import static io.prestosql.sql.tree.ArrayConstructor.ARRAY_CONSTRUCTOR; -import static io.prestosql.sql.tree.FrameBound.Type.FOLLOWING; -import static io.prestosql.sql.tree.FrameBound.Type.PRECEDING; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; -import static io.prestosql.sql.tree.SortItem.Ordering.DESCENDING; -import static io.prestosql.sql.tree.WindowFrame.Type.GROUPS; -import static io.prestosql.sql.tree.WindowFrame.Type.RANGE; -import static io.prestosql.sql.tree.WindowFrame.Type.ROWS; -import static io.prestosql.type.ArrayParametricType.ARRAY; -import static io.prestosql.type.DateTimes.extractTimePrecision; -import static io.prestosql.type.DateTimes.extractTimestampPrecision; -import static io.prestosql.type.DateTimes.parseTime; -import static io.prestosql.type.DateTimes.parseTimeWithTimeZone; -import static io.prestosql.type.DateTimes.parseTimestamp; -import static io.prestosql.type.DateTimes.parseTimestampWithTimeZone; -import static io.prestosql.type.DateTimes.timeHasTimeZone; -import static io.prestosql.type.DateTimes.timestampHasTimeZone; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; -import static io.prestosql.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.spi.StandardErrorCode.EXPRESSION_NOT_CONSTANT; +import static io.trino.spi.StandardErrorCode.FUNCTION_NOT_AGGREGATE; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_LITERAL; +import static io.trino.spi.StandardErrorCode.INVALID_ORDER_BY; +import static io.trino.spi.StandardErrorCode.INVALID_PARAMETER_USAGE; +import static io.trino.spi.StandardErrorCode.MISSING_ORDER_BY; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.OPERATOR_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TOO_MANY_ARGUMENTS; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.StandardErrorCode.TYPE_NOT_FOUND; +import static io.trino.spi.connector.StandardWarningCode.DEPRECATED_FUNCTION; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.SUBSCRIPT; +import static io.trino.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeType.createTimeType; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimeWithTimeZoneType.createTimeWithTimeZoneType; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.NodeUtils.getSortItemsFromOrderBy; +import static io.trino.sql.analyzer.Analyzer.verifyNoAggregateWindowOrGroupingFunctions; +import static io.trino.sql.analyzer.ExpressionTreeUtils.extractLocation; +import static io.trino.sql.analyzer.SemanticExceptions.missingAttributeException; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toTypeSignature; +import static io.trino.sql.tree.ArrayConstructor.ARRAY_CONSTRUCTOR; +import static io.trino.sql.tree.FrameBound.Type.FOLLOWING; +import static io.trino.sql.tree.FrameBound.Type.PRECEDING; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.tree.SortItem.Ordering.DESCENDING; +import static io.trino.sql.tree.WindowFrame.Type.GROUPS; +import static io.trino.sql.tree.WindowFrame.Type.RANGE; +import static io.trino.sql.tree.WindowFrame.Type.ROWS; +import static io.trino.type.ArrayParametricType.ARRAY; +import static io.trino.type.DateTimes.extractTimePrecision; +import static io.trino.type.DateTimes.extractTimestampPrecision; +import static io.trino.type.DateTimes.parseTime; +import static io.trino.type.DateTimes.parseTimeWithTimeZone; +import static io.trino.type.DateTimes.parseTimestamp; +import static io.trino.type.DateTimes.parseTimestampWithTimeZone; +import static io.trino.type.DateTimes.timeHasTimeZone; +import static io.trino.type.DateTimes.timestampHasTimeZone; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; +import static io.trino.type.JsonType.JSON; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.util.Collections.unmodifiableMap; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionTreeUtils.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionTreeUtils.java index f7ed94bf99dc..8e8a11f75e4a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionTreeUtils.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionTreeUtils.java @@ -14,15 +14,15 @@ package io.trino.sql.analyzer; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.Location; -import io.prestosql.sql.tree.DefaultExpressionTraversalVisitor; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.spi.Location; +import io.trino.sql.tree.DefaultExpressionTraversalVisitor; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.QualifiedName; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/FeaturesConfig.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/FeaturesConfig.java index 62ba76fc501a..21394a28fea6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/FeaturesConfig.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/FeaturesConfig.java @@ -36,7 +36,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.units.DataSize.Unit.KILOBYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.sql.analyzer.RegexLibrary.JONI; +import static io.trino.sql.analyzer.RegexLibrary.JONI; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MINUTES; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/Field.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/Field.java index 518cf130ec7f..6f4cf158e2f0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/Field.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/Field.java @@ -13,9 +13,9 @@ */ package io.trino.sql.analyzer; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.QualifiedObjectName; +import io.trino.spi.type.Type; +import io.trino.sql.tree.QualifiedName; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/FreeLambdaReferenceExtractor.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/FreeLambdaReferenceExtractor.java index 76442d74db2b..222fe83f4c46 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/FreeLambdaReferenceExtractor.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/FreeLambdaReferenceExtractor.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.tree.DefaultExpressionTraversalVisitor; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; +import io.trino.sql.tree.DefaultExpressionTraversalVisitor; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; import java.util.List; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/QueryExplainer.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/QueryExplainer.java index 037d6949e81e..5b061facf0ae 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/QueryExplainer.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/QueryExplainer.java @@ -14,30 +14,30 @@ package io.trino.sql.analyzer; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.cost.CostCalculator; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.execution.DataDefinitionTask; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.LogicalPlanner; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.PlanFragmenter; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.PlanOptimizers; -import io.prestosql.sql.planner.SubPlan; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.planner.planprinter.IoPlanPrinter; -import io.prestosql.sql.planner.planprinter.PlanPrinter; -import io.prestosql.sql.tree.ExplainType.Type; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Statement; +import io.trino.Session; +import io.trino.cost.CostCalculator; +import io.trino.cost.StatsCalculator; +import io.trino.execution.DataDefinitionTask; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.LogicalPlanner; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.PlanFragmenter; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.PlanOptimizers; +import io.trino.sql.planner.SubPlan; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.planprinter.IoPlanPrinter; +import io.trino.sql.planner.planprinter.PlanPrinter; +import io.trino.sql.tree.ExplainType.Type; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Statement; import javax.inject.Inject; @@ -45,10 +45,10 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.sql.ParameterUtils.parameterExtractor; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; -import static io.prestosql.sql.planner.planprinter.IoPlanPrinter.textIoPlan; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.sql.ParameterUtils.parameterExtractor; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; +import static io.trino.sql.planner.planprinter.IoPlanPrinter.textIoPlan; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/RelationId.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/RelationId.java index 07c3f24e528a..e214bee84ae7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/RelationId.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/RelationId.java @@ -13,8 +13,8 @@ */ package io.trino.sql.analyzer; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; import java.util.Objects; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/RelationType.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/RelationType.java index 449739fae300..682594881a93 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/RelationType.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/RelationType.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.sql.tree.QualifiedName; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/ResolvedField.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/ResolvedField.java index ac72e417113b..72f7621b2891 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/ResolvedField.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/ResolvedField.java @@ -13,7 +13,7 @@ */ package io.trino.sql.analyzer; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/Scope.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/Scope.java index 9fe9c08ab861..1b0a37f98350 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/Scope.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/Scope.java @@ -15,11 +15,11 @@ import com.google.common.base.Predicate; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.RowType; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.WithQuery; +import io.trino.spi.type.RowType; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.WithQuery; import javax.annotation.concurrent.Immutable; @@ -31,13 +31,13 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.StandardErrorCode.AMBIGUOUS_NAME; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.asQualifiedName; -import static io.prestosql.sql.analyzer.Scope.BasisType.FIELD; -import static io.prestosql.sql.analyzer.Scope.BasisType.TABLE; -import static io.prestosql.sql.analyzer.SemanticExceptions.ambiguousAttributeException; -import static io.prestosql.sql.analyzer.SemanticExceptions.missingAttributeException; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.spi.StandardErrorCode.AMBIGUOUS_NAME; +import static io.trino.sql.analyzer.ExpressionTreeUtils.asQualifiedName; +import static io.trino.sql.analyzer.Scope.BasisType.FIELD; +import static io.trino.sql.analyzer.Scope.BasisType.TABLE; +import static io.trino.sql.analyzer.SemanticExceptions.ambiguousAttributeException; +import static io.trino.sql.analyzer.SemanticExceptions.missingAttributeException; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; import static java.util.Objects.requireNonNull; @Immutable diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/ScopeReferenceExtractor.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/ScopeReferenceExtractor.java index f082ed5680d2..ffa553ff08cc 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/ScopeReferenceExtractor.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/ScopeReferenceExtractor.java @@ -13,10 +13,10 @@ */ package io.trino.sql.analyzer; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.util.AstUtils; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.util.AstUtils; import java.util.Map; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/SemanticExceptions.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/SemanticExceptions.java index ca74d2fde007..f69608c073c5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/SemanticExceptions.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/SemanticExceptions.java @@ -13,15 +13,15 @@ */ package io.trino.sql.analyzer; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.PrestoException; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.QualifiedName; -import static io.prestosql.spi.StandardErrorCode.AMBIGUOUS_NAME; -import static io.prestosql.spi.StandardErrorCode.COLUMN_NOT_FOUND; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.extractLocation; +import static io.trino.spi.StandardErrorCode.AMBIGUOUS_NAME; +import static io.trino.spi.StandardErrorCode.COLUMN_NOT_FOUND; +import static io.trino.sql.analyzer.ExpressionTreeUtils.extractLocation; import static java.lang.String.format; public final class SemanticExceptions diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/StatementAnalyzer.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/StatementAnalyzer.java index 90874851cf74..824cc035ad73 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/StatementAnalyzer.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/StatementAnalyzer.java @@ -20,150 +20,150 @@ import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.FunctionKind; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.NewTableLayout; -import io.prestosql.metadata.OperatorNotFoundException; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.metadata.TableHandle; -import io.prestosql.metadata.TableMetadata; -import io.prestosql.security.AccessControl; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.security.ViewAccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.PrestoWarning; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMaterializedViewDefinition; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.ConnectorViewDefinition.ViewColumn; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeNotFoundException; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.InterpretedFunctionInvoker; -import io.prestosql.sql.SqlPath; -import io.prestosql.sql.analyzer.Analysis.GroupingSetAnalysis; -import io.prestosql.sql.analyzer.Analysis.SelectExpression; -import io.prestosql.sql.analyzer.Analysis.UnnestAnalysis; -import io.prestosql.sql.analyzer.Scope.AsteriskedIdentifierChainBasis; -import io.prestosql.sql.parser.ParsingException; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.DeterminismEvaluator; -import io.prestosql.sql.planner.ExpressionInterpreter; -import io.prestosql.sql.planner.ScopeAware; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.tree.AddColumn; -import io.prestosql.sql.tree.AliasedRelation; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.AllRows; -import io.prestosql.sql.tree.Analyze; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.Call; -import io.prestosql.sql.tree.Comment; -import io.prestosql.sql.tree.Commit; -import io.prestosql.sql.tree.CreateMaterializedView; -import io.prestosql.sql.tree.CreateSchema; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.CreateTableAsSelect; -import io.prestosql.sql.tree.CreateView; -import io.prestosql.sql.tree.Cube; -import io.prestosql.sql.tree.Deallocate; -import io.prestosql.sql.tree.Delete; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.DropColumn; -import io.prestosql.sql.tree.DropMaterializedView; -import io.prestosql.sql.tree.DropSchema; -import io.prestosql.sql.tree.DropTable; -import io.prestosql.sql.tree.DropView; -import io.prestosql.sql.tree.Except; -import io.prestosql.sql.tree.Execute; -import io.prestosql.sql.tree.Explain; -import io.prestosql.sql.tree.ExplainType; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FetchFirst; -import io.prestosql.sql.tree.FieldReference; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.Grant; -import io.prestosql.sql.tree.GroupBy; -import io.prestosql.sql.tree.GroupingElement; -import io.prestosql.sql.tree.GroupingOperation; -import io.prestosql.sql.tree.GroupingSets; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.Insert; -import io.prestosql.sql.tree.Intersect; -import io.prestosql.sql.tree.Join; -import io.prestosql.sql.tree.JoinCriteria; -import io.prestosql.sql.tree.JoinOn; -import io.prestosql.sql.tree.JoinUsing; -import io.prestosql.sql.tree.Lateral; -import io.prestosql.sql.tree.Limit; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NaturalJoin; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Offset; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.Prepare; -import io.prestosql.sql.tree.Property; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.QuerySpecification; -import io.prestosql.sql.tree.RefreshMaterializedView; -import io.prestosql.sql.tree.Relation; -import io.prestosql.sql.tree.RenameColumn; -import io.prestosql.sql.tree.RenameSchema; -import io.prestosql.sql.tree.RenameTable; -import io.prestosql.sql.tree.RenameView; -import io.prestosql.sql.tree.ResetSession; -import io.prestosql.sql.tree.Revoke; -import io.prestosql.sql.tree.Rollback; -import io.prestosql.sql.tree.Rollup; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SampledRelation; -import io.prestosql.sql.tree.Select; -import io.prestosql.sql.tree.SelectItem; -import io.prestosql.sql.tree.SetOperation; -import io.prestosql.sql.tree.SetSchemaAuthorization; -import io.prestosql.sql.tree.SetSession; -import io.prestosql.sql.tree.SetTableAuthorization; -import io.prestosql.sql.tree.SetViewAuthorization; -import io.prestosql.sql.tree.SimpleGroupBy; -import io.prestosql.sql.tree.SingleColumn; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.StartTransaction; -import io.prestosql.sql.tree.Statement; -import io.prestosql.sql.tree.SubqueryExpression; -import io.prestosql.sql.tree.SubscriptExpression; -import io.prestosql.sql.tree.Table; -import io.prestosql.sql.tree.TableSubquery; -import io.prestosql.sql.tree.Union; -import io.prestosql.sql.tree.Unnest; -import io.prestosql.sql.tree.Use; -import io.prestosql.sql.tree.Values; -import io.prestosql.sql.tree.Window; -import io.prestosql.sql.tree.WindowFrame; -import io.prestosql.sql.tree.With; -import io.prestosql.sql.tree.WithQuery; -import io.prestosql.type.TypeCoercion; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.FunctionKind; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.metadata.NewTableLayout; +import io.trino.metadata.OperatorNotFoundException; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.ResolvedFunction; +import io.trino.metadata.TableHandle; +import io.trino.metadata.TableMetadata; +import io.trino.security.AccessControl; +import io.trino.security.AllowAllAccessControl; +import io.trino.security.ViewAccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.PrestoWarning; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMaterializedViewDefinition; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.ConnectorViewDefinition.ViewColumn; +import io.trino.spi.function.OperatorType; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.security.Identity; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeNotFoundException; +import io.trino.spi.type.VarcharType; +import io.trino.sql.InterpretedFunctionInvoker; +import io.trino.sql.SqlPath; +import io.trino.sql.analyzer.Analysis.GroupingSetAnalysis; +import io.trino.sql.analyzer.Analysis.SelectExpression; +import io.trino.sql.analyzer.Analysis.UnnestAnalysis; +import io.trino.sql.analyzer.Scope.AsteriskedIdentifierChainBasis; +import io.trino.sql.parser.ParsingException; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.DeterminismEvaluator; +import io.trino.sql.planner.ExpressionInterpreter; +import io.trino.sql.planner.ScopeAware; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.tree.AddColumn; +import io.trino.sql.tree.AliasedRelation; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.AllRows; +import io.trino.sql.tree.Analyze; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.Call; +import io.trino.sql.tree.Comment; +import io.trino.sql.tree.Commit; +import io.trino.sql.tree.CreateMaterializedView; +import io.trino.sql.tree.CreateSchema; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.CreateTableAsSelect; +import io.trino.sql.tree.CreateView; +import io.trino.sql.tree.Cube; +import io.trino.sql.tree.Deallocate; +import io.trino.sql.tree.Delete; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.DropColumn; +import io.trino.sql.tree.DropMaterializedView; +import io.trino.sql.tree.DropSchema; +import io.trino.sql.tree.DropTable; +import io.trino.sql.tree.DropView; +import io.trino.sql.tree.Except; +import io.trino.sql.tree.Execute; +import io.trino.sql.tree.Explain; +import io.trino.sql.tree.ExplainType; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FetchFirst; +import io.trino.sql.tree.FieldReference; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.Grant; +import io.trino.sql.tree.GroupBy; +import io.trino.sql.tree.GroupingElement; +import io.trino.sql.tree.GroupingOperation; +import io.trino.sql.tree.GroupingSets; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.Insert; +import io.trino.sql.tree.Intersect; +import io.trino.sql.tree.Join; +import io.trino.sql.tree.JoinCriteria; +import io.trino.sql.tree.JoinOn; +import io.trino.sql.tree.JoinUsing; +import io.trino.sql.tree.Lateral; +import io.trino.sql.tree.Limit; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NaturalJoin; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Offset; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.Prepare; +import io.trino.sql.tree.Property; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.QuerySpecification; +import io.trino.sql.tree.RefreshMaterializedView; +import io.trino.sql.tree.Relation; +import io.trino.sql.tree.RenameColumn; +import io.trino.sql.tree.RenameSchema; +import io.trino.sql.tree.RenameTable; +import io.trino.sql.tree.RenameView; +import io.trino.sql.tree.ResetSession; +import io.trino.sql.tree.Revoke; +import io.trino.sql.tree.Rollback; +import io.trino.sql.tree.Rollup; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SampledRelation; +import io.trino.sql.tree.Select; +import io.trino.sql.tree.SelectItem; +import io.trino.sql.tree.SetOperation; +import io.trino.sql.tree.SetSchemaAuthorization; +import io.trino.sql.tree.SetSession; +import io.trino.sql.tree.SetTableAuthorization; +import io.trino.sql.tree.SetViewAuthorization; +import io.trino.sql.tree.SimpleGroupBy; +import io.trino.sql.tree.SingleColumn; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.StartTransaction; +import io.trino.sql.tree.Statement; +import io.trino.sql.tree.SubqueryExpression; +import io.trino.sql.tree.SubscriptExpression; +import io.trino.sql.tree.Table; +import io.trino.sql.tree.TableSubquery; +import io.trino.sql.tree.Union; +import io.trino.sql.tree.Unnest; +import io.trino.sql.tree.Use; +import io.trino.sql.tree.Values; +import io.trino.sql.tree.Window; +import io.trino.sql.tree.WindowFrame; +import io.trino.sql.tree.With; +import io.trino.sql.tree.WithQuery; +import io.trino.type.TypeCoercion; import java.util.ArrayList; import java.util.Collection; @@ -185,83 +185,83 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.getLast; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.SystemSessionProperties.getMaxGroupingSets; -import static io.prestosql.metadata.FunctionKind.AGGREGATE; -import static io.prestosql.metadata.FunctionKind.WINDOW; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.CATALOG_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.COLUMN_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.COLUMN_TYPE_UNKNOWN; -import static io.prestosql.spi.StandardErrorCode.DUPLICATE_COLUMN_NAME; -import static io.prestosql.spi.StandardErrorCode.DUPLICATE_NAMED_QUERY; -import static io.prestosql.spi.StandardErrorCode.DUPLICATE_PROPERTY; -import static io.prestosql.spi.StandardErrorCode.EXPRESSION_NOT_CONSTANT; -import static io.prestosql.spi.StandardErrorCode.EXPRESSION_NOT_IN_DISTINCT; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_NOT_WINDOW; -import static io.prestosql.spi.StandardErrorCode.INVALID_ARGUMENTS; -import static io.prestosql.spi.StandardErrorCode.INVALID_COLUMN_REFERENCE; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.INVALID_LIMIT_CLAUSE; -import static io.prestosql.spi.StandardErrorCode.INVALID_RECURSIVE_REFERENCE; -import static io.prestosql.spi.StandardErrorCode.INVALID_ROW_FILTER; -import static io.prestosql.spi.StandardErrorCode.INVALID_VIEW; -import static io.prestosql.spi.StandardErrorCode.INVALID_WINDOW_FRAME; -import static io.prestosql.spi.StandardErrorCode.MISMATCHED_COLUMN_ALIASES; -import static io.prestosql.spi.StandardErrorCode.MISSING_COLUMN_ALIASES; -import static io.prestosql.spi.StandardErrorCode.MISSING_COLUMN_NAME; -import static io.prestosql.spi.StandardErrorCode.MISSING_GROUP_BY; -import static io.prestosql.spi.StandardErrorCode.MISSING_ORDER_BY; -import static io.prestosql.spi.StandardErrorCode.NESTED_RECURSIVE; -import static io.prestosql.spi.StandardErrorCode.NESTED_WINDOW; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.NULL_TREATMENT_NOT_ALLOWED; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TABLE_ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TOO_MANY_GROUPING_SETS; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.StandardErrorCode.VIEW_IS_RECURSIVE; -import static io.prestosql.spi.StandardErrorCode.VIEW_IS_STALE; -import static io.prestosql.spi.connector.StandardWarningCode.REDUNDANT_ORDER_BY; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.NodeUtils.getSortItemsFromOrderBy; -import static io.prestosql.sql.NodeUtils.mapFromProperties; -import static io.prestosql.sql.ParsingUtil.createParsingOptions; -import static io.prestosql.sql.analyzer.AggregationAnalyzer.verifyOrderByAggregations; -import static io.prestosql.sql.analyzer.AggregationAnalyzer.verifySourceAggregations; -import static io.prestosql.sql.analyzer.Analyzer.verifyNoAggregateWindowOrGroupingFunctions; -import static io.prestosql.sql.analyzer.CanonicalizationAware.canonicalizationAwareKey; -import static io.prestosql.sql.analyzer.CanonicalizationAware.canonicalize; -import static io.prestosql.sql.analyzer.ExpressionAnalyzer.createConstantAnalyzer; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.asQualifiedName; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.extractAggregateFunctions; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.extractExpressions; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.extractLocation; -import static io.prestosql.sql.analyzer.ExpressionTreeUtils.extractWindowFunctions; -import static io.prestosql.sql.analyzer.Scope.BasisType.TABLE; -import static io.prestosql.sql.analyzer.ScopeReferenceExtractor.getReferencesToScope; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.planner.ExpressionInterpreter.expressionOptimizer; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ExplainType.Type.DISTRIBUTED; -import static io.prestosql.sql.tree.FrameBound.Type.CURRENT_ROW; -import static io.prestosql.sql.tree.FrameBound.Type.FOLLOWING; -import static io.prestosql.sql.tree.FrameBound.Type.PRECEDING; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_FOLLOWING; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; -import static io.prestosql.sql.tree.Join.Type.FULL; -import static io.prestosql.sql.tree.Join.Type.INNER; -import static io.prestosql.sql.tree.Join.Type.LEFT; -import static io.prestosql.sql.tree.Join.Type.RIGHT; -import static io.prestosql.sql.util.AstUtils.preOrder; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.MoreLists.mappedCopy; +import static io.trino.SystemSessionProperties.getMaxGroupingSets; +import static io.trino.metadata.FunctionKind.AGGREGATE; +import static io.trino.metadata.FunctionKind.WINDOW; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.CATALOG_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.COLUMN_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.COLUMN_TYPE_UNKNOWN; +import static io.trino.spi.StandardErrorCode.DUPLICATE_COLUMN_NAME; +import static io.trino.spi.StandardErrorCode.DUPLICATE_NAMED_QUERY; +import static io.trino.spi.StandardErrorCode.DUPLICATE_PROPERTY; +import static io.trino.spi.StandardErrorCode.EXPRESSION_NOT_CONSTANT; +import static io.trino.spi.StandardErrorCode.EXPRESSION_NOT_IN_DISTINCT; +import static io.trino.spi.StandardErrorCode.FUNCTION_NOT_WINDOW; +import static io.trino.spi.StandardErrorCode.INVALID_ARGUMENTS; +import static io.trino.spi.StandardErrorCode.INVALID_COLUMN_REFERENCE; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_LIMIT_CLAUSE; +import static io.trino.spi.StandardErrorCode.INVALID_RECURSIVE_REFERENCE; +import static io.trino.spi.StandardErrorCode.INVALID_ROW_FILTER; +import static io.trino.spi.StandardErrorCode.INVALID_VIEW; +import static io.trino.spi.StandardErrorCode.INVALID_WINDOW_FRAME; +import static io.trino.spi.StandardErrorCode.MISMATCHED_COLUMN_ALIASES; +import static io.trino.spi.StandardErrorCode.MISSING_COLUMN_ALIASES; +import static io.trino.spi.StandardErrorCode.MISSING_COLUMN_NAME; +import static io.trino.spi.StandardErrorCode.MISSING_GROUP_BY; +import static io.trino.spi.StandardErrorCode.MISSING_ORDER_BY; +import static io.trino.spi.StandardErrorCode.NESTED_RECURSIVE; +import static io.trino.spi.StandardErrorCode.NESTED_WINDOW; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NULL_TREATMENT_NOT_ALLOWED; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TABLE_ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TOO_MANY_GROUPING_SETS; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.StandardErrorCode.VIEW_IS_RECURSIVE; +import static io.trino.spi.StandardErrorCode.VIEW_IS_STALE; +import static io.trino.spi.connector.StandardWarningCode.REDUNDANT_ORDER_BY; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.NodeUtils.getSortItemsFromOrderBy; +import static io.trino.sql.NodeUtils.mapFromProperties; +import static io.trino.sql.ParsingUtil.createParsingOptions; +import static io.trino.sql.analyzer.AggregationAnalyzer.verifyOrderByAggregations; +import static io.trino.sql.analyzer.AggregationAnalyzer.verifySourceAggregations; +import static io.trino.sql.analyzer.Analyzer.verifyNoAggregateWindowOrGroupingFunctions; +import static io.trino.sql.analyzer.CanonicalizationAware.canonicalizationAwareKey; +import static io.trino.sql.analyzer.CanonicalizationAware.canonicalize; +import static io.trino.sql.analyzer.ExpressionAnalyzer.createConstantAnalyzer; +import static io.trino.sql.analyzer.ExpressionTreeUtils.asQualifiedName; +import static io.trino.sql.analyzer.ExpressionTreeUtils.extractAggregateFunctions; +import static io.trino.sql.analyzer.ExpressionTreeUtils.extractExpressions; +import static io.trino.sql.analyzer.ExpressionTreeUtils.extractLocation; +import static io.trino.sql.analyzer.ExpressionTreeUtils.extractWindowFunctions; +import static io.trino.sql.analyzer.Scope.BasisType.TABLE; +import static io.trino.sql.analyzer.ScopeReferenceExtractor.getReferencesToScope; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.planner.ExpressionInterpreter.expressionOptimizer; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ExplainType.Type.DISTRIBUTED; +import static io.trino.sql.tree.FrameBound.Type.CURRENT_ROW; +import static io.trino.sql.tree.FrameBound.Type.FOLLOWING; +import static io.trino.sql.tree.FrameBound.Type.PRECEDING; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_FOLLOWING; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; +import static io.trino.sql.tree.Join.Type.FULL; +import static io.trino.sql.tree.Join.Type.INNER; +import static io.trino.sql.tree.Join.Type.LEFT; +import static io.trino.sql.tree.Join.Type.RIGHT; +import static io.trino.sql.util.AstUtils.preOrder; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.MoreLists.mappedCopy; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.util.Collections.emptyList; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/TypeSignatureProvider.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/TypeSignatureProvider.java index 86b018ad4b06..d3b22694b76f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/TypeSignatureProvider.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/TypeSignatureProvider.java @@ -14,8 +14,8 @@ package io.trino.sql.analyzer; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.util.List; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/TypeSignatureTranslator.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/TypeSignatureTranslator.java index c4cfb8a97141..7b23202d1e3e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/TypeSignatureTranslator.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/TypeSignatureTranslator.java @@ -14,24 +14,24 @@ package io.trino.sql.analyzer; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.RowFieldName; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.DataType; -import io.prestosql.sql.tree.DataTypeParameter; -import io.prestosql.sql.tree.DateTimeDataType; -import io.prestosql.sql.tree.GenericDataType; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.IntervalDayTimeDataType; -import io.prestosql.sql.tree.NumericParameter; -import io.prestosql.sql.tree.RowDataType; -import io.prestosql.sql.tree.TypeParameter; +import io.trino.spi.PrestoException; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.RowFieldName; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarcharType; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.DataType; +import io.trino.sql.tree.DataTypeParameter; +import io.trino.sql.tree.DateTimeDataType; +import io.trino.sql.tree.GenericDataType; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.IntervalDayTimeDataType; +import io.trino.sql.tree.NumericParameter; +import io.trino.sql.tree.RowDataType; +import io.trino.sql.tree.TypeParameter; import org.assertj.core.util.VisibleForTesting; import java.util.ArrayList; @@ -43,18 +43,18 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.type.StandardTypes.INTERVAL_DAY_TO_SECOND; -import static io.prestosql.spi.type.StandardTypes.INTERVAL_YEAR_TO_MONTH; -import static io.prestosql.spi.type.TypeSignatureParameter.namedTypeParameter; -import static io.prestosql.spi.type.TypeSignatureParameter.numericParameter; -import static io.prestosql.spi.type.TypeSignatureParameter.typeParameter; -import static io.prestosql.spi.type.TypeSignatureParameter.typeVariable; -import static io.prestosql.spi.type.VarcharType.UNBOUNDED_LENGTH; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; -import static io.prestosql.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.type.StandardTypes.INTERVAL_DAY_TO_SECOND; +import static io.trino.spi.type.StandardTypes.INTERVAL_YEAR_TO_MONTH; +import static io.trino.spi.type.TypeSignatureParameter.namedTypeParameter; +import static io.trino.spi.type.TypeSignatureParameter.numericParameter; +import static io.trino.spi.type.TypeSignatureParameter.typeParameter; +import static io.trino.spi.type.TypeSignatureParameter.typeVariable; +import static io.trino.spi.type.VarcharType.UNBOUNDED_LENGTH; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; import static java.lang.String.format; public class TypeSignatureTranslator diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/WindowFunctionValidator.java b/core/trino-main/src/main/java/io/trino/sql/analyzer/WindowFunctionValidator.java index b731fa52c6b9..b590d445948c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/WindowFunctionValidator.java +++ b/core/trino-main/src/main/java/io/trino/sql/analyzer/WindowFunctionValidator.java @@ -13,14 +13,14 @@ */ package io.trino.sql.analyzer; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.tree.DefaultExpressionTraversalVisitor; -import io.prestosql.sql.tree.FunctionCall; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.tree.DefaultExpressionTraversalVisitor; +import io.trino.sql.tree.FunctionCall; -import static io.prestosql.metadata.FunctionKind.WINDOW; -import static io.prestosql.spi.StandardErrorCode.MISSING_OVER; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.metadata.FunctionKind.WINDOW; +import static io.trino.spi.StandardErrorCode.MISSING_OVER; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; import static java.util.Objects.requireNonNull; class WindowFunctionValidator diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/AndCodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/AndCodeGenerator.java index aa6bca5e7926..3cf488ef3dc6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/AndCodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/AndCodeGenerator.java @@ -18,8 +18,8 @@ import io.airlift.bytecode.Variable; import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.instruction.LabelNode; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.bytecode.expression.BytecodeExpressions.constantFalse; diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/ArrayGeneratorUtils.java b/core/trino-main/src/main/java/io/trino/sql/gen/ArrayGeneratorUtils.java index b9e22bef36db..6faa05fddf33 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/ArrayGeneratorUtils.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/ArrayGeneratorUtils.java @@ -16,14 +16,14 @@ import io.airlift.bytecode.Scope; import io.airlift.bytecode.Variable; import io.airlift.bytecode.expression.BytecodeExpression; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.Type; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.FunctionMetadata; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.Type; import java.util.function.Function; -import static io.prestosql.sql.gen.InvokeFunctionBytecodeExpression.invokeFunction; +import static io.trino.sql.gen.InvokeFunctionBytecodeExpression.invokeFunction; public final class ArrayGeneratorUtils { diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/ArrayMapBytecodeExpression.java b/core/trino-main/src/main/java/io/trino/sql/gen/ArrayMapBytecodeExpression.java index 99ca1fe14802..263d737c959a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/ArrayMapBytecodeExpression.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/ArrayMapBytecodeExpression.java @@ -22,11 +22,11 @@ import io.airlift.bytecode.control.ForLoop; import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.expression.BytecodeExpression; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.type.Type; -import io.prestosql.type.UnknownType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.type.Type; +import io.trino.type.UnknownType; import java.util.List; import java.util.concurrent.atomic.AtomicLong; @@ -37,7 +37,7 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.constantNull; import static io.airlift.bytecode.expression.BytecodeExpressions.lessThan; import static io.airlift.bytecode.instruction.VariableInstruction.incrementVariable; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; public class ArrayMapBytecodeExpression extends BytecodeExpression diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/BetweenCodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/BetweenCodeGenerator.java index 2ba016f04369..c537e5d4510a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/BetweenCodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/BetweenCodeGenerator.java @@ -17,20 +17,20 @@ import io.airlift.bytecode.BytecodeNode; import io.airlift.bytecode.Variable; import io.airlift.bytecode.instruction.LabelNode; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.sql.relational.VariableReferenceExpression; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; +import io.trino.sql.relational.VariableReferenceExpression; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.gen.BytecodeUtils.ifWasNullPopAndGoto; -import static io.prestosql.sql.gen.RowExpressionCompiler.createTempVariableReferenceExpression; -import static io.prestosql.sql.relational.Expressions.call; -import static io.prestosql.sql.relational.SpecialForm.Form.AND; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.gen.BytecodeUtils.ifWasNullPopAndGoto; +import static io.trino.sql.gen.RowExpressionCompiler.createTempVariableReferenceExpression; +import static io.trino.sql.relational.Expressions.call; +import static io.trino.sql.relational.SpecialForm.Form.AND; import static java.util.Objects.requireNonNull; public class BetweenCodeGenerator diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/BindCodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/BindCodeGenerator.java index fd7a657d1dec..50f46e4375a0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/BindCodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/BindCodeGenerator.java @@ -15,10 +15,10 @@ package io.trino.sql.gen; import io.airlift.bytecode.BytecodeNode; -import io.prestosql.sql.gen.LambdaBytecodeGenerator.CompiledLambda; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; +import io.trino.sql.gen.LambdaBytecodeGenerator.CompiledLambda; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/BodyCompiler.java b/core/trino-main/src/main/java/io/trino/sql/gen/BodyCompiler.java index 81e630247dc4..d6039afb60a6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/BodyCompiler.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/BodyCompiler.java @@ -14,7 +14,7 @@ package io.trino.sql.gen; import io.airlift.bytecode.ClassDefinition; -import io.prestosql.sql.relational.RowExpression; +import io.trino.sql.relational.RowExpression; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/BytecodeGeneratorContext.java b/core/trino-main/src/main/java/io/trino/sql/gen/BytecodeGeneratorContext.java index 1617fa303784..740b7fe19cce 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/BytecodeGeneratorContext.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/BytecodeGeneratorContext.java @@ -16,11 +16,11 @@ import io.airlift.bytecode.BytecodeNode; import io.airlift.bytecode.Scope; import io.airlift.bytecode.Variable; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.sql.relational.RowExpression; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.function.InvocationConvention; +import io.trino.sql.relational.RowExpression; import java.lang.invoke.MethodHandle; import java.util.List; @@ -28,8 +28,8 @@ import java.util.function.Function; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.gen.BytecodeUtils.generateFullInvocation; -import static io.prestosql.sql.gen.BytecodeUtils.generateInvocation; +import static io.trino.sql.gen.BytecodeUtils.generateFullInvocation; +import static io.trino.sql.gen.BytecodeUtils.generateInvocation; import static java.util.Objects.requireNonNull; public class BytecodeGeneratorContext diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/BytecodeUtils.java b/core/trino-main/src/main/java/io/trino/sql/gen/BytecodeUtils.java index cf40c558e543..b6cbd0ad8aa3 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/BytecodeUtils.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/BytecodeUtils.java @@ -25,18 +25,18 @@ import io.airlift.bytecode.expression.BytecodeExpression; import io.airlift.bytecode.instruction.LabelNode; import io.airlift.slice.Slice; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.InputReferenceCompiler.InputReferenceNode; -import io.prestosql.type.FunctionType; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.spi.type.Type; +import io.trino.sql.gen.InputReferenceCompiler.InputReferenceNode; +import io.trino.type.FunctionType; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -53,14 +53,14 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.constantFalse; import static io.airlift.bytecode.expression.BytecodeExpressions.constantTrue; import static io.airlift.bytecode.expression.BytecodeExpressions.invokeDynamic; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.sql.gen.Bootstrap.BOOTSTRAP_METHOD; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.sql.gen.Bootstrap.BOOTSTRAP_METHOD; import static java.lang.String.format; public final class BytecodeUtils diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/CachedInstanceBinder.java b/core/trino-main/src/main/java/io/trino/sql/gen/CachedInstanceBinder.java index 8f422351b349..77168e0fd3d6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/CachedInstanceBinder.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/CachedInstanceBinder.java @@ -25,7 +25,7 @@ import static io.airlift.bytecode.Access.FINAL; import static io.airlift.bytecode.Access.PRIVATE; import static io.airlift.bytecode.Access.a; -import static io.prestosql.sql.gen.BytecodeUtils.invoke; +import static io.trino.sql.gen.BytecodeUtils.invoke; import static java.util.Objects.requireNonNull; public final class CachedInstanceBinder diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/CoalesceCodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/CoalesceCodeGenerator.java index cc6bb81cd0bf..3aac06099205 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/CoalesceCodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/CoalesceCodeGenerator.java @@ -18,9 +18,9 @@ import io.airlift.bytecode.BytecodeNode; import io.airlift.bytecode.Variable; import io.airlift.bytecode.control.IfStatement; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; +import io.trino.spi.type.Type; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; import java.util.ArrayList; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/CompilerOperations.java b/core/trino-main/src/main/java/io/trino/sql/gen/CompilerOperations.java index a1b13dbd5f89..a631867a4670 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/CompilerOperations.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/CompilerOperations.java @@ -13,13 +13,13 @@ */ package io.trino.sql.gen; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import javax.annotation.Nullable; import java.util.Set; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BooleanType.BOOLEAN; // This methods are statically bound by the compiler @SuppressWarnings("UnusedDeclaration") diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/CursorProcessorCompiler.java b/core/trino-main/src/main/java/io/trino/sql/gen/CursorProcessorCompiler.java index 4dc5e01bf146..54ad14c1e76b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/CursorProcessorCompiler.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/CursorProcessorCompiler.java @@ -26,23 +26,23 @@ import io.airlift.bytecode.control.WhileLoop; import io.airlift.bytecode.instruction.LabelNode; import io.airlift.slice.Slice; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.CursorProcessorOutput; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.LambdaBytecodeGenerator.CompiledLambda; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.InputReferenceExpression; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.RowExpressionVisitor; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.sql.relational.VariableReferenceExpression; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.CursorProcessorOutput; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.Type; +import io.trino.sql.gen.LambdaBytecodeGenerator.CompiledLambda; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.InputReferenceExpression; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.RowExpressionVisitor; +import io.trino.sql.relational.SpecialForm; +import io.trino.sql.relational.VariableReferenceExpression; import java.util.List; import java.util.Map; @@ -56,8 +56,8 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.newInstance; import static io.airlift.bytecode.expression.BytecodeExpressions.or; import static io.airlift.bytecode.instruction.JumpInstruction.jump; -import static io.prestosql.sql.gen.BytecodeUtils.generateWrite; -import static io.prestosql.sql.gen.LambdaExpressionExtractor.extractLambdaExpressions; +import static io.trino.sql.gen.BytecodeUtils.generateWrite; +import static io.trino.sql.gen.LambdaExpressionExtractor.extractLambdaExpressions; import static java.lang.String.format; public class CursorProcessorCompiler diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/DereferenceCodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/DereferenceCodeGenerator.java index bfdc7355bb0e..9b66e3a8abcd 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/DereferenceCodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/DereferenceCodeGenerator.java @@ -19,15 +19,15 @@ import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.expression.BytecodeExpression; import io.airlift.bytecode.instruction.LabelNode; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.bytecode.expression.BytecodeExpressions.constantInt; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; import static java.util.Objects.requireNonNull; public class DereferenceCodeGenerator diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/ExpressionCompiler.java b/core/trino-main/src/main/java/io/trino/sql/gen/ExpressionCompiler.java index d1bf10a589f1..5efbcc6ebb2b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/ExpressionCompiler.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/ExpressionCompiler.java @@ -21,13 +21,13 @@ import io.airlift.bytecode.ClassDefinition; import io.airlift.bytecode.CompilationException; import io.airlift.jmx.CacheStatsMBean; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.project.CursorProcessor; -import io.prestosql.operator.project.PageFilter; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.operator.project.PageProjection; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.relational.RowExpression; +import io.trino.metadata.Metadata; +import io.trino.operator.project.CursorProcessor; +import io.trino.operator.project.PageFilter; +import io.trino.operator.project.PageProcessor; +import io.trino.operator.project.PageProjection; +import io.trino.spi.PrestoException; +import io.trino.sql.relational.RowExpression; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -45,12 +45,12 @@ import static io.airlift.bytecode.Access.PUBLIC; import static io.airlift.bytecode.Access.a; import static io.airlift.bytecode.ParameterizedType.type; -import static io.prestosql.spi.StandardErrorCode.COMPILER_ERROR; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.gen.BytecodeUtils.invoke; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; +import static io.trino.spi.StandardErrorCode.COMPILER_ERROR; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.gen.BytecodeUtils.invoke; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; import static java.util.Objects.requireNonNull; public class ExpressionCompiler diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/ExpressionProfiler.java b/core/trino-main/src/main/java/io/trino/sql/gen/ExpressionProfiler.java index edaaaa10b366..6608a3210a99 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/ExpressionProfiler.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/ExpressionProfiler.java @@ -19,7 +19,7 @@ import static com.google.common.base.Ticker.systemTicker; import static com.google.common.base.Verify.verify; -import static io.prestosql.execution.executor.PrioritizedSplitRunner.SPLIT_RUN_QUANTA; +import static io.trino.execution.executor.PrioritizedSplitRunner.SPLIT_RUN_QUANTA; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/IfCodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/IfCodeGenerator.java index f521ce766f24..ad6428cdfdce 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/IfCodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/IfCodeGenerator.java @@ -17,8 +17,8 @@ import io.airlift.bytecode.BytecodeNode; import io.airlift.bytecode.Variable; import io.airlift.bytecode.control.IfStatement; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/InCodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/InCodeGenerator.java index f4e4cbdd9636..ad3262f949e7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/InCodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/InCodeGenerator.java @@ -24,15 +24,15 @@ import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.control.SwitchStatement.SwitchBuilder; import io.airlift.bytecode.instruction.LabelNode; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.util.FastutilSetHelper; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.Type; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; +import io.trino.util.FastutilSetHelper; import java.lang.invoke.MethodHandle; import java.util.Collection; @@ -46,17 +46,17 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.constantTrue; import static io.airlift.bytecode.expression.BytecodeExpressions.invokeStatic; import static io.airlift.bytecode.instruction.JumpInstruction.jump; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.sql.gen.BytecodeUtils.ifWasNullPopAndGoto; -import static io.prestosql.sql.gen.BytecodeUtils.invoke; -import static io.prestosql.sql.gen.BytecodeUtils.loadConstant; -import static io.prestosql.util.FastutilSetHelper.toFastutilHashSet; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.sql.gen.BytecodeUtils.ifWasNullPopAndGoto; +import static io.trino.sql.gen.BytecodeUtils.invoke; +import static io.trino.sql.gen.BytecodeUtils.loadConstant; +import static io.trino.util.FastutilSetHelper.toFastutilHashSet; import static java.lang.Math.toIntExact; public class InCodeGenerator diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/InputReferenceCompiler.java b/core/trino-main/src/main/java/io/trino/sql/gen/InputReferenceCompiler.java index 80c994e76f35..91e5726d3953 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/InputReferenceCompiler.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/InputReferenceCompiler.java @@ -24,20 +24,20 @@ import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.expression.BytecodeExpression; import io.airlift.slice.Slice; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.InputReferenceExpression; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpressionVisitor; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.sql.relational.VariableReferenceExpression; +import io.trino.spi.type.Type; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.InputReferenceExpression; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpressionVisitor; +import io.trino.sql.relational.SpecialForm; +import io.trino.sql.relational.VariableReferenceExpression; import org.objectweb.asm.MethodVisitor; import java.util.List; import java.util.function.BiFunction; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; import static java.util.Objects.requireNonNull; class InputReferenceCompiler diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/InvokeFunctionBytecodeExpression.java b/core/trino-main/src/main/java/io/trino/sql/gen/InvokeFunctionBytecodeExpression.java index d38178363820..77c24180cf28 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/InvokeFunctionBytecodeExpression.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/InvokeFunctionBytecodeExpression.java @@ -20,17 +20,17 @@ import io.airlift.bytecode.MethodGenerationContext; import io.airlift.bytecode.Scope; import io.airlift.bytecode.expression.BytecodeExpression; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.Type; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.FunctionMetadata; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.Type; import java.util.List; import java.util.function.Function; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.bytecode.ParameterizedType.type; -import static io.prestosql.sql.gen.BytecodeUtils.generateInvocation; +import static io.trino.sql.gen.BytecodeUtils.generateInvocation; import static java.util.Objects.requireNonNull; public class InvokeFunctionBytecodeExpression diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/IsNullCodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/IsNullCodeGenerator.java index 1d56a7dfb5ee..e5f8d857221b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/IsNullCodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/IsNullCodeGenerator.java @@ -16,13 +16,13 @@ import io.airlift.bytecode.BytecodeBlock; import io.airlift.bytecode.BytecodeNode; import io.airlift.bytecode.Variable; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.bytecode.expression.BytecodeExpressions.constantFalse; import static io.airlift.bytecode.instruction.Constant.loadBoolean; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.type.UnknownType.UNKNOWN; import static java.util.Objects.requireNonNull; public class IsNullCodeGenerator diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/JoinCompiler.java b/core/trino-main/src/main/java/io/trino/sql/gen/JoinCompiler.java index 1df0f41994c8..36a094393404 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/JoinCompiler.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/JoinCompiler.java @@ -33,20 +33,20 @@ import io.airlift.bytecode.expression.BytecodeExpressions; import io.airlift.bytecode.instruction.LabelNode; import io.airlift.jmx.CacheStatsMBean; -import io.prestosql.Session; -import io.prestosql.operator.JoinHash; -import io.prestosql.operator.JoinHashSupplier; -import io.prestosql.operator.LookupSourceSupplier; -import io.prestosql.operator.PagesHash; -import io.prestosql.operator.PagesHashStrategy; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; +import io.trino.Session; +import io.trino.operator.JoinHash; +import io.trino.operator.JoinHashSupplier; +import io.trino.operator.LookupSourceSupplier; +import io.trino.operator.PagesHash; +import io.trino.operator.PagesHashStrategy; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; import it.unimi.dsi.fastutil.longs.LongArrayList; import org.openjdk.jol.info.ClassLayout; import org.weakref.jmx.Managed; @@ -80,14 +80,14 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.invokeDynamic; import static io.airlift.bytecode.expression.BytecodeExpressions.newInstance; import static io.airlift.bytecode.expression.BytecodeExpressions.notEqual; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.sql.gen.Bootstrap.BOOTSTRAP_METHOD; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.sql.gen.Bootstrap.BOOTSTRAP_METHOD; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; import static java.util.Objects.requireNonNull; public class JoinCompiler diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/JoinFilterFunctionCompiler.java b/core/trino-main/src/main/java/io/trino/sql/gen/JoinFilterFunctionCompiler.java index 4e480467371d..5dad7fe8e188 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/JoinFilterFunctionCompiler.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/JoinFilterFunctionCompiler.java @@ -30,17 +30,17 @@ import io.airlift.bytecode.Variable; import io.airlift.bytecode.control.IfStatement; import io.airlift.jmx.CacheStatsMBean; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.InternalJoinFilterFunction; -import io.prestosql.operator.JoinFilterFunction; -import io.prestosql.operator.StandardJoinFilterFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.sql.gen.LambdaBytecodeGenerator.CompiledLambda; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.RowExpressionVisitor; +import io.trino.metadata.Metadata; +import io.trino.operator.InternalJoinFilterFunction; +import io.trino.operator.JoinFilterFunction; +import io.trino.operator.StandardJoinFilterFunction; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.sql.gen.LambdaBytecodeGenerator.CompiledLambda; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.RowExpressionVisitor; import it.unimi.dsi.fastutil.longs.LongArrayList; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -62,10 +62,10 @@ import static io.airlift.bytecode.ParameterizedType.type; import static io.airlift.bytecode.expression.BytecodeExpressions.constantFalse; import static io.airlift.bytecode.expression.BytecodeExpressions.constantInt; -import static io.prestosql.sql.gen.BytecodeUtils.invoke; -import static io.prestosql.sql.gen.LambdaExpressionExtractor.extractLambdaExpressions; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; +import static io.trino.sql.gen.BytecodeUtils.invoke; +import static io.trino.sql.gen.LambdaExpressionExtractor.extractLambdaExpressions; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; import static java.util.Objects.requireNonNull; public class JoinFilterFunctionCompiler diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/LambdaBytecodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/LambdaBytecodeGenerator.java index 6b10e88ee372..5568c17de4b7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/LambdaBytecodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/LambdaBytecodeGenerator.java @@ -29,18 +29,18 @@ import io.airlift.bytecode.Scope; import io.airlift.bytecode.Variable; import io.airlift.bytecode.expression.BytecodeExpression; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.aggregation.AccumulatorCompiler; -import io.prestosql.operator.aggregation.LambdaProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.InputReferenceExpression; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.RowExpressionVisitor; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.sql.relational.VariableReferenceExpression; +import io.trino.metadata.Metadata; +import io.trino.operator.aggregation.AccumulatorCompiler; +import io.trino.operator.aggregation.LambdaProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.InputReferenceExpression; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.RowExpressionVisitor; +import io.trino.sql.relational.SpecialForm; +import io.trino.sql.relational.VariableReferenceExpression; import org.objectweb.asm.Handle; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; @@ -59,15 +59,15 @@ import static io.airlift.bytecode.ParameterizedType.type; import static io.airlift.bytecode.expression.BytecodeExpressions.constantFalse; import static io.airlift.bytecode.expression.BytecodeExpressions.invokeDynamic; -import static io.prestosql.spi.StandardErrorCode.COMPILER_ERROR; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.sql.gen.BytecodeUtils.boxPrimitiveIfNecessary; -import static io.prestosql.sql.gen.BytecodeUtils.unboxPrimitiveIfNecessary; -import static io.prestosql.sql.gen.LambdaCapture.LAMBDA_CAPTURE_METHOD; -import static io.prestosql.sql.gen.LambdaExpressionExtractor.extractLambdaExpressions; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.COMPILER_ERROR; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.sql.gen.BytecodeUtils.boxPrimitiveIfNecessary; +import static io.trino.sql.gen.BytecodeUtils.unboxPrimitiveIfNecessary; +import static io.trino.sql.gen.LambdaCapture.LAMBDA_CAPTURE_METHOD; +import static io.trino.sql.gen.LambdaExpressionExtractor.extractLambdaExpressions; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Failures.checkCondition; import static java.util.Objects.requireNonNull; import static org.objectweb.asm.Type.getMethodType; import static org.objectweb.asm.Type.getType; diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/LambdaExpressionExtractor.java b/core/trino-main/src/main/java/io/trino/sql/gen/LambdaExpressionExtractor.java index 2abc727506bc..0c20c1fe2dbf 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/LambdaExpressionExtractor.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/LambdaExpressionExtractor.java @@ -14,14 +14,14 @@ package io.trino.sql.gen; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.InputReferenceExpression; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.RowExpressionVisitor; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.sql.relational.VariableReferenceExpression; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.InputReferenceExpression; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.RowExpressionVisitor; +import io.trino.sql.relational.SpecialForm; +import io.trino.sql.relational.VariableReferenceExpression; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/NullIfCodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/NullIfCodeGenerator.java index 9af99003493b..45d9e9baf9ab 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/NullIfCodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/NullIfCodeGenerator.java @@ -20,17 +20,17 @@ import io.airlift.bytecode.Variable; import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.instruction.LabelNode; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; import java.util.List; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.bytecode.expression.BytecodeExpressions.constantTrue; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.sql.gen.BytecodeUtils.ifWasNullPopAndGoto; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.sql.gen.BytecodeUtils.ifWasNullPopAndGoto; import static java.util.Objects.requireNonNull; public class NullIfCodeGenerator diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/OrCodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/OrCodeGenerator.java index 64f0515082ef..d390ebece367 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/OrCodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/OrCodeGenerator.java @@ -18,8 +18,8 @@ import io.airlift.bytecode.Variable; import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.instruction.LabelNode; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.bytecode.expression.BytecodeExpressions.constantFalse; diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/OrderingCompiler.java b/core/trino-main/src/main/java/io/trino/sql/gen/OrderingCompiler.java index 50b6817c4c2c..728984138673 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/OrderingCompiler.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/OrderingCompiler.java @@ -28,18 +28,18 @@ import io.airlift.bytecode.instruction.LabelNode; import io.airlift.jmx.CacheStatsMBean; import io.airlift.log.Logger; -import io.prestosql.operator.PageWithPositionComparator; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.PagesIndexComparator; -import io.prestosql.operator.PagesIndexOrdering; -import io.prestosql.operator.SimplePageWithPositionComparator; -import io.prestosql.operator.SimplePagesIndexComparator; -import io.prestosql.operator.SyntheticAddress; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.operator.PageWithPositionComparator; +import io.trino.operator.PagesIndex; +import io.trino.operator.PagesIndexComparator; +import io.trino.operator.PagesIndexOrdering; +import io.trino.operator.SimplePageWithPositionComparator; +import io.trino.operator.SimplePagesIndexComparator; +import io.trino.operator.SyntheticAddress; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import it.unimi.dsi.fastutil.longs.LongArrayList; import it.unimi.dsi.fastutil.objects.ObjectArrayList; import org.weakref.jmx.Managed; @@ -59,12 +59,12 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.constantInt; import static io.airlift.bytecode.expression.BytecodeExpressions.invokeDynamic; import static io.airlift.bytecode.expression.BytecodeExpressions.invokeStatic; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.sql.gen.Bootstrap.BOOTSTRAP_METHOD; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.sql.gen.Bootstrap.BOOTSTRAP_METHOD; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; import static java.util.Objects.requireNonNull; public class OrderingCompiler diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/PageFunctionCompiler.java b/core/trino-main/src/main/java/io/trino/sql/gen/PageFunctionCompiler.java index da3fb68d33e3..d2d28280a3dd 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/PageFunctionCompiler.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/PageFunctionCompiler.java @@ -32,30 +32,30 @@ import io.airlift.bytecode.control.ForLoop; import io.airlift.bytecode.control.IfStatement; import io.airlift.jmx.CacheStatsMBean; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.Work; -import io.prestosql.operator.project.ConstantPageProjection; -import io.prestosql.operator.project.GeneratedPageProjection; -import io.prestosql.operator.project.InputChannels; -import io.prestosql.operator.project.InputPageProjection; -import io.prestosql.operator.project.PageFieldsToInputParametersRewriter; -import io.prestosql.operator.project.PageFilter; -import io.prestosql.operator.project.PageProjection; -import io.prestosql.operator.project.SelectedPositions; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.sql.gen.LambdaBytecodeGenerator.CompiledLambda; -import io.prestosql.sql.planner.CompilerConfig; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.DeterminismEvaluator; -import io.prestosql.sql.relational.Expressions; -import io.prestosql.sql.relational.InputReferenceExpression; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.RowExpressionVisitor; +import io.trino.metadata.Metadata; +import io.trino.operator.Work; +import io.trino.operator.project.ConstantPageProjection; +import io.trino.operator.project.GeneratedPageProjection; +import io.trino.operator.project.InputChannels; +import io.trino.operator.project.InputPageProjection; +import io.trino.operator.project.PageFieldsToInputParametersRewriter; +import io.trino.operator.project.PageFilter; +import io.trino.operator.project.PageProjection; +import io.trino.operator.project.SelectedPositions; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.sql.gen.LambdaBytecodeGenerator.CompiledLambda; +import io.trino.sql.planner.CompilerConfig; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.DeterminismEvaluator; +import io.trino.sql.relational.Expressions; +import io.trino.sql.relational.InputReferenceExpression; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.RowExpressionVisitor; import org.objectweb.asm.MethodTooLargeException; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -88,14 +88,14 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.lessThan; import static io.airlift.bytecode.expression.BytecodeExpressions.newArray; import static io.airlift.bytecode.expression.BytecodeExpressions.not; -import static io.prestosql.operator.project.PageFieldsToInputParametersRewriter.rewritePageFieldsToInputParameters; -import static io.prestosql.spi.StandardErrorCode.COMPILER_ERROR; -import static io.prestosql.sql.gen.BytecodeUtils.generateWrite; -import static io.prestosql.sql.gen.BytecodeUtils.invoke; -import static io.prestosql.sql.gen.LambdaExpressionExtractor.extractLambdaExpressions; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Reflection.constructorMethodHandle; +import static io.trino.operator.project.PageFieldsToInputParametersRewriter.rewritePageFieldsToInputParameters; +import static io.trino.spi.StandardErrorCode.COMPILER_ERROR; +import static io.trino.sql.gen.BytecodeUtils.generateWrite; +import static io.trino.sql.gen.BytecodeUtils.invoke; +import static io.trino.sql.gen.LambdaExpressionExtractor.extractLambdaExpressions; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Reflection.constructorMethodHandle; import static java.util.Objects.requireNonNull; public class PageFunctionCompiler diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/RowConstructorCodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/RowConstructorCodeGenerator.java index 4942b83f0adf..124a04a78bbd 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/RowConstructorCodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/RowConstructorCodeGenerator.java @@ -18,19 +18,19 @@ import io.airlift.bytecode.Scope; import io.airlift.bytecode.Variable; import io.airlift.bytecode.control.IfStatement; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.type.Type; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; import java.util.List; import static io.airlift.bytecode.expression.BytecodeExpressions.constantFalse; import static io.airlift.bytecode.expression.BytecodeExpressions.constantInt; import static io.airlift.bytecode.expression.BytecodeExpressions.constantNull; -import static io.prestosql.sql.gen.SqlTypeBytecodeExpression.constantType; +import static io.trino.sql.gen.SqlTypeBytecodeExpression.constantType; import static java.util.Objects.requireNonNull; public class RowConstructorCodeGenerator diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/RowExpressionCompiler.java b/core/trino-main/src/main/java/io/trino/sql/gen/RowExpressionCompiler.java index 0105f6cedda7..2c84dd4765fa 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/RowExpressionCompiler.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/RowExpressionCompiler.java @@ -19,17 +19,17 @@ import io.airlift.bytecode.BytecodeNode; import io.airlift.bytecode.Scope; import io.airlift.bytecode.Variable; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.LambdaBytecodeGenerator.CompiledLambda; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.InputReferenceExpression; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.RowExpressionVisitor; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.sql.relational.VariableReferenceExpression; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.sql.gen.LambdaBytecodeGenerator.CompiledLambda; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.InputReferenceExpression; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.RowExpressionVisitor; +import io.trino.sql.relational.SpecialForm; +import io.trino.sql.relational.VariableReferenceExpression; import java.util.Map; import java.util.Optional; @@ -42,8 +42,8 @@ import static io.airlift.bytecode.instruction.Constant.loadInt; import static io.airlift.bytecode.instruction.Constant.loadLong; import static io.airlift.bytecode.instruction.Constant.loadString; -import static io.prestosql.sql.gen.BytecodeUtils.loadConstant; -import static io.prestosql.sql.gen.LambdaBytecodeGenerator.generateLambda; +import static io.trino.sql.gen.BytecodeUtils.loadConstant; +import static io.trino.sql.gen.LambdaBytecodeGenerator.generateLambda; public class RowExpressionCompiler { diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/SqlTypeBytecodeExpression.java b/core/trino-main/src/main/java/io/trino/sql/gen/SqlTypeBytecodeExpression.java index d79250944a4f..33a577f887e1 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/SqlTypeBytecodeExpression.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/SqlTypeBytecodeExpression.java @@ -19,13 +19,13 @@ import io.airlift.bytecode.expression.BytecodeExpression; import io.airlift.bytecode.instruction.InvokeInstruction; import io.airlift.slice.Slice; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.lang.reflect.Method; import java.util.List; import static io.airlift.bytecode.ParameterizedType.type; -import static io.prestosql.sql.gen.Bootstrap.BOOTSTRAP_METHOD; +import static io.trino.sql.gen.Bootstrap.BOOTSTRAP_METHOD; import static java.util.Objects.requireNonNull; public class SqlTypeBytecodeExpression diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/SwitchCodeGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/SwitchCodeGenerator.java index 0087f7399a05..c0e19663920d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/SwitchCodeGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/SwitchCodeGenerator.java @@ -21,10 +21,10 @@ import io.airlift.bytecode.control.IfStatement; import io.airlift.bytecode.instruction.LabelNode; import io.airlift.bytecode.instruction.VariableInstruction; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.Type; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; import java.util.List; import java.util.Optional; @@ -33,7 +33,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.bytecode.expression.BytecodeExpressions.constantFalse; import static io.airlift.bytecode.expression.BytecodeExpressions.constantTrue; -import static io.prestosql.sql.relational.SpecialForm.Form.WHEN; +import static io.trino.sql.relational.SpecialForm.Form.WHEN; import static java.util.Objects.requireNonNull; public class SwitchCodeGenerator diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/VarArgsToArrayAdapterGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/VarArgsToArrayAdapterGenerator.java index e5ccc549417e..c1f16e05202c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/VarArgsToArrayAdapterGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/VarArgsToArrayAdapterGenerator.java @@ -19,8 +19,8 @@ import io.airlift.bytecode.MethodDefinition; import io.airlift.bytecode.Parameter; import io.airlift.bytecode.expression.BytecodeExpression; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.util.Reflection; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.util.Reflection; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodType; @@ -36,11 +36,11 @@ import static io.airlift.bytecode.ParameterizedType.type; import static io.airlift.bytecode.expression.BytecodeExpressions.newArray; import static io.airlift.bytecode.expression.BytecodeExpressions.newInstance; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.sql.gen.BytecodeUtils.loadConstant; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.sql.gen.BytecodeUtils.loadConstant; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Failures.checkCondition; import static java.util.Collections.nCopies; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/gen/VarArgsToMapAdapterGenerator.java b/core/trino-main/src/main/java/io/trino/sql/gen/VarArgsToMapAdapterGenerator.java index 8872ded9368d..05930d3749ae 100644 --- a/core/trino-main/src/main/java/io/trino/sql/gen/VarArgsToMapAdapterGenerator.java +++ b/core/trino-main/src/main/java/io/trino/sql/gen/VarArgsToMapAdapterGenerator.java @@ -21,7 +21,7 @@ import io.airlift.bytecode.MethodDefinition; import io.airlift.bytecode.Parameter; import io.airlift.bytecode.Variable; -import io.prestosql.util.Reflection; +import io.trino.util.Reflection; import java.lang.invoke.MethodHandle; import java.util.HashMap; @@ -38,11 +38,11 @@ import static io.airlift.bytecode.expression.BytecodeExpressions.constantInt; import static io.airlift.bytecode.expression.BytecodeExpressions.constantString; import static io.airlift.bytecode.expression.BytecodeExpressions.invokeStatic; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.sql.gen.BytecodeUtils.loadConstant; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.sql.gen.BytecodeUtils.loadConstant; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Failures.checkCondition; public final class VarArgsToMapAdapterGenerator { diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/Coercer.java b/core/trino-main/src/main/java/io/trino/sql/planner/Coercer.java index 3a23a5f5747a..0c5b5ec70c18 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/Coercer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/Coercer.java @@ -13,18 +13,18 @@ */ package io.trino.sql.planner; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.NodeRef; +import io.trino.spi.type.Type; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.NodeRef; import java.util.Map; import java.util.Set; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; public final class Coercer { diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/CompilerConfig.java b/core/trino-main/src/main/java/io/trino/sql/planner/CompilerConfig.java index 7d746e9b46f0..8b63b56712ec 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/CompilerConfig.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/CompilerConfig.java @@ -15,7 +15,7 @@ import io.airlift.configuration.Config; import io.airlift.configuration.DefunctConfig; -import io.prestosql.spi.function.Description; +import io.trino.spi.function.Description; import javax.validation.constraints.Min; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/ConnectorExpressionTranslator.java b/core/trino-main/src/main/java/io/trino/sql/planner/ConnectorExpressionTranslator.java index a0d79ce77444..315a52a3ac21 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/ConnectorExpressionTranslator.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/ConnectorExpressionTranslator.java @@ -13,28 +13,28 @@ */ package io.trino.sql.planner; -import io.prestosql.Session; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Constant; -import io.prestosql.spi.expression.FieldDereference; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.BinaryLiteral; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.CharLiteral; -import io.prestosql.sql.tree.DecimalLiteral; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Constant; +import io.trino.spi.expression.FieldDereference; +import io.trino.spi.expression.Variable; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.BinaryLiteral; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.CharLiteral; +import io.trino.sql.tree.DecimalLiteral; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/ConnectorExpressions.java b/core/trino-main/src/main/java/io/trino/sql/planner/ConnectorExpressions.java index 47478676dbf0..c7ecbec76528 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/ConnectorExpressions.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/ConnectorExpressions.java @@ -15,8 +15,8 @@ import com.google.common.graph.SuccessorsFunction; import com.google.common.graph.Traverser; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Variable; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Variable; import java.util.List; import java.util.stream.Stream; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/DesugarArrayConstructorRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/DesugarArrayConstructorRewriter.java index dbcf0b82d1d4..d20ddaeea67e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/DesugarArrayConstructorRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/DesugarArrayConstructorRewriter.java @@ -14,16 +14,16 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.ArrayConstructor; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.sql.tree.ArrayConstructor; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/DesugarAtTimeZoneRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/DesugarAtTimeZoneRewriter.java index 7983a9347c0c..e72373fca88d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/DesugarAtTimeZoneRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/DesugarAtTimeZoneRewriter.java @@ -14,27 +14,27 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.AtTimeZone; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.sql.tree.AtTimeZone; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; import java.util.Map; -import static io.prestosql.spi.type.TimeWithTimeZoneType.createTimeWithTimeZoneType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.spi.type.TimeWithTimeZoneType.createTimeWithTimeZoneType; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; import static java.util.Objects.requireNonNull; public final class DesugarAtTimeZoneRewriter diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/DesugarLikeRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/DesugarLikeRewriter.java index d1b89b0e3da0..9a8dc1266fc0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/DesugarLikeRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/DesugarLikeRewriter.java @@ -14,23 +14,23 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; import java.util.Map; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.type.LikeFunctions.LIKE_PATTERN_FUNCTION_NAME; -import static io.prestosql.type.LikePatternType.LIKE_PATTERN; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.type.LikeFunctions.LIKE_PATTERN_FUNCTION_NAME; +import static io.trino.type.LikePatternType.LIKE_PATTERN; import static java.util.Objects.requireNonNull; public final class DesugarLikeRewriter diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/DesugarRowSubscriptRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/DesugarRowSubscriptRewriter.java index 0424cd04e9c1..9791ba2ea23d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/DesugarRowSubscriptRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/DesugarRowSubscriptRewriter.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.SubscriptExpression; +import io.trino.Session; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.SubscriptExpression; import java.util.Map; import java.util.Optional; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/DesugarTryExpressionRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/DesugarTryExpressionRewriter.java index 5371f98c216a..5f4567ff35ce 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/DesugarTryExpressionRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/DesugarTryExpressionRewriter.java @@ -15,22 +15,22 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.TryExpression; -import io.prestosql.type.FunctionType; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.TryExpression; +import io.trino.type.FunctionType; import java.util.Map; -import static io.prestosql.operator.scalar.TryFunction.NAME; +import static io.trino.operator.scalar.TryFunction.NAME; public final class DesugarTryExpressionRewriter { diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/DeterminismEvaluator.java b/core/trino-main/src/main/java/io/trino/sql/planner/DeterminismEvaluator.java index 365386da6560..5c8463a04275 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/DeterminismEvaluator.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/DeterminismEvaluator.java @@ -13,11 +13,11 @@ */ package io.trino.sql.planner; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.tree.DefaultExpressionTraversalVisitor; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.sql.tree.DefaultExpressionTraversalVisitor; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/DistributedExecutionPlanner.java b/core/trino-main/src/main/java/io/trino/sql/planner/DistributedExecutionPlanner.java index 5f197a9b3ec4..973f29115719 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/DistributedExecutionPlanner.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/DistributedExecutionPlanner.java @@ -16,53 +16,53 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; -import io.prestosql.Session; -import io.prestosql.execution.TableInfo; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableMetadata; -import io.prestosql.metadata.TableProperties; -import io.prestosql.operator.StageExecutionDescriptor; -import io.prestosql.server.DynamicFilterService; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.split.SampledSplitSource; -import io.prestosql.split.SplitManager; -import io.prestosql.split.SplitSource; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableDeleteNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; +import io.trino.Session; +import io.trino.execution.TableInfo; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableMetadata; +import io.trino.metadata.TableProperties; +import io.trino.operator.StageExecutionDescriptor; +import io.trino.server.DynamicFilterService; +import io.trino.spi.connector.DynamicFilter; +import io.trino.split.SampledSplitSource; +import io.trino.split.SplitManager; +import io.trino.split.SplitSource; +import io.trino.sql.DynamicFilters; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableDeleteNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; import javax.inject.Inject; @@ -72,10 +72,10 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.GROUPED_SCHEDULING; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; -import static io.prestosql.spi.connector.DynamicFilter.EMPTY; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.GROUPED_SCHEDULING; +import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; +import static io.trino.spi.connector.DynamicFilter.EMPTY; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; import static java.util.Objects.requireNonNull; public class DistributedExecutionPlanner diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/DomainCoercer.java b/core/trino-main/src/main/java/io/trino/sql/planner/DomainCoercer.java index 47c8180a1236..fa93f0cc962f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/DomainCoercer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/DomainCoercer.java @@ -15,31 +15,31 @@ import com.google.common.base.Throwables; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.OperatorNotFoundException; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.predicate.AllOrNoneValueSet; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Marker; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.Ranges; -import io.prestosql.spi.predicate.SortedRangeSet; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.InterpretedFunctionInvoker; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.OperatorNotFoundException; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.predicate.AllOrNoneValueSet; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Marker; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.Ranges; +import io.trino.spi.predicate.SortedRangeSet; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.InterpretedFunctionInvoker; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.SATURATED_FLOOR_CAST; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.SATURATED_FLOOR_CAST; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/DomainTranslator.java b/core/trino-main/src/main/java/io/trino/sql/planner/DomainTranslator.java index 48e6fb05c52c..9458fc362bfc 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/DomainTranslator.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/DomainTranslator.java @@ -19,49 +19,49 @@ import com.google.common.collect.PeekingIterator; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.OperatorNotFoundException; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.predicate.DiscreteValues; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Marker; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.Ranges; -import io.prestosql.spi.predicate.SortedRangeSet; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.ExpressionUtils; -import io.prestosql.sql.InterpretedFunctionInvoker; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.InListExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.type.LikeFunctions; -import io.prestosql.type.TypeCoercion; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.OperatorNotFoundException; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.PrestoException; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.predicate.DiscreteValues; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Marker; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.Ranges; +import io.trino.spi.predicate.SortedRangeSet; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.VarcharType; +import io.trino.sql.ExpressionUtils; +import io.trino.sql.InterpretedFunctionInvoker; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.InListExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SymbolReference; +import io.trino.type.LikeFunctions; +import io.trino.type.TypeCoercion; import javax.annotation.Nullable; @@ -80,23 +80,23 @@ import static io.airlift.slice.SliceUtf8.getCodePointAt; import static io.airlift.slice.SliceUtf8.lengthOfCodePoint; import static io.airlift.slice.SliceUtf8.setCodePointAt; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.SATURATED_FLOOR_CAST; -import static io.prestosql.spi.type.TypeUtils.isFloatingPointNaN; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.ExpressionUtils.combineDisjunctsWithDefault; -import static io.prestosql.sql.ExpressionUtils.or; -import static io.prestosql.sql.tree.BooleanLiteral.FALSE_LITERAL; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.NOT_EQUAL; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.SATURATED_FLOOR_CAST; +import static io.trino.spi.type.TypeUtils.isFloatingPointNaN; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.ExpressionUtils.combineDisjunctsWithDefault; +import static io.trino.sql.ExpressionUtils.or; +import static io.trino.sql.tree.BooleanLiteral.FALSE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.NOT_EQUAL; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.collectingAndThen; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/EffectivePredicateExtractor.java b/core/trino-main/src/main/java/io/trino/sql/planner/EffectivePredicateExtractor.java index f6c103051929..5a613e0accbf 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/EffectivePredicateExtractor.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/EffectivePredicateExtractor.java @@ -18,37 +18,37 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.SingleRowBlock; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.block.SingleRowBlock; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SymbolReference; import java.util.ArrayList; import java.util.Collection; @@ -64,14 +64,14 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.spi.type.TypeUtils.isFloatingPointNaN; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.ExpressionUtils.expressionOrNullSymbols; -import static io.prestosql.sql.ExpressionUtils.extractConjuncts; -import static io.prestosql.sql.ExpressionUtils.filterDeterministicConjuncts; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.spi.type.TypeUtils.isFloatingPointNaN; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.ExpressionUtils.expressionOrNullSymbols; +import static io.trino.sql.ExpressionUtils.extractConjuncts; +import static io.trino.sql.ExpressionUtils.filterDeterministicConjuncts; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/EqualityInference.java b/core/trino-main/src/main/java/io/trino/sql/planner/EqualityInference.java index 10743bc3bd07..ad3ec55db6b5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/EqualityInference.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/EqualityInference.java @@ -21,11 +21,11 @@ import com.google.common.collect.ImmutableSetMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.Ordering; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.util.DisjointSet; +import io.trino.metadata.Metadata; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; +import io.trino.util.DisjointSet; import java.util.ArrayList; import java.util.Arrays; @@ -39,10 +39,10 @@ import java.util.function.Predicate; import java.util.stream.Collectors; -import static io.prestosql.sql.ExpressionUtils.extractConjuncts; -import static io.prestosql.sql.planner.DeterminismEvaluator.isDeterministic; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.NullabilityAnalyzer.mayReturnNullOnNonNullInput; +import static io.trino.sql.ExpressionUtils.extractConjuncts; +import static io.trino.sql.planner.DeterminismEvaluator.isDeterministic; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.NullabilityAnalyzer.mayReturnNullOnNonNullInput; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionExtractor.java b/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionExtractor.java index 9f64e6930ede..858635890b65 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionExtractor.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionExtractor.java @@ -14,23 +14,23 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.iterative.GroupReference; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Expression; +import io.trino.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Expression; import java.util.List; import java.util.function.Consumer; -import static io.prestosql.sql.planner.iterative.Lookup.noLookup; +import static io.trino.sql.planner.iterative.Lookup.noLookup; import static java.util.Objects.requireNonNull; public final class ExpressionExtractor diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionInterpreter.java b/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionInterpreter.java index 955700a0606a..f3a02f1a96a5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionInterpreter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionInterpreter.java @@ -19,84 +19,84 @@ import com.google.common.primitives.Primitives; import io.airlift.json.JsonCodec; import io.airlift.slice.Slice; -import io.prestosql.Session; -import io.prestosql.client.FailureInfo; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.operator.scalar.ArraySubscriptOperator; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RowBlockBuilder; -import io.prestosql.spi.block.SingleRowBlock; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.RowType.Field; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.InterpretedFunctionInvoker; -import io.prestosql.sql.analyzer.ExpressionAnalyzer; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.planner.iterative.rule.DesugarCurrentPath; -import io.prestosql.sql.planner.iterative.rule.DesugarCurrentUser; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; -import io.prestosql.sql.tree.ArrayConstructor; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.BindExpression; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.ComparisonExpression.Operator; -import io.prestosql.sql.tree.CurrentPath; -import io.prestosql.sql.tree.CurrentUser; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FieldReference; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.InListExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.Literal; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullIfExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.QuantifiedComparisonExpression; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SubqueryExpression; -import io.prestosql.sql.tree.SubscriptExpression; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.WhenClause; -import io.prestosql.type.FunctionType; -import io.prestosql.type.JoniRegexp; -import io.prestosql.type.LikeFunctions; -import io.prestosql.type.TypeCoercion; -import io.prestosql.util.Failures; -import io.prestosql.util.FastutilSetHelper; +import io.trino.Session; +import io.trino.client.FailureInfo; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.operator.scalar.ArraySubscriptOperator; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RowBlockBuilder; +import io.trino.spi.block.SingleRowBlock; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.RowType.Field; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.sql.InterpretedFunctionInvoker; +import io.trino.sql.analyzer.ExpressionAnalyzer; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.planner.iterative.rule.DesugarCurrentPath; +import io.trino.sql.planner.iterative.rule.DesugarCurrentUser; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArithmeticUnaryExpression; +import io.trino.sql.tree.ArrayConstructor; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.BindExpression; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.ComparisonExpression.Operator; +import io.trino.sql.tree.CurrentPath; +import io.trino.sql.tree.CurrentUser; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FieldReference; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.InListExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.Literal; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullIfExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.QuantifiedComparisonExpression; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SubqueryExpression; +import io.trino.sql.tree.SubscriptExpression; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.WhenClause; +import io.trino.type.FunctionType; +import io.trino.type.JoniRegexp; +import io.trino.type.LikeFunctions; +import io.trino.type.TypeCoercion; +import io.trino.util.Failures; +import io.trino.util.FastutilSetHelper; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -119,33 +119,33 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.DynamicFilters.isDynamicFilter; -import static io.prestosql.sql.analyzer.ConstantExpressionVerifier.verifyExpressionIsConstant; -import static io.prestosql.sql.analyzer.ExpressionAnalyzer.createConstantAnalyzer; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toTypeSignature; -import static io.prestosql.sql.gen.VarArgsToMapAdapterGenerator.generateVarArgsToMapAdapter; -import static io.prestosql.sql.planner.DeterminismEvaluator.isDeterministic; -import static io.prestosql.sql.planner.ResolvedFunctionCallRewriter.rewriteResolvedFunctions; -import static io.prestosql.sql.planner.iterative.rule.CanonicalizeExpressionRewriter.canonicalizeExpression; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.type.LikeFunctions.isLikePattern; -import static io.prestosql.type.LikeFunctions.unescapeLiteralLikePattern; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.spi.type.TypeUtils.writeNativeValue; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.DynamicFilters.isDynamicFilter; +import static io.trino.sql.analyzer.ConstantExpressionVerifier.verifyExpressionIsConstant; +import static io.trino.sql.analyzer.ExpressionAnalyzer.createConstantAnalyzer; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toTypeSignature; +import static io.trino.sql.gen.VarArgsToMapAdapterGenerator.generateVarArgsToMapAdapter; +import static io.trino.sql.planner.DeterminismEvaluator.isDeterministic; +import static io.trino.sql.planner.ResolvedFunctionCallRewriter.rewriteResolvedFunctions; +import static io.trino.sql.planner.iterative.rule.CanonicalizeExpressionRewriter.canonicalizeExpression; +import static io.trino.type.JsonType.JSON; +import static io.trino.type.LikeFunctions.isLikePattern; +import static io.trino.type.LikeFunctions.unescapeLiteralLikePattern; +import static io.trino.util.Failures.checkCondition; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionNodeInliner.java b/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionNodeInliner.java index e142a2290243..32eb1c508082 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionNodeInliner.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionNodeInliner.java @@ -13,9 +13,9 @@ */ package io.trino.sql.planner; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionSymbolInliner.java b/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionSymbolInliner.java index 408d61124473..fd9742cb24ac 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionSymbolInliner.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/ExpressionSymbolInliner.java @@ -15,12 +15,12 @@ import com.google.common.collect.HashMultiset; import com.google.common.collect.Multiset; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/FragmentTableScanCounter.java b/core/trino-main/src/main/java/io/trino/sql/planner/FragmentTableScanCounter.java index 496fa8248928..100ed982ebe2 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/FragmentTableScanCounter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/FragmentTableScanCounter.java @@ -13,10 +13,10 @@ */ package io.trino.sql.planner; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.TableScanNode; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/FunctionCallBuilder.java b/core/trino-main/src/main/java/io/trino/sql/planner/FunctionCallBuilder.java index 82f9e5b78f7b..66276ffa196b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/FunctionCallBuilder.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/FunctionCallBuilder.java @@ -13,16 +13,16 @@ */ package io.trino.sql.planner; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.analyzer.TypeSignatureProvider; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.NodeLocation; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Window; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.analyzer.TypeSignatureProvider; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.NodeLocation; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Window; import java.util.ArrayList; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/GroupingOperationRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/GroupingOperationRewriter.java index ee435896a4fa..af2e053aaa30 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/GroupingOperationRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/GroupingOperationRewriter.java @@ -13,17 +13,17 @@ */ package io.trino.sql.planner; -import io.prestosql.sql.analyzer.FieldId; -import io.prestosql.sql.analyzer.RelationId; -import io.prestosql.sql.analyzer.ResolvedField; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArrayConstructor; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.GroupingOperation; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.SubscriptExpression; +import io.trino.sql.analyzer.FieldId; +import io.trino.sql.analyzer.RelationId; +import io.trino.sql.analyzer.ResolvedField; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArrayConstructor; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.GroupingOperation; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.SubscriptExpression; import java.util.List; import java.util.Map; @@ -32,7 +32,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.ADD; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.ADD; import static java.util.Objects.requireNonNull; public final class GroupingOperationRewriter diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/InputExtractor.java b/core/trino-main/src/main/java/io/trino/sql/planner/InputExtractor.java index 260f5c17eb10..39ea0222ad4a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/InputExtractor.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/InputExtractor.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.execution.Column; -import io.prestosql.execution.Input; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.execution.Column; +import io.trino.execution.Input; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.TableScanNode; import java.util.HashSet; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/LiteralEncoder.java b/core/trino-main/src/main/java/io/trino/sql/planner/LiteralEncoder.java index 5c4d6b7e6011..6b00c9553074 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/LiteralEncoder.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/LiteralEncoder.java @@ -19,55 +19,55 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.SliceUtf8; -import io.prestosql.block.BlockSerdeUtil; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.operator.scalar.VarbinaryFunctions; -import io.prestosql.operator.scalar.timestamp.TimestampToVarcharCast; -import io.prestosql.operator.scalar.timestamptz.TimestampWithTimeZoneToVarcharCast; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.DecimalLiteral; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.TimestampLiteral; +import io.trino.block.BlockSerdeUtil; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.operator.scalar.VarbinaryFunctions; +import io.trino.operator.scalar.timestamp.TimestampToVarcharCast; +import io.trino.operator.scalar.timestamptz.TimestampWithTimeZoneToVarcharCast; +import io.trino.spi.block.Block; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.sql.tree.ArithmeticUnaryExpression; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.DecimalLiteral; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.TimestampLiteral; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.metadata.LiteralFunction.LITERAL_FUNCTION_NAME; -import static io.prestosql.metadata.LiteralFunction.typeForMagicLiteral; -import static io.prestosql.spi.predicate.Utils.nativeValueToBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.type.DateTimes.parseTimestampWithTimeZone; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.metadata.LiteralFunction.LITERAL_FUNCTION_NAME; +import static io.trino.metadata.LiteralFunction.typeForMagicLiteral; +import static io.trino.spi.predicate.Utils.nativeValueToBlock; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.type.DateTimes.parseTimestampWithTimeZone; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/LiteralInterpreter.java b/core/trino-main/src/main/java/io/trino/sql/planner/LiteralInterpreter.java index 4de56faf5835..f114af8ad3e1 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/LiteralInterpreter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/LiteralInterpreter.java @@ -15,50 +15,50 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeNotFoundException; -import io.prestosql.sql.InterpretedFunctionInvoker; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.BinaryLiteral; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.CharLiteral; -import io.prestosql.sql.tree.DecimalLiteral; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.IntervalLiteral; -import io.prestosql.sql.tree.Literal; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.TimeLiteral; -import io.prestosql.sql.tree.TimestampLiteral; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeNotFoundException; +import io.trino.sql.InterpretedFunctionInvoker; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.BinaryLiteral; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.CharLiteral; +import io.trino.sql.tree.DecimalLiteral; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.IntervalLiteral; +import io.trino.sql.tree.Literal; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.TimeLiteral; +import io.trino.sql.tree.TimestampLiteral; import java.util.Map; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_LITERAL; -import static io.prestosql.spi.StandardErrorCode.TYPE_NOT_FOUND; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.type.DateTimes.parseTime; -import static io.prestosql.type.DateTimes.parseTimeWithTimeZone; -import static io.prestosql.type.DateTimes.parseTimestamp; -import static io.prestosql.type.DateTimes.parseTimestampWithTimeZone; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.DateTimeUtils.parseDayTimeInterval; -import static io.prestosql.util.DateTimeUtils.parseYearMonthInterval; +import static io.trino.spi.StandardErrorCode.INVALID_LITERAL; +import static io.trino.spi.StandardErrorCode.TYPE_NOT_FOUND; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.type.DateTimes.parseTime; +import static io.trino.type.DateTimes.parseTimeWithTimeZone; +import static io.trino.type.DateTimes.parseTimestamp; +import static io.trino.type.DateTimes.parseTimestampWithTimeZone; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.DateTimeUtils.parseDayTimeInterval; +import static io.trino.util.DateTimeUtils.parseYearMonthInterval; import static java.util.Objects.requireNonNull; public final class LiteralInterpreter diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/LocalDynamicFilterConsumer.java b/core/trino-main/src/main/java/io/trino/sql/planner/LocalDynamicFilterConsumer.java index 9868a6a6f581..b9a70320d576 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/LocalDynamicFilterConsumer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/LocalDynamicFilterConsumer.java @@ -17,12 +17,12 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.ArrayList; import java.util.HashMap; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/LocalDynamicFiltersCollector.java b/core/trino-main/src/main/java/io/trino/sql/planner/LocalDynamicFiltersCollector.java index 8a65c62d32fe..311f706e511b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/LocalDynamicFiltersCollector.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/LocalDynamicFiltersCollector.java @@ -17,15 +17,15 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.plan.DynamicFilterId; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.plan.DynamicFilterId; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; @@ -42,9 +42,9 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.concurrent.MoreFutures.addSuccessCallback; import static io.airlift.concurrent.MoreFutures.unmodifiableFuture; -import static io.prestosql.sql.DynamicFilters.Descriptor; -import static io.prestosql.sql.DynamicFilters.extractSourceSymbols; -import static io.prestosql.sql.planner.DomainCoercer.applySaturatedCasts; +import static io.trino.sql.DynamicFilters.Descriptor; +import static io.trino.sql.DynamicFilters.extractSourceSymbols; +import static io.trino.sql.planner.DomainCoercer.applySaturatedCasts; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java b/core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java index bdff86908a9c..0acc08998f4b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java @@ -29,180 +29,180 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.log.Logger; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.execution.DynamicFilterConfig; -import io.prestosql.execution.ExplainAnalyzeContext; -import io.prestosql.execution.StageId; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskManagerConfig; -import io.prestosql.execution.buffer.OutputBuffer; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.index.IndexManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.metadata.TableHandle; -import io.prestosql.operator.AggregationOperator.AggregationOperatorFactory; -import io.prestosql.operator.AssignUniqueIdOperator; -import io.prestosql.operator.DeleteOperator.DeleteOperatorFactory; -import io.prestosql.operator.DevNullOperator.DevNullOperatorFactory; -import io.prestosql.operator.DriverFactory; -import io.prestosql.operator.DynamicFilterSourceOperator; -import io.prestosql.operator.DynamicFilterSourceOperator.DynamicFilterSourceOperatorFactory; -import io.prestosql.operator.EnforceSingleRowOperator; -import io.prestosql.operator.ExchangeClientSupplier; -import io.prestosql.operator.ExchangeOperator.ExchangeOperatorFactory; -import io.prestosql.operator.ExplainAnalyzeOperator.ExplainAnalyzeOperatorFactory; -import io.prestosql.operator.FilterAndProjectOperator; -import io.prestosql.operator.GroupIdOperator; -import io.prestosql.operator.HashAggregationOperator.HashAggregationOperatorFactory; -import io.prestosql.operator.HashBuilderOperator.HashBuilderOperatorFactory; -import io.prestosql.operator.HashSemiJoinOperator; -import io.prestosql.operator.JoinBridgeManager; -import io.prestosql.operator.JoinOperatorFactory; -import io.prestosql.operator.JoinOperatorFactory.OuterOperatorFactoryResult; -import io.prestosql.operator.LimitOperator.LimitOperatorFactory; -import io.prestosql.operator.LocalPlannerAware; -import io.prestosql.operator.LookupJoinOperators; -import io.prestosql.operator.LookupOuterOperator.LookupOuterOperatorFactory; -import io.prestosql.operator.LookupSourceFactory; -import io.prestosql.operator.MarkDistinctOperator.MarkDistinctOperatorFactory; -import io.prestosql.operator.MergeOperator.MergeOperatorFactory; -import io.prestosql.operator.NestedLoopJoinBridge; -import io.prestosql.operator.NestedLoopJoinPagesSupplier; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.OrderByOperator.OrderByOperatorFactory; -import io.prestosql.operator.OutputFactory; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.PagesSpatialIndexFactory; -import io.prestosql.operator.PartitionFunction; -import io.prestosql.operator.PartitionedLookupSourceFactory; -import io.prestosql.operator.PartitionedOutputOperator.PartitionedOutputFactory; -import io.prestosql.operator.PipelineExecutionStrategy; -import io.prestosql.operator.RowNumberOperator; -import io.prestosql.operator.ScanFilterAndProjectOperator.ScanFilterAndProjectOperatorFactory; -import io.prestosql.operator.SetBuilderOperator.SetBuilderOperatorFactory; -import io.prestosql.operator.SetBuilderOperator.SetSupplier; -import io.prestosql.operator.SourceOperatorFactory; -import io.prestosql.operator.SpatialIndexBuilderOperator.SpatialIndexBuilderOperatorFactory; -import io.prestosql.operator.SpatialIndexBuilderOperator.SpatialPredicate; -import io.prestosql.operator.SpatialJoinOperator.SpatialJoinOperatorFactory; -import io.prestosql.operator.StageExecutionDescriptor; -import io.prestosql.operator.StatisticsWriterOperator.StatisticsWriterOperatorFactory; -import io.prestosql.operator.StreamingAggregationOperator; -import io.prestosql.operator.TableDeleteOperator.TableDeleteOperatorFactory; -import io.prestosql.operator.TableScanOperator.TableScanOperatorFactory; -import io.prestosql.operator.TaskContext; -import io.prestosql.operator.TaskOutputOperator.TaskOutputFactory; -import io.prestosql.operator.TopNOperator; -import io.prestosql.operator.TopNRowNumberOperator; -import io.prestosql.operator.ValuesOperator.ValuesOperatorFactory; -import io.prestosql.operator.WindowFunctionDefinition; -import io.prestosql.operator.WindowOperator.WindowOperatorFactory; -import io.prestosql.operator.WorkProcessorPipelineSourceOperator; -import io.prestosql.operator.aggregation.AccumulatorFactory; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.aggregation.LambdaProvider; -import io.prestosql.operator.exchange.LocalExchange.LocalExchangeFactory; -import io.prestosql.operator.exchange.LocalExchangeSinkOperator.LocalExchangeSinkOperatorFactory; -import io.prestosql.operator.exchange.LocalExchangeSourceOperator.LocalExchangeSourceOperatorFactory; -import io.prestosql.operator.exchange.LocalMergeSourceOperator.LocalMergeSourceOperatorFactory; -import io.prestosql.operator.exchange.PageChannelSelector; -import io.prestosql.operator.index.DynamicTupleFilterFactory; -import io.prestosql.operator.index.FieldSetFilteringRecordSet; -import io.prestosql.operator.index.IndexBuildDriverFactoryProvider; -import io.prestosql.operator.index.IndexJoinLookupStats; -import io.prestosql.operator.index.IndexLookupSourceFactory; -import io.prestosql.operator.index.IndexSourceOperator; -import io.prestosql.operator.project.CursorProcessor; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.operator.window.FrameInfo; -import io.prestosql.operator.window.WindowFunctionSupplier; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.SingleRowBlock; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorIndex; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spiller.PartitioningSpillerFactory; -import io.prestosql.spiller.SingleStreamSpillerFactory; -import io.prestosql.spiller.SpillerFactory; -import io.prestosql.split.MappedRecordSet; -import io.prestosql.split.PageSinkManager; -import io.prestosql.split.PageSourceProvider; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.planner.optimizations.IndexJoinOptimizer; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.StatisticAggregationsDescriptor; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableDeleteNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TableWriterNode.DeleteTarget; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.planner.plan.WindowNode.Frame; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SqlToRowExpressionTranslator; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.SortItem.Ordering; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.FunctionType; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.execution.DynamicFilterConfig; +import io.trino.execution.ExplainAnalyzeContext; +import io.trino.execution.StageId; +import io.trino.execution.TaskId; +import io.trino.execution.TaskManagerConfig; +import io.trino.execution.buffer.OutputBuffer; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.index.IndexManager; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.metadata.TableHandle; +import io.trino.operator.AggregationOperator.AggregationOperatorFactory; +import io.trino.operator.AssignUniqueIdOperator; +import io.trino.operator.DeleteOperator.DeleteOperatorFactory; +import io.trino.operator.DevNullOperator.DevNullOperatorFactory; +import io.trino.operator.DriverFactory; +import io.trino.operator.DynamicFilterSourceOperator; +import io.trino.operator.DynamicFilterSourceOperator.DynamicFilterSourceOperatorFactory; +import io.trino.operator.EnforceSingleRowOperator; +import io.trino.operator.ExchangeClientSupplier; +import io.trino.operator.ExchangeOperator.ExchangeOperatorFactory; +import io.trino.operator.ExplainAnalyzeOperator.ExplainAnalyzeOperatorFactory; +import io.trino.operator.FilterAndProjectOperator; +import io.trino.operator.GroupIdOperator; +import io.trino.operator.HashAggregationOperator.HashAggregationOperatorFactory; +import io.trino.operator.HashBuilderOperator.HashBuilderOperatorFactory; +import io.trino.operator.HashSemiJoinOperator; +import io.trino.operator.JoinBridgeManager; +import io.trino.operator.JoinOperatorFactory; +import io.trino.operator.JoinOperatorFactory.OuterOperatorFactoryResult; +import io.trino.operator.LimitOperator.LimitOperatorFactory; +import io.trino.operator.LocalPlannerAware; +import io.trino.operator.LookupJoinOperators; +import io.trino.operator.LookupOuterOperator.LookupOuterOperatorFactory; +import io.trino.operator.LookupSourceFactory; +import io.trino.operator.MarkDistinctOperator.MarkDistinctOperatorFactory; +import io.trino.operator.MergeOperator.MergeOperatorFactory; +import io.trino.operator.NestedLoopJoinBridge; +import io.trino.operator.NestedLoopJoinPagesSupplier; +import io.trino.operator.OperatorFactory; +import io.trino.operator.OrderByOperator.OrderByOperatorFactory; +import io.trino.operator.OutputFactory; +import io.trino.operator.PagesIndex; +import io.trino.operator.PagesSpatialIndexFactory; +import io.trino.operator.PartitionFunction; +import io.trino.operator.PartitionedLookupSourceFactory; +import io.trino.operator.PartitionedOutputOperator.PartitionedOutputFactory; +import io.trino.operator.PipelineExecutionStrategy; +import io.trino.operator.RowNumberOperator; +import io.trino.operator.ScanFilterAndProjectOperator.ScanFilterAndProjectOperatorFactory; +import io.trino.operator.SetBuilderOperator.SetBuilderOperatorFactory; +import io.trino.operator.SetBuilderOperator.SetSupplier; +import io.trino.operator.SourceOperatorFactory; +import io.trino.operator.SpatialIndexBuilderOperator.SpatialIndexBuilderOperatorFactory; +import io.trino.operator.SpatialIndexBuilderOperator.SpatialPredicate; +import io.trino.operator.SpatialJoinOperator.SpatialJoinOperatorFactory; +import io.trino.operator.StageExecutionDescriptor; +import io.trino.operator.StatisticsWriterOperator.StatisticsWriterOperatorFactory; +import io.trino.operator.StreamingAggregationOperator; +import io.trino.operator.TableDeleteOperator.TableDeleteOperatorFactory; +import io.trino.operator.TableScanOperator.TableScanOperatorFactory; +import io.trino.operator.TaskContext; +import io.trino.operator.TaskOutputOperator.TaskOutputFactory; +import io.trino.operator.TopNOperator; +import io.trino.operator.TopNRowNumberOperator; +import io.trino.operator.ValuesOperator.ValuesOperatorFactory; +import io.trino.operator.WindowFunctionDefinition; +import io.trino.operator.WindowOperator.WindowOperatorFactory; +import io.trino.operator.WorkProcessorPipelineSourceOperator; +import io.trino.operator.aggregation.AccumulatorFactory; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.aggregation.LambdaProvider; +import io.trino.operator.exchange.LocalExchange.LocalExchangeFactory; +import io.trino.operator.exchange.LocalExchangeSinkOperator.LocalExchangeSinkOperatorFactory; +import io.trino.operator.exchange.LocalExchangeSourceOperator.LocalExchangeSourceOperatorFactory; +import io.trino.operator.exchange.LocalMergeSourceOperator.LocalMergeSourceOperatorFactory; +import io.trino.operator.exchange.PageChannelSelector; +import io.trino.operator.index.DynamicTupleFilterFactory; +import io.trino.operator.index.FieldSetFilteringRecordSet; +import io.trino.operator.index.IndexBuildDriverFactoryProvider; +import io.trino.operator.index.IndexJoinLookupStats; +import io.trino.operator.index.IndexLookupSourceFactory; +import io.trino.operator.index.IndexSourceOperator; +import io.trino.operator.project.CursorProcessor; +import io.trino.operator.project.PageProcessor; +import io.trino.operator.window.FrameInfo; +import io.trino.operator.window.WindowFunctionSupplier; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.SingleRowBlock; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorIndex; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spiller.PartitioningSpillerFactory; +import io.trino.spiller.SingleStreamSpillerFactory; +import io.trino.spiller.SpillerFactory; +import io.trino.split.MappedRecordSet; +import io.trino.split.PageSinkManager; +import io.trino.split.PageSourceProvider; +import io.trino.sql.DynamicFilters; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.gen.JoinFilterFunctionCompiler; +import io.trino.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; +import io.trino.sql.gen.OrderingCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.planner.optimizations.IndexJoinOptimizer; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.StatisticAggregationsDescriptor; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableDeleteNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TableWriterNode.DeleteTarget; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.planner.plan.WindowNode.Frame; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SqlToRowExpressionTranslator; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.SortItem.Ordering; +import io.trino.sql.tree.SymbolReference; +import io.trino.type.BlockTypeOperators; +import io.trino.type.FunctionType; import javax.inject.Inject; @@ -235,70 +235,70 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.collect.Range.closedOpen; import static io.airlift.concurrent.MoreFutures.addSuccessCallback; -import static io.prestosql.SystemSessionProperties.getAggregationOperatorUnspillMemoryLimit; -import static io.prestosql.SystemSessionProperties.getFilterAndProjectMinOutputPageRowCount; -import static io.prestosql.SystemSessionProperties.getFilterAndProjectMinOutputPageSize; -import static io.prestosql.SystemSessionProperties.getTaskConcurrency; -import static io.prestosql.SystemSessionProperties.getTaskWriterCount; -import static io.prestosql.SystemSessionProperties.isEnableLargeDynamicFilters; -import static io.prestosql.SystemSessionProperties.isExchangeCompressionEnabled; -import static io.prestosql.SystemSessionProperties.isLateMaterializationEnabled; -import static io.prestosql.SystemSessionProperties.isSpillEnabled; -import static io.prestosql.SystemSessionProperties.isSpillOrderBy; -import static io.prestosql.SystemSessionProperties.isSpillWindowOperator; -import static io.prestosql.operator.DistinctLimitOperator.DistinctLimitOperatorFactory; -import static io.prestosql.operator.JoinUtils.isBuildSideReplicated; -import static io.prestosql.operator.NestedLoopBuildOperator.NestedLoopBuildOperatorFactory; -import static io.prestosql.operator.NestedLoopJoinOperator.NestedLoopJoinOperatorFactory; -import static io.prestosql.operator.PipelineExecutionStrategy.GROUPED_EXECUTION; -import static io.prestosql.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; -import static io.prestosql.operator.TableFinishOperator.TableFinishOperatorFactory; -import static io.prestosql.operator.TableFinishOperator.TableFinisher; -import static io.prestosql.operator.TableWriterOperator.FRAGMENT_CHANNEL; -import static io.prestosql.operator.TableWriterOperator.ROW_COUNT_CHANNEL; -import static io.prestosql.operator.TableWriterOperator.STATS_START_CHANNEL; -import static io.prestosql.operator.TableWriterOperator.TableWriterOperatorFactory; -import static io.prestosql.operator.WindowFunctionDefinition.window; -import static io.prestosql.operator.unnest.UnnestOperator.UnnestOperatorFactory; -import static io.prestosql.spi.StandardErrorCode.COMPILER_ERROR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; -import static io.prestosql.spiller.PartitioningSpillerFactory.unsupportedPartitioningSpillerFactory; -import static io.prestosql.sql.DynamicFilters.extractDynamicFilters; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.gen.LambdaBytecodeGenerator.compileLambdaProvider; -import static io.prestosql.sql.planner.ExpressionExtractor.extractExpressions; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.SortExpressionExtractor.extractSortExpression; -import static io.prestosql.sql.planner.SystemPartitioningHandle.COORDINATOR_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_BROADCAST_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SCALED_WRITER_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.FINAL; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; -import static io.prestosql.sql.planner.plan.TableWriterNode.CreateTarget; -import static io.prestosql.sql.planner.plan.TableWriterNode.InsertTarget; -import static io.prestosql.sql.planner.plan.TableWriterNode.WriterTarget; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; -import static io.prestosql.sql.tree.SortItem.Ordering.DESCENDING; -import static io.prestosql.util.Reflection.constructorMethodHandle; -import static io.prestosql.util.SpatialJoinUtils.ST_CONTAINS; -import static io.prestosql.util.SpatialJoinUtils.ST_DISTANCE; -import static io.prestosql.util.SpatialJoinUtils.ST_INTERSECTS; -import static io.prestosql.util.SpatialJoinUtils.ST_WITHIN; -import static io.prestosql.util.SpatialJoinUtils.extractSupportedSpatialComparisons; -import static io.prestosql.util.SpatialJoinUtils.extractSupportedSpatialFunctions; +import static io.trino.SystemSessionProperties.getAggregationOperatorUnspillMemoryLimit; +import static io.trino.SystemSessionProperties.getFilterAndProjectMinOutputPageRowCount; +import static io.trino.SystemSessionProperties.getFilterAndProjectMinOutputPageSize; +import static io.trino.SystemSessionProperties.getTaskConcurrency; +import static io.trino.SystemSessionProperties.getTaskWriterCount; +import static io.trino.SystemSessionProperties.isEnableLargeDynamicFilters; +import static io.trino.SystemSessionProperties.isExchangeCompressionEnabled; +import static io.trino.SystemSessionProperties.isLateMaterializationEnabled; +import static io.trino.SystemSessionProperties.isSpillEnabled; +import static io.trino.SystemSessionProperties.isSpillOrderBy; +import static io.trino.SystemSessionProperties.isSpillWindowOperator; +import static io.trino.operator.DistinctLimitOperator.DistinctLimitOperatorFactory; +import static io.trino.operator.JoinUtils.isBuildSideReplicated; +import static io.trino.operator.NestedLoopBuildOperator.NestedLoopBuildOperatorFactory; +import static io.trino.operator.NestedLoopJoinOperator.NestedLoopJoinOperatorFactory; +import static io.trino.operator.PipelineExecutionStrategy.GROUPED_EXECUTION; +import static io.trino.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.operator.TableFinishOperator.TableFinishOperatorFactory; +import static io.trino.operator.TableFinishOperator.TableFinisher; +import static io.trino.operator.TableWriterOperator.FRAGMENT_CHANNEL; +import static io.trino.operator.TableWriterOperator.ROW_COUNT_CHANNEL; +import static io.trino.operator.TableWriterOperator.STATS_START_CHANNEL; +import static io.trino.operator.TableWriterOperator.TableWriterOperatorFactory; +import static io.trino.operator.WindowFunctionDefinition.window; +import static io.trino.operator.unnest.UnnestOperator.UnnestOperatorFactory; +import static io.trino.spi.StandardErrorCode.COMPILER_ERROR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.spi.type.TypeUtils.writeNativeValue; +import static io.trino.spiller.PartitioningSpillerFactory.unsupportedPartitioningSpillerFactory; +import static io.trino.sql.DynamicFilters.extractDynamicFilters; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.gen.LambdaBytecodeGenerator.compileLambdaProvider; +import static io.trino.sql.planner.ExpressionExtractor.extractExpressions; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.SortExpressionExtractor.extractSortExpression; +import static io.trino.sql.planner.SystemPartitioningHandle.COORDINATOR_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_BROADCAST_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SCALED_WRITER_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.plan.AggregationNode.Step.FINAL; +import static io.trino.sql.planner.plan.AggregationNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.JoinNode.Type.FULL; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.sql.planner.plan.TableWriterNode.CreateTarget; +import static io.trino.sql.planner.plan.TableWriterNode.InsertTarget; +import static io.trino.sql.planner.plan.TableWriterNode.WriterTarget; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.tree.SortItem.Ordering.DESCENDING; +import static io.trino.util.Reflection.constructorMethodHandle; +import static io.trino.util.SpatialJoinUtils.ST_CONTAINS; +import static io.trino.util.SpatialJoinUtils.ST_DISTANCE; +import static io.trino.util.SpatialJoinUtils.ST_INTERSECTS; +import static io.trino.util.SpatialJoinUtils.ST_WITHIN; +import static io.trino.util.SpatialJoinUtils.extractSupportedSpatialComparisons; +import static io.trino.util.SpatialJoinUtils.extractSupportedSpatialFunctions; import static java.util.Objects.requireNonNull; import static java.util.stream.IntStream.range; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/LogicalPlanner.java b/core/trino-main/src/main/java/io/trino/sql/planner/LogicalPlanner.java index fa09e5fe63a8..020a740eced6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/LogicalPlanner.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/LogicalPlanner.java @@ -15,75 +15,75 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.cost.CachingCostProvider; -import io.prestosql.cost.CachingStatsProvider; -import io.prestosql.cost.CostCalculator; -import io.prestosql.cost.CostProvider; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.cost.StatsProvider; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.NewTableLayout; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.metadata.TableHandle; -import io.prestosql.metadata.TableMetadata; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.statistics.TableStatisticsMetadata; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.Field; -import io.prestosql.sql.analyzer.RelationId; -import io.prestosql.sql.analyzer.RelationType; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.planner.StatisticsAggregationPlanner.TableStatisticAggregation; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.StatisticAggregations; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.sanity.PlanSanityChecker; -import io.prestosql.sql.tree.Analyze; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.CreateTableAsSelect; -import io.prestosql.sql.tree.Delete; -import io.prestosql.sql.tree.Explain; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.Insert; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.RefreshMaterializedView; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.Statement; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.type.TypeCoercion; -import io.prestosql.type.UnknownType; +import io.trino.Session; +import io.trino.cost.CachingCostProvider; +import io.trino.cost.CachingStatsProvider; +import io.trino.cost.CostCalculator; +import io.trino.cost.CostProvider; +import io.trino.cost.StatsAndCosts; +import io.trino.cost.StatsCalculator; +import io.trino.cost.StatsProvider; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.NewTableLayout; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.ResolvedFunction; +import io.trino.metadata.TableHandle; +import io.trino.metadata.TableMetadata; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.statistics.TableStatisticsMetadata; +import io.trino.spi.type.CharType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.VarcharType; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.analyzer.Field; +import io.trino.sql.analyzer.RelationId; +import io.trino.sql.analyzer.RelationType; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.planner.StatisticsAggregationPlanner.TableStatisticAggregation; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.StatisticAggregations; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.sanity.PlanSanityChecker; +import io.trino.sql.tree.Analyze; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.CreateTableAsSelect; +import io.trino.sql.tree.Delete; +import io.trino.sql.tree.Explain; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.Insert; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.RefreshMaterializedView; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.Statement; +import io.trino.sql.tree.StringLiteral; +import io.trino.type.TypeCoercion; +import io.trino.type.UnknownType; import java.util.AbstractMap.SimpleImmutableEntry; import java.util.ArrayList; @@ -102,24 +102,24 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Streams.zip; -import static io.prestosql.SystemSessionProperties.isCollectPlanStatisticsForAllQueries; -import static io.prestosql.SystemSessionProperties.isUsePreferredWritePartitioning; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.statistics.TableStatisticType.ROW_COUNT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.TableWriterNode.CreateReference; -import static io.prestosql.sql.planner.plan.TableWriterNode.InsertReference; -import static io.prestosql.sql.planner.plan.TableWriterNode.WriterTarget; -import static io.prestosql.sql.planner.sanity.PlanSanityChecker.DISTRIBUTED_PLAN_SANITY_CHECKER; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.SystemSessionProperties.isCollectPlanStatisticsForAllQueries; +import static io.trino.SystemSessionProperties.isUsePreferredWritePartitioning; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.statistics.TableStatisticType.ROW_COUNT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.TableWriterNode.CreateReference; +import static io.trino.sql.planner.plan.TableWriterNode.InsertReference; +import static io.trino.sql.planner.plan.TableWriterNode.WriterTarget; +import static io.trino.sql.planner.sanity.PlanSanityChecker.DISTRIBUTED_PLAN_SANITY_CHECKER; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/LookupSymbolResolver.java b/core/trino-main/src/main/java/io/trino/sql/planner/LookupSymbolResolver.java index edc018bf0a49..e640385799a5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/LookupSymbolResolver.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/LookupSymbolResolver.java @@ -14,8 +14,8 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.NullableValue; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.NullableValue; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/NodeAndMappings.java b/core/trino-main/src/main/java/io/trino/sql/planner/NodeAndMappings.java index 768d64c6af39..56536777a55e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/NodeAndMappings.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/NodeAndMappings.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/NodePartitionMap.java b/core/trino-main/src/main/java/io/trino/sql/planner/NodePartitionMap.java index 3a79fdbcb01c..de14864128e6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/NodePartitionMap.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/NodePartitionMap.java @@ -14,10 +14,10 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableList; -import io.prestosql.execution.scheduler.BucketNodeMap; -import io.prestosql.execution.scheduler.FixedBucketNodeMap; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; +import io.trino.execution.scheduler.BucketNodeMap; +import io.trino.execution.scheduler.FixedBucketNodeMap; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; import java.util.List; import java.util.function.ToIntFunction; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/NodePartitioningManager.java b/core/trino-main/src/main/java/io/trino/sql/planner/NodePartitioningManager.java index 14cc2e26160d..d8bec19c2fc1 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/NodePartitioningManager.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/NodePartitioningManager.java @@ -15,24 +15,24 @@ import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.scheduler.BucketNodeMap; -import io.prestosql.execution.scheduler.FixedBucketNodeMap; -import io.prestosql.execution.scheduler.NodeScheduler; -import io.prestosql.execution.scheduler.group.DynamicBucketNodeMap; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; -import io.prestosql.operator.BucketPartitionFunction; -import io.prestosql.operator.PartitionFunction; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.connector.ConnectorBucketNodeMap; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.type.Type; -import io.prestosql.split.EmptySplit; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.execution.scheduler.BucketNodeMap; +import io.trino.execution.scheduler.FixedBucketNodeMap; +import io.trino.execution.scheduler.NodeScheduler; +import io.trino.execution.scheduler.group.DynamicBucketNodeMap; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; +import io.trino.operator.BucketPartitionFunction; +import io.trino.operator.PartitionFunction; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.connector.ConnectorBucketNodeMap; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.type.Type; +import io.trino.split.EmptySplit; +import io.trino.type.BlockTypeOperators; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/NullabilityAnalyzer.java b/core/trino-main/src/main/java/io/trino/sql/planner/NullabilityAnalyzer.java index dbb6955fdca9..98dd6a49b6b8 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/NullabilityAnalyzer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/NullabilityAnalyzer.java @@ -13,18 +13,18 @@ */ package io.trino.sql.planner; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.DefaultExpressionTraversalVisitor; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.NullIfExpression; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.SubscriptExpression; -import io.prestosql.sql.tree.TryExpression; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.DefaultExpressionTraversalVisitor; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.NullIfExpression; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.SubscriptExpression; +import io.trino.sql.tree.TryExpression; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/OptimizerStatsRecorder.java b/core/trino-main/src/main/java/io/trino/sql/planner/OptimizerStatsRecorder.java index 460ccf2f8ea6..7ddc6962c891 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/OptimizerStatsRecorder.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/OptimizerStatsRecorder.java @@ -14,8 +14,8 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.optimizations.OptimizerStats; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.optimizations.OptimizerStats; +import io.trino.sql.planner.optimizations.PlanOptimizer; import org.weakref.jmx.MBeanExport; import org.weakref.jmx.MBeanExporter; import org.weakref.jmx.ObjectNames; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/OrderingScheme.java b/core/trino-main/src/main/java/io/trino/sql/planner/OrderingScheme.java index 0fe844693db8..7cf546b2a09a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/OrderingScheme.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/OrderingScheme.java @@ -18,11 +18,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.SortItem.NullOrdering; -import io.prestosql.sql.tree.SortItem.Ordering; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.SortItem.NullOrdering; +import io.trino.sql.tree.SortItem.Ordering; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/ParameterRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/ParameterRewriter.java index d00ff141dab6..d5663aab78c0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/ParameterRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/ParameterRewriter.java @@ -13,19 +13,19 @@ */ package io.trino.sql.planner; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Parameter; +import io.trino.spi.type.Type; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Parameter; import java.util.Map; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; import static java.util.Objects.requireNonNull; public class ParameterRewriter diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/PartialTranslator.java b/core/trino-main/src/main/java/io/trino/sql/planner/PartialTranslator.java index 4afd42f00ff0..8a398f64f31f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/PartialTranslator.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/PartialTranslator.java @@ -14,13 +14,13 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.NodeRef; +import io.trino.Session; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.type.Type; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.NodeRef; import java.util.HashMap; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/Partitioning.java b/core/trino-main/src/main/java/io/trino/sql/planner/Partitioning.java index 95c6b42e4762..477eb87ff2a6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/Partitioning.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/Partitioning.java @@ -17,11 +17,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.predicate.NullableValue; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/PartitioningHandle.java b/core/trino-main/src/main/java/io/trino/sql/planner/PartitioningHandle.java index a4c2ef2c6021..9fb4d0341477 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/PartitioningHandle.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/PartitioningHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.connector.CatalogName; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Objects; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/Plan.java b/core/trino-main/src/main/java/io/trino/sql/planner/Plan.java index 00656f50efd1..bbf3c40ce585 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/Plan.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/Plan.java @@ -13,8 +13,8 @@ */ package io.trino.sql.planner; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.cost.StatsAndCosts; +import io.trino.sql.planner.plan.PlanNode; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/PlanBuilder.java b/core/trino-main/src/main/java/io/trino/sql/planner/PlanBuilder.java index 2e5816b65c20..3ef9f6214bcb 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/PlanBuilder.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/PlanBuilder.java @@ -14,14 +14,14 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.NodeRef; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.NodeRef; import java.util.HashMap; import java.util.List; @@ -29,7 +29,7 @@ import java.util.function.BiFunction; import java.util.function.BiPredicate; -import static io.prestosql.sql.planner.ScopeAware.scopeAwareKey; +import static io.trino.sql.planner.ScopeAware.scopeAwareKey; import static java.util.Objects.requireNonNull; class PlanBuilder diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/PlanCopier.java b/core/trino-main/src/main/java/io/trino/sql/planner/PlanCopier.java index 49cb4c5c6552..071b0ff2f43c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/PlanCopier.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/PlanCopier.java @@ -13,30 +13,30 @@ */ package io.trino.sql.planner; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.optimizations.UnaliasSymbolReferences; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.optimizations.UnaliasSymbolReferences; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/PlanFragment.java b/core/trino-main/src/main/java/io/trino/sql/planner/PlanFragment.java index 15e8e68eb149..3c731c74c6a3 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/PlanFragment.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/PlanFragment.java @@ -17,13 +17,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.operator.StageExecutionDescriptor; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.RemoteSourceNode; +import io.trino.cost.StatsAndCosts; +import io.trino.operator.StageExecutionDescriptor; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.RemoteSourceNode; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/PlanFragmenter.java b/core/trino-main/src/main/java/io/trino/sql/planner/PlanFragmenter.java index cb0d38e96b3c..27f4f64bfca3 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/PlanFragmenter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/PlanFragmenter.java @@ -16,40 +16,40 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.execution.scheduler.BucketNodeMap; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.metadata.TableProperties.TablePartitioning; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.PrestoWarning; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableDeleteNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.cost.StatsAndCosts; +import io.trino.execution.QueryManagerConfig; +import io.trino.execution.scheduler.BucketNodeMap; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.metadata.TableProperties.TablePartitioning; +import io.trino.spi.PrestoException; +import io.trino.spi.PrestoWarning; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableDeleteNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; import javax.inject.Inject; @@ -65,20 +65,20 @@ import static com.google.common.base.Predicates.in; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.SystemSessionProperties.getQueryMaxStageCount; -import static io.prestosql.SystemSessionProperties.isDynamicScheduleForGroupedExecution; -import static io.prestosql.SystemSessionProperties.isForceSingleNodeOutput; -import static io.prestosql.operator.StageExecutionDescriptor.ungroupedExecution; -import static io.prestosql.spi.StandardErrorCode.QUERY_HAS_TOO_MANY_STAGES; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.connector.StandardWarningCode.TOO_MANY_STAGES; -import static io.prestosql.sql.planner.SchedulingOrderVisitor.scheduleOrder; -import static io.prestosql.sql.planner.SystemPartitioningHandle.COORDINATOR_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPLICATE; -import static io.prestosql.sql.planner.planprinter.PlanPrinter.jsonFragmentPlan; +import static io.trino.SystemSessionProperties.getQueryMaxStageCount; +import static io.trino.SystemSessionProperties.isDynamicScheduleForGroupedExecution; +import static io.trino.SystemSessionProperties.isForceSingleNodeOutput; +import static io.trino.operator.StageExecutionDescriptor.ungroupedExecution; +import static io.trino.spi.StandardErrorCode.QUERY_HAS_TOO_MANY_STAGES; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.connector.StandardWarningCode.TOO_MANY_STAGES; +import static io.trino.sql.planner.SchedulingOrderVisitor.scheduleOrder; +import static io.trino.sql.planner.SystemPartitioningHandle.COORDINATOR_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPLICATE; +import static io.trino.sql.planner.planprinter.PlanPrinter.jsonFragmentPlan; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/PlanNodeIdAllocator.java b/core/trino-main/src/main/java/io/trino/sql/planner/PlanNodeIdAllocator.java index b17716ae86a7..8dc20992d65d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/PlanNodeIdAllocator.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/PlanNodeIdAllocator.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanNodeId; public class PlanNodeIdAllocator { diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/PlanOptimizers.java b/core/trino-main/src/main/java/io/trino/sql/planner/PlanOptimizers.java index d41df488cf86..1f38cb9d79a0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/PlanOptimizers.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/PlanOptimizers.java @@ -15,201 +15,201 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.cost.CostCalculator; -import io.prestosql.cost.CostCalculator.EstimatedExchanges; -import io.prestosql.cost.CostComparator; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.cost.TaskCountEstimator; -import io.prestosql.execution.TaskManagerConfig; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.split.PageSourceManager; -import io.prestosql.split.SplitManager; -import io.prestosql.sql.planner.iterative.IterativeOptimizer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.iterative.rule.AddExchangesBelowPartialAggregationOverGroupIdRuleSet; -import io.prestosql.sql.planner.iterative.rule.AddIntermediateAggregations; -import io.prestosql.sql.planner.iterative.rule.ApplyTableScanRedirection; -import io.prestosql.sql.planner.iterative.rule.CanonicalizeExpressions; -import io.prestosql.sql.planner.iterative.rule.CreatePartialTopN; -import io.prestosql.sql.planner.iterative.rule.DesugarArrayConstructor; -import io.prestosql.sql.planner.iterative.rule.DesugarAtTimeZone; -import io.prestosql.sql.planner.iterative.rule.DesugarCurrentPath; -import io.prestosql.sql.planner.iterative.rule.DesugarCurrentUser; -import io.prestosql.sql.planner.iterative.rule.DesugarLambdaExpression; -import io.prestosql.sql.planner.iterative.rule.DesugarLike; -import io.prestosql.sql.planner.iterative.rule.DesugarRowSubscript; -import io.prestosql.sql.planner.iterative.rule.DesugarTryExpression; -import io.prestosql.sql.planner.iterative.rule.DetermineJoinDistributionType; -import io.prestosql.sql.planner.iterative.rule.DetermineSemiJoinDistributionType; -import io.prestosql.sql.planner.iterative.rule.EliminateCrossJoins; -import io.prestosql.sql.planner.iterative.rule.EvaluateZeroSample; -import io.prestosql.sql.planner.iterative.rule.ExtractDereferencesFromFilterAboveScan; -import io.prestosql.sql.planner.iterative.rule.ExtractSpatialJoins; -import io.prestosql.sql.planner.iterative.rule.GatherAndMergeWindows; -import io.prestosql.sql.planner.iterative.rule.ImplementBernoulliSampleAsFilter; -import io.prestosql.sql.planner.iterative.rule.ImplementExceptAll; -import io.prestosql.sql.planner.iterative.rule.ImplementExceptDistinctAsUnion; -import io.prestosql.sql.planner.iterative.rule.ImplementFilteredAggregations; -import io.prestosql.sql.planner.iterative.rule.ImplementIntersectAll; -import io.prestosql.sql.planner.iterative.rule.ImplementIntersectDistinctAsUnion; -import io.prestosql.sql.planner.iterative.rule.ImplementLimitWithTies; -import io.prestosql.sql.planner.iterative.rule.ImplementOffset; -import io.prestosql.sql.planner.iterative.rule.InlineProjections; -import io.prestosql.sql.planner.iterative.rule.MergeExcept; -import io.prestosql.sql.planner.iterative.rule.MergeFilters; -import io.prestosql.sql.planner.iterative.rule.MergeIntersect; -import io.prestosql.sql.planner.iterative.rule.MergeLimitOverProjectWithSort; -import io.prestosql.sql.planner.iterative.rule.MergeLimitWithDistinct; -import io.prestosql.sql.planner.iterative.rule.MergeLimitWithSort; -import io.prestosql.sql.planner.iterative.rule.MergeLimitWithTopN; -import io.prestosql.sql.planner.iterative.rule.MergeLimits; -import io.prestosql.sql.planner.iterative.rule.MergeUnion; -import io.prestosql.sql.planner.iterative.rule.MultipleDistinctAggregationToMarkDistinct; -import io.prestosql.sql.planner.iterative.rule.PruneAggregationColumns; -import io.prestosql.sql.planner.iterative.rule.PruneAggregationSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneApplyColumns; -import io.prestosql.sql.planner.iterative.rule.PruneApplyCorrelation; -import io.prestosql.sql.planner.iterative.rule.PruneApplySourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneAssignUniqueIdColumns; -import io.prestosql.sql.planner.iterative.rule.PruneCorrelatedJoinColumns; -import io.prestosql.sql.planner.iterative.rule.PruneCorrelatedJoinCorrelation; -import io.prestosql.sql.planner.iterative.rule.PruneCountAggregationOverScalar; -import io.prestosql.sql.planner.iterative.rule.PruneDeleteSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneDistinctAggregation; -import io.prestosql.sql.planner.iterative.rule.PruneDistinctLimitSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneEnforceSingleRowColumns; -import io.prestosql.sql.planner.iterative.rule.PruneExceptSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneExchangeColumns; -import io.prestosql.sql.planner.iterative.rule.PruneExchangeSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneExplainAnalyzeSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneFilterColumns; -import io.prestosql.sql.planner.iterative.rule.PruneGroupIdColumns; -import io.prestosql.sql.planner.iterative.rule.PruneGroupIdSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneIndexJoinColumns; -import io.prestosql.sql.planner.iterative.rule.PruneIndexSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneIntersectSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneJoinChildrenColumns; -import io.prestosql.sql.planner.iterative.rule.PruneJoinColumns; -import io.prestosql.sql.planner.iterative.rule.PruneLimitColumns; -import io.prestosql.sql.planner.iterative.rule.PruneMarkDistinctColumns; -import io.prestosql.sql.planner.iterative.rule.PruneOffsetColumns; -import io.prestosql.sql.planner.iterative.rule.PruneOrderByInAggregation; -import io.prestosql.sql.planner.iterative.rule.PruneOutputSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneProjectColumns; -import io.prestosql.sql.planner.iterative.rule.PruneRowNumberColumns; -import io.prestosql.sql.planner.iterative.rule.PruneSampleColumns; -import io.prestosql.sql.planner.iterative.rule.PruneSemiJoinColumns; -import io.prestosql.sql.planner.iterative.rule.PruneSemiJoinFilteringSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneSortColumns; -import io.prestosql.sql.planner.iterative.rule.PruneSpatialJoinChildrenColumns; -import io.prestosql.sql.planner.iterative.rule.PruneSpatialJoinColumns; -import io.prestosql.sql.planner.iterative.rule.PruneTableScanColumns; -import io.prestosql.sql.planner.iterative.rule.PruneTableWriterSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneTopNColumns; -import io.prestosql.sql.planner.iterative.rule.PruneTopNRowNumberColumns; -import io.prestosql.sql.planner.iterative.rule.PruneUnionColumns; -import io.prestosql.sql.planner.iterative.rule.PruneUnionSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneUnnestColumns; -import io.prestosql.sql.planner.iterative.rule.PruneUnnestSourceColumns; -import io.prestosql.sql.planner.iterative.rule.PruneValuesColumns; -import io.prestosql.sql.planner.iterative.rule.PruneWindowColumns; -import io.prestosql.sql.planner.iterative.rule.PushAggregationIntoTableScan; -import io.prestosql.sql.planner.iterative.rule.PushAggregationThroughOuterJoin; -import io.prestosql.sql.planner.iterative.rule.PushDeleteIntoConnector; -import io.prestosql.sql.planner.iterative.rule.PushDistinctLimitIntoTableScan; -import io.prestosql.sql.planner.iterative.rule.PushDownDereferenceThroughFilter; -import io.prestosql.sql.planner.iterative.rule.PushDownDereferenceThroughJoin; -import io.prestosql.sql.planner.iterative.rule.PushDownDereferenceThroughProject; -import io.prestosql.sql.planner.iterative.rule.PushDownDereferenceThroughSemiJoin; -import io.prestosql.sql.planner.iterative.rule.PushDownDereferenceThroughUnnest; -import io.prestosql.sql.planner.iterative.rule.PushDownDereferencesThroughAssignUniqueId; -import io.prestosql.sql.planner.iterative.rule.PushDownDereferencesThroughLimit; -import io.prestosql.sql.planner.iterative.rule.PushDownDereferencesThroughRowNumber; -import io.prestosql.sql.planner.iterative.rule.PushDownDereferencesThroughSort; -import io.prestosql.sql.planner.iterative.rule.PushDownDereferencesThroughTopN; -import io.prestosql.sql.planner.iterative.rule.PushDownDereferencesThroughTopNRowNumber; -import io.prestosql.sql.planner.iterative.rule.PushDownDereferencesThroughWindow; -import io.prestosql.sql.planner.iterative.rule.PushLimitIntoTableScan; -import io.prestosql.sql.planner.iterative.rule.PushLimitThroughMarkDistinct; -import io.prestosql.sql.planner.iterative.rule.PushLimitThroughOffset; -import io.prestosql.sql.planner.iterative.rule.PushLimitThroughOuterJoin; -import io.prestosql.sql.planner.iterative.rule.PushLimitThroughProject; -import io.prestosql.sql.planner.iterative.rule.PushLimitThroughSemiJoin; -import io.prestosql.sql.planner.iterative.rule.PushLimitThroughUnion; -import io.prestosql.sql.planner.iterative.rule.PushOffsetThroughProject; -import io.prestosql.sql.planner.iterative.rule.PushPartialAggregationThroughExchange; -import io.prestosql.sql.planner.iterative.rule.PushPartialAggregationThroughJoin; -import io.prestosql.sql.planner.iterative.rule.PushPredicateIntoTableScan; -import io.prestosql.sql.planner.iterative.rule.PushPredicateThroughProjectIntoRowNumber; -import io.prestosql.sql.planner.iterative.rule.PushPredicateThroughProjectIntoWindow; -import io.prestosql.sql.planner.iterative.rule.PushProjectionIntoTableScan; -import io.prestosql.sql.planner.iterative.rule.PushProjectionThroughExchange; -import io.prestosql.sql.planner.iterative.rule.PushProjectionThroughUnion; -import io.prestosql.sql.planner.iterative.rule.PushRemoteExchangeThroughAssignUniqueId; -import io.prestosql.sql.planner.iterative.rule.PushSampleIntoTableScan; -import io.prestosql.sql.planner.iterative.rule.PushTableWriteThroughUnion; -import io.prestosql.sql.planner.iterative.rule.PushTopNIntoTableScan; -import io.prestosql.sql.planner.iterative.rule.PushTopNThroughOuterJoin; -import io.prestosql.sql.planner.iterative.rule.PushTopNThroughProject; -import io.prestosql.sql.planner.iterative.rule.PushTopNThroughUnion; -import io.prestosql.sql.planner.iterative.rule.RemoveAggregationInSemiJoin; -import io.prestosql.sql.planner.iterative.rule.RemoveDuplicateConditions; -import io.prestosql.sql.planner.iterative.rule.RemoveEmptyDelete; -import io.prestosql.sql.planner.iterative.rule.RemoveFullSample; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantCrossJoin; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantDistinctLimit; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantEnforceSingleRowNode; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantExists; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantJoin; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantLimit; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantOffset; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantSort; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantTableScanPredicate; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantTopN; -import io.prestosql.sql.planner.iterative.rule.RemoveTrivialFilters; -import io.prestosql.sql.planner.iterative.rule.RemoveUnreferencedScalarApplyNodes; -import io.prestosql.sql.planner.iterative.rule.RemoveUnreferencedScalarSubqueries; -import io.prestosql.sql.planner.iterative.rule.RemoveUnsupportedDynamicFilters; -import io.prestosql.sql.planner.iterative.rule.ReorderJoins; -import io.prestosql.sql.planner.iterative.rule.RewriteSpatialPartitioningAggregation; -import io.prestosql.sql.planner.iterative.rule.SimplifyCountOverConstant; -import io.prestosql.sql.planner.iterative.rule.SimplifyExpressions; -import io.prestosql.sql.planner.iterative.rule.SingleDistinctAggregationToGroupBy; -import io.prestosql.sql.planner.iterative.rule.TransformCorrelatedDistinctAggregationWithProjection; -import io.prestosql.sql.planner.iterative.rule.TransformCorrelatedDistinctAggregationWithoutProjection; -import io.prestosql.sql.planner.iterative.rule.TransformCorrelatedGlobalAggregationWithProjection; -import io.prestosql.sql.planner.iterative.rule.TransformCorrelatedGlobalAggregationWithoutProjection; -import io.prestosql.sql.planner.iterative.rule.TransformCorrelatedGroupedAggregationWithProjection; -import io.prestosql.sql.planner.iterative.rule.TransformCorrelatedGroupedAggregationWithoutProjection; -import io.prestosql.sql.planner.iterative.rule.TransformCorrelatedInPredicateToJoin; -import io.prestosql.sql.planner.iterative.rule.TransformCorrelatedJoinToJoin; -import io.prestosql.sql.planner.iterative.rule.TransformCorrelatedScalarSubquery; -import io.prestosql.sql.planner.iterative.rule.TransformCorrelatedSingleRowSubqueryToProject; -import io.prestosql.sql.planner.iterative.rule.TransformExistsApplyToCorrelatedJoin; -import io.prestosql.sql.planner.iterative.rule.TransformFilteringSemiJoinToInnerJoin; -import io.prestosql.sql.planner.iterative.rule.TransformUncorrelatedInPredicateSubqueryToSemiJoin; -import io.prestosql.sql.planner.iterative.rule.TransformUncorrelatedSubqueryToJoin; -import io.prestosql.sql.planner.iterative.rule.UnwrapCastInComparison; -import io.prestosql.sql.planner.optimizations.AddExchanges; -import io.prestosql.sql.planner.optimizations.AddLocalExchanges; -import io.prestosql.sql.planner.optimizations.BeginTableWrite; -import io.prestosql.sql.planner.optimizations.CheckSubqueryNodesAreRewritten; -import io.prestosql.sql.planner.optimizations.HashGenerationOptimizer; -import io.prestosql.sql.planner.optimizations.IndexJoinOptimizer; -import io.prestosql.sql.planner.optimizations.LimitPushDown; -import io.prestosql.sql.planner.optimizations.MetadataQueryOptimizer; -import io.prestosql.sql.planner.optimizations.OptimizeMixedDistinctAggregations; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.planner.optimizations.PredicatePushDown; -import io.prestosql.sql.planner.optimizations.PruneUnreferencedOutputs; -import io.prestosql.sql.planner.optimizations.ReplicateSemiJoinInDelete; -import io.prestosql.sql.planner.optimizations.StatsRecordingPlanOptimizer; -import io.prestosql.sql.planner.optimizations.TableDeleteOptimizer; -import io.prestosql.sql.planner.optimizations.TransformQuantifiedComparisonApplyToCorrelatedJoin; -import io.prestosql.sql.planner.optimizations.UnaliasSymbolReferences; -import io.prestosql.sql.planner.optimizations.WindowFilterPushDown; +import io.trino.cost.CostCalculator; +import io.trino.cost.CostCalculator.EstimatedExchanges; +import io.trino.cost.CostComparator; +import io.trino.cost.StatsCalculator; +import io.trino.cost.TaskCountEstimator; +import io.trino.execution.TaskManagerConfig; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.split.PageSourceManager; +import io.trino.split.SplitManager; +import io.trino.sql.planner.iterative.IterativeOptimizer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.iterative.rule.AddExchangesBelowPartialAggregationOverGroupIdRuleSet; +import io.trino.sql.planner.iterative.rule.AddIntermediateAggregations; +import io.trino.sql.planner.iterative.rule.ApplyTableScanRedirection; +import io.trino.sql.planner.iterative.rule.CanonicalizeExpressions; +import io.trino.sql.planner.iterative.rule.CreatePartialTopN; +import io.trino.sql.planner.iterative.rule.DesugarArrayConstructor; +import io.trino.sql.planner.iterative.rule.DesugarAtTimeZone; +import io.trino.sql.planner.iterative.rule.DesugarCurrentPath; +import io.trino.sql.planner.iterative.rule.DesugarCurrentUser; +import io.trino.sql.planner.iterative.rule.DesugarLambdaExpression; +import io.trino.sql.planner.iterative.rule.DesugarLike; +import io.trino.sql.planner.iterative.rule.DesugarRowSubscript; +import io.trino.sql.planner.iterative.rule.DesugarTryExpression; +import io.trino.sql.planner.iterative.rule.DetermineJoinDistributionType; +import io.trino.sql.planner.iterative.rule.DetermineSemiJoinDistributionType; +import io.trino.sql.planner.iterative.rule.EliminateCrossJoins; +import io.trino.sql.planner.iterative.rule.EvaluateZeroSample; +import io.trino.sql.planner.iterative.rule.ExtractDereferencesFromFilterAboveScan; +import io.trino.sql.planner.iterative.rule.ExtractSpatialJoins; +import io.trino.sql.planner.iterative.rule.GatherAndMergeWindows; +import io.trino.sql.planner.iterative.rule.ImplementBernoulliSampleAsFilter; +import io.trino.sql.planner.iterative.rule.ImplementExceptAll; +import io.trino.sql.planner.iterative.rule.ImplementExceptDistinctAsUnion; +import io.trino.sql.planner.iterative.rule.ImplementFilteredAggregations; +import io.trino.sql.planner.iterative.rule.ImplementIntersectAll; +import io.trino.sql.planner.iterative.rule.ImplementIntersectDistinctAsUnion; +import io.trino.sql.planner.iterative.rule.ImplementLimitWithTies; +import io.trino.sql.planner.iterative.rule.ImplementOffset; +import io.trino.sql.planner.iterative.rule.InlineProjections; +import io.trino.sql.planner.iterative.rule.MergeExcept; +import io.trino.sql.planner.iterative.rule.MergeFilters; +import io.trino.sql.planner.iterative.rule.MergeIntersect; +import io.trino.sql.planner.iterative.rule.MergeLimitOverProjectWithSort; +import io.trino.sql.planner.iterative.rule.MergeLimitWithDistinct; +import io.trino.sql.planner.iterative.rule.MergeLimitWithSort; +import io.trino.sql.planner.iterative.rule.MergeLimitWithTopN; +import io.trino.sql.planner.iterative.rule.MergeLimits; +import io.trino.sql.planner.iterative.rule.MergeUnion; +import io.trino.sql.planner.iterative.rule.MultipleDistinctAggregationToMarkDistinct; +import io.trino.sql.planner.iterative.rule.PruneAggregationColumns; +import io.trino.sql.planner.iterative.rule.PruneAggregationSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneApplyColumns; +import io.trino.sql.planner.iterative.rule.PruneApplyCorrelation; +import io.trino.sql.planner.iterative.rule.PruneApplySourceColumns; +import io.trino.sql.planner.iterative.rule.PruneAssignUniqueIdColumns; +import io.trino.sql.planner.iterative.rule.PruneCorrelatedJoinColumns; +import io.trino.sql.planner.iterative.rule.PruneCorrelatedJoinCorrelation; +import io.trino.sql.planner.iterative.rule.PruneCountAggregationOverScalar; +import io.trino.sql.planner.iterative.rule.PruneDeleteSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneDistinctAggregation; +import io.trino.sql.planner.iterative.rule.PruneDistinctLimitSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneEnforceSingleRowColumns; +import io.trino.sql.planner.iterative.rule.PruneExceptSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneExchangeColumns; +import io.trino.sql.planner.iterative.rule.PruneExchangeSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneExplainAnalyzeSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneFilterColumns; +import io.trino.sql.planner.iterative.rule.PruneGroupIdColumns; +import io.trino.sql.planner.iterative.rule.PruneGroupIdSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneIndexJoinColumns; +import io.trino.sql.planner.iterative.rule.PruneIndexSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneIntersectSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneJoinChildrenColumns; +import io.trino.sql.planner.iterative.rule.PruneJoinColumns; +import io.trino.sql.planner.iterative.rule.PruneLimitColumns; +import io.trino.sql.planner.iterative.rule.PruneMarkDistinctColumns; +import io.trino.sql.planner.iterative.rule.PruneOffsetColumns; +import io.trino.sql.planner.iterative.rule.PruneOrderByInAggregation; +import io.trino.sql.planner.iterative.rule.PruneOutputSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneProjectColumns; +import io.trino.sql.planner.iterative.rule.PruneRowNumberColumns; +import io.trino.sql.planner.iterative.rule.PruneSampleColumns; +import io.trino.sql.planner.iterative.rule.PruneSemiJoinColumns; +import io.trino.sql.planner.iterative.rule.PruneSemiJoinFilteringSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneSortColumns; +import io.trino.sql.planner.iterative.rule.PruneSpatialJoinChildrenColumns; +import io.trino.sql.planner.iterative.rule.PruneSpatialJoinColumns; +import io.trino.sql.planner.iterative.rule.PruneTableScanColumns; +import io.trino.sql.planner.iterative.rule.PruneTableWriterSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneTopNColumns; +import io.trino.sql.planner.iterative.rule.PruneTopNRowNumberColumns; +import io.trino.sql.planner.iterative.rule.PruneUnionColumns; +import io.trino.sql.planner.iterative.rule.PruneUnionSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneUnnestColumns; +import io.trino.sql.planner.iterative.rule.PruneUnnestSourceColumns; +import io.trino.sql.planner.iterative.rule.PruneValuesColumns; +import io.trino.sql.planner.iterative.rule.PruneWindowColumns; +import io.trino.sql.planner.iterative.rule.PushAggregationIntoTableScan; +import io.trino.sql.planner.iterative.rule.PushAggregationThroughOuterJoin; +import io.trino.sql.planner.iterative.rule.PushDeleteIntoConnector; +import io.trino.sql.planner.iterative.rule.PushDistinctLimitIntoTableScan; +import io.trino.sql.planner.iterative.rule.PushDownDereferenceThroughFilter; +import io.trino.sql.planner.iterative.rule.PushDownDereferenceThroughJoin; +import io.trino.sql.planner.iterative.rule.PushDownDereferenceThroughProject; +import io.trino.sql.planner.iterative.rule.PushDownDereferenceThroughSemiJoin; +import io.trino.sql.planner.iterative.rule.PushDownDereferenceThroughUnnest; +import io.trino.sql.planner.iterative.rule.PushDownDereferencesThroughAssignUniqueId; +import io.trino.sql.planner.iterative.rule.PushDownDereferencesThroughLimit; +import io.trino.sql.planner.iterative.rule.PushDownDereferencesThroughRowNumber; +import io.trino.sql.planner.iterative.rule.PushDownDereferencesThroughSort; +import io.trino.sql.planner.iterative.rule.PushDownDereferencesThroughTopN; +import io.trino.sql.planner.iterative.rule.PushDownDereferencesThroughTopNRowNumber; +import io.trino.sql.planner.iterative.rule.PushDownDereferencesThroughWindow; +import io.trino.sql.planner.iterative.rule.PushLimitIntoTableScan; +import io.trino.sql.planner.iterative.rule.PushLimitThroughMarkDistinct; +import io.trino.sql.planner.iterative.rule.PushLimitThroughOffset; +import io.trino.sql.planner.iterative.rule.PushLimitThroughOuterJoin; +import io.trino.sql.planner.iterative.rule.PushLimitThroughProject; +import io.trino.sql.planner.iterative.rule.PushLimitThroughSemiJoin; +import io.trino.sql.planner.iterative.rule.PushLimitThroughUnion; +import io.trino.sql.planner.iterative.rule.PushOffsetThroughProject; +import io.trino.sql.planner.iterative.rule.PushPartialAggregationThroughExchange; +import io.trino.sql.planner.iterative.rule.PushPartialAggregationThroughJoin; +import io.trino.sql.planner.iterative.rule.PushPredicateIntoTableScan; +import io.trino.sql.planner.iterative.rule.PushPredicateThroughProjectIntoRowNumber; +import io.trino.sql.planner.iterative.rule.PushPredicateThroughProjectIntoWindow; +import io.trino.sql.planner.iterative.rule.PushProjectionIntoTableScan; +import io.trino.sql.planner.iterative.rule.PushProjectionThroughExchange; +import io.trino.sql.planner.iterative.rule.PushProjectionThroughUnion; +import io.trino.sql.planner.iterative.rule.PushRemoteExchangeThroughAssignUniqueId; +import io.trino.sql.planner.iterative.rule.PushSampleIntoTableScan; +import io.trino.sql.planner.iterative.rule.PushTableWriteThroughUnion; +import io.trino.sql.planner.iterative.rule.PushTopNIntoTableScan; +import io.trino.sql.planner.iterative.rule.PushTopNThroughOuterJoin; +import io.trino.sql.planner.iterative.rule.PushTopNThroughProject; +import io.trino.sql.planner.iterative.rule.PushTopNThroughUnion; +import io.trino.sql.planner.iterative.rule.RemoveAggregationInSemiJoin; +import io.trino.sql.planner.iterative.rule.RemoveDuplicateConditions; +import io.trino.sql.planner.iterative.rule.RemoveEmptyDelete; +import io.trino.sql.planner.iterative.rule.RemoveFullSample; +import io.trino.sql.planner.iterative.rule.RemoveRedundantCrossJoin; +import io.trino.sql.planner.iterative.rule.RemoveRedundantDistinctLimit; +import io.trino.sql.planner.iterative.rule.RemoveRedundantEnforceSingleRowNode; +import io.trino.sql.planner.iterative.rule.RemoveRedundantExists; +import io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; +import io.trino.sql.planner.iterative.rule.RemoveRedundantJoin; +import io.trino.sql.planner.iterative.rule.RemoveRedundantLimit; +import io.trino.sql.planner.iterative.rule.RemoveRedundantOffset; +import io.trino.sql.planner.iterative.rule.RemoveRedundantSort; +import io.trino.sql.planner.iterative.rule.RemoveRedundantTableScanPredicate; +import io.trino.sql.planner.iterative.rule.RemoveRedundantTopN; +import io.trino.sql.planner.iterative.rule.RemoveTrivialFilters; +import io.trino.sql.planner.iterative.rule.RemoveUnreferencedScalarApplyNodes; +import io.trino.sql.planner.iterative.rule.RemoveUnreferencedScalarSubqueries; +import io.trino.sql.planner.iterative.rule.RemoveUnsupportedDynamicFilters; +import io.trino.sql.planner.iterative.rule.ReorderJoins; +import io.trino.sql.planner.iterative.rule.RewriteSpatialPartitioningAggregation; +import io.trino.sql.planner.iterative.rule.SimplifyCountOverConstant; +import io.trino.sql.planner.iterative.rule.SimplifyExpressions; +import io.trino.sql.planner.iterative.rule.SingleDistinctAggregationToGroupBy; +import io.trino.sql.planner.iterative.rule.TransformCorrelatedDistinctAggregationWithProjection; +import io.trino.sql.planner.iterative.rule.TransformCorrelatedDistinctAggregationWithoutProjection; +import io.trino.sql.planner.iterative.rule.TransformCorrelatedGlobalAggregationWithProjection; +import io.trino.sql.planner.iterative.rule.TransformCorrelatedGlobalAggregationWithoutProjection; +import io.trino.sql.planner.iterative.rule.TransformCorrelatedGroupedAggregationWithProjection; +import io.trino.sql.planner.iterative.rule.TransformCorrelatedGroupedAggregationWithoutProjection; +import io.trino.sql.planner.iterative.rule.TransformCorrelatedInPredicateToJoin; +import io.trino.sql.planner.iterative.rule.TransformCorrelatedJoinToJoin; +import io.trino.sql.planner.iterative.rule.TransformCorrelatedScalarSubquery; +import io.trino.sql.planner.iterative.rule.TransformCorrelatedSingleRowSubqueryToProject; +import io.trino.sql.planner.iterative.rule.TransformExistsApplyToCorrelatedJoin; +import io.trino.sql.planner.iterative.rule.TransformFilteringSemiJoinToInnerJoin; +import io.trino.sql.planner.iterative.rule.TransformUncorrelatedInPredicateSubqueryToSemiJoin; +import io.trino.sql.planner.iterative.rule.TransformUncorrelatedSubqueryToJoin; +import io.trino.sql.planner.iterative.rule.UnwrapCastInComparison; +import io.trino.sql.planner.optimizations.AddExchanges; +import io.trino.sql.planner.optimizations.AddLocalExchanges; +import io.trino.sql.planner.optimizations.BeginTableWrite; +import io.trino.sql.planner.optimizations.CheckSubqueryNodesAreRewritten; +import io.trino.sql.planner.optimizations.HashGenerationOptimizer; +import io.trino.sql.planner.optimizations.IndexJoinOptimizer; +import io.trino.sql.planner.optimizations.LimitPushDown; +import io.trino.sql.planner.optimizations.MetadataQueryOptimizer; +import io.trino.sql.planner.optimizations.OptimizeMixedDistinctAggregations; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.optimizations.PredicatePushDown; +import io.trino.sql.planner.optimizations.PruneUnreferencedOutputs; +import io.trino.sql.planner.optimizations.ReplicateSemiJoinInDelete; +import io.trino.sql.planner.optimizations.StatsRecordingPlanOptimizer; +import io.trino.sql.planner.optimizations.TableDeleteOptimizer; +import io.trino.sql.planner.optimizations.TransformQuantifiedComparisonApplyToCorrelatedJoin; +import io.trino.sql.planner.optimizations.UnaliasSymbolReferences; +import io.trino.sql.planner.optimizations.WindowFilterPushDown; import org.weakref.jmx.MBeanExporter; import javax.annotation.PostConstruct; @@ -219,7 +219,7 @@ import java.util.List; import java.util.Set; -import static io.prestosql.SystemSessionProperties.isIterativeRuleBasedColumnPruning; +import static io.trino.SystemSessionProperties.isIterativeRuleBasedColumnPruning; public class PlanOptimizers { diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/QueryPlanner.java b/core/trino-main/src/main/java/io/trino/sql/planner/QueryPlanner.java index e4871190a36f..8b515f115122 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/QueryPlanner.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/QueryPlanner.java @@ -19,63 +19,63 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.NodeUtils; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.Analysis.GroupingSetAnalysis; -import io.prestosql.sql.analyzer.Analysis.SelectExpression; -import io.prestosql.sql.analyzer.FieldId; -import io.prestosql.sql.analyzer.RelationType; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.TableWriterNode.DeleteTarget; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Delete; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FetchFirst; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.FunctionCall.NullTreatment; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.IntervalLiteral; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Offset; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.QuerySpecification; -import io.prestosql.sql.tree.Relation; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.Table; -import io.prestosql.sql.tree.Union; -import io.prestosql.sql.tree.Window; -import io.prestosql.sql.tree.WindowFrame; -import io.prestosql.type.TypeCoercion; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.sql.NodeUtils; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.analyzer.Analysis.GroupingSetAnalysis; +import io.trino.sql.analyzer.Analysis.SelectExpression; +import io.trino.sql.analyzer.FieldId; +import io.trino.sql.analyzer.RelationType; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.TableWriterNode.DeleteTarget; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Delete; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FetchFirst; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.FunctionCall.NullTreatment; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.IntervalLiteral; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Offset; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.QuerySpecification; +import io.trino.sql.tree.Relation; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.Table; +import io.trino.sql.tree.Union; +import io.trino.sql.tree.Window; +import io.trino.sql.tree.WindowFrame; +import io.trino.type.TypeCoercion; import java.util.ArrayList; import java.util.Arrays; @@ -94,34 +94,34 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.SystemSessionProperties.getMaxRecursionDepth; -import static io.prestosql.SystemSessionProperties.isSkipRedundantSort; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.NodeUtils.getSortItemsFromOrderBy; -import static io.prestosql.sql.analyzer.ExpressionAnalyzer.isNumericType; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.GroupingOperationRewriter.rewriteGroupingOperation; -import static io.prestosql.sql.planner.OrderingScheme.sortItemToSortOrder; -import static io.prestosql.sql.planner.PlanBuilder.newPlanBuilder; -import static io.prestosql.sql.planner.ScopeAware.scopeAwareKey; -import static io.prestosql.sql.planner.plan.AggregationNode.groupingSets; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.FrameBound.Type.CURRENT_ROW; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; -import static io.prestosql.sql.tree.IntervalLiteral.IntervalField.DAY; -import static io.prestosql.sql.tree.IntervalLiteral.IntervalField.YEAR; -import static io.prestosql.sql.tree.IntervalLiteral.Sign.POSITIVE; -import static io.prestosql.sql.tree.WindowFrame.Type.GROUPS; -import static io.prestosql.sql.tree.WindowFrame.Type.RANGE; -import static io.prestosql.sql.tree.WindowFrame.Type.ROWS; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; -import static io.prestosql.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; +import static io.trino.SystemSessionProperties.getMaxRecursionDepth; +import static io.trino.SystemSessionProperties.isSkipRedundantSort; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.NodeUtils.getSortItemsFromOrderBy; +import static io.trino.sql.analyzer.ExpressionAnalyzer.isNumericType; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.GroupingOperationRewriter.rewriteGroupingOperation; +import static io.trino.sql.planner.OrderingScheme.sortItemToSortOrder; +import static io.trino.sql.planner.PlanBuilder.newPlanBuilder; +import static io.trino.sql.planner.ScopeAware.scopeAwareKey; +import static io.trino.sql.planner.plan.AggregationNode.groupingSets; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.tree.FrameBound.Type.CURRENT_ROW; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; +import static io.trino.sql.tree.IntervalLiteral.IntervalField.DAY; +import static io.trino.sql.tree.IntervalLiteral.IntervalField.YEAR; +import static io.trino.sql.tree.IntervalLiteral.Sign.POSITIVE; +import static io.trino.sql.tree.WindowFrame.Type.GROUPS; +import static io.trino.sql.tree.WindowFrame.Type.RANGE; +import static io.trino.sql.tree.WindowFrame.Type.ROWS; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/ReferenceAwareExpressionNodeInliner.java b/core/trino-main/src/main/java/io/trino/sql/planner/ReferenceAwareExpressionNodeInliner.java index cb136845dd40..bdff0294e2e2 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/ReferenceAwareExpressionNodeInliner.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/ReferenceAwareExpressionNodeInliner.java @@ -14,10 +14,10 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.NodeRef; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.NodeRef; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/RelationPlan.java b/core/trino-main/src/main/java/io/trino/sql/planner/RelationPlan.java index 97f047059771..d5e151560161 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/RelationPlan.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/RelationPlan.java @@ -14,9 +14,9 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.analyzer.RelationType; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.analyzer.RelationType; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/RelationPlanner.java b/core/trino-main/src/main/java/io/trino/sql/planner/RelationPlanner.java index 0f79d4ffc165..dee0ff2c908a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/RelationPlanner.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/RelationPlanner.java @@ -17,63 +17,63 @@ import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ListMultimap; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.ExpressionUtils; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.Analysis.UnnestAnalysis; -import io.prestosql.sql.analyzer.Field; -import io.prestosql.sql.analyzer.RelationType; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.AliasedRelation; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Except; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.Intersect; -import io.prestosql.sql.tree.Join; -import io.prestosql.sql.tree.JoinCriteria; -import io.prestosql.sql.tree.JoinUsing; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.Lateral; -import io.prestosql.sql.tree.NaturalJoin; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.QuerySpecification; -import io.prestosql.sql.tree.Relation; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SampledRelation; -import io.prestosql.sql.tree.SetOperation; -import io.prestosql.sql.tree.SubqueryExpression; -import io.prestosql.sql.tree.Table; -import io.prestosql.sql.tree.TableSubquery; -import io.prestosql.sql.tree.Union; -import io.prestosql.sql.tree.Unnest; -import io.prestosql.sql.tree.Values; -import io.prestosql.type.TypeCoercion; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.ExpressionUtils; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.analyzer.Analysis.UnnestAnalysis; +import io.trino.sql.analyzer.Field; +import io.trino.sql.analyzer.RelationType; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.AliasedRelation; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Except; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.Intersect; +import io.trino.sql.tree.Join; +import io.trino.sql.tree.JoinCriteria; +import io.trino.sql.tree.JoinUsing; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.Lateral; +import io.trino.sql.tree.NaturalJoin; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.QuerySpecification; +import io.trino.sql.tree.Relation; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SampledRelation; +import io.trino.sql.tree.SetOperation; +import io.trino.sql.tree.SubqueryExpression; +import io.trino.sql.tree.Table; +import io.trino.sql.tree.TableSubquery; +import io.trino.sql.tree.Union; +import io.trino.sql.tree.Unnest; +import io.trino.sql.tree.Values; +import io.trino.type.TypeCoercion; import java.util.ArrayList; import java.util.HashMap; @@ -88,18 +88,18 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.PlanBuilder.newPlanBuilder; -import static io.prestosql.sql.planner.QueryPlanner.coerce; -import static io.prestosql.sql.planner.QueryPlanner.coerceIfNecessary; -import static io.prestosql.sql.planner.QueryPlanner.pruneInvisibleFields; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.Join.Type.CROSS; -import static io.prestosql.sql.tree.Join.Type.IMPLICIT; -import static io.prestosql.sql.tree.Join.Type.INNER; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.PlanBuilder.newPlanBuilder; +import static io.trino.sql.planner.QueryPlanner.coerce; +import static io.trino.sql.planner.QueryPlanner.coerceIfNecessary; +import static io.trino.sql.planner.QueryPlanner.pruneInvisibleFields; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.Join.Type.CROSS; +import static io.trino.sql.tree.Join.Type.IMPLICIT; +import static io.trino.sql.tree.Join.Type.INNER; import static java.util.Objects.requireNonNull; class RelationPlanner diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/ResolvedFunctionCallRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/ResolvedFunctionCallRewriter.java index 699f751da8b0..89f6964d8b09 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/ResolvedFunctionCallRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/ResolvedFunctionCallRewriter.java @@ -13,12 +13,12 @@ */ package io.trino.sql.planner; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.NodeRef; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.NodeRef; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/RuleStatsRecorder.java b/core/trino-main/src/main/java/io/trino/sql/planner/RuleStatsRecorder.java index 0cc78bf158b8..3b5247a93c77 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/RuleStatsRecorder.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/RuleStatsRecorder.java @@ -14,9 +14,9 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.IterativeOptimizer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.iterative.RuleStats; +import io.trino.sql.planner.iterative.IterativeOptimizer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.iterative.RuleStats; import org.weakref.jmx.MBeanExport; import org.weakref.jmx.MBeanExporter; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/SchedulingOrderVisitor.java b/core/trino-main/src/main/java/io/trino/sql/planner/SchedulingOrderVisitor.java index 6ab9e927b5ce..2ba19e83967c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/SchedulingOrderVisitor.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/SchedulingOrderVisitor.java @@ -15,13 +15,13 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.TableScanNode; import java.util.List; import java.util.function.Consumer; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/ScopeAware.java b/core/trino-main/src/main/java/io/trino/sql/planner/ScopeAware.java index feaf6488dd62..7bd487055be9 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/ScopeAware.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/ScopeAware.java @@ -13,20 +13,20 @@ */ package io.trino.sql.planner; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.CanonicalizationAware; -import io.prestosql.sql.analyzer.ResolvedField; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.Node; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.analyzer.CanonicalizationAware; +import io.trino.sql.analyzer.ResolvedField; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.Node; import java.util.OptionalInt; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.util.AstUtils.treeEqual; -import static io.prestosql.sql.util.AstUtils.treeHash; +import static io.trino.sql.util.AstUtils.treeEqual; +import static io.trino.sql.util.AstUtils.treeHash; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/SimplePlanVisitor.java b/core/trino-main/src/main/java/io/trino/sql/planner/SimplePlanVisitor.java index 2d3162503f5e..5f959b432619 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/SimplePlanVisitor.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/SimplePlanVisitor.java @@ -13,8 +13,8 @@ */ package io.trino.sql.planner; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; public class SimplePlanVisitor extends PlanVisitor diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/SortExpressionContext.java b/core/trino-main/src/main/java/io/trino/sql/planner/SortExpressionContext.java index f51383db3f3a..46a487624857 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/SortExpressionContext.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/SortExpressionContext.java @@ -14,7 +14,7 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.tree.Expression; +import io.trino.sql.tree.Expression; import java.util.List; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/SortExpressionExtractor.java b/core/trino-main/src/main/java/io/trino/sql/planner/SortExpressionExtractor.java index fa696bef0acb..0ce094ce40c8 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/SortExpressionExtractor.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/SortExpressionExtractor.java @@ -14,14 +14,14 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.ExpressionUtils; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.metadata.Metadata; +import io.trino.sql.ExpressionUtils; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Optional; @@ -30,8 +30,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; import static java.util.Collections.singletonList; import static java.util.Comparator.comparing; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/StageExecutionPlan.java b/core/trino-main/src/main/java/io/trino/sql/planner/StageExecutionPlan.java index 0682b4d77447..ef8d3dee1b14 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/StageExecutionPlan.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/StageExecutionPlan.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.execution.TableInfo; -import io.prestosql.split.SplitSource; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.TableInfo; +import io.trino.split.SplitSource; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/StatisticsAggregationPlanner.java b/core/trino-main/src/main/java/io/trino/sql/planner/StatisticsAggregationPlanner.java index b2bf4c1bb4f5..fa27b027e54e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/StatisticsAggregationPlanner.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/StatisticsAggregationPlanner.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.operator.aggregation.MaxDataSizeForStats; -import io.prestosql.operator.aggregation.SumDataSizeForStats; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.statistics.ColumnStatisticMetadata; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.statistics.TableStatisticType; -import io.prestosql.spi.statistics.TableStatisticsMetadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.StatisticAggregations; -import io.prestosql.sql.planner.plan.StatisticAggregationsDescriptor; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.operator.aggregation.MaxDataSizeForStats; +import io.trino.operator.aggregation.SumDataSizeForStats; +import io.trino.spi.PrestoException; +import io.trino.spi.statistics.ColumnStatisticMetadata; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.statistics.TableStatisticType; +import io.trino.spi.statistics.TableStatisticsMetadata; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.StatisticAggregations; +import io.trino.sql.planner.plan.StatisticAggregationsDescriptor; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Map; @@ -39,11 +39,11 @@ import static com.google.common.base.Verify.verifyNotNull; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.statistics.TableStatisticType.ROW_COUNT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.statistics.TableStatisticType.ROW_COUNT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static java.util.Objects.requireNonNull; public class StatisticsAggregationPlanner diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/SubExpressionExtractor.java b/core/trino-main/src/main/java/io/trino/sql/planner/SubExpressionExtractor.java index cb4d2162d9ef..86cdcb41d0a3 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/SubExpressionExtractor.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/SubExpressionExtractor.java @@ -13,8 +13,8 @@ */ package io.trino.sql.planner; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.util.AstUtils; +import io.trino.sql.tree.Expression; +import io.trino.sql.util.AstUtils; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/SubPlan.java b/core/trino-main/src/main/java/io/trino/sql/planner/SubPlan.java index a6fa9e7c5967..f095e1037d3e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/SubPlan.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/SubPlan.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Multiset; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.RemoteSourceNode; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/SubqueryPlanner.java b/core/trino-main/src/main/java/io/trino/sql/planner/SubqueryPlanner.java index 5a566d461ad4..0b05fda9ef93 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/SubqueryPlanner.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/SubqueryPlanner.java @@ -18,28 +18,28 @@ import com.google.common.collect.Iterables; import com.google.common.graph.SuccessorsFunction; import com.google.common.graph.Traverser; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.QuantifiedComparisonExpression; -import io.prestosql.sql.tree.QuantifiedComparisonExpression.Quantifier; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.SubqueryExpression; -import io.prestosql.type.TypeCoercion; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.QuantifiedComparisonExpression; +import io.trino.sql.tree.QuantifiedComparisonExpression.Quantifier; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.SubqueryExpression; +import io.trino.type.TypeCoercion; import java.util.ArrayList; import java.util.Collection; @@ -53,12 +53,12 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.collect.Streams.stream; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.planner.PlanBuilder.newPlanBuilder; -import static io.prestosql.sql.planner.QueryPlanner.coerce; -import static io.prestosql.sql.planner.ScopeAware.scopeAwareKey; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.planner.PlanBuilder.newPlanBuilder; +import static io.trino.sql.planner.QueryPlanner.coerce; +import static io.trino.sql.planner.ScopeAware.scopeAwareKey; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/Symbol.java b/core/trino-main/src/main/java/io/trino/sql/planner/Symbol.java index 087255a78a63..4da4a543b9b3 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/Symbol.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/Symbol.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import static com.google.common.base.Preconditions.checkArgument; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/SymbolAllocator.java b/core/trino-main/src/main/java/io/trino/sql/planner/SymbolAllocator.java index e9a3de7a23e2..20a0c74d5c25 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/SymbolAllocator.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/SymbolAllocator.java @@ -14,15 +14,15 @@ package io.trino.sql.planner; import com.google.common.primitives.Ints; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.Field; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GroupingOperation; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.Type; +import io.trino.sql.analyzer.Field; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GroupingOperation; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.SymbolReference; import java.util.HashMap; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/SymbolsExtractor.java b/core/trino-main/src/main/java/io/trino/sql/planner/SymbolsExtractor.java index 4499b76da5a0..81c58a71c8bf 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/SymbolsExtractor.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/SymbolsExtractor.java @@ -15,29 +15,29 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.DefaultExpressionTraversalVisitor; -import io.prestosql.sql.tree.DefaultTraversalVisitor; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SubqueryExpression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.DefaultExpressionTraversalVisitor; +import io.trino.sql.tree.DefaultTraversalVisitor; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SubqueryExpression; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.ExpressionExtractor.extractExpressions; -import static io.prestosql.sql.planner.ExpressionExtractor.extractExpressionsNonRecursive; -import static io.prestosql.sql.planner.iterative.Lookup.noLookup; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.sql.planner.ExpressionExtractor.extractExpressions; +import static io.trino.sql.planner.ExpressionExtractor.extractExpressionsNonRecursive; +import static io.trino.sql.planner.iterative.Lookup.noLookup; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; import static java.util.Objects.requireNonNull; public final class SymbolsExtractor diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/SystemPartitioningHandle.java b/core/trino-main/src/main/java/io/trino/sql/planner/SystemPartitioningHandle.java index 7c31b853f15a..6d873c03946d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/SystemPartitioningHandle.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/SystemPartitioningHandle.java @@ -16,20 +16,20 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.execution.scheduler.NodeScheduler; -import io.prestosql.execution.scheduler.NodeSelector; -import io.prestosql.metadata.InternalNode; -import io.prestosql.operator.BucketPartitionFunction; -import io.prestosql.operator.HashGenerator; -import io.prestosql.operator.InterpretedHashGenerator; -import io.prestosql.operator.PartitionFunction; -import io.prestosql.operator.PrecomputedHashGenerator; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.execution.scheduler.NodeScheduler; +import io.trino.execution.scheduler.NodeSelector; +import io.trino.metadata.InternalNode; +import io.trino.operator.BucketPartitionFunction; +import io.trino.operator.HashGenerator; +import io.trino.operator.InterpretedHashGenerator; +import io.trino.operator.PartitionFunction; +import io.trino.operator.PrecomputedHashGenerator; +import io.trino.spi.Page; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Objects; @@ -37,9 +37,9 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.SystemSessionProperties.getHashPartitionCount; -import static io.prestosql.spi.StandardErrorCode.NO_NODES_AVAILABLE; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.SystemSessionProperties.getHashPartitionCount; +import static io.trino.spi.StandardErrorCode.NO_NODES_AVAILABLE; +import static io.trino.util.Failures.checkCondition; import static java.util.Objects.requireNonNull; public final class SystemPartitioningHandle diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/TranslationMap.java b/core/trino-main/src/main/java/io/trino/sql/planner/TranslationMap.java index cea3f11dce1a..f258bbf84809 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/TranslationMap.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/TranslationMap.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.ResolvedField; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.FieldReference; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GenericDataType; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.RowDataType; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.util.AstUtils; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.analyzer.ResolvedField; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.FieldReference; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GenericDataType; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.RowDataType; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.util.AstUtils; import java.util.Arrays; import java.util.Collections; @@ -45,7 +45,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.sql.planner.ScopeAware.scopeAwareKey; +import static io.trino.sql.planner.ScopeAware.scopeAwareKey; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/TypeAnalyzer.java b/core/trino-main/src/main/java/io/trino/sql/planner/TypeAnalyzer.java index a2c05958bdd4..ba81b7d31112 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/TypeAnalyzer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/TypeAnalyzer.java @@ -16,20 +16,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NodeRef; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.type.Type; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NodeRef; import javax.inject.Inject; import java.util.Map; -import static io.prestosql.sql.analyzer.ExpressionAnalyzer.analyzeExpressions; +import static io.trino.sql.analyzer.ExpressionAnalyzer.analyzeExpressions; /** * This class is to facilitate obtaining the type of an expression and its subexpressions diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/TypeProvider.java b/core/trino-main/src/main/java/io/trino/sql/planner/TypeProvider.java index d68e947c2fec..467b1b6e896f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/TypeProvider.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/TypeProvider.java @@ -14,7 +14,7 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Collections; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/GroupReference.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/GroupReference.java index 1fe6a52e5719..a256890f282d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/GroupReference.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/GroupReference.java @@ -14,10 +14,10 @@ package io.trino.sql.planner.iterative; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanVisitor; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/IterativeOptimizer.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/IterativeOptimizer.java index 52bdb1aa5e38..6b6314faaddf 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/IterativeOptimizer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/IterativeOptimizer.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.cost.CachingCostProvider; -import io.prestosql.cost.CachingStatsProvider; -import io.prestosql.cost.CostCalculator; -import io.prestosql.cost.CostProvider; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.cost.StatsProvider; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Match; -import io.prestosql.matching.Pattern; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.cost.CachingCostProvider; +import io.trino.cost.CachingStatsProvider; +import io.trino.cost.CostCalculator; +import io.trino.cost.CostProvider; +import io.trino.cost.StatsCalculator; +import io.trino.cost.StatsProvider; +import io.trino.execution.warnings.WarningCollector; +import io.trino.matching.Capture; +import io.trino.matching.Match; +import io.trino.matching.Pattern; +import io.trino.spi.PrestoException; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.plan.PlanNode; import java.util.Iterator; import java.util.List; @@ -44,8 +44,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.spi.StandardErrorCode.OPTIMIZER_TIMEOUT; +import static io.trino.matching.Capture.newCapture; +import static io.trino.spi.StandardErrorCode.OPTIMIZER_TIMEOUT; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Lookup.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Lookup.java index ae41824c762d..4be471954877 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Lookup.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Lookup.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner.iterative; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.function.Function; import java.util.stream.Stream; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Memo.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Memo.java index 7e52507d7405..bef93d2ca804 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Memo.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Memo.java @@ -15,10 +15,10 @@ import com.google.common.collect.HashMultiset; import com.google.common.collect.Multiset; -import io.prestosql.cost.PlanCostEstimate; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.cost.PlanCostEstimate; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.plan.PlanNode; import javax.annotation.Nullable; @@ -32,7 +32,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.iterative.Plans.resolveGroupReferences; +import static io.trino.sql.planner.iterative.Plans.resolveGroupReferences; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Plans.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Plans.java index 3acea170eb0c..77ab047145f0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Plans.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Plans.java @@ -13,8 +13,8 @@ */ package io.trino.sql.planner.iterative; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; import java.util.List; import java.util.stream.Collectors; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Rule.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Rule.java index bf0a91d4aeb1..b021805ba900 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Rule.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/Rule.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.iterative; -import io.prestosql.Session; -import io.prestosql.cost.CostProvider; -import io.prestosql.cost.StatsProvider; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.CostProvider; +import io.trino.cost.StatsProvider; +import io.trino.execution.warnings.WarningCollector; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/RuleIndex.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/RuleIndex.java index 14c9b95b3114..bdba97da4b7b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/RuleIndex.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/RuleIndex.java @@ -17,8 +17,8 @@ import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ListMultimap; import com.google.common.reflect.TypeToken; -import io.prestosql.matching.Pattern; -import io.prestosql.matching.pattern.TypeOfPattern; +import io.trino.matching.Pattern; +import io.trino.matching.pattern.TypeOfPattern; import java.util.Set; import java.util.stream.Stream; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AddExchangesBelowPartialAggregationOverGroupIdRuleSet.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AddExchangesBelowPartialAggregationOverGroupIdRuleSet.java index 4671e85cb2d1..ce86e488adb7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AddExchangesBelowPartialAggregationOverGroupIdRuleSet.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AddExchangesBelowPartialAggregationOverGroupIdRuleSet.java @@ -17,28 +17,28 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Multiset; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.cost.SymbolStatsEstimate; -import io.prestosql.cost.TaskCountEstimator; -import io.prestosql.execution.TaskManagerConfig; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.StreamPreferredProperties; -import io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.Session; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.cost.SymbolStatsEstimate; +import io.trino.cost.TaskCountEstimator; +import io.trino.execution.TaskManagerConfig; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.StreamPreferredProperties; +import io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; import java.util.Collection; import java.util.List; @@ -51,22 +51,22 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMultiset.toImmutableMultiset; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.SystemSessionProperties.getTaskConcurrency; -import static io.prestosql.SystemSessionProperties.isEnableForcedExchangeBelowGroupId; -import static io.prestosql.SystemSessionProperties.isEnableStatsCalculator; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.matching.Pattern.nonEmpty; -import static io.prestosql.matching.Pattern.typeOf; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; -import static io.prestosql.sql.planner.optimizations.StreamPreferredProperties.fixedParallelism; -import static io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.deriveProperties; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.partitionedExchange; -import static io.prestosql.sql.planner.plan.Patterns.Aggregation.groupingColumns; -import static io.prestosql.sql.planner.plan.Patterns.Aggregation.step; -import static io.prestosql.sql.planner.plan.Patterns.Exchange.scope; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.SystemSessionProperties.getTaskConcurrency; +import static io.trino.SystemSessionProperties.isEnableForcedExchangeBelowGroupId; +import static io.trino.SystemSessionProperties.isEnableStatsCalculator; +import static io.trino.matching.Capture.newCapture; +import static io.trino.matching.Pattern.nonEmpty; +import static io.trino.matching.Pattern.typeOf; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.sql.planner.optimizations.StreamPreferredProperties.fixedParallelism; +import static io.trino.sql.planner.optimizations.StreamPropertyDerivations.deriveProperties; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.partitionedExchange; +import static io.trino.sql.planner.plan.Patterns.Aggregation.groupingColumns; +import static io.trino.sql.planner.plan.Patterns.Aggregation.step; +import static io.trino.sql.planner.plan.Patterns.Exchange.scope; +import static io.trino.sql.planner.plan.Patterns.source; import static java.lang.Double.isNaN; import static java.lang.Math.min; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AddIntermediateAggregations.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AddIntermediateAggregations.java index 22cf87b0bee5..bef0c756f643 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AddIntermediateAggregations.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AddIntermediateAggregations.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; import java.util.Map; import java.util.Optional; @@ -37,12 +37,12 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.SystemSessionProperties.getTaskConcurrency; -import static io.prestosql.matching.Pattern.empty; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; -import static io.prestosql.sql.planner.plan.Patterns.Aggregation.groupingColumns; -import static io.prestosql.sql.planner.plan.Patterns.Aggregation.step; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; +import static io.trino.SystemSessionProperties.getTaskConcurrency; +import static io.trino.matching.Pattern.empty; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; +import static io.trino.sql.planner.plan.Patterns.Aggregation.groupingColumns; +import static io.trino.sql.planner.plan.Patterns.Aggregation.step; +import static io.trino.sql.planner.plan.Patterns.aggregation; /** * Adds INTERMEDIATE aggregations between an un-grouped FINAL aggregation and its preceding diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AggregationDecorrelation.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AggregationDecorrelation.java index 814c3dd4bfa3..163c254c4273 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AggregationDecorrelation.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AggregationDecorrelation.java @@ -14,10 +14,10 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.PlanNode; import java.util.Map; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ApplyTableScanRedirection.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ApplyTableScanRedirection.java index 1706b33a63df..22ab14d076b7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ApplyTableScanRedirection.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ApplyTableScanRedirection.java @@ -16,34 +16,34 @@ import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.DomainTranslator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.sql.planner.DomainTranslator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TableScanNode; import java.util.List; import java.util.Map; import java.util.Optional; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.metadata.QualifiedObjectName.convertFromSchemaTableName; -import static io.prestosql.spi.StandardErrorCode.COLUMN_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; +import static io.trino.metadata.QualifiedObjectName.convertFromSchemaTableName; +import static io.trino.spi.StandardErrorCode.COLUMN_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.sql.planner.plan.Patterns.tableScan; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/CanonicalizeExpressionRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/CanonicalizeExpressionRewriter.java index 1980b6decaab..ae0aec3cfaf6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/CanonicalizeExpressionRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/CanonicalizeExpressionRewriter.java @@ -14,35 +14,35 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.scalar.FormatFunction; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.CurrentTime; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.Extract; -import io.prestosql.sql.tree.Format; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.Literal; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.WhenClause; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.operator.scalar.FormatFunction; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.CurrentTime; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.Extract; +import io.trino.sql.tree.Format; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.Literal; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.WhenClause; import java.util.List; import java.util.Map; @@ -50,9 +50,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.ADD; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.MULTIPLY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.ADD; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.MULTIPLY; import static java.util.Objects.requireNonNull; public final class CanonicalizeExpressionRewriter diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/CanonicalizeExpressions.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/CanonicalizeExpressions.java index d06185b32945..b2b52217adde 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/CanonicalizeExpressions.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/CanonicalizeExpressions.java @@ -13,10 +13,10 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.TypeAnalyzer; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.TypeAnalyzer; -import static io.prestosql.sql.planner.iterative.rule.CanonicalizeExpressionRewriter.rewrite; +import static io.trino.sql.planner.iterative.rule.CanonicalizeExpressionRewriter.rewrite; public class CanonicalizeExpressions extends ExpressionRewriteRuleSet diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/CreatePartialTopN.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/CreatePartialTopN.java index b49dbfab1412..2f43d4e48a7e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/CreatePartialTopN.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/CreatePartialTopN.java @@ -13,16 +13,16 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.TopNNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.TopNNode; -import static io.prestosql.sql.planner.plan.Patterns.TopN.step; -import static io.prestosql.sql.planner.plan.Patterns.topN; -import static io.prestosql.sql.planner.plan.TopNNode.Step.FINAL; -import static io.prestosql.sql.planner.plan.TopNNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.TopNNode.Step.SINGLE; +import static io.trino.sql.planner.plan.Patterns.TopN.step; +import static io.trino.sql.planner.plan.Patterns.topN; +import static io.trino.sql.planner.plan.TopNNode.Step.FINAL; +import static io.trino.sql.planner.plan.TopNNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.TopNNode.Step.SINGLE; public class CreatePartialTopN implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DereferencePushdown.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DereferencePushdown.java index 3ec3a792785a..3368e54ec03a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DereferencePushdown.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DereferencePushdown.java @@ -14,12 +14,12 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.DefaultExpressionTraversalVisitor; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.DefaultExpressionTraversalVisitor; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.SymbolReference; import java.util.Collection; import java.util.List; @@ -28,7 +28,7 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.sql.planner.SymbolsExtractor.extractAll; +import static io.trino.sql.planner.SymbolsExtractor.extractAll; /** * Provides helper methods to push down dereferences in the query plan. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarArrayConstructor.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarArrayConstructor.java index b73c55611616..7a0fbfc7fcc8 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarArrayConstructor.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarArrayConstructor.java @@ -14,10 +14,10 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.DesugarArrayConstructorRewriter; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.DesugarArrayConstructorRewriter; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarAtTimeZone.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarAtTimeZone.java index 5a786f3e4cd7..27bbaaa4fd06 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarAtTimeZone.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarAtTimeZone.java @@ -13,9 +13,9 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.DesugarAtTimeZoneRewriter; -import io.prestosql.sql.planner.TypeAnalyzer; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.DesugarAtTimeZoneRewriter; +import io.trino.sql.planner.TypeAnalyzer; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarCurrentPath.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarCurrentPath.java index 2483505c7fa9..7053acc14852 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarCurrentPath.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarCurrentPath.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.tree.CurrentPath; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.tree.CurrentPath; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.QualifiedName; -import static io.prestosql.sql.tree.ExpressionTreeRewriter.rewriteWith; +import static io.trino.sql.tree.ExpressionTreeRewriter.rewriteWith; public class DesugarCurrentPath extends ExpressionRewriteRuleSet diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarCurrentUser.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarCurrentUser.java index 3f8b9f398d21..0b856181b845 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarCurrentUser.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarCurrentUser.java @@ -13,13 +13,13 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.tree.CurrentUser; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.tree.CurrentUser; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.QualifiedName; public class DesugarCurrentUser extends ExpressionRewriteRuleSet diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarLambdaExpression.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarLambdaExpression.java index ddc29a727df4..bc6e44237361 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarLambdaExpression.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarLambdaExpression.java @@ -13,8 +13,8 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.tree.Expression; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.tree.Expression; public class DesugarLambdaExpression extends ExpressionRewriteRuleSet diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarLike.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarLike.java index 9b0a28d840cd..43a6bbcb86d2 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarLike.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarLike.java @@ -14,10 +14,10 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.DesugarLikeRewriter; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.DesugarLikeRewriter; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarRowSubscript.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarRowSubscript.java index 60d162192388..db279a65bb49 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarRowSubscript.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarRowSubscript.java @@ -13,8 +13,8 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.DesugarRowSubscriptRewriter; -import io.prestosql.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.DesugarRowSubscriptRewriter; +import io.trino.sql.planner.TypeAnalyzer; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarTryExpression.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarTryExpression.java index e7c0b6fce418..48f975734579 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarTryExpression.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DesugarTryExpression.java @@ -13,9 +13,9 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.DesugarTryExpressionRewriter; -import io.prestosql.sql.planner.TypeAnalyzer; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.DesugarTryExpressionRewriter; +import io.trino.sql.planner.TypeAnalyzer; public class DesugarTryExpression extends ExpressionRewriteRuleSet 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 c2aad7c7d038..8bac0630c654 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,40 +17,40 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Ordering; import io.airlift.units.DataSize; -import io.prestosql.cost.CostComparator; -import io.prestosql.cost.LocalCostEstimate; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.cost.StatsProvider; -import io.prestosql.cost.TaskCountEstimator; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.PlanNodeSearcher; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Unnest; +import io.trino.cost.CostComparator; +import io.trino.cost.LocalCostEstimate; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.cost.StatsProvider; +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; +import io.trino.sql.planner.optimizations.PlanNodeSearcher; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Unnest; import java.util.ArrayList; import java.util.List; -import static io.prestosql.SystemSessionProperties.getJoinDistributionType; -import static io.prestosql.SystemSessionProperties.getJoinMaxBroadcastTableSize; -import static io.prestosql.cost.CostCalculatorWithEstimatedExchanges.calculateJoinCostWithoutOutput; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.AUTOMATIC; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMostScalar; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.PARTITIONED; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.REPLICATED; -import static io.prestosql.sql.planner.plan.JoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; -import static io.prestosql.sql.planner.plan.Patterns.join; -import static io.prestosql.util.MorePredicates.isInstanceOfAny; +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; +import static io.trino.sql.planner.plan.JoinNode.Type.FULL; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.sql.planner.plan.Patterns.join; +import static io.trino.util.MorePredicates.isInstanceOfAny; import static java.util.Objects.requireNonNull; public class DetermineJoinDistributionType 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 3482d717f9cb..a5786b63c4e2 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,29 +15,29 @@ import com.google.common.collect.Ordering; import io.airlift.units.DataSize; -import io.prestosql.cost.CostComparator; -import io.prestosql.cost.LocalCostEstimate; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.cost.StatsProvider; -import io.prestosql.cost.TaskCountEstimator; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; +import io.trino.cost.CostComparator; +import io.trino.cost.LocalCostEstimate; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.cost.StatsProvider; +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; +import io.trino.sql.planner.plan.SemiJoinNode; import java.util.ArrayList; import java.util.List; -import static io.prestosql.SystemSessionProperties.getJoinDistributionType; -import static io.prestosql.SystemSessionProperties.getJoinMaxBroadcastTableSize; -import static io.prestosql.cost.CostCalculatorWithEstimatedExchanges.calculateJoinCostWithoutOutput; -import static io.prestosql.sql.planner.iterative.rule.DetermineJoinDistributionType.getSourceTablesSizeInBytes; -import static io.prestosql.sql.planner.plan.Patterns.semiJoin; -import static io.prestosql.sql.planner.plan.SemiJoinNode.DistributionType.PARTITIONED; -import static io.prestosql.sql.planner.plan.SemiJoinNode.DistributionType.REPLICATED; +import static io.trino.SystemSessionProperties.getJoinDistributionType; +import static io.trino.SystemSessionProperties.getJoinMaxBroadcastTableSize; +import static io.trino.cost.CostCalculatorWithEstimatedExchanges.calculateJoinCostWithoutOutput; +import static io.trino.sql.planner.iterative.rule.DetermineJoinDistributionType.getSourceTablesSizeInBytes; +import static io.trino.sql.planner.plan.Patterns.semiJoin; +import static io.trino.sql.planner.plan.SemiJoinNode.DistributionType.PARTITIONED; +import static io.trino.sql.planner.plan.SemiJoinNode.DistributionType.REPLICATED; import static java.util.Objects.requireNonNull; /** 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 24250616cc20..08648306790c 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,20 +16,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.joins.JoinGraph; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.tree.Expression; +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.iterative.Rule; +import io.trino.sql.planner.optimizations.joins.JoinGraph; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.tree.Expression; import java.util.HashMap; import java.util.HashSet; @@ -42,11 +42,11 @@ 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.prestosql.SystemSessionProperties.getJoinReorderingStrategy; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.AUTOMATIC; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.ELIMINATE_CROSS_JOINS; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.plan.Patterns.join; +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; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/EvaluateZeroSample.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/EvaluateZeroSample.java index a0c2804deaeb..7936be4da4ac 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/EvaluateZeroSample.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/EvaluateZeroSample.java @@ -14,14 +14,14 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.ValuesNode; -import static io.prestosql.sql.planner.plan.Patterns.Sample.sampleRatio; -import static io.prestosql.sql.planner.plan.Patterns.sample; +import static io.trino.sql.planner.plan.Patterns.Sample.sampleRatio; +import static io.trino.sql.planner.plan.Patterns.sample; /** * Replaces 0% sample node with empty values node. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExpressionRewriteRuleSet.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExpressionRewriteRuleSet.java index 80907ba672fb..69b33812e0d2 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExpressionRewriteRuleSet.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExpressionRewriteRuleSet.java @@ -16,26 +16,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.SortItem.NullOrdering; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.SortItem.NullOrdering; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Optional; @@ -43,14 +43,14 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.ResolvedFunction.extractFunctionName; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.filter; -import static io.prestosql.sql.planner.plan.Patterns.join; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.values; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; -import static io.prestosql.sql.tree.SortItem.Ordering.DESCENDING; +import static io.trino.metadata.ResolvedFunction.extractFunctionName; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.filter; +import static io.trino.sql.planner.plan.Patterns.join; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.values; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.tree.SortItem.Ordering.DESCENDING; import static java.util.Objects.requireNonNull; public class ExpressionRewriteRuleSet diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExtractCommonPredicatesExpressionRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExtractCommonPredicatesExpressionRewriter.java index 823c55ee42ae..09626deeac6c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExtractCommonPredicatesExpressionRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExtractCommonPredicatesExpressionRewriter.java @@ -16,21 +16,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.LogicalBinaryExpression; +import io.trino.metadata.Metadata; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.LogicalBinaryExpression; import java.util.Collection; import java.util.List; import java.util.Set; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.ExpressionUtils.combinePredicates; -import static io.prestosql.sql.ExpressionUtils.extractPredicates; -import static io.prestosql.sql.planner.DeterminismEvaluator.isDeterministic; -import static io.prestosql.sql.tree.LogicalBinaryExpression.Operator.OR; +import static io.trino.sql.ExpressionUtils.combinePredicates; +import static io.trino.sql.ExpressionUtils.extractPredicates; +import static io.trino.sql.planner.DeterminismEvaluator.isDeterministic; +import static io.trino.sql.tree.LogicalBinaryExpression.Operator.OR; import static java.util.Collections.emptySet; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExtractDereferencesFromFilterAboveScan.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExtractDereferencesFromFilterAboveScan.java index ed4915961cdf..4b42bef2b063 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExtractDereferencesFromFilterAboveScan.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExtractDereferencesFromFilterAboveScan.java @@ -15,30 +15,30 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.plan.Patterns.filter; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.plan.Patterns.filter; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.tableScan; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExtractSpatialJoins.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExtractSpatialJoins.java index a8a920272eed..9862407cf5aa 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExtractSpatialJoins.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ExtractSpatialJoins.java @@ -19,50 +19,50 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.Session; -import io.prestosql.execution.Lifespan; -import io.prestosql.geospatial.KdbTree; -import io.prestosql.geospatial.KdbTreeUtils; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.Split; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.split.PageSourceManager; -import io.prestosql.split.SplitManager; -import io.prestosql.split.SplitSource; -import io.prestosql.split.SplitSource.SplitBatch; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.iterative.Rule.Context; -import io.prestosql.sql.planner.iterative.Rule.Result; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.execution.Lifespan; +import io.trino.geospatial.KdbTree; +import io.trino.geospatial.KdbTreeUtils; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.Split; +import io.trino.metadata.TableHandle; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.split.PageSourceManager; +import io.trino.split.SplitManager; +import io.trino.split.SplitSource; +import io.trino.split.SplitSource.SplitBatch; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.iterative.Rule.Context; +import io.trino.sql.planner.iterative.Rule.Result; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SymbolReference; import java.io.IOException; import java.io.UncheckedIOException; @@ -75,28 +75,28 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.SystemSessionProperties.getSpatialPartitioningTableName; -import static io.prestosql.SystemSessionProperties.isSpatialJoinEnabled; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.spi.StandardErrorCode.INVALID_SPATIAL_PARTITIONING; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; -import static io.prestosql.spi.connector.DynamicFilter.EMPTY; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.SymbolsExtractor.extractUnique; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.Patterns.filter; -import static io.prestosql.sql.planner.plan.Patterns.join; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; -import static io.prestosql.util.SpatialJoinUtils.extractSupportedSpatialComparisons; -import static io.prestosql.util.SpatialJoinUtils.extractSupportedSpatialFunctions; +import static io.trino.SystemSessionProperties.getSpatialPartitioningTableName; +import static io.trino.SystemSessionProperties.isSpatialJoinEnabled; +import static io.trino.matching.Capture.newCapture; +import static io.trino.spi.StandardErrorCode.INVALID_SPATIAL_PARTITIONING; +import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; +import static io.trino.spi.connector.DynamicFilter.EMPTY; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.SymbolsExtractor.extractUnique; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.Patterns.filter; +import static io.trino.sql.planner.plan.Patterns.join; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.util.SpatialJoinUtils.extractSupportedSpatialComparisons; +import static io.trino.util.SpatialJoinUtils.extractSupportedSpatialFunctions; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/GatherAndMergeWindows.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/GatherAndMergeWindows.java index 69532f164bb2..75b22e17f082 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/GatherAndMergeWindows.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/GatherAndMergeWindows.java @@ -17,19 +17,19 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.matching.PropertyPattern; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.Expression; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.matching.PropertyPattern; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.Expression; import java.util.Iterator; import java.util.List; @@ -41,13 +41,13 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.iterative.rule.Util.transpose; -import static io.prestosql.sql.planner.optimizations.WindowNodeUtil.dependsOn; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.window; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; +import static io.trino.sql.planner.iterative.rule.Util.transpose; +import static io.trino.sql.planner.optimizations.WindowNodeUtil.dependsOn; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.window; public final class GatherAndMergeWindows { diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementBernoulliSampleAsFilter.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementBernoulliSampleAsFilter.java index 6cb1f850b2f5..f5c111ff4b88 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementBernoulliSampleAsFilter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementBernoulliSampleAsFilter.java @@ -13,20 +13,20 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.QualifiedName; -import static io.prestosql.sql.planner.plan.Patterns.Sample.sampleType; -import static io.prestosql.sql.planner.plan.Patterns.sample; -import static io.prestosql.sql.planner.plan.SampleNode.Type.BERNOULLI; +import static io.trino.sql.planner.plan.Patterns.Sample.sampleType; +import static io.trino.sql.planner.plan.Patterns.sample; +import static io.trino.sql.planner.plan.SampleNode.Type.BERNOULLI; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementExceptAll.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementExceptAll.java index f4369dd5c107..5acad5a0e084 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementExceptAll.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementExceptAll.java @@ -14,29 +14,29 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.QualifiedName; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.planner.plan.Patterns.Except.distinct; -import static io.prestosql.sql.planner.plan.Patterns.except; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.SUBTRACT; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.planner.plan.Patterns.Except.distinct; +import static io.trino.sql.planner.plan.Patterns.except; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.SUBTRACT; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementExceptDistinctAsUnion.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementExceptDistinctAsUnion.java index 02f9552e5814..eccb303d65ad 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementExceptDistinctAsUnion.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementExceptDistinctAsUnion.java @@ -14,23 +14,23 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.GenericLiteral; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.GenericLiteral; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.planner.plan.Patterns.Except.distinct; -import static io.prestosql.sql.planner.plan.Patterns.except; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.planner.plan.Patterns.Except.distinct; +import static io.trino.sql.planner.plan.Patterns.except; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementFilteredAggregations.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementFilteredAggregations.java index 87f7f06b6d98..101fba6d81cb 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementFilteredAggregations.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementFilteredAggregations.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.ExpressionUtils.combineDisjunctsWithDefault; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.ExpressionUtils.combineDisjunctsWithDefault; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; /** * Implements filtered aggregations by transforming plans of the following shape: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementIntersectAll.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementIntersectAll.java index 8266d5f52bb8..0b8c8274c412 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementIntersectAll.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementIntersectAll.java @@ -14,26 +14,26 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.QualifiedName; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.planner.plan.Patterns.Intersect.distinct; -import static io.prestosql.sql.planner.plan.Patterns.intersect; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.planner.plan.Patterns.Intersect.distinct; +import static io.trino.sql.planner.plan.Patterns.intersect; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementIntersectDistinctAsUnion.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementIntersectDistinctAsUnion.java index 259c30b0c6fc..7143e7ee5bdc 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementIntersectDistinctAsUnion.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementIntersectDistinctAsUnion.java @@ -13,23 +13,23 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.GenericLiteral; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.GenericLiteral; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.planner.plan.Patterns.Intersect.distinct; -import static io.prestosql.sql.planner.plan.Patterns.intersect; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.planner.plan.Patterns.Intersect.distinct; +import static io.trino.sql.planner.plan.Patterns.intersect; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementLimitWithTies.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementLimitWithTies.java index a59b2f1f9255..399822b869c7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementLimitWithTies.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementLimitWithTies.java @@ -16,31 +16,31 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.WindowFrame; import java.util.Optional; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.source; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementOffset.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementOffset.java index b5c2f312ca23..dc206c47f617 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementOffset.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ImplementOffset.java @@ -14,22 +14,22 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.GenericLiteral; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.GenericLiteral; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.plan.Patterns.offset; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.plan.Patterns.offset; /** * Transforms: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/InlineProjections.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/InlineProjections.java index 56818c0c22ca..56365a8acd33 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/InlineProjections.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/InlineProjections.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Literal; -import io.prestosql.sql.tree.TryExpression; -import io.prestosql.sql.util.AstUtils; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Literal; +import io.trino.sql.tree.TryExpression; +import io.trino.sql.util.AstUtils; import java.util.Map; import java.util.Optional; @@ -36,10 +36,10 @@ import java.util.function.Function; import java.util.stream.Collectors; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionSymbolInliner.inlineSymbols; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionSymbolInliner.inlineSymbols; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; import static java.util.stream.Collectors.toSet; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/LambdaCaptureDesugaringRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/LambdaCaptureDesugaringRewriter.java index 8fd65e5f2d00..8468c27bea07 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/LambdaCaptureDesugaringRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/LambdaCaptureDesugaringRewriter.java @@ -18,17 +18,17 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.tree.BindExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.tree.BindExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.SymbolReference; import java.util.LinkedHashSet; import java.util.List; @@ -36,7 +36,7 @@ import java.util.function.Function; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.ExpressionSymbolInliner.inlineSymbols; +import static io.trino.sql.planner.ExpressionSymbolInliner.inlineSymbols; import static java.util.Objects.requireNonNull; public final class LambdaCaptureDesugaringRewriter diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeExcept.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeExcept.java index f64a50eacc18..b680e13973cf 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeExcept.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeExcept.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.SetOperationNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.SetOperationNode; import java.util.Optional; -import static io.prestosql.sql.planner.plan.Patterns.except; +import static io.trino.sql.planner.plan.Patterns.except; public class MergeExcept implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeFilters.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeFilters.java index 47a5f17aec15..b4508782b6ea 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeFilters.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeFilters.java @@ -13,17 +13,17 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.FilterNode; - -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.planner.plan.Patterns.filter; -import static io.prestosql.sql.planner.plan.Patterns.source; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.FilterNode; + +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.planner.plan.Patterns.filter; +import static io.trino.sql.planner.plan.Patterns.source; import static java.util.Objects.requireNonNull; public class MergeFilters diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeIntersect.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeIntersect.java index ea3c89aeb526..2e9223025ca4 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeIntersect.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeIntersect.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.SetOperationNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.SetOperationNode; import java.util.Optional; -import static io.prestosql.sql.planner.plan.Patterns.intersect; +import static io.trino.sql.planner.plan.Patterns.intersect; /** * Transforms: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitOverProjectWithSort.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitOverProjectWithSort.java index f7e9077aa2ff..7d6224d47f58 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitOverProjectWithSort.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitOverProjectWithSort.java @@ -14,22 +14,22 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.TopNNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.TopNNode; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.sort; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.TopNNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.TopNNode.Step.SINGLE; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.sort; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.TopNNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.TopNNode.Step.SINGLE; /** * Transforms: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitWithDistinct.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitWithDistinct.java index 32e90a40c528..f0e3acdc762d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitWithDistinct.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitWithDistinct.java @@ -13,18 +13,18 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.LimitNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.LimitNode; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.source; public class MergeLimitWithDistinct implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitWithSort.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitWithSort.java index be4884bd1ce5..aa9e8944ba6e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitWithSort.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitWithSort.java @@ -13,18 +13,18 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.TopNNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.TopNNode; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.sort; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.sort; +import static io.trino.sql.planner.plan.Patterns.source; public class MergeLimitWithSort implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitWithTopN.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitWithTopN.java index 0d580cc26ac0..722206216b2f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitWithTopN.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimitWithTopN.java @@ -13,17 +13,17 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.TopNNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.TopNNode; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.topN; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.topN; /** * This rule handles both LimitNode with ties and LimitNode without ties. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimits.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimits.java index 6c3dfb380b5a..51c258be5c72 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimits.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeLimits.java @@ -14,15 +14,15 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.LimitNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.LimitNode; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.source; /** * This rule handles both LimitNode with ties and LimitNode without ties. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeUnion.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeUnion.java index 406ed6bbbb07..6a1143a15428 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeUnion.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MergeUnion.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.SetOperationNode; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.SetOperationNode; +import io.trino.sql.planner.plan.UnionNode; import java.util.Optional; -import static io.prestosql.sql.planner.plan.Patterns.union; +import static io.trino.sql.planner.plan.Patterns.union; /** * Transforms: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MultipleDistinctAggregationToMarkDistinct.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MultipleDistinctAggregationToMarkDistinct.java index bda1a60823d5..dc5a16b7a438 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MultipleDistinctAggregationToMarkDistinct.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/MultipleDistinctAggregationToMarkDistinct.java @@ -17,15 +17,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.SystemSessionProperties; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.SystemSessionProperties; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.HashMap; import java.util.HashSet; @@ -33,8 +33,8 @@ import java.util.Optional; import java.util.Set; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.planner.plan.Patterns.aggregation; import static java.util.stream.Collectors.toSet; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PlanNodeWithCost.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PlanNodeWithCost.java index b50c94eb7d0b..11edf3afbfd2 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PlanNodeWithCost.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PlanNodeWithCost.java @@ -14,8 +14,8 @@ package io.trino.sql.planner.iterative.rule; -import io.prestosql.cost.PlanCostEstimate; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.cost.PlanCostEstimate; +import io.trino.sql.planner.plan.PlanNode; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ProjectOffPushDownRule.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ProjectOffPushDownRule.java index 51d306d21de1..07274390883c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ProjectOffPushDownRule.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ProjectOffPushDownRule.java @@ -14,21 +14,21 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; import java.util.Optional; import java.util.Set; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.iterative.rule.Util.pruneInputs; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.iterative.rule.Util.pruneInputs; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; /** * @param The node type to look for under the ProjectNode diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneAggregationColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneAggregationColumns.java index 275f1966d8a5..7e63d714cbf4 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneAggregationColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneAggregationColumns.java @@ -14,15 +14,15 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.Maps; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.Map; import java.util.Optional; import java.util.Set; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.aggregation; public class PruneAggregationColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneAggregationSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneAggregationSourceColumns.java index 1711e2e745a0..884d351cc9fd 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneAggregationSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneAggregationSourceColumns.java @@ -14,18 +14,18 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.Streams; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.aggregation; public class PruneAggregationSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneApplyColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneApplyColumns.java index ddadb16168cf..114f8235afd1 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneApplyColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneApplyColumns.java @@ -14,20 +14,20 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.tree.Expression; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.tree.Expression; import java.util.Map; import java.util.Optional; import java.util.Set; import static com.google.common.collect.Sets.intersection; -import static io.prestosql.sql.planner.SymbolsExtractor.extractUnique; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.plan.Patterns.applyNode; +import static io.trino.sql.planner.SymbolsExtractor.extractUnique; +import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; +import static io.trino.sql.planner.plan.Patterns.applyNode; /** * This rule restricts the outputs of ApplyNode's input and subquery diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneApplyCorrelation.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneApplyCorrelation.java index c58db196b5c6..75f0f8a4f4fb 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneApplyCorrelation.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneApplyCorrelation.java @@ -13,18 +13,18 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.ApplyNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.ApplyNode; import java.util.List; import java.util.Set; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.SymbolsExtractor.extractUnique; -import static io.prestosql.sql.planner.plan.Patterns.applyNode; +import static io.trino.sql.planner.SymbolsExtractor.extractUnique; +import static io.trino.sql.planner.plan.Patterns.applyNode; /** * This rule updates ApplyNode's correlation list. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneApplySourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneApplySourceColumns.java index 75d3d00c0d3e..eef4ab199a6d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneApplySourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneApplySourceColumns.java @@ -14,20 +14,20 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.plan.Patterns.applyNode; +import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; +import static io.trino.sql.planner.plan.Patterns.applyNode; /** * This rule restricts outputs of ApplyNode's subquery to include only the symbols diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneAssignUniqueIdColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneAssignUniqueIdColumns.java index 6718694c7104..ac16335533bd 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneAssignUniqueIdColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneAssignUniqueIdColumns.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.assignUniqueId; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.assignUniqueId; public class PruneAssignUniqueIdColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneCorrelatedJoinColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneCorrelatedJoinColumns.java index 8e159e667bfd..9a0e404e3b15 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneCorrelatedJoinColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneCorrelatedJoinColumns.java @@ -14,23 +14,23 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; import java.util.Set; import static com.google.common.collect.Sets.intersection; -import static io.prestosql.sql.planner.SymbolsExtractor.extractUnique; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMostScalar; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isScalar; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.planner.SymbolsExtractor.extractUnique; +import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMostScalar; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isScalar; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; /** * This rule restricts the outputs of CorrelatedJoinNode's input and subquery diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneCorrelatedJoinCorrelation.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneCorrelatedJoinCorrelation.java index 39e02df2a8fe..ccf61bc5e481 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneCorrelatedJoinCorrelation.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneCorrelatedJoinCorrelation.java @@ -13,18 +13,18 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.CorrelatedJoinNode; import java.util.List; import java.util.Set; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.SymbolsExtractor.extractUnique; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.planner.SymbolsExtractor.extractUnique; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; /** * This rule updates CorrelatedJoinNode's correlation list. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneCountAggregationOverScalar.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneCountAggregationOverScalar.java index 7fbd822b5b85..30bfdb5d773f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneCountAggregationOverScalar.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneCountAggregationOverScalar.java @@ -14,23 +14,23 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.FunctionId; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Row; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.FunctionId; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Row; import java.util.Map; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isScalar; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isScalar; +import static io.trino.sql.planner.plan.Patterns.aggregation; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneDeleteSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneDeleteSourceColumns.java index 7e1a6d7a0328..6beed9dd2461 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneDeleteSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneDeleteSourceColumns.java @@ -14,13 +14,13 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.DeleteNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.DeleteNode; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.delete; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.delete; public class PruneDeleteSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneDistinctAggregation.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneDistinctAggregation.java index d5a725e1f38e..8a6452274190 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneDistinctAggregation.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneDistinctAggregation.java @@ -14,23 +14,23 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.UnionNode; import java.util.List; import java.util.stream.Collectors; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.sql.planner.plan.ChildReplacer.replaceChildren; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.ChildReplacer.replaceChildren; +import static io.trino.sql.planner.plan.Patterns.aggregation; public class PruneDistinctAggregation implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneDistinctLimitSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneDistinctLimitSourceColumns.java index d41935418d09..6c91cda701e2 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneDistinctLimitSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneDistinctLimitSourceColumns.java @@ -14,14 +14,14 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.DistinctLimitNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.DistinctLimitNode; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.distinctLimit; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.distinctLimit; public class PruneDistinctLimitSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneEnforceSingleRowColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneEnforceSingleRowColumns.java index 91104b74341f..8eb2cc0fffd9 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneEnforceSingleRowColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneEnforceSingleRowColumns.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.enforceSingleRow; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.enforceSingleRow; public class PruneEnforceSingleRowColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExceptSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExceptSourceColumns.java index c078c9db78c0..746bb16ee675 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExceptSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExceptSourceColumns.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.ExceptNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.ExceptNode; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.except; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.except; public class PruneExceptSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExchangeColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExchangeColumns.java index 8c82bd54f8d0..fc6d1ca38f9f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExchangeColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExchangeColumns.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.Set; -import static io.prestosql.sql.planner.plan.Patterns.exchange; +import static io.trino.sql.planner.plan.Patterns.exchange; /** * This rule restricts the outputs of ExchangeNode based on which diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExchangeSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExchangeSourceColumns.java index 106f8af28492..d45fb49dddde 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExchangeSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExchangeSourceColumns.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.ExchangeNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.ExchangeNode; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.exchange; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.exchange; public class PruneExchangeSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExplainAnalyzeSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExplainAnalyzeSourceColumns.java index 045b4832d2a0..26dfec84533b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExplainAnalyzeSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneExplainAnalyzeSourceColumns.java @@ -14,13 +14,13 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.explainAnalyze; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.explainAnalyze; public class PruneExplainAnalyzeSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneFilterColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneFilterColumns.java index f8fee6f22c92..7bf26882a310 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneFilterColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneFilterColumns.java @@ -14,17 +14,17 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.Streams; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.filter; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.filter; public class PruneFilterColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneGroupIdColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneGroupIdColumns.java index bd6616c797a3..a7085fe52deb 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneGroupIdColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneGroupIdColumns.java @@ -13,16 +13,16 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import java.util.Optional; import java.util.Set; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.plan.Patterns.groupId; +import static io.trino.sql.planner.plan.Patterns.groupId; /** * This rule prunes GroupIdNode's aggregationArguments. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneGroupIdSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneGroupIdSourceColumns.java index 6d34d157d860..aa547dca3fef 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneGroupIdSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneGroupIdSourceColumns.java @@ -13,13 +13,13 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.GroupIdNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.GroupIdNode; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.groupId; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.groupId; public class PruneGroupIdSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneIndexJoinColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneIndexJoinColumns.java index 0fc6ff8aa14b..828ad226ed72 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneIndexJoinColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneIndexJoinColumns.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; import java.util.Set; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.indexJoin; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.indexJoin; public class PruneIndexJoinColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneIndexSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneIndexSourceColumns.java index 81ad5accb4ba..517f31938ea8 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneIndexSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneIndexSourceColumns.java @@ -14,10 +14,10 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.Maps; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.spi.connector.ColumnHandle; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import java.util.Map; @@ -26,7 +26,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.plan.Patterns.indexSource; +import static io.trino.sql.planner.plan.Patterns.indexSource; public class PruneIndexSourceColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneIntersectSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneIntersectSourceColumns.java index f066e355d5e5..25dd81abcd31 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneIntersectSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneIntersectSourceColumns.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.IntersectNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.IntersectNode; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.intersect; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.intersect; public class PruneIntersectSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneJoinChildrenColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneJoinChildrenColumns.java index 328bc68fc86f..93a5e31f6463 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneJoinChildrenColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneJoinChildrenColumns.java @@ -14,17 +14,17 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.JoinNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.JoinNode; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.join; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.join; /** * Joins support output symbol selection, so make any project-off of child columns explicit in project nodes. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneJoinColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneJoinColumns.java index 9079fac6325d..f33dfd42fc17 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneJoinColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneJoinColumns.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; import java.util.Set; -import static io.prestosql.sql.planner.plan.Patterns.join; -import static io.prestosql.util.MoreLists.filteredCopy; +import static io.trino.sql.planner.plan.Patterns.join; +import static io.trino.util.MoreLists.filteredCopy; /** * Joins support output symbol selection, so absorb any project-off into the node. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneLimitColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneLimitColumns.java index 7df0962a8d61..6deabfdb516b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneLimitColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneLimitColumns.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.limit; public class PruneLimitColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneMarkDistinctColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneMarkDistinctColumns.java index 8262eefe0a35..0f344a5a285c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneMarkDistinctColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneMarkDistinctColumns.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.Streams; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.markDistinct; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.markDistinct; public class PruneMarkDistinctColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneOffsetColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneOffsetColumns.java index 718b96adae80..6acb368a37e4 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneOffsetColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneOffsetColumns.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.offset; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.offset; public class PruneOffsetColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneOrderByInAggregation.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneOrderByInAggregation.java index 99efef0c21df..89ca910ea212 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneOrderByInAggregation.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneOrderByInAggregation.java @@ -14,18 +14,18 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; import java.util.Map; import java.util.Optional; -import static io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.AggregationNode.Aggregation; +import static io.trino.sql.planner.plan.Patterns.aggregation; import static java.util.Objects.requireNonNull; public class PruneOrderByInAggregation diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneOutputSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneOutputSourceColumns.java index 462780dfbb93..be0f7bd7276c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneOutputSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneOutputSourceColumns.java @@ -14,13 +14,13 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.OutputNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.OutputNode; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.output; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.output; public class PruneOutputSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneProjectColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneProjectColumns.java index 6843182fa207..2cbf55fc9534 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneProjectColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneProjectColumns.java @@ -13,14 +13,14 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; import java.util.Optional; import java.util.Set; -import static io.prestosql.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.project; public class PruneProjectColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneRowNumberColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneRowNumberColumns.java index b88a9dd5a6b9..afd9db4fa976 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneRowNumberColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneRowNumberColumns.java @@ -14,17 +14,17 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.Streams; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.RowNumberNode; import java.util.Optional; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.rowNumber; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.rowNumber; public class PruneRowNumberColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSampleColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSampleColumns.java index 42ee5b16cb5c..d6eb5b1f6298 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSampleColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSampleColumns.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SampleNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SampleNode; import java.util.Optional; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.sample; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.sample; public class PruneSampleColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSemiJoinColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSemiJoinColumns.java index 300f727884a9..44dd7b45ca9a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSemiJoinColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSemiJoinColumns.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Streams; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SemiJoinNode; import java.util.Optional; import java.util.Set; import java.util.stream.Stream; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.plan.Patterns.semiJoin; +import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; +import static io.trino.sql.planner.plan.Patterns.semiJoin; public class PruneSemiJoinColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSemiJoinFilteringSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSemiJoinFilteringSourceColumns.java index c82e35abcffd..f3a279a89d9d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSemiJoinFilteringSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSemiJoinFilteringSourceColumns.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Streams; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.SemiJoinNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.SemiJoinNode; import java.util.Set; import java.util.stream.Stream; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.plan.Patterns.semiJoin; +import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; +import static io.trino.sql.planner.plan.Patterns.semiJoin; public class PruneSemiJoinFilteringSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSortColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSortColumns.java index f55da18a8193..e2be1ff549e0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSortColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSortColumns.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.Streams; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SortNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SortNode; import java.util.Optional; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.sort; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.sort; public class PruneSortColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSpatialJoinChildrenColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSpatialJoinChildrenColumns.java index a45a8031a8e9..cf59940059a2 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSpatialJoinChildrenColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSpatialJoinChildrenColumns.java @@ -14,17 +14,17 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.SpatialJoinNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.SpatialJoinNode; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.spatialJoin; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.spatialJoin; public class PruneSpatialJoinChildrenColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSpatialJoinColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSpatialJoinColumns.java index 6eb80b895515..e902c2df40f1 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSpatialJoinColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneSpatialJoinColumns.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SpatialJoinNode; import java.util.Optional; import java.util.Set; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.plan.Patterns.spatialJoin; +import static io.trino.sql.planner.plan.Patterns.spatialJoin; /** * Spatial joins support output symbol selection, so absorb any project-off into the node. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTableScanColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTableScanColumns.java index 28d51747a752..2b964f630c00 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTableScanColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTableScanColumns.java @@ -14,18 +14,18 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.Assignment; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Variable; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.Assignment; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Variable; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; import java.util.List; import java.util.Map; @@ -35,8 +35,8 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; -import static io.prestosql.util.MoreLists.filteredCopy; +import static io.trino.sql.planner.plan.Patterns.tableScan; +import static io.trino.util.MoreLists.filteredCopy; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTableWriterSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTableWriterSourceColumns.java index f4807c7d31e8..47b4fd6299db 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTableWriterSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTableWriterSourceColumns.java @@ -14,17 +14,17 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.StatisticAggregations; -import io.prestosql.sql.planner.plan.TableWriterNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.StatisticAggregations; +import io.trino.sql.planner.plan.TableWriterNode; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.tableWriterNode; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.tableWriterNode; public class PruneTableWriterSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTopNColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTopNColumns.java index 6b19a352fb27..bb9b011c2675 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTopNColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTopNColumns.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.Streams; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TopNNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TopNNode; import java.util.Optional; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.topN; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.topN; public class PruneTopNColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTopNRowNumberColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTopNRowNumberColumns.java index 4322a2174335..1dd75901c47e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTopNRowNumberColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneTopNRowNumberColumns.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.Streams; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; import java.util.Optional; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.topNRowNumber; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.topNRowNumber; public class PruneTopNRowNumberColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnionColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnionColumns.java index 0649ec0491ee..96cfb6ab183a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnionColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnionColumns.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.UnionNode; import java.util.Map; import java.util.Optional; import java.util.Set; import static com.google.common.collect.ImmutableListMultimap.toImmutableListMultimap; -import static io.prestosql.sql.planner.plan.Patterns.union; +import static io.trino.sql.planner.plan.Patterns.union; /** * Transforms diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnionSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnionSourceColumns.java index b6e262326d99..3c1ae66a8813 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnionSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnionSourceColumns.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.UnionNode; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.union; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.union; public class PruneUnionSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnnestColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnnestColumns.java index 86d93f9a169a..8092132021be 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnnestColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnnestColumns.java @@ -14,17 +14,17 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.UnnestNode; import java.util.List; import java.util.Optional; import java.util.Set; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.plan.Patterns.unnest; +import static io.trino.sql.planner.plan.Patterns.unnest; /** * Absorb pruning projection into the node. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnnestSourceColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnnestSourceColumns.java index 30b807ecc3dd..24edd2bed028 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnnestSourceColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneUnnestSourceColumns.java @@ -14,14 +14,14 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.UnnestNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.UnnestNode; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictChildOutputs; -import static io.prestosql.sql.planner.plan.Patterns.unnest; +import static io.trino.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static io.trino.sql.planner.plan.Patterns.unnest; public class PruneUnnestSourceColumns implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneValuesColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneValuesColumns.java index 4412e8351aa7..85f6975ab0f5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneValuesColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneValuesColumns.java @@ -14,11 +14,11 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Row; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Row; import java.util.Arrays; import java.util.List; @@ -27,8 +27,8 @@ import java.util.stream.Collectors; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.plan.Patterns.values; -import static io.prestosql.util.MoreLists.filteredCopy; +import static io.trino.sql.planner.plan.Patterns.values; +import static io.trino.util.MoreLists.filteredCopy; public class PruneValuesColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneWindowColumns.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneWindowColumns.java index 10caeacc6fd9..9162aa66aee8 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneWindowColumns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PruneWindowColumns.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.WindowNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.WindowNode; import java.util.Map; import java.util.Optional; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.plan.Patterns.window; +import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; +import static io.trino.sql.planner.plan.Patterns.window; public class PruneWindowColumns extends ProjectOffPushDownRule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushAggregationIntoTableScan.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushAggregationIntoTableScan.java index 4283e558e900..ab53694766a8 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushAggregationIntoTableScan.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushAggregationIntoTableScan.java @@ -15,32 +15,32 @@ import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.AggregationApplicationResult; -import io.prestosql.spi.connector.Assignment; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.SortItem; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Variable; -import io.prestosql.sql.planner.ConnectorExpressionTranslator; -import io.prestosql.sql.planner.LiteralEncoder; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.AggregationApplicationResult; +import io.trino.spi.connector.Assignment; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.SortItem; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Variable; +import io.trino.sql.planner.ConnectorExpressionTranslator; +import io.trino.sql.planner.LiteralEncoder; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.HashMap; import java.util.List; @@ -52,12 +52,12 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.SystemSessionProperties.isAllowPushdownIntoConnectors; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.Aggregation.step; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; +import static io.trino.SystemSessionProperties.isAllowPushdownIntoConnectors; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.Aggregation.step; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.tableScan; public class PushAggregationIntoTableScan implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushAggregationThroughOuterJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushAggregationThroughOuterJoin.java index 1877fa14cd52..5a085a88f663 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushAggregationThroughOuterJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushAggregationThroughOuterJoin.java @@ -16,29 +16,29 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.SymbolMapper; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.Row; +import io.trino.Session; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.spi.type.Type; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.SymbolMapper; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.Row; import java.util.HashSet; import java.util.List; @@ -49,16 +49,16 @@ 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.prestosql.SystemSessionProperties.isPushAggregationThroughOuterJoin; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.optimizations.DistinctOutputQueryUtil.isDistinct; -import static io.prestosql.sql.planner.optimizations.SymbolMapper.symbolMapper; -import static io.prestosql.sql.planner.plan.AggregationNode.globalAggregation; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.join; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.SystemSessionProperties.isPushAggregationThroughOuterJoin; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.optimizations.DistinctOutputQueryUtil.isDistinct; +import static io.trino.sql.planner.optimizations.SymbolMapper.symbolMapper; +import static io.trino.sql.planner.plan.AggregationNode.globalAggregation; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.join; +import static io.trino.sql.planner.plan.Patterns.source; /** * This optimizer pushes aggregations below outer joins when: the aggregation diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDeleteIntoConnector.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDeleteIntoConnector.java index ccb0b67e2765..74f721bc3eb5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDeleteIntoConnector.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDeleteIntoConnector.java @@ -13,21 +13,21 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.TableDeleteNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.TableDeleteNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.delete; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.tableFinish; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.delete; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.tableFinish; +import static io.trino.sql.planner.plan.Patterns.tableScan; import static java.util.Objects.requireNonNull; public class PushDeleteIntoConnector diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDistinctLimitIntoTableScan.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDistinctLimitIntoTableScan.java index 1a9c4dac998f..e6ddda41d050 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDistinctLimitIntoTableScan.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDistinctLimitIntoTableScan.java @@ -14,26 +14,26 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.isAllowPushdownIntoConnectors; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.iterative.rule.PushAggregationIntoTableScan.pushAggregationIntoTableScan; -import static io.prestosql.sql.planner.plan.Patterns.DistinctLimit.isPartial; -import static io.prestosql.sql.planner.plan.Patterns.distinctLimit; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; +import static io.trino.SystemSessionProperties.isAllowPushdownIntoConnectors; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.iterative.rule.PushAggregationIntoTableScan.pushAggregationIntoTableScan; +import static io.trino.sql.planner.plan.Patterns.DistinctLimit.isPartial; +import static io.trino.sql.planner.plan.Patterns.distinctLimit; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.tableScan; import static java.util.Objects.requireNonNull; public class PushDistinctLimitIntoTableScan diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughFilter.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughFilter.java index 196ec67d0994..3836b1f244f5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughFilter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughFilter.java @@ -15,30 +15,30 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Map; import java.util.Set; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.plan.Patterns.filter; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.plan.Patterns.filter; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughJoin.java index 5fa0301df0b3..33a17721bdb8 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughJoin.java @@ -16,20 +16,20 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Map; @@ -38,14 +38,14 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.SymbolsExtractor.extractAll; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.getBase; -import static io.prestosql.sql.planner.plan.Patterns.join; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.SymbolsExtractor.extractAll; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.getBase; +import static io.trino.sql.planner.plan.Patterns.join; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughProject.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughProject.java index 149c8f1aa48d..dcd06ca66568 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughProject.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughProject.java @@ -14,28 +14,28 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.HashBiMap; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.getBase; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.getBase; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughSemiJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughSemiJoin.java index 0f8930d4bc9a..724e6f5b7ebd 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughSemiJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughSemiJoin.java @@ -15,31 +15,31 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.getBase; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.semiJoin; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.getBase; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.semiJoin; +import static io.trino.sql.planner.plan.Patterns.source; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughUnnest.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughUnnest.java index 080394e590a6..d9f788eeef24 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughUnnest.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferenceThroughUnnest.java @@ -15,31 +15,31 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.getBase; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.unnest; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.getBase; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.unnest; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughAssignUniqueId.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughAssignUniqueId.java index c415f47a0c3c..0202abbe548e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughAssignUniqueId.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughAssignUniqueId.java @@ -15,28 +15,28 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.plan.Patterns.assignUniqueId; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.plan.Patterns.assignUniqueId; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughLimit.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughLimit.java index 08212fa9048b..a95eccc9523d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughLimit.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughLimit.java @@ -15,30 +15,30 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.getBase; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.getBase; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughMarkDistinct.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughMarkDistinct.java index c4f2b7deba7f..7b552dc98c79 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughMarkDistinct.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughMarkDistinct.java @@ -15,30 +15,30 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.getBase; -import static io.prestosql.sql.planner.plan.Patterns.markDistinct; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.getBase; +import static io.trino.sql.planner.plan.Patterns.markDistinct; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughRowNumber.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughRowNumber.java index 2360a5c6c5a5..3c3e953ae160 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughRowNumber.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughRowNumber.java @@ -15,30 +15,30 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.getBase; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.rowNumber; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.getBase; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.rowNumber; +import static io.trino.sql.planner.plan.Patterns.source; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughSort.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughSort.java index 4947eee87ec2..dc20888c431f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughSort.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughSort.java @@ -15,30 +15,30 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.getBase; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.sort; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.getBase; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.sort; +import static io.trino.sql.planner.plan.Patterns.source; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughTopN.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughTopN.java index ac627b3f680f..98bedf492c28 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughTopN.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughTopN.java @@ -15,30 +15,30 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.getBase; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.topN; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.getBase; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.topN; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughTopNRowNumber.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughTopNRowNumber.java index 1379f6ca509a..c29aee7a2b21 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughTopNRowNumber.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughTopNRowNumber.java @@ -15,33 +15,33 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.getBase; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.topNRowNumber; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.getBase; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.topNRowNumber; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughWindow.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughWindow.java index 13a8fa274954..db75eea61bcd 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughWindow.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownDereferencesThroughWindow.java @@ -15,19 +15,19 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; @@ -35,13 +35,13 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.getBase; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.window; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.getBase; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.window; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownNegationsExpressionRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownNegationsExpressionRewriter.java index b0c0f13301df..5de9ead16a47 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownNegationsExpressionRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushDownNegationsExpressionRewriter.java @@ -14,31 +14,31 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.ComparisonExpression.Operator; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NotExpression; +import io.trino.metadata.Metadata; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.Type; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.ComparisonExpression.Operator; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NotExpression; import java.util.List; import java.util.Map; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.ExpressionUtils.combinePredicates; -import static io.prestosql.sql.ExpressionUtils.extractPredicates; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.IS_DISTINCT_FROM; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.sql.ExpressionUtils.combinePredicates; +import static io.trino.sql.ExpressionUtils.extractPredicates; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.IS_DISTINCT_FROM; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; import static java.util.Objects.requireNonNull; public final class PushDownNegationsExpressionRewriter diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitIntoTableScan.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitIntoTableScan.java index 0021de049ab1..a2305b6ad54f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitIntoTableScan.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitIntoTableScan.java @@ -13,21 +13,21 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.Session; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; -import static io.prestosql.SystemSessionProperties.isAllowPushdownIntoConnectors; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; +import static io.trino.SystemSessionProperties.isAllowPushdownIntoConnectors; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.tableScan; public class PushLimitIntoTableScan implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughMarkDistinct.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughMarkDistinct.java index 81817ba9edfc..63014c5bdc4b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughMarkDistinct.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughMarkDistinct.java @@ -13,18 +13,18 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.iterative.rule.Util.transpose; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.markDistinct; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.iterative.rule.Util.transpose; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.markDistinct; +import static io.trino.sql.planner.plan.Patterns.source; public class PushLimitThroughMarkDistinct implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughOffset.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughOffset.java index 425a2380feb4..0fa1550065d0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughOffset.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughOffset.java @@ -14,17 +14,17 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.OffsetNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.OffsetNode; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.offset; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.offset; +import static io.trino.sql.planner.plan.Patterns.source; import static java.lang.Math.addExact; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughOuterJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughOuterJoin.java index 07302977e684..6832fb8013ee 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughOuterJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughOuterJoin.java @@ -14,22 +14,22 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; -import static io.prestosql.sql.planner.plan.Patterns.Join.type; -import static io.prestosql.sql.planner.plan.Patterns.join; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.sql.planner.plan.Patterns.Join.type; +import static io.trino.sql.planner.plan.Patterns.join; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.source; /** * Transforms: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughProject.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughProject.java index 07d702168c5a..c4b9345a6c14 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughProject.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughProject.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.SymbolMapper; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.SymbolMapper; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.Set; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.exclusiveDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.iterative.rule.Util.transpose; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.exclusiveDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.iterative.rule.Util.transpose; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; public class PushLimitThroughProject implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughSemiJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughSemiJoin.java index 2097eb09af4f..c5d3bd9311c4 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughSemiJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughSemiJoin.java @@ -13,18 +13,18 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.SemiJoinNode; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.iterative.rule.Util.transpose; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.semiJoin; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.iterative.rule.Util.transpose; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.semiJoin; +import static io.trino.sql.planner.plan.Patterns.source; public class PushLimitThroughSemiJoin implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughUnion.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughUnion.java index 545913af155a..08b02ca406d4 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughUnion.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushLimitThroughUnion.java @@ -14,19 +14,19 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.UnionNode; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; -import static io.prestosql.sql.planner.plan.Patterns.limit; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.union; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; +import static io.trino.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.union; /** * Transforms: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushOffsetThroughProject.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushOffsetThroughProject.java index d4aafeedd638..b7f5f6d7f7d0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushOffsetThroughProject.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushOffsetThroughProject.java @@ -13,18 +13,18 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.ProjectNode; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.iterative.rule.Util.transpose; -import static io.prestosql.sql.planner.plan.Patterns.offset; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.iterative.rule.Util.transpose; +import static io.trino.sql.planner.plan.Patterns.offset; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; /** * Transforms: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPartialAggregationThroughExchange.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPartialAggregationThroughExchange.java index c26c25c728dd..e85b1573cd4f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPartialAggregationThroughExchange.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPartialAggregationThroughExchange.java @@ -14,25 +14,25 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.AggregationFunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.SymbolMapper; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.LambdaExpression; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.AggregationFunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.SymbolMapper; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.LambdaExpression; import java.util.ArrayList; import java.util.Collections; @@ -45,15 +45,15 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.SystemSessionProperties.preferPartialAggregation; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.FINAL; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.exchange; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.SystemSessionProperties.preferPartialAggregation; +import static io.trino.sql.planner.plan.AggregationNode.Step.FINAL; +import static io.trino.sql.planner.plan.AggregationNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.exchange; +import static io.trino.sql.planner.plan.Patterns.source; import static java.util.Objects.requireNonNull; public class PushPartialAggregationThroughExchange diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPartialAggregationThroughJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPartialAggregationThroughJoin.java index 8c27ac14f9b5..2caf6573f161 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPartialAggregationThroughJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPartialAggregationThroughJoin.java @@ -16,17 +16,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Streams; -import io.prestosql.Session; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.HashSet; import java.util.List; @@ -36,13 +36,13 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Sets.intersection; -import static io.prestosql.SystemSessionProperties.isPushPartialAggregationThroughJoin; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.join; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.SystemSessionProperties.isPushPartialAggregationThroughJoin; +import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; +import static io.trino.sql.planner.plan.AggregationNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.join; +import static io.trino.sql.planner.plan.Patterns.source; public class PushPartialAggregationThroughJoin implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPredicateIntoTableScan.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPredicateIntoTableScan.java index fe7814a60891..363e013fa849 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPredicateIntoTableScan.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPredicateIntoTableScan.java @@ -15,35 +15,35 @@ import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.metadata.TableLayoutResult; -import io.prestosql.operator.scalar.TryFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.DomainTranslator; -import io.prestosql.sql.planner.ExpressionInterpreter; -import io.prestosql.sql.planner.LookupSymbolResolver; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NullLiteral; +import io.trino.Session; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.metadata.TableLayoutResult; +import io.trino.operator.scalar.TryFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.DomainTranslator; +import io.trino.sql.planner.ExpressionInterpreter; +import io.trino.sql.planner.LookupSymbolResolver; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NullLiteral; import java.util.Map; import java.util.Objects; @@ -52,16 +52,16 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Sets.intersection; -import static io.prestosql.SystemSessionProperties.isAllowPushdownIntoConnectors; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.metadata.TableLayoutResult.computeEnforced; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.ExpressionUtils.filterDeterministicConjuncts; -import static io.prestosql.sql.ExpressionUtils.filterNonDeterministicConjuncts; -import static io.prestosql.sql.planner.plan.Patterns.filter; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.SystemSessionProperties.isAllowPushdownIntoConnectors; +import static io.trino.matching.Capture.newCapture; +import static io.trino.metadata.TableLayoutResult.computeEnforced; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.ExpressionUtils.filterDeterministicConjuncts; +import static io.trino.sql.ExpressionUtils.filterNonDeterministicConjuncts; +import static io.trino.sql.planner.plan.Patterns.filter; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.tableScan; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPredicateThroughProjectIntoRowNumber.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPredicateThroughProjectIntoRowNumber.java index 421c24079852..838d3fce66f7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPredicateThroughProjectIntoRowNumber.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPredicateThroughProjectIntoRowNumber.java @@ -14,38 +14,38 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.ExpressionUtils; -import io.prestosql.sql.planner.DomainTranslator; -import io.prestosql.sql.planner.DomainTranslator.ExtractionResult; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Expression; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.ExpressionUtils; +import io.trino.sql.planner.DomainTranslator; +import io.trino.sql.planner.DomainTranslator.ExtractionResult; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Expression; import java.util.Optional; import java.util.OptionalInt; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.spi.predicate.Marker.Bound.BELOW; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.sql.planner.DomainTranslator.fromPredicate; -import static io.prestosql.sql.planner.plan.Patterns.filter; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.rowNumber; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.matching.Capture.newCapture; +import static io.trino.spi.predicate.Marker.Bound.BELOW; +import static io.trino.spi.predicate.Range.range; +import static io.trino.sql.planner.DomainTranslator.fromPredicate; +import static io.trino.sql.planner.plan.Patterns.filter; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.rowNumber; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPredicateThroughProjectIntoWindow.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPredicateThroughProjectIntoWindow.java index 20eeb94742be..8fa939fc9569 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPredicateThroughProjectIntoWindow.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushPredicateThroughProjectIntoWindow.java @@ -14,43 +14,43 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.FunctionId; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.ExpressionUtils; -import io.prestosql.sql.planner.DomainTranslator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.Session; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.FunctionId; +import io.trino.metadata.Metadata; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.ExpressionUtils; +import io.trino.sql.planner.DomainTranslator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.QualifiedName; import java.util.Optional; import java.util.OptionalInt; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.SystemSessionProperties.isOptimizeTopNRowNumber; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.spi.predicate.Marker.Bound.BELOW; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.sql.planner.DomainTranslator.fromPredicate; -import static io.prestosql.sql.planner.plan.Patterns.filter; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.window; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.SystemSessionProperties.isOptimizeTopNRowNumber; +import static io.trino.matching.Capture.newCapture; +import static io.trino.spi.predicate.Marker.Bound.BELOW; +import static io.trino.spi.predicate.Range.range; +import static io.trino.sql.planner.DomainTranslator.fromPredicate; +import static io.trino.sql.planner.plan.Patterns.filter; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.window; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionIntoTableScan.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionIntoTableScan.java index 4f9f99254398..6eacca9de54b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionIntoTableScan.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionIntoTableScan.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.Assignment; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.sql.planner.ConnectorExpressionTranslator; -import io.prestosql.sql.planner.LiteralEncoder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NodeRef; +import io.trino.Session; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.Assignment; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.sql.planner.ConnectorExpressionTranslator; +import io.trino.sql.planner.LiteralEncoder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NodeRef; import java.util.ArrayList; import java.util.HashMap; @@ -45,13 +45,13 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.SystemSessionProperties.isAllowPushdownIntoConnectors; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.PartialTranslator.extractPartialTranslations; -import static io.prestosql.sql.planner.ReferenceAwareExpressionNodeInliner.replaceExpression; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; +import static io.trino.SystemSessionProperties.isAllowPushdownIntoConnectors; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.PartialTranslator.extractPartialTranslations; +import static io.trino.sql.planner.ReferenceAwareExpressionNodeInliner.replaceExpression; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.tableScan; public class PushProjectionIntoTableScan implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionThroughExchange.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionThroughExchange.java index 12612cbaef34..d45d11cc4b20 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionThroughExchange.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionThroughExchange.java @@ -16,31 +16,31 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.spi.type.Type; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionSymbolInliner.inlineSymbols; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.plan.Patterns.exchange; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionSymbolInliner.inlineSymbols; +import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; +import static io.trino.sql.planner.plan.Patterns.exchange; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; /** * Transforms: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionThroughJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionThroughJoin.java index 86acc2b29d94..854a0b21a8da 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionThroughJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionThroughJoin.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Streams; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; import java.util.List; import java.util.Map; @@ -34,9 +34,9 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.DeterminismEvaluator.isDeterministic; -import static io.prestosql.sql.planner.SymbolsExtractor.extractUnique; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.DeterminismEvaluator.isDeterministic; +import static io.trino.sql.planner.SymbolsExtractor.extractUnique; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; /** * Utility class for pushing projections through inner join so that joins are not separated diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionThroughUnion.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionThroughUnion.java index f369d9ce06f6..1d8530df1228 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionThroughUnion.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushProjectionThroughUnion.java @@ -15,28 +15,28 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.HashMap; import java.util.List; import java.util.Map; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.ExpressionSymbolInliner.inlineSymbols; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.union; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.ExpressionSymbolInliner.inlineSymbols; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.union; public class PushProjectionThroughUnion implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushRemoteExchangeThroughAssignUniqueId.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushRemoteExchangeThroughAssignUniqueId.java index 537af333656b..64eb1a387672 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushRemoteExchangeThroughAssignUniqueId.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushRemoteExchangeThroughAssignUniqueId.java @@ -14,14 +14,14 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.ExchangeNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.ExchangeNode; import java.util.List; import java.util.Optional; @@ -29,12 +29,12 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPLICATE; -import static io.prestosql.sql.planner.plan.Patterns.assignUniqueId; -import static io.prestosql.sql.planner.plan.Patterns.exchange; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPLICATE; +import static io.trino.sql.planner.plan.Patterns.assignUniqueId; +import static io.trino.sql.planner.plan.Patterns.exchange; +import static io.trino.sql.planner.plan.Patterns.source; /** * Pushes RemoteExchange node down through the AssignUniqueId to preserve diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushSampleIntoTableScan.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushSampleIntoTableScan.java index 94494ea8742f..5d228cf59344 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushSampleIntoTableScan.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushSampleIntoTableScan.java @@ -13,24 +13,24 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.Session; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.SampleType; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.SampleNode.Type; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.SampleType; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.SampleNode.Type; +import io.trino.sql.planner.plan.TableScanNode; -import static io.prestosql.SystemSessionProperties.isAllowPushdownIntoConnectors; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.Sample.sampleType; -import static io.prestosql.sql.planner.plan.Patterns.sample; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; -import static io.prestosql.sql.planner.plan.SampleNode.Type.SYSTEM; +import static io.trino.SystemSessionProperties.isAllowPushdownIntoConnectors; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.Sample.sampleType; +import static io.trino.sql.planner.plan.Patterns.sample; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.tableScan; +import static io.trino.sql.planner.plan.SampleNode.Type.SYSTEM; public class PushSampleIntoTableScan implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTableWriteThroughUnion.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTableWriteThroughUnion.java index c5ce8475b6f7..406a86d7d538 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTableWriteThroughUnion.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTableWriteThroughUnion.java @@ -16,28 +16,28 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.SymbolMapper; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.Session; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.SymbolMapper; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.UnionNode; import java.util.ArrayList; import java.util.List; import java.util.Map; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.SystemSessionProperties.isPushTableWriteThroughUnion; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.optimizations.SymbolMapper.symbolMapper; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.tableWriterNode; -import static io.prestosql.sql.planner.plan.Patterns.union; +import static io.trino.SystemSessionProperties.isPushTableWriteThroughUnion; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.optimizations.SymbolMapper.symbolMapper; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.tableWriterNode; +import static io.trino.sql.planner.plan.Patterns.union; public class PushTableWriteThroughUnion implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNIntoTableScan.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNIntoTableScan.java index 83c0c41ac087..83a054682b93 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNIntoTableScan.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNIntoTableScan.java @@ -13,25 +13,25 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.SortItem; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TopNNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.SortItem; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TopNNode; import java.util.List; import java.util.Map; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; -import static io.prestosql.sql.planner.plan.Patterns.topN; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.tableScan; +import static io.trino.sql.planner.plan.Patterns.topN; public class PushTopNIntoTableScan implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNThroughOuterJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNThroughOuterJoin.java index 759943020c85..bf4f03b6434a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNThroughOuterJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNThroughOuterJoin.java @@ -15,27 +15,27 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TopNNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TopNNode; import java.util.List; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; -import static io.prestosql.sql.planner.plan.Patterns.Join.type; -import static io.prestosql.sql.planner.plan.Patterns.TopN.step; -import static io.prestosql.sql.planner.plan.Patterns.join; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.topN; -import static io.prestosql.sql.planner.plan.TopNNode.Step.PARTIAL; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.sql.planner.plan.Patterns.Join.type; +import static io.trino.sql.planner.plan.Patterns.TopN.step; +import static io.trino.sql.planner.plan.Patterns.join; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.topN; +import static io.trino.sql.planner.plan.TopNNode.Step.PARTIAL; /** * Transforms: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNThroughProject.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNThroughProject.java index 4e7c55b01952..310782a9320c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNThroughProject.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNThroughProject.java @@ -15,31 +15,31 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.SymbolMapper; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.SymbolMapper; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Optional; import java.util.Set; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.exclusiveDereferences; -import static io.prestosql.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.topN; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.exclusiveDereferences; +import static io.trino.sql.planner.iterative.rule.DereferencePushdown.extractDereferences; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.topN; /** * Transforms: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNThroughUnion.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNThroughUnion.java index 865c451afa81..3cee564f248c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNThroughUnion.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNThroughUnion.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.SymbolMapper; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.SymbolMapper; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.UnionNode; import java.util.Set; import static com.google.common.collect.Iterables.getLast; import static com.google.common.collect.Sets.intersection; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.TopN.step; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.topN; -import static io.prestosql.sql.planner.plan.Patterns.union; -import static io.prestosql.sql.planner.plan.TopNNode.Step.PARTIAL; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.TopN.step; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.topN; +import static io.trino.sql.planner.plan.Patterns.union; +import static io.trino.sql.planner.plan.TopNNode.Step.PARTIAL; public class PushTopNThroughUnion implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveAggregationInSemiJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveAggregationInSemiJoin.java index 1e1a1125eae4..8b801c96535c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveAggregationInSemiJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveAggregationInSemiJoin.java @@ -14,18 +14,18 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.SemiJoinNode; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.SemiJoin.getFilteringSource; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.semiJoin; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.SemiJoin.getFilteringSource; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.semiJoin; /** * Remove the aggregation node that produces distinct rows from the Filtering source of a Semi join. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveDuplicateConditions.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveDuplicateConditions.java index a48c9f0d5a39..1661c00a2ad1 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveDuplicateConditions.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveDuplicateConditions.java @@ -13,13 +13,13 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.LogicalBinaryExpression; +import io.trino.metadata.Metadata; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.LogicalBinaryExpression; -import static io.prestosql.sql.ExpressionUtils.combinePredicates; -import static io.prestosql.sql.ExpressionUtils.extractPredicates; +import static io.trino.sql.ExpressionUtils.combinePredicates; +import static io.trino.sql.ExpressionUtils.extractPredicates; /** * Flattens and removes duplicate conjuncts or disjuncts. E.g., diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveEmptyDelete.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveEmptyDelete.java index 5ba1f603f97b..3058aad9df6a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveEmptyDelete.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveEmptyDelete.java @@ -14,20 +14,20 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.Row; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.Row; -import static io.prestosql.sql.planner.plan.Patterns.Values.rowCount; -import static io.prestosql.sql.planner.plan.Patterns.delete; -import static io.prestosql.sql.planner.plan.Patterns.exchange; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.tableFinish; -import static io.prestosql.sql.planner.plan.Patterns.values; +import static io.trino.sql.planner.plan.Patterns.Values.rowCount; +import static io.trino.sql.planner.plan.Patterns.delete; +import static io.trino.sql.planner.plan.Patterns.exchange; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.tableFinish; +import static io.trino.sql.planner.plan.Patterns.values; /** * If the predicate for a delete is optimized to false, the target table scan diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveFullSample.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveFullSample.java index dce385568d58..440a9dfb07ab 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveFullSample.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveFullSample.java @@ -13,13 +13,13 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.SampleNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.SampleNode; -import static io.prestosql.sql.planner.plan.Patterns.Sample.sampleRatio; -import static io.prestosql.sql.planner.plan.Patterns.sample; +import static io.trino.sql.planner.plan.Patterns.Sample.sampleRatio; +import static io.trino.sql.planner.plan.Patterns.sample; /** * Removes 100% sample nodes. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantCrossJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantCrossJoin.java index cb38377114e9..4e91961151e9 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantCrossJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantCrossJoin.java @@ -13,13 +13,13 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.JoinNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.JoinNode; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isScalar; -import static io.prestosql.sql.planner.plan.Patterns.join; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isScalar; +import static io.trino.sql.planner.plan.Patterns.join; public class RemoveRedundantCrossJoin implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantDistinctLimit.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantDistinctLimit.java index 929b57d69e40..4c7cd3c75d20 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantDistinctLimit.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantDistinctLimit.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.ValuesNode; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isScalar; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.Patterns.distinctLimit; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isScalar; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.Patterns.distinctLimit; /** * Replace DistinctLimit node diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantEnforceSingleRowNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantEnforceSingleRowNode.java index a3f2eaa65c95..c0feec540498 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantEnforceSingleRowNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantEnforceSingleRowNode.java @@ -13,13 +13,13 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.EnforceSingleRowNode; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isScalar; -import static io.prestosql.sql.planner.plan.Patterns.enforceSingleRow; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isScalar; +import static io.trino.sql.planner.plan.Patterns.enforceSingleRow; public class RemoveRedundantEnforceSingleRowNode implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantExists.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantExists.java index be9880082c85..05ede3cd25fd 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantExists.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantExists.java @@ -13,20 +13,20 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.QueryCardinalityUtil; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.Expression; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.QueryCardinalityUtil; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.Expression; -import static io.prestosql.sql.planner.plan.Patterns.applyNode; -import static io.prestosql.sql.tree.BooleanLiteral.FALSE_LITERAL; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.planner.plan.Patterns.applyNode; +import static io.trino.sql.tree.BooleanLiteral.FALSE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; /** * Given: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantIdentityProjections.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantIdentityProjections.java index 476cdcc69bd8..0aeb6d7d9d53 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantIdentityProjections.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantIdentityProjections.java @@ -14,12 +14,12 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.ProjectNode; -import static io.prestosql.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.project; /** * Removes projection nodes that only perform non-renaming identity projections diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantJoin.java index 83a9ce68c5df..e09863115f49 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantJoin.java @@ -14,18 +14,18 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.JoinNode.Type; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode.Type; +import io.trino.sql.planner.plan.ValuesNode; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; -import static io.prestosql.sql.planner.plan.Patterns.join; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.sql.planner.plan.Patterns.join; public class RemoveRedundantJoin implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantLimit.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantLimit.java index c353f4688c6b..b159e541907d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantLimit.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantLimit.java @@ -14,14 +14,14 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.ValuesNode; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; -import static io.prestosql.sql.planner.plan.Patterns.limit; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; +import static io.trino.sql.planner.plan.Patterns.limit; /** * Remove Limit node when the subplan is guaranteed to produce fewer rows than the limit and diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantOffset.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantOffset.java index f96a691f6649..acb904e96edc 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantOffset.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantOffset.java @@ -14,14 +14,14 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.ValuesNode; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; -import static io.prestosql.sql.planner.plan.Patterns.offset; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; +import static io.trino.sql.planner.plan.Patterns.offset; /** * Remove Offset node and its subplan when the subplan is guaranteed to produce no more rows than the offset diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantSort.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantSort.java index 9c211c762e00..7a7454c6f810 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantSort.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantSort.java @@ -14,15 +14,15 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.ValuesNode; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isScalar; -import static io.prestosql.sql.planner.plan.Patterns.sort; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isScalar; +import static io.trino.sql.planner.plan.Patterns.sort; public class RemoveRedundantSort implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantTableScanPredicate.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantTableScanPredicate.java index cd97aa25ea47..136196f619a6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantTableScanPredicate.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantTableScanPredicate.java @@ -16,38 +16,38 @@ import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.DomainTranslator; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Expression; +import io.trino.Session; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.DomainTranslator; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Expression; import java.util.Map; import java.util.Objects; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.ExpressionUtils.filterDeterministicConjuncts; -import static io.prestosql.sql.ExpressionUtils.filterNonDeterministicConjuncts; -import static io.prestosql.sql.planner.iterative.rule.PushPredicateIntoTableScan.createResultingPredicate; -import static io.prestosql.sql.planner.plan.Patterns.filter; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.ExpressionUtils.filterDeterministicConjuncts; +import static io.trino.sql.ExpressionUtils.filterNonDeterministicConjuncts; +import static io.trino.sql.planner.iterative.rule.PushPredicateIntoTableScan.createResultingPredicate; +import static io.trino.sql.planner.plan.Patterns.filter; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.planner.plan.Patterns.tableScan; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; public class RemoveRedundantTableScanPredicate diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantTopN.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantTopN.java index 7a2bad272799..92196fb00397 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantTopN.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveRedundantTopN.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.ValuesNode; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isScalar; -import static io.prestosql.sql.planner.plan.Patterns.topN; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMost; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isScalar; +import static io.trino.sql.planner.plan.Patterns.topN; /** * Replace TopN node diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveTrivialFilters.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveTrivialFilters.java index db63e96bc6f1..51963a6c5cd7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveTrivialFilters.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveTrivialFilters.java @@ -13,16 +13,16 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Expression; - -import static io.prestosql.sql.planner.plan.Patterns.filter; -import static io.prestosql.sql.tree.BooleanLiteral.FALSE_LITERAL; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Expression; + +import static io.trino.sql.planner.plan.Patterns.filter; +import static io.trino.sql.tree.BooleanLiteral.FALSE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Collections.emptyList; public class RemoveTrivialFilters diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveUnreferencedScalarApplyNodes.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveUnreferencedScalarApplyNodes.java index f2f0dcf129f2..1ea839d18893 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveUnreferencedScalarApplyNodes.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveUnreferencedScalarApplyNodes.java @@ -14,12 +14,12 @@ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.ApplyNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.ApplyNode; -import static io.prestosql.sql.planner.plan.Patterns.applyNode; +import static io.trino.sql.planner.plan.Patterns.applyNode; public class RemoveUnreferencedScalarApplyNodes implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveUnreferencedScalarSubqueries.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveUnreferencedScalarSubqueries.java index e77ad6af009f..6d0725ff4005 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveUnreferencedScalarSubqueries.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveUnreferencedScalarSubqueries.java @@ -13,20 +13,20 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.PlanNode; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtLeastScalar; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isScalar; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.filter; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtLeastScalar; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isScalar; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.filter; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; public class RemoveUnreferencedScalarSubqueries implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveUnsupportedDynamicFilters.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveUnsupportedDynamicFilters.java index 42de7ab6dcf5..af8e3e149669 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveUnsupportedDynamicFilters.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RemoveUnsupportedDynamicFilters.java @@ -15,35 +15,35 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.OperatorNotFoundException; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.type.TypeCoercion; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.OperatorNotFoundException; +import io.trino.spi.type.Type; +import io.trino.sql.DynamicFilters; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.SymbolReference; +import io.trino.type.TypeCoercion; import java.util.HashSet; import java.util.List; @@ -54,15 +54,15 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.spi.function.OperatorType.SATURATED_FLOOR_CAST; -import static io.prestosql.sql.DynamicFilters.extractDynamicFilters; -import static io.prestosql.sql.DynamicFilters.getDescriptor; -import static io.prestosql.sql.DynamicFilters.isDynamicFilter; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.ExpressionUtils.combinePredicates; -import static io.prestosql.sql.ExpressionUtils.extractConjuncts; -import static io.prestosql.sql.planner.plan.ChildReplacer.replaceChildren; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.spi.function.OperatorType.SATURATED_FLOOR_CAST; +import static io.trino.sql.DynamicFilters.extractDynamicFilters; +import static io.trino.sql.DynamicFilters.getDescriptor; +import static io.trino.sql.DynamicFilters.isDynamicFilter; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.ExpressionUtils.combinePredicates; +import static io.trino.sql.ExpressionUtils.extractConjuncts; +import static io.trino.sql.planner.plan.ChildReplacer.replaceChildren; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; 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 c47df7a831d5..6d7b4f0046d2 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,32 +22,32 @@ import com.google.common.collect.Ordering; import com.google.common.collect.Sets; import io.airlift.log.Logger; -import io.prestosql.Session; -import io.prestosql.cost.CostComparator; -import io.prestosql.cost.CostProvider; -import io.prestosql.cost.PlanCostEstimate; -import io.prestosql.cost.PlanNodeStatsAndCostSummary; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.cost.StatsProvider; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.planner.EqualityInference; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.JoinNode.DistributionType; -import io.prestosql.sql.planner.plan.JoinNode.EquiJoinClause; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.cost.CostComparator; +import io.trino.cost.CostProvider; +import io.trino.cost.PlanCostEstimate; +import io.trino.cost.PlanNodeStatsAndCostSummary; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.cost.StatsProvider; +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; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode.DistributionType; +import io.trino.sql.planner.plan.JoinNode.EquiJoinClause; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.ArrayList; import java.util.HashMap; @@ -67,27 +67,27 @@ 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.prestosql.SystemSessionProperties.getJoinDistributionType; -import static io.prestosql.SystemSessionProperties.getJoinReorderingStrategy; -import static io.prestosql.SystemSessionProperties.getMaxReorderedJoins; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.ExpressionUtils.extractConjuncts; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.AUTOMATIC; -import static io.prestosql.sql.planner.DeterminismEvaluator.isDeterministic; -import static io.prestosql.sql.planner.EqualityInference.nonInferrableConjuncts; -import static io.prestosql.sql.planner.iterative.rule.DetermineJoinDistributionType.canReplicate; -import static io.prestosql.sql.planner.iterative.rule.PushProjectionThroughJoin.pushProjectionThroughJoin; -import static io.prestosql.sql.planner.iterative.rule.ReorderJoins.JoinEnumerationResult.INFINITE_COST_RESULT; -import static io.prestosql.sql.planner.iterative.rule.ReorderJoins.JoinEnumerationResult.UNKNOWN_COST_RESULT; -import static io.prestosql.sql.planner.iterative.rule.ReorderJoins.MultiJoinNode.toMultiJoinNode; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMostScalar; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.PARTITIONED; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.REPLICATED; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.Patterns.join; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; +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; +import static io.trino.sql.planner.iterative.rule.PushProjectionThroughJoin.pushProjectionThroughJoin; +import static io.trino.sql.planner.iterative.rule.ReorderJoins.JoinEnumerationResult.INFINITE_COST_RESULT; +import static io.trino.sql.planner.iterative.rule.ReorderJoins.JoinEnumerationResult.UNKNOWN_COST_RESULT; +import static io.trino.sql.planner.iterative.rule.ReorderJoins.MultiJoinNode.toMultiJoinNode; +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; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.Patterns.join; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toCollection; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RewriteSpatialPartitioningAggregation.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RewriteSpatialPartitioningAggregation.java index 8fcf1185434b..67b529384d76 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RewriteSpatialPartitioningAggregation.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/RewriteSpatialPartitioningAggregation.java @@ -15,31 +15,31 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.QualifiedName; import java.util.Map; import java.util.Optional; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.SystemSessionProperties.getHashPartitionCount; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypeSignatures; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; +import static io.trino.SystemSessionProperties.getHashPartitionCount; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypeSignatures; +import static io.trino.sql.planner.plan.Patterns.aggregation; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SetOperationMerge.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SetOperationMerge.java index 50ec0813a5bf..9e64003afee7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SetOperationMerge.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SetOperationMerge.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.iterative.Rule.Context; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SetOperationNode; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.iterative.Rule.Context; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SetOperationNode; +import io.trino.sql.planner.plan.UnionNode; import java.util.ArrayList; import java.util.Collection; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SetOperationNodeTranslator.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SetOperationNodeTranslator.java index e6f74567db3f..b5cf2d46d725 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SetOperationNodeTranslator.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SetOperationNodeTranslator.java @@ -17,25 +17,25 @@ import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SetOperationNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.planner.plan.WindowNode.Specification; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.Type; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SetOperationNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.planner.plan.WindowNode.Specification; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Map; @@ -44,15 +44,15 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Iterables.concat; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_FOLLOWING; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; -import static io.prestosql.sql.tree.WindowFrame.Type.ROWS; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_FOLLOWING; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; +import static io.trino.sql.tree.WindowFrame.Type.ROWS; import static java.util.Objects.requireNonNull; public class SetOperationNodeTranslator diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SimplifyCountOverConstant.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SimplifyCountOverConstant.java index 200dc98af760..20a4edaf823b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SimplifyCountOverConstant.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SimplifyCountOverConstant.java @@ -14,32 +14,32 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Literal; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Literal; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Optional; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; public class SimplifyCountOverConstant implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SimplifyExpressions.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SimplifyExpressions.java index fc512c04b90c..2fe62c1e4e56 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SimplifyExpressions.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SimplifyExpressions.java @@ -15,24 +15,24 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.ExpressionInterpreter; -import io.prestosql.sql.planner.LiteralEncoder; -import io.prestosql.sql.planner.NoOpSymbolResolver; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.sql.planner.ExpressionInterpreter; +import io.trino.sql.planner.LiteralEncoder; +import io.trino.sql.planner.NoOpSymbolResolver; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.SymbolReference; import java.util.Map; import java.util.Set; -import static io.prestosql.sql.planner.iterative.rule.ExtractCommonPredicatesExpressionRewriter.extractCommonPredicates; -import static io.prestosql.sql.planner.iterative.rule.PushDownNegationsExpressionRewriter.pushDownNegations; +import static io.trino.sql.planner.iterative.rule.ExtractCommonPredicatesExpressionRewriter.extractCommonPredicates; +import static io.trino.sql.planner.iterative.rule.PushDownNegationsExpressionRewriter.pushDownNegations; import static java.util.Objects.requireNonNull; public class SimplifyExpressions diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SingleDistinctAggregationToGroupBy.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SingleDistinctAggregationToGroupBy.java index 6dc0a3bd7e34..9475cf135700 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SingleDistinctAggregationToGroupBy.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/SingleDistinctAggregationToGroupBy.java @@ -16,13 +16,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.tree.Expression; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.tree.Expression; import java.util.HashSet; import java.util.List; @@ -33,9 +33,9 @@ import java.util.stream.Stream; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.Patterns.aggregation; import static java.util.Collections.emptyList; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithProjection.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithProjection.java index e418854f0446..0fbb7a86782b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithProjection.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithProjection.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.PlanNodeDecorrelator; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.Patterns; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.PlanNodeDecorrelator; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.Patterns; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; import java.util.HashSet; import java.util.List; @@ -37,19 +37,19 @@ import java.util.Set; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.matching.Pattern.nonEmpty; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.filter; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.subquery; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.type; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.matching.Capture.newCapture; +import static io.trino.matching.Pattern.nonEmpty; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.filter; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.subquery; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.type; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithoutProjection.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithoutProjection.java index 776f30157a24..5d355514b182 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithoutProjection.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithoutProjection.java @@ -16,34 +16,34 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.PlanNodeDecorrelator; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.Patterns; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.PlanNodeDecorrelator; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.Patterns; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.matching.Pattern.nonEmpty; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.filter; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.subquery; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.type; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.matching.Capture.newCapture; +import static io.trino.matching.Pattern.nonEmpty; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.filter; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.subquery; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.type; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithProjection.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithProjection.java index a35d637493ec..3d50fb5327ef 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithProjection.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithProjection.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.PlanNodeDecorrelator; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.Patterns; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.PlanNodeDecorrelator; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.Patterns; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; import java.util.HashSet; import java.util.List; @@ -41,25 +41,25 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.matching.Pattern.empty; -import static io.prestosql.matching.Pattern.nonEmpty; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.planner.iterative.rule.AggregationDecorrelation.isDistinctOperator; -import static io.prestosql.sql.planner.iterative.rule.AggregationDecorrelation.rewriteWithMasks; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.Patterns.Aggregation.groupingColumns; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.filter; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.subquery; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.matching.Capture.newCapture; +import static io.trino.matching.Pattern.empty; +import static io.trino.matching.Pattern.nonEmpty; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.planner.iterative.rule.AggregationDecorrelation.isDistinctOperator; +import static io.trino.sql.planner.iterative.rule.AggregationDecorrelation.rewriteWithMasks; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.Patterns.Aggregation.groupingColumns; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.filter; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.subquery; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithoutProjection.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithoutProjection.java index dfe008ec35e1..2e9b52ae48ac 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithoutProjection.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithoutProjection.java @@ -16,47 +16,47 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.PlanNodeDecorrelator; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.Patterns; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.PlanNodeDecorrelator; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.Patterns; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; import java.util.Map; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.matching.Pattern.empty; -import static io.prestosql.matching.Pattern.nonEmpty; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.planner.iterative.rule.AggregationDecorrelation.isDistinctOperator; -import static io.prestosql.sql.planner.iterative.rule.AggregationDecorrelation.rewriteWithMasks; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.Patterns.Aggregation.groupingColumns; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.filter; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.subquery; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.matching.Capture.newCapture; +import static io.trino.matching.Pattern.empty; +import static io.trino.matching.Pattern.nonEmpty; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.planner.iterative.rule.AggregationDecorrelation.isDistinctOperator; +import static io.trino.sql.planner.iterative.rule.AggregationDecorrelation.rewriteWithMasks; +import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.Patterns.Aggregation.groupingColumns; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.filter; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.subquery; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithProjection.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithProjection.java index bc5ef0b83cfe..c9089039e7a6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithProjection.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithProjection.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.PlanNodeDecorrelator; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.Patterns; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.PlanNodeDecorrelator; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.Patterns; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; import java.util.HashSet; import java.util.List; @@ -37,21 +37,21 @@ import java.util.Set; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.matching.Pattern.nonEmpty; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.iterative.rule.AggregationDecorrelation.isDistinctOperator; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.Patterns.Aggregation.groupingColumns; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.filter; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.subquery; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.type; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.matching.Capture.newCapture; +import static io.trino.matching.Pattern.nonEmpty; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.iterative.rule.AggregationDecorrelation.isDistinctOperator; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.Patterns.Aggregation.groupingColumns; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.filter; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.subquery; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.type; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithoutProjection.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithoutProjection.java index 0ac99a36e409..bd4ebd4f53d7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithoutProjection.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithoutProjection.java @@ -16,37 +16,37 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.PlanNodeDecorrelator; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.Patterns; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.PlanNodeDecorrelator; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.Patterns; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.matching.Pattern.nonEmpty; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.iterative.rule.AggregationDecorrelation.isDistinctOperator; -import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.Patterns.Aggregation.groupingColumns; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.filter; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.subquery; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.type; -import static io.prestosql.sql.planner.plan.Patterns.aggregation; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.matching.Capture.newCapture; +import static io.trino.matching.Pattern.nonEmpty; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.iterative.rule.AggregationDecorrelation.isDistinctOperator; +import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.Patterns.Aggregation.groupingColumns; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.filter; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.subquery; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.type; +import static io.trino.sql.planner.plan.Patterns.aggregation; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedInPredicateToJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedInPredicateToJoin.java index ed1bcfb36eac..4ab568c63a3c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedInPredicateToJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedInPredicateToJoin.java @@ -16,40 +16,40 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.WhenClause; -import io.prestosql.sql.util.AstUtils; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.WhenClause; +import io.trino.sql.util.AstUtils; import javax.annotation.Nullable; @@ -58,15 +58,15 @@ import java.util.Set; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.matching.Pattern.nonEmpty; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.ExpressionUtils.or; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.Patterns.Apply.correlation; -import static io.prestosql.sql.planner.plan.Patterns.applyNode; +import static io.trino.matching.Pattern.nonEmpty; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.ExpressionUtils.or; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.Patterns.Apply.correlation; +import static io.trino.sql.planner.plan.Patterns.applyNode; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedJoinToJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedJoinToJoin.java index 742062e77ba9..476d72e04a83 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedJoinToJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedJoinToJoin.java @@ -15,27 +15,27 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.PlanNodeDecorrelator; -import io.prestosql.sql.planner.optimizations.PlanNodeDecorrelator.DecorrelatedNode; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.tree.Expression; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.PlanNodeDecorrelator; +import io.trino.sql.planner.optimizations.PlanNodeDecorrelator.DecorrelatedNode; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.tree.Expression; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.matching.Pattern.nonEmpty; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.correlation; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.matching.Pattern.nonEmpty; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.correlation; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; /** * Tries to decorrelate subquery and rewrite it using normal join. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedScalarSubquery.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedScalarSubquery.java index 662de61ffac5..02ea1fa78874 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedScalarSubquery.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedScalarSubquery.java @@ -15,43 +15,43 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Range; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.BigintType; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.WhenClause; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.spi.type.BigintType; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.WhenClause; import java.util.Optional; -import static io.prestosql.matching.Pattern.nonEmpty; -import static io.prestosql.spi.StandardErrorCode.SUBQUERY_MULTIPLE_ROWS; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.extractCardinality; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.correlation; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.filter; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.matching.Pattern.nonEmpty; +import static io.trino.spi.StandardErrorCode.SUBQUERY_MULTIPLE_ROWS; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.extractCardinality; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.correlation; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.filter; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedSingleRowSubqueryToProject.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedSingleRowSubqueryToProject.java index ce8c0da16f73..0d09c1bfa5f9 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedSingleRowSubqueryToProject.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformCorrelatedSingleRowSubqueryToProject.java @@ -13,21 +13,21 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.ValuesNode; import java.util.List; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.filter; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.filter; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; /** * This optimizer can rewrite correlated single row subquery to projection in a way described here: diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformExistsApplyToCorrelatedJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformExistsApplyToCorrelatedJoin.java index d4fde5200870..4649b2f6674c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformExistsApplyToCorrelatedJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformExistsApplyToCorrelatedJoin.java @@ -15,43 +15,43 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.PlanNodeDecorrelator; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.PlanNodeDecorrelator; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.QualifiedName; import java.util.Optional; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.plan.AggregationNode.globalAggregation; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.Patterns.applyNode; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.plan.AggregationNode.globalAggregation; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.Patterns.applyNode; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformFilteringSemiJoinToInnerJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformFilteringSemiJoinToInnerJoin.java index b7f09963f5a8..48242c4ba9b9 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformFilteringSemiJoinToInnerJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformFilteringSemiJoinToInnerJoin.java @@ -15,41 +15,41 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.PlanNodeSearcher; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.JoinNode.EquiJoinClause; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.tree.Expression; +import io.trino.Session; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.PlanNodeSearcher; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode.EquiJoinClause; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.tree.Expression; import java.util.List; import java.util.Optional; import java.util.function.Predicate; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.SystemSessionProperties.isRewriteFilteringSemiJoinToInnerJoin; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.ExpressionUtils.extractConjuncts; -import static io.prestosql.sql.planner.ExpressionSymbolInliner.inlineSymbols; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.Patterns.filter; -import static io.prestosql.sql.planner.plan.Patterns.semiJoin; -import static io.prestosql.sql.planner.plan.Patterns.source; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.SystemSessionProperties.isRewriteFilteringSemiJoinToInnerJoin; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.ExpressionUtils.extractConjuncts; +import static io.trino.sql.planner.ExpressionSymbolInliner.inlineSymbols; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.Patterns.filter; +import static io.trino.sql.planner.plan.Patterns.semiJoin; +import static io.trino.sql.planner.plan.Patterns.source; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.function.Predicate.not; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformUncorrelatedInPredicateSubqueryToSemiJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformUncorrelatedInPredicateSubqueryToSemiJoin.java index 450744978733..cf1e84e87f9b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformUncorrelatedInPredicateSubqueryToSemiJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformUncorrelatedInPredicateSubqueryToSemiJoin.java @@ -13,21 +13,21 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.InPredicate; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.InPredicate; import java.util.Optional; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.matching.Pattern.empty; -import static io.prestosql.sql.planner.plan.Patterns.Apply.correlation; -import static io.prestosql.sql.planner.plan.Patterns.applyNode; +import static io.trino.matching.Pattern.empty; +import static io.trino.sql.planner.plan.Patterns.Apply.correlation; +import static io.trino.sql.planner.plan.Patterns.applyNode; /** * This optimizers looks for InPredicate expressions in ApplyNodes and replaces the nodes with SemiJoin nodes. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformUncorrelatedSubqueryToJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformUncorrelatedSubqueryToJoin.java index ab8dc1af0f1a..303460708c9e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformUncorrelatedSubqueryToJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/TransformUncorrelatedSubqueryToJoin.java @@ -17,29 +17,29 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.NullLiteral; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.NullLiteral; import java.util.Optional; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.matching.Pattern.empty; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; -import static io.prestosql.sql.planner.plan.Patterns.CorrelatedJoin.correlation; -import static io.prestosql.sql.planner.plan.Patterns.correlatedJoin; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.matching.Pattern.empty; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.FULL; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; +import static io.trino.sql.planner.plan.Patterns.CorrelatedJoin.correlation; +import static io.trino.sql.planner.plan.Patterns.correlatedJoin; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; public class TransformUncorrelatedSubqueryToJoin implements Rule diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/UnwrapCastInComparison.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/UnwrapCastInComparison.java index 47dad9a37692..1322cebeb154 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/UnwrapCastInComparison.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/UnwrapCastInComparison.java @@ -15,37 +15,37 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Throwables; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.OperatorNotFoundException; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.InterpretedFunctionInvoker; -import io.prestosql.sql.planner.ExpressionInterpreter; -import io.prestosql.sql.planner.LiteralEncoder; -import io.prestosql.sql.planner.NoOpSymbolResolver; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.type.TypeCoercion; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.metadata.Metadata; +import io.trino.metadata.OperatorNotFoundException; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.PrestoException; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.RealType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.InterpretedFunctionInvoker; +import io.trino.sql.planner.ExpressionInterpreter; +import io.trino.sql.planner.LiteralEncoder; +import io.trino.sql.planner.NoOpSymbolResolver; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.NullLiteral; +import io.trino.type.TypeCoercion; import java.lang.invoke.MethodHandle; import java.time.Instant; @@ -54,29 +54,29 @@ import java.time.zone.ZoneOffsetTransition; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.spi.type.TypeUtils.isFloatingPointNaN; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.ExpressionUtils.or; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.NOT_EQUAL; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.spi.type.TypeUtils.isFloatingPointNaN; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.ExpressionUtils.or; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.NOT_EQUAL; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/Util.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/Util.java index ceadd89ce789..483d857a3dc8 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/Util.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/Util.java @@ -16,13 +16,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; import java.util.Collection; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/ActualProperties.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/ActualProperties.java index 1a949304bdfe..48f4aec363e5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/ActualProperties.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/ActualProperties.java @@ -16,15 +16,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ConstantProperty; -import io.prestosql.spi.connector.LocalProperty; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningHandle; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.Expression; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ConstantProperty; +import io.trino.spi.connector.LocalProperty; +import io.trino.spi.predicate.NullableValue; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningHandle; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.Expression; import javax.annotation.concurrent.Immutable; @@ -39,10 +39,10 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.sql.planner.SystemPartitioningHandle.COORDINATOR_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; -import static io.prestosql.util.MoreLists.filteredCopy; +import static io.trino.sql.planner.SystemPartitioningHandle.COORDINATOR_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; +import static io.trino.util.MoreLists.filteredCopy; import static java.util.Objects.requireNonNull; public class ActualProperties diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddExchanges.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddExchanges.java index c193131a697c..71cbf44c85e6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddExchanges.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddExchanges.java @@ -19,60 +19,60 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSetMultimap; import com.google.common.collect.SetMultimap; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.GroupingProperty; -import io.prestosql.spi.connector.LocalProperty; -import io.prestosql.spi.connector.SortingProperty; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.DomainTranslator; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.rule.PushPredicateIntoTableScan; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ChildReplacer; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableDeleteNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.GroupingProperty; +import io.trino.spi.connector.LocalProperty; +import io.trino.spi.connector.SortingProperty; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.DomainTranslator; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.rule.PushPredicateIntoTableScan; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ChildReplacer; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableDeleteNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.ArrayList; import java.util.HashMap; @@ -86,29 +86,29 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.SystemSessionProperties.ignoreDownStreamPreferences; -import static io.prestosql.SystemSessionProperties.isColocatedJoinEnabled; -import static io.prestosql.SystemSessionProperties.isDistributedSortEnabled; -import static io.prestosql.SystemSessionProperties.isForceSingleNodeOutput; -import static io.prestosql.sql.planner.FragmentTableScanCounter.countSources; -import static io.prestosql.sql.planner.FragmentTableScanCounter.hasMultipleSources; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SCALED_WRITER_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.optimizations.ActualProperties.Global.partitionedOn; -import static io.prestosql.sql.planner.optimizations.ActualProperties.Global.singleStreamPartition; -import static io.prestosql.sql.planner.optimizations.LocalProperties.grouped; -import static io.prestosql.sql.planner.optimizations.PreferredProperties.partitionedWithLocal; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.sql.planner.plan.ExchangeNode.gatheringExchange; -import static io.prestosql.sql.planner.plan.ExchangeNode.mergingExchange; -import static io.prestosql.sql.planner.plan.ExchangeNode.partitionedExchange; -import static io.prestosql.sql.planner.plan.ExchangeNode.replicatedExchange; -import static io.prestosql.sql.planner.plan.ExchangeNode.roundRobinExchange; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.SystemSessionProperties.ignoreDownStreamPreferences; +import static io.trino.SystemSessionProperties.isColocatedJoinEnabled; +import static io.trino.SystemSessionProperties.isDistributedSortEnabled; +import static io.trino.SystemSessionProperties.isForceSingleNodeOutput; +import static io.trino.sql.planner.FragmentTableScanCounter.countSources; +import static io.trino.sql.planner.FragmentTableScanCounter.hasMultipleSources; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SCALED_WRITER_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.optimizations.ActualProperties.Global.partitionedOn; +import static io.trino.sql.planner.optimizations.ActualProperties.Global.singleStreamPartition; +import static io.trino.sql.planner.optimizations.LocalProperties.grouped; +import static io.trino.sql.planner.optimizations.PreferredProperties.partitionedWithLocal; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.plan.ExchangeNode.gatheringExchange; +import static io.trino.sql.planner.plan.ExchangeNode.mergingExchange; +import static io.trino.sql.planner.plan.ExchangeNode.partitionedExchange; +import static io.trino.sql.planner.plan.ExchangeNode.replicatedExchange; +import static io.trino.sql.planner.plan.ExchangeNode.roundRobinExchange; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.lang.String.format; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddLocalExchanges.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddLocalExchanges.java index 50ccc334347b..58cfc0757213 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddLocalExchanges.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddLocalExchanges.java @@ -16,50 +16,50 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ConstantProperty; -import io.prestosql.spi.connector.GroupingProperty; -import io.prestosql.spi.connector.LocalProperty; -import io.prestosql.spi.connector.SortingProperty; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.Literal; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ConstantProperty; +import io.trino.spi.connector.GroupingProperty; +import io.trino.spi.connector.LocalProperty; +import io.trino.spi.connector.SortingProperty; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.Literal; +import io.trino.sql.tree.SymbolReference; import java.util.ArrayList; import java.util.Iterator; @@ -72,28 +72,28 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.SystemSessionProperties.getTaskConcurrency; -import static io.prestosql.SystemSessionProperties.getTaskWriterCount; -import static io.prestosql.SystemSessionProperties.isDistributedSortEnabled; -import static io.prestosql.SystemSessionProperties.isSpillEnabled; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.optimizations.StreamPreferredProperties.any; -import static io.prestosql.sql.planner.optimizations.StreamPreferredProperties.defaultParallelism; -import static io.prestosql.sql.planner.optimizations.StreamPreferredProperties.exactlyPartitionedOn; -import static io.prestosql.sql.planner.optimizations.StreamPreferredProperties.fixedParallelism; -import static io.prestosql.sql.planner.optimizations.StreamPreferredProperties.singleStream; -import static io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.FIXED; -import static io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.SINGLE; -import static io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.derivePropertiesRecursively; -import static io.prestosql.sql.planner.plan.ChildReplacer.replaceChildren; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.sql.planner.plan.ExchangeNode.gatheringExchange; -import static io.prestosql.sql.planner.plan.ExchangeNode.mergingExchange; -import static io.prestosql.sql.planner.plan.ExchangeNode.partitionedExchange; +import static io.trino.SystemSessionProperties.getTaskConcurrency; +import static io.trino.SystemSessionProperties.getTaskWriterCount; +import static io.trino.SystemSessionProperties.isDistributedSortEnabled; +import static io.trino.SystemSessionProperties.isSpillEnabled; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.optimizations.StreamPreferredProperties.any; +import static io.trino.sql.planner.optimizations.StreamPreferredProperties.defaultParallelism; +import static io.trino.sql.planner.optimizations.StreamPreferredProperties.exactlyPartitionedOn; +import static io.trino.sql.planner.optimizations.StreamPreferredProperties.fixedParallelism; +import static io.trino.sql.planner.optimizations.StreamPreferredProperties.singleStream; +import static io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.FIXED; +import static io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.SINGLE; +import static io.trino.sql.planner.optimizations.StreamPropertyDerivations.derivePropertiesRecursively; +import static io.trino.sql.planner.plan.ChildReplacer.replaceChildren; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.plan.ExchangeNode.gatheringExchange; +import static io.trino.sql.planner.plan.ExchangeNode.mergingExchange; +import static io.trino.sql.planner.plan.ExchangeNode.partitionedExchange; import static java.util.Objects.requireNonNull; import static java.util.function.Predicate.isEqual; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/BeginTableWrite.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/BeginTableWrite.java index 960e1bd59364..7e24597b94cb 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/BeginTableWrite.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/BeginTableWrite.java @@ -15,39 +15,39 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TableWriterNode.CreateReference; -import io.prestosql.sql.planner.plan.TableWriterNode.CreateTarget; -import io.prestosql.sql.planner.plan.TableWriterNode.DeleteTarget; -import io.prestosql.sql.planner.plan.TableWriterNode.InsertReference; -import io.prestosql.sql.planner.plan.TableWriterNode.InsertTarget; -import io.prestosql.sql.planner.plan.TableWriterNode.WriterTarget; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TableWriterNode.CreateReference; +import io.trino.sql.planner.plan.TableWriterNode.CreateTarget; +import io.trino.sql.planner.plan.TableWriterNode.DeleteTarget; +import io.trino.sql.planner.plan.TableWriterNode.InsertReference; +import io.trino.sql.planner.plan.TableWriterNode.InsertTarget; +import io.trino.sql.planner.plan.TableWriterNode.WriterTarget; +import io.trino.sql.planner.plan.UnionNode; import java.util.Optional; import java.util.Set; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMostScalar; -import static io.prestosql.sql.planner.plan.ChildReplacer.replaceChildren; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMostScalar; +import static io.trino.sql.planner.plan.ChildReplacer.replaceChildren; import static java.util.stream.Collectors.toSet; /* diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/CheckSubqueryNodesAreRewritten.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/CheckSubqueryNodesAreRewritten.java index 9e5a42ae7c4b..6c204deaa254 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/CheckSubqueryNodesAreRewritten.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/CheckSubqueryNodesAreRewritten.java @@ -14,24 +14,24 @@ package io.trino.sql.planner.optimizations; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.tree.Node; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.spi.PrestoException; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.tree.Node; import java.util.List; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; public class CheckSubqueryNodesAreRewritten implements PlanOptimizer diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/DistinctOutputQueryUtil.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/DistinctOutputQueryUtil.java index 3be395d83d2b..859b3239aba3 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/DistinctOutputQueryUtil.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/DistinctOutputQueryUtil.java @@ -13,18 +13,18 @@ */ package io.trino.sql.planner.optimizations; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.ValuesNode; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/ExpressionEquivalence.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/ExpressionEquivalence.java index 180cc25ec81f..79a326fcbdb7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/ExpressionEquivalence.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/ExpressionEquivalence.java @@ -18,24 +18,24 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Ordering; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.DesugarArrayConstructorRewriter; -import io.prestosql.sql.planner.DesugarLikeRewriter; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.InputReferenceExpression; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.RowExpressionVisitor; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.sql.relational.SpecialForm.Form; -import io.prestosql.sql.relational.VariableReferenceExpression; -import io.prestosql.sql.tree.Expression; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.sql.planner.DesugarArrayConstructorRewriter; +import io.trino.sql.planner.DesugarLikeRewriter; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.InputReferenceExpression; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.RowExpressionVisitor; +import io.trino.sql.relational.SpecialForm; +import io.trino.sql.relational.SpecialForm.Form; +import io.trino.sql.relational.VariableReferenceExpression; +import io.trino.sql.tree.Expression; import java.util.Comparator; import java.util.HashMap; @@ -46,13 +46,13 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.Signature.mangleOperatorName; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.IS_DISTINCT_FROM; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.relational.SpecialForm.Form.AND; -import static io.prestosql.sql.relational.SpecialForm.Form.OR; -import static io.prestosql.sql.relational.SqlToRowExpressionTranslator.translate; +import static io.trino.metadata.Signature.mangleOperatorName; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.IS_DISTINCT_FROM; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.relational.SpecialForm.Form.AND; +import static io.trino.sql.relational.SpecialForm.Form.OR; +import static io.trino.sql.relational.SqlToRowExpressionTranslator.translate; import static java.lang.Integer.min; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/HashGenerationOptimizer.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/HashGenerationOptimizer.java index 02e248137a72..ea28b0d1d798 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/HashGenerationOptimizer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/HashGenerationOptimizer.java @@ -23,48 +23,48 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Multimap; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.Partitioning.ArgumentBinding; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexJoinNode.EquiJoinClause; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.StandardTypes; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.Partitioning.ArgumentBinding; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexJoinNode.EquiJoinClause; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; import java.util.Collection; import java.util.HashMap; @@ -82,14 +82,14 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.metadata.Signature.mangleOperatorName; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; -import static io.prestosql.sql.planner.plan.ChildReplacer.replaceChildren; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; -import static io.prestosql.type.TypeUtils.NULL_HASH_CODE; +import static io.trino.metadata.Signature.mangleOperatorName; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.sql.planner.plan.ChildReplacer.replaceChildren; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.type.TypeUtils.NULL_HASH_CODE; import static java.util.Objects.requireNonNull; public class HashGenerationOptimizer diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/IndexJoinOptimizer.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/IndexJoinOptimizer.java index 2743b8c71fce..253fa1ea6e0e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/IndexJoinOptimizer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/IndexJoinOptimizer.java @@ -20,39 +20,39 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.metadata.ResolvedIndex; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.DomainTranslator; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.planner.plan.WindowNode.Function; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.metadata.ResolvedIndex; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.DomainTranslator; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.planner.plan.WindowNode.Function; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.WindowFrame; import java.util.List; import java.util.Map; @@ -65,8 +65,8 @@ import static com.google.common.base.Predicates.in; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; import static java.util.function.Function.identity; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/LimitPushDown.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/LimitPushDown.java index 3b9066701c2a..36db237ca59a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/LimitPushDown.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/LimitPushDown.java @@ -14,23 +14,23 @@ package io.trino.sql.planner.optimizations; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.ValuesNode; import java.util.ArrayList; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/LocalProperties.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/LocalProperties.java index 2e738dc4e28b..8eef783789ed 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/LocalProperties.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/LocalProperties.java @@ -16,9 +16,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.PeekingIterator; -import io.prestosql.spi.connector.ConstantProperty; -import io.prestosql.spi.connector.GroupingProperty; -import io.prestosql.spi.connector.LocalProperty; +import io.trino.spi.connector.ConstantProperty; +import io.trino.spi.connector.GroupingProperty; +import io.trino.spi.connector.LocalProperty; import java.util.ArrayList; import java.util.Collection; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/MetadataQueryOptimizer.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/MetadataQueryOptimizer.java index 19dfa0cfe0ab..edd704c3f7d5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/MetadataQueryOptimizer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/MetadataQueryOptimizer.java @@ -17,43 +17,43 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableProperties; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.DiscretePredicates; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.LiteralEncoder; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Row; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableProperties; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.DiscretePredicates; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.sql.planner.LiteralEncoder; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Row; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; -import static io.prestosql.sql.planner.DeterminismEvaluator.isDeterministic; +import static io.trino.sql.planner.DeterminismEvaluator.isDeterministic; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/OptimizeMixedDistinctAggregations.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/OptimizeMixedDistinctAggregations.java index 8356af59270b..883271fb372c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/OptimizeMixedDistinctAggregations.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/OptimizeMixedDistinctAggregations.java @@ -17,30 +17,30 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; import java.util.ArrayList; import java.util.HashSet; @@ -51,12 +51,12 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.SystemSessionProperties.isOptimizeDistinctAggregationEnabled; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.SystemSessionProperties.isOptimizeDistinctAggregationEnabled; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; import static java.util.Objects.requireNonNull; /* diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PlanNodeDecorrelator.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PlanNodeDecorrelator.java index f6af03f68f89..f3e6c8a60e8d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PlanNodeDecorrelator.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PlanNodeDecorrelator.java @@ -21,31 +21,31 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Multimap; import com.google.common.collect.Sets; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.ExpressionUtils; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.iterative.GroupReference; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.WindowNode.Specification; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.ExpressionUtils; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.WindowNode.Specification; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Map; @@ -56,10 +56,10 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.optimizations.SymbolMapper.symbolMapper; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.optimizations.SymbolMapper.symbolMapper; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PlanNodeSearcher.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PlanNodeSearcher.java index 03e277d6a276..4e40106b5bdd 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PlanNodeSearcher.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PlanNodeSearcher.java @@ -14,8 +14,8 @@ package io.trino.sql.planner.optimizations; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import java.util.Optional; @@ -25,8 +25,8 @@ import static com.google.common.base.Predicates.alwaysTrue; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.sql.planner.iterative.Lookup.noLookup; -import static io.prestosql.sql.planner.plan.ChildReplacer.replaceChildren; +import static io.trino.sql.planner.iterative.Lookup.noLookup; +import static io.trino.sql.planner.plan.ChildReplacer.replaceChildren; import static java.util.Objects.requireNonNull; public class PlanNodeSearcher diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PlanOptimizer.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PlanOptimizer.java index 6bc8c5b509aa..1e018beb8866 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PlanOptimizer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PlanOptimizer.java @@ -13,12 +13,12 @@ */ package io.trino.sql.planner.optimizations; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNode; public interface PlanOptimizer { diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PredicatePushDown.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PredicatePushDown.java index 36b88ef76eff..2574af42d03d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PredicatePushDown.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PredicatePushDown.java @@ -20,54 +20,54 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import com.google.common.collect.Streams; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.DomainTranslator; -import io.prestosql.sql.planner.EffectivePredicateExtractor; -import io.prestosql.sql.planner.EqualityInference; -import io.prestosql.sql.planner.ExpressionInterpreter; -import io.prestosql.sql.planner.LiteralEncoder; -import io.prestosql.sql.planner.NoOpSymbolResolver; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Literal; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.TryExpression; -import io.prestosql.sql.util.AstUtils; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.DomainTranslator; +import io.trino.sql.planner.EffectivePredicateExtractor; +import io.trino.sql.planner.EqualityInference; +import io.trino.sql.planner.ExpressionInterpreter; +import io.trino.sql.planner.LiteralEncoder; +import io.trino.sql.planner.NoOpSymbolResolver; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Literal; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.TryExpression; +import io.trino.sql.util.AstUtils; import java.util.ArrayList; import java.util.Collection; @@ -88,30 +88,30 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.SystemSessionProperties.isEnableDynamicFiltering; -import static io.prestosql.SystemSessionProperties.isPredicatePushdownUseTableProperties; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.sql.DynamicFilters.createDynamicFilterExpression; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.ExpressionUtils.extractConjuncts; -import static io.prestosql.sql.ExpressionUtils.filterDeterministicConjuncts; -import static io.prestosql.sql.planner.DeterminismEvaluator.isDeterministic; -import static io.prestosql.sql.planner.ExpressionSymbolInliner.inlineSymbols; -import static io.prestosql.sql.planner.SymbolsExtractor.extractUnique; -import static io.prestosql.sql.planner.iterative.rule.CanonicalizeExpressionRewriter.canonicalizeExpression; -import static io.prestosql.sql.planner.iterative.rule.UnwrapCastInComparison.unwrapCasts; -import static io.prestosql.sql.planner.plan.JoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.IS_DISTINCT_FROM; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.SystemSessionProperties.isEnableDynamicFiltering; +import static io.trino.SystemSessionProperties.isPredicatePushdownUseTableProperties; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.sql.DynamicFilters.createDynamicFilterExpression; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.ExpressionUtils.extractConjuncts; +import static io.trino.sql.ExpressionUtils.filterDeterministicConjuncts; +import static io.trino.sql.planner.DeterminismEvaluator.isDeterministic; +import static io.trino.sql.planner.ExpressionSymbolInliner.inlineSymbols; +import static io.trino.sql.planner.SymbolsExtractor.extractUnique; +import static io.trino.sql.planner.iterative.rule.CanonicalizeExpressionRewriter.canonicalizeExpression; +import static io.trino.sql.planner.iterative.rule.UnwrapCastInComparison.unwrapCasts; +import static io.trino.sql.planner.plan.JoinNode.Type.FULL; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.IS_DISTINCT_FROM; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; import static java.util.Objects.requireNonNull; public class PredicatePushDown diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PreferredProperties.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PreferredProperties.java index 6f6662f6cadf..d0c8735d3a2f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PreferredProperties.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PreferredProperties.java @@ -16,9 +16,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; -import io.prestosql.spi.connector.LocalProperty; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.Symbol; +import io.trino.spi.connector.LocalProperty; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PropertyDerivations.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PropertyDerivations.java index 2d78fbf781bf..83d5b38dd47a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PropertyDerivations.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PropertyDerivations.java @@ -19,66 +19,66 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableProperties; -import io.prestosql.metadata.TableProperties.TablePartitioning; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConstantProperty; -import io.prestosql.spi.connector.GroupingProperty; -import io.prestosql.spi.connector.LocalProperty; -import io.prestosql.spi.connector.SortingProperty; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.DomainTranslator; -import io.prestosql.sql.planner.ExpressionInterpreter; -import io.prestosql.sql.planner.NoOpSymbolResolver; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.optimizations.ActualProperties.Global; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableDeleteNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableProperties; +import io.trino.metadata.TableProperties.TablePartitioning; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConstantProperty; +import io.trino.spi.connector.GroupingProperty; +import io.trino.spi.connector.LocalProperty; +import io.trino.spi.connector.SortingProperty; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.DomainTranslator; +import io.trino.sql.planner.ExpressionInterpreter; +import io.trino.sql.planner.NoOpSymbolResolver; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.optimizations.ActualProperties.Global; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableDeleteNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.SymbolReference; import java.util.Collection; import java.util.HashMap; @@ -93,16 +93,16 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.SystemSessionProperties.planWithTableNodePartitioning; -import static io.prestosql.spi.predicate.TupleDomain.extractFixedValues; -import static io.prestosql.sql.planner.SystemPartitioningHandle.ARBITRARY_DISTRIBUTION; -import static io.prestosql.sql.planner.optimizations.ActualProperties.Global.arbitraryPartition; -import static io.prestosql.sql.planner.optimizations.ActualProperties.Global.coordinatorSingleStreamPartition; -import static io.prestosql.sql.planner.optimizations.ActualProperties.Global.partitionedOn; -import static io.prestosql.sql.planner.optimizations.ActualProperties.Global.singleStreamPartition; -import static io.prestosql.sql.planner.optimizations.ActualProperties.Global.streamPartitionedOn; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.SystemSessionProperties.planWithTableNodePartitioning; +import static io.trino.spi.predicate.TupleDomain.extractFixedValues; +import static io.trino.sql.planner.SystemPartitioningHandle.ARBITRARY_DISTRIBUTION; +import static io.trino.sql.planner.optimizations.ActualProperties.Global.arbitraryPartition; +import static io.trino.sql.planner.optimizations.ActualProperties.Global.coordinatorSingleStreamPartition; +import static io.trino.sql.planner.optimizations.ActualProperties.Global.partitionedOn; +import static io.trino.sql.planner.optimizations.ActualProperties.Global.singleStreamPartition; +import static io.trino.sql.planner.optimizations.ActualProperties.Global.streamPartitionedOn; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toMap; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PruneUnreferencedOutputs.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PruneUnreferencedOutputs.java index 48b6a862ef6a..723872b0dfbe 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PruneUnreferencedOutputs.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PruneUnreferencedOutputs.java @@ -20,60 +20,60 @@ import com.google.common.collect.Iterables; import com.google.common.collect.ListMultimap; import com.google.common.collect.Sets; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.rule.PruneTableScanColumns; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SetOperationNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.StatisticAggregations; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Row; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.rule.PruneTableScanColumns; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SetOperationNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.StatisticAggregations; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Row; import java.util.ArrayList; import java.util.Collection; @@ -90,12 +90,12 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.concat; import static com.google.common.collect.Sets.intersection; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isAtMostScalar; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.isScalar; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMostScalar; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isScalar; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/QueryCardinalityUtil.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/QueryCardinalityUtil.java index cd1f3511a646..6a06d03f1750 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/QueryCardinalityUtil.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/QueryCardinalityUtil.java @@ -14,22 +14,22 @@ package io.trino.sql.planner.optimizations; import com.google.common.collect.Range; -import io.prestosql.sql.planner.iterative.GroupReference; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.ValuesNode; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.sql.planner.iterative.Lookup.noLookup; +import static io.trino.sql.planner.iterative.Lookup.noLookup; import static java.lang.Math.max; import static java.lang.Math.min; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/ReplicateSemiJoinInDelete.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/ReplicateSemiJoinInDelete.java index 2fc6fc710707..ae9fe64fecc4 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/ReplicateSemiJoinInDelete.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/ReplicateSemiJoinInDelete.java @@ -13,17 +13,17 @@ */ package io.trino.sql.planner.optimizations; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; -import static io.prestosql.sql.planner.plan.SemiJoinNode.DistributionType.REPLICATED; +import static io.trino.sql.planner.plan.SemiJoinNode.DistributionType.REPLICATED; import static java.util.Objects.requireNonNull; public class ReplicateSemiJoinInDelete diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/StatsRecordingPlanOptimizer.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/StatsRecordingPlanOptimizer.java index 34ea88b60898..21f2871c66db 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/StatsRecordingPlanOptimizer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/StatsRecordingPlanOptimizer.java @@ -13,13 +13,13 @@ */ package io.trino.sql.planner.optimizations; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.sql.planner.OptimizerStatsRecorder; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.sql.planner.OptimizerStatsRecorder; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNode; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/StreamPreferredProperties.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/StreamPreferredProperties.java index aee896f616b1..f047bd409862 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/StreamPreferredProperties.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/StreamPreferredProperties.java @@ -16,10 +16,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; -import io.prestosql.Session; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties; -import io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution; +import io.trino.Session; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties; +import io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution; import java.util.Collection; import java.util.List; @@ -30,11 +30,11 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.SystemSessionProperties.getTaskConcurrency; -import static io.prestosql.SystemSessionProperties.preferStreamingOperators; -import static io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.FIXED; -import static io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.MULTIPLE; -import static io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.SINGLE; +import static io.trino.SystemSessionProperties.getTaskConcurrency; +import static io.trino.SystemSessionProperties.preferStreamingOperators; +import static io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.FIXED; +import static io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.MULTIPLE; +import static io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.SINGLE; import static java.util.Objects.requireNonNull; public class StreamPreferredProperties diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/StreamPropertyDerivations.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/StreamPropertyDerivations.java index b0d00daaaaaf..1ab0a55a84d2 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/StreamPropertyDerivations.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/StreamPropertyDerivations.java @@ -18,54 +18,54 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableProperties; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.LocalProperty; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.Partitioning.ArgumentBinding; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableDeleteNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableProperties; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.LocalProperty; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.Partitioning.ArgumentBinding; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableDeleteNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import javax.annotation.concurrent.Immutable; @@ -85,13 +85,13 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.SystemSessionProperties.isSpillEnabled; -import static io.prestosql.spi.predicate.TupleDomain.extractFixedValues; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; -import static io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.FIXED; -import static io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.MULTIPLE; -import static io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.SINGLE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.SystemSessionProperties.isSpillEnabled; +import static io.trino.spi.predicate.TupleDomain.extractFixedValues; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; +import static io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.FIXED; +import static io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.MULTIPLE; +import static io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.SINGLE; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; import static java.util.Objects.requireNonNull; public final class StreamPropertyDerivations diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/SymbolMapper.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/SymbolMapper.java index a19f6086fde4..ed1d6eb1f158 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/SymbolMapper.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/SymbolMapper.java @@ -15,30 +15,30 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.StatisticAggregations; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.StatisticAggregations; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.SymbolReference; import java.util.HashMap; import java.util.HashSet; @@ -51,7 +51,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.plan.AggregationNode.groupingSets; +import static io.trino.sql.planner.plan.AggregationNode.groupingSets; import static java.util.Objects.requireNonNull; public class SymbolMapper diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/TableDeleteOptimizer.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/TableDeleteOptimizer.java index 28f70926cea7..efdf847a70ee 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/TableDeleteOptimizer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/TableDeleteOptimizer.java @@ -14,19 +14,19 @@ package io.trino.sql.planner.optimizations; import com.google.common.collect.Iterables; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.planner.plan.TableDeleteNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.planner.plan.TableDeleteNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/TransformQuantifiedComparisonApplyToCorrelatedJoin.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/TransformQuantifiedComparisonApplyToCorrelatedJoin.java index 73d9778b73f4..be8b33dd9bf9 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/TransformQuantifiedComparisonApplyToCorrelatedJoin.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/TransformQuantifiedComparisonApplyToCorrelatedJoin.java @@ -15,35 +15,35 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.ExpressionUtils; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.QuantifiedComparisonExpression; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.WhenClause; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.Type; +import io.trino.sql.ExpressionUtils; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.QuantifiedComparisonExpression; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.WhenClause; import java.util.EnumSet; import java.util.List; @@ -52,21 +52,21 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.plan.AggregationNode.globalAggregation; -import static io.prestosql.sql.planner.plan.SimplePlanRewriter.rewriteWith; -import static io.prestosql.sql.tree.BooleanLiteral.FALSE_LITERAL; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.NOT_EQUAL; -import static io.prestosql.sql.tree.QuantifiedComparisonExpression.Quantifier.ALL; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.plan.AggregationNode.globalAggregation; +import static io.trino.sql.planner.plan.SimplePlanRewriter.rewriteWith; +import static io.trino.sql.tree.BooleanLiteral.FALSE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.NOT_EQUAL; +import static io.trino.sql.tree.QuantifiedComparisonExpression.Quantifier.ALL; import static java.util.Collections.emptyList; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/UnaliasSymbolReferences.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/UnaliasSymbolReferences.java index c075d29bcc76..34ad1fbb7402 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/UnaliasSymbolReferences.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/UnaliasSymbolReferences.java @@ -19,64 +19,64 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.ListMultimap; import com.google.common.collect.Sets; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.sql.planner.DeterminismEvaluator; -import io.prestosql.sql.planner.NodeAndMappings; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableDeleteNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.sql.planner.DeterminismEvaluator; +import io.trino.sql.planner.NodeAndMappings; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableDeleteNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SymbolReference; import java.util.AbstractMap.SimpleEntry; import java.util.ArrayList; @@ -93,9 +93,9 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.optimizations.SymbolMapper.symbolMapper; -import static io.prestosql.sql.planner.optimizations.SymbolMapper.symbolReallocator; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.optimizations.SymbolMapper.symbolMapper; +import static io.trino.sql.planner.optimizations.SymbolMapper.symbolReallocator; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/WindowFilterPushDown.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/WindowFilterPushDown.java index cb9cd506cd88..9824c7a4f9ab 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/WindowFilterPushDown.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/WindowFilterPushDown.java @@ -14,45 +14,45 @@ package io.trino.sql.planner.optimizations; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.FunctionId; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.ExpressionUtils; -import io.prestosql.sql.planner.DomainTranslator; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SimplePlanRewriter; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.FunctionId; +import io.trino.metadata.Metadata; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.ExpressionUtils; +import io.trino.sql.planner.DomainTranslator; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SimplePlanRewriter; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.QualifiedName; import java.util.Optional; import java.util.OptionalInt; import static com.google.common.base.Verify.verify; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.SystemSessionProperties.isOptimizeTopNRowNumber; -import static io.prestosql.spi.predicate.Marker.Bound.BELOW; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.DomainTranslator.ExtractionResult; -import static io.prestosql.sql.planner.DomainTranslator.fromPredicate; -import static io.prestosql.sql.planner.plan.ChildReplacer.replaceChildren; +import static io.trino.SystemSessionProperties.isOptimizeTopNRowNumber; +import static io.trino.spi.predicate.Marker.Bound.BELOW; +import static io.trino.spi.predicate.Range.range; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.DomainTranslator.ExtractionResult; +import static io.trino.sql.planner.DomainTranslator.fromPredicate; +import static io.trino.sql.planner.plan.ChildReplacer.replaceChildren; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/WindowNodeUtil.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/WindowNodeUtil.java index 7af5461ae9a3..977cdda9c0cb 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/WindowNodeUtil.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/WindowNodeUtil.java @@ -13,8 +13,8 @@ */ package io.trino.sql.planner.optimizations; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.plan.WindowNode; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.plan.WindowNode; import java.util.Collection; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/joins/JoinGraph.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/joins/JoinGraph.java index aff5209bf49b..f842b71fb66e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/joins/JoinGraph.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/joins/JoinGraph.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.GroupReference; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; import java.util.Collection; import java.util.HashMap; @@ -38,8 +38,8 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.sql.planner.iterative.rule.PushProjectionThroughJoin.pushProjectionThroughJoin; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.iterative.rule.PushProjectionThroughJoin.pushProjectionThroughJoin; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java index 4a94d6e52a23..4f6511cb325e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java @@ -19,15 +19,15 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.metadata.AggregationFunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.type.FunctionType; +import io.trino.metadata.AggregationFunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.SymbolReference; +import io.trino.type.FunctionType; import javax.annotation.concurrent.Immutable; @@ -39,7 +39,7 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; import static java.util.Objects.requireNonNull; @Immutable diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/ApplyNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/ApplyNode.java index 2e79fa3d5311..d20954f05eb7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/ApplyNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/ApplyNode.java @@ -16,12 +16,12 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.QuantifiedComparisonExpression; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.QuantifiedComparisonExpression; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/AssignUniqueId.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/AssignUniqueId.java index 4a1049c88e8d..e72060fa389e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/AssignUniqueId.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/AssignUniqueId.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/Assignments.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/Assignments.java index 95da9e5199e1..5ab1bc2f79b6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/Assignments.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/Assignments.java @@ -19,15 +19,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; -import io.prestosql.Session; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.SymbolReference; import java.util.Collection; import java.util.LinkedHashMap; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/CorrelatedJoinNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/CorrelatedJoinNode.java index 108b726de74d..64b11e70ecf7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/CorrelatedJoinNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/CorrelatedJoinNode.java @@ -16,10 +16,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Join; -import io.prestosql.sql.tree.Node; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Join; +import io.trino.sql.tree.Node; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/DeleteNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/DeleteNode.java index 9d365164b3ca..8ca579d291ca 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/DeleteNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/DeleteNode.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.TableWriterNode.DeleteTarget; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.TableWriterNode.DeleteTarget; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/DistinctLimitNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/DistinctLimitNode.java index 488bd5e6d7d2..d434b1fd5f82 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/DistinctLimitNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/DistinctLimitNode.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/EnforceSingleRowNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/EnforceSingleRowNode.java index 5406e45c8010..f27c3c412832 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/EnforceSingleRowNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/EnforceSingleRowNode.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/ExceptNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/ExceptNode.java index a8939477dd38..2876eb90fbb5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/ExceptNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/ExceptNode.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ListMultimap; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/ExchangeNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/ExchangeNode.java index 02bbf187f688..f285cf5a408f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/ExchangeNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/ExchangeNode.java @@ -17,12 +17,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.Partitioning.ArgumentBinding; -import io.prestosql.sql.planner.PartitioningHandle; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.Partitioning.ArgumentBinding; +import io.trino.sql.planner.PartitioningHandle; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; @@ -30,14 +30,14 @@ import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_BROADCAST_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_PASSTHROUGH_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.util.MoreLists.listOfListsCopy; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_BROADCAST_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_PASSTHROUGH_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.util.MoreLists.listOfListsCopy; import static java.util.Objects.requireNonNull; @Immutable diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/ExplainAnalyzeNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/ExplainAnalyzeNode.java index d9a416b87a25..8e821758ba49 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/ExplainAnalyzeNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/ExplainAnalyzeNode.java @@ -18,7 +18,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/FilterNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/FilterNode.java index 7754e6fce8b2..a589aa5f5634 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/FilterNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/FilterNode.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.Expression; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.Expression; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/GroupIdNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/GroupIdNode.java index 8da6370d098a..ef37ab7a7820 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/GroupIdNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/GroupIdNode.java @@ -20,7 +20,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; @@ -32,7 +32,7 @@ import java.util.stream.Collectors; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.util.MoreLists.listOfListsCopy; +import static io.trino.util.MoreLists.listOfListsCopy; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toSet; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/IndexJoinNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/IndexJoinNode.java index cd07f60b8019..b699320c9b99 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/IndexJoinNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/IndexJoinNode.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/IndexSourceNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/IndexSourceNode.java index babe4a3550f9..e93d18bdcfc6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/IndexSourceNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/IndexSourceNode.java @@ -18,10 +18,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.IndexHandle; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.sql.planner.Symbol; +import io.trino.metadata.IndexHandle; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.sql.planner.Symbol; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/IntersectNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/IntersectNode.java index 23a89bbcdd0b..099b5fd9a904 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/IntersectNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/IntersectNode.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ListMultimap; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/JoinNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/JoinNode.java index 6b51d3ff850e..b51d5b30ee66 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/JoinNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/JoinNode.java @@ -18,11 +18,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.cost.PlanNodeStatsAndCostSummary; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Join; +import io.trino.cost.PlanNodeStatsAndCostSummary; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Join; import javax.annotation.concurrent.Immutable; @@ -34,11 +34,11 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.REPLICATED; -import static io.prestosql.sql.planner.plan.JoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.sql.planner.plan.JoinNode.DistributionType.REPLICATED; +import static io.trino.sql.planner.plan.JoinNode.Type.FULL; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/LimitNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/LimitNode.java index 8e06f17d5783..b2632fc76d40 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/LimitNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/LimitNode.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/MarkDistinctNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/MarkDistinctNode.java index d1d4c091631c..8f95656b9477 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/MarkDistinctNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/MarkDistinctNode.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/OffsetNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/OffsetNode.java index e64c11d1321f..1579d8727e26 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/OffsetNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/OffsetNode.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/OutputNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/OutputNode.java index 8c16a62040d1..84fd345a8418 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/OutputNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/OutputNode.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/Patterns.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/Patterns.java index cbbde2bbb1da..f7848f636daa 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/Patterns.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/Patterns.java @@ -13,21 +13,21 @@ */ package io.trino.sql.planner.plan; -import io.prestosql.matching.Pattern; -import io.prestosql.matching.Property; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type; -import io.prestosql.sql.tree.Expression; +import io.trino.matching.Pattern; +import io.trino.matching.Property; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.CorrelatedJoinNode.Type; +import io.trino.sql.tree.Expression; import java.util.List; import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.matching.Pattern.typeOf; -import static io.prestosql.matching.Property.optionalProperty; -import static io.prestosql.matching.Property.property; +import static io.trino.matching.Pattern.typeOf; +import static io.trino.matching.Property.optionalProperty; +import static io.trino.matching.Property.property; public final class Patterns { diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/PlanNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/PlanNode.java index 3edb8ef9caf1..6650d9c883d0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/PlanNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/PlanNode.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/PlanVisitor.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/PlanVisitor.java index 998c7ecfe836..27a7069a2f26 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/PlanVisitor.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/PlanVisitor.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner.plan; -import io.prestosql.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.iterative.GroupReference; public abstract class PlanVisitor { diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/ProjectNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/ProjectNode.java index 4325bb531130..47c7e839f7d5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/ProjectNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/ProjectNode.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/RemoteSourceNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/RemoteSourceNode.java index d937dc33c262..17dd62267cb1 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/RemoteSourceNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/RemoteSourceNode.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/RowNumberNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/RowNumberNode.java index b79f666a80e1..f586a4d67757 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/RowNumberNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/RowNumberNode.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/SampleNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/SampleNode.java index 9e33d7de54c7..00b2295f1050 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/SampleNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/SampleNode.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.SampledRelation; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.SampledRelation; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/SemiJoinNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/SemiJoinNode.java index 63703793fe01..10f26192829c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/SemiJoinNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/SemiJoinNode.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/SetOperationNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/SetOperationNode.java index 3c19e16e27a8..35beebc3a7ea 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/SetOperationNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/SetOperationNode.java @@ -24,8 +24,8 @@ import com.google.common.collect.ListMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.SymbolReference; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/SimplePlanRewriter.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/SimplePlanRewriter.java index 7c5a0b5370fc..80804113b91b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/SimplePlanRewriter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/SimplePlanRewriter.java @@ -17,7 +17,7 @@ import static com.google.common.base.Verify.verifyNotNull; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.plan.ChildReplacer.replaceChildren; +import static io.trino.sql.planner.plan.ChildReplacer.replaceChildren; public abstract class SimplePlanRewriter extends PlanVisitor> diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/SortNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/SortNode.java index 4eba5b0eb6c6..df2c76fc626c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/SortNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/SortNode.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/SpatialJoinNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/SpatialJoinNode.java index 8a91baf4509f..8297a6564dfb 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/SpatialJoinNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/SpatialJoinNode.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.Expression; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.Expression; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/StatisticAggregations.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/StatisticAggregations.java index ad955340621c..f2cca5759da9 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/StatisticAggregations.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/StatisticAggregations.java @@ -17,13 +17,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.AggregationFunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.metadata.AggregationFunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/StatisticAggregationsDescriptor.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/StatisticAggregationsDescriptor.java index 683b463e32a2..a317954c3eec 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/StatisticAggregationsDescriptor.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/StatisticAggregationsDescriptor.java @@ -24,9 +24,9 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.statistics.ColumnStatisticMetadata; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.statistics.TableStatisticType; +import io.trino.spi.statistics.ColumnStatisticMetadata; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.statistics.TableStatisticType; import java.io.IOException; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/StatisticsWriterNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/StatisticsWriterNode.java index 71d2b21822f9..4a62a2c3bbaa 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/StatisticsWriterNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/StatisticsWriterNode.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.metadata.AnalyzeTableHandle; -import io.prestosql.metadata.TableHandle; -import io.prestosql.sql.planner.Symbol; +import io.trino.metadata.AnalyzeTableHandle; +import io.trino.metadata.TableHandle; +import io.trino.sql.planner.Symbol; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableDeleteNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableDeleteNode.java index afabce94c559..052d530d7c5b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableDeleteNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableDeleteNode.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.TableHandle; -import io.prestosql.sql.planner.Symbol; +import io.trino.metadata.TableHandle; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableFinishNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableFinishNode.java index daff2b84b96e..6b987cdcae5a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableFinishNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableFinishNode.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; @@ -25,7 +25,7 @@ import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.sql.planner.plan.TableWriterNode.WriterTarget; +import static io.trino.sql.planner.plan.TableWriterNode.WriterTarget; import static java.util.Objects.requireNonNull; @Immutable diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableScanNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableScanNode.java index 535d074882ff..ae1469bf3265 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableScanNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableScanNode.java @@ -17,10 +17,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.sql.planner.Symbol; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.TupleDomain; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableWriterNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableWriterNode.java index 7c9c64549d05..6bf2d9f92b7d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableWriterNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/TableWriterNode.java @@ -20,16 +20,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.metadata.InsertTableHandle; -import io.prestosql.metadata.NewTableLayout; -import io.prestosql.metadata.OutputTableHandle; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.Symbol; +import io.trino.metadata.InsertTableHandle; +import io.trino.metadata.NewTableLayout; +import io.trino.metadata.OutputTableHandle; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/TopNNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/TopNNode.java index 31e1f5133802..caeec47c73f6 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/TopNNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/TopNNode.java @@ -17,16 +17,16 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.util.Failures.checkCondition; import static java.util.Objects.requireNonNull; @Immutable diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/TopNRowNumberNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/TopNRowNumberNode.java index d88dd177462a..4703269a4b04 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/TopNRowNumberNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/TopNRowNumberNode.java @@ -17,9 +17,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.WindowNode.Specification; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.WindowNode.Specification; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/UnionNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/UnionNode.java index 16f86d3614af..e56a011d42ab 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/UnionNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/UnionNode.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ListMultimap; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/UnnestNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/UnnestNode.java index bec11f67ff1c..2a7d2543c18c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/UnnestNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/UnnestNode.java @@ -18,10 +18,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.plan.JoinNode.Type; -import io.prestosql.sql.tree.Expression; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.plan.JoinNode.Type; +import io.trino.sql.tree.Expression; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/ValuesNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/ValuesNode.java index d9f11230b1f1..a00ac5a97489 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/ValuesNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/ValuesNode.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Row; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Row; import javax.annotation.concurrent.Immutable; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/plan/WindowNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/plan/WindowNode.java index 6d58fa114c8e..ae6dab50481f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/plan/WindowNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/plan/WindowNode.java @@ -19,12 +19,12 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.WindowFrame; import javax.annotation.concurrent.Immutable; @@ -37,7 +37,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.concat; -import static io.prestosql.sql.tree.WindowFrame.Type.RANGE; +import static io.trino.sql.tree.WindowFrame.Type.RANGE; import static java.util.Objects.requireNonNull; @Immutable diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/HashCollisionPlanNodeStats.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/HashCollisionPlanNodeStats.java index ba9860cb1427..3597839db694 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/HashCollisionPlanNodeStats.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/HashCollisionPlanNodeStats.java @@ -15,7 +15,7 @@ import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/IoPlanPrinter.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/IoPlanPrinter.java index 240bad06e9eb..b8b1f39f0177 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/IoPlanPrinter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/IoPlanPrinter.java @@ -16,37 +16,37 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.cost.PlanCostEstimate; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.metadata.TableMetadata; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Marker; -import io.prestosql.spi.predicate.Marker.Bound; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.DomainTranslator; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TableWriterNode.CreateReference; -import io.prestosql.sql.planner.plan.TableWriterNode.CreateTarget; -import io.prestosql.sql.planner.plan.TableWriterNode.DeleteTarget; -import io.prestosql.sql.planner.plan.TableWriterNode.InsertReference; -import io.prestosql.sql.planner.plan.TableWriterNode.InsertTarget; -import io.prestosql.sql.planner.plan.TableWriterNode.WriterTarget; -import io.prestosql.sql.planner.planprinter.IoPlanPrinter.IoPlan.IoPlanBuilder; +import io.trino.Session; +import io.trino.cost.PlanCostEstimate; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.cost.StatsAndCosts; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.metadata.TableMetadata; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Marker; +import io.trino.spi.predicate.Marker.Bound; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.DomainTranslator; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TableWriterNode.CreateReference; +import io.trino.sql.planner.plan.TableWriterNode.CreateTarget; +import io.trino.sql.planner.plan.TableWriterNode.DeleteTarget; +import io.trino.sql.planner.plan.TableWriterNode.InsertReference; +import io.trino.sql.planner.plan.TableWriterNode.InsertTarget; +import io.trino.sql.planner.plan.TableWriterNode.WriterTarget; +import io.trino.sql.planner.planprinter.IoPlanPrinter.IoPlan.IoPlanBuilder; import java.util.HashSet; import java.util.Map; @@ -58,7 +58,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.spi.predicate.Marker.Bound.EXACTLY; +import static io.trino.spi.predicate.Marker.Bound.EXACTLY; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/JsonRenderer.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/JsonRenderer.java index bd4b07f504b5..b8edca880dfd 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/JsonRenderer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/JsonRenderer.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import io.airlift.json.JsonCodec; -import io.prestosql.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanFragmentId; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/NodeRepresentation.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/NodeRepresentation.java index e53288b5e1dd..837cb028f468 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/NodeRepresentation.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/NodeRepresentation.java @@ -13,12 +13,12 @@ */ package io.trino.sql.planner.planprinter; -import io.prestosql.cost.PlanCostEstimate; -import io.prestosql.cost.PlanNodeStatsAndCostSummary; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.cost.PlanCostEstimate; +import io.trino.cost.PlanNodeStatsAndCostSummary; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanNodeStats.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanNodeStats.java index 1cab112b120e..f7515b8af7ec 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanNodeStats.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanNodeStats.java @@ -15,15 +15,15 @@ import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.util.Mergeable; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.util.Mergeable; import java.util.Map; import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.util.MoreMaps.mergeMaps; +import static io.trino.util.MoreMaps.mergeMaps; import static java.lang.Double.max; import static java.lang.Math.sqrt; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanNodeStatsSummarizer.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanNodeStatsSummarizer.java index e2811b1ed534..4faadf54209a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanNodeStatsSummarizer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanNodeStatsSummarizer.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableMap; import io.airlift.units.Duration; -import io.prestosql.execution.StageInfo; -import io.prestosql.execution.TaskInfo; -import io.prestosql.operator.HashCollisionsInfo; -import io.prestosql.operator.OperatorStats; -import io.prestosql.operator.PipelineStats; -import io.prestosql.operator.TaskStats; -import io.prestosql.operator.WindowInfo; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.StageInfo; +import io.trino.execution.TaskInfo; +import io.trino.operator.HashCollisionsInfo; +import io.trino.operator.OperatorStats; +import io.trino.operator.PipelineStats; +import io.trino.operator.TaskStats; +import io.trino.operator.WindowInfo; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.ArrayList; import java.util.HashMap; @@ -34,7 +34,7 @@ import static com.google.common.collect.Iterables.getLast; import static com.google.common.collect.Lists.reverse; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.util.MoreMaps.mergeMaps; +import static io.trino.util.MoreMaps.mergeMaps; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanPrinter.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanPrinter.java index 790b5626f8e8..6254877f9223 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanPrinter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanPrinter.java @@ -19,93 +19,93 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Streams; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.cost.PlanCostEstimate; -import io.prestosql.cost.PlanNodeStatsAndCostSummary; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.execution.StageInfo; -import io.prestosql.execution.StageStats; -import io.prestosql.execution.TableInfo; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.operator.StageExecutionDescriptor; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Marker; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.ColumnStatisticMetadata; -import io.prestosql.spi.statistics.TableStatisticType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.SubPlan; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.GroupReference; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExchangeNode.Scope; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.StatisticAggregations; -import io.prestosql.sql.planner.plan.StatisticAggregationsDescriptor; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableDeleteNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.planner.planprinter.NodeRepresentation.TypedSymbol; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.util.GraphvizPrinter; +import io.trino.Session; +import io.trino.cost.PlanCostEstimate; +import io.trino.cost.PlanNodeStatsAndCostSummary; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.cost.StatsAndCosts; +import io.trino.execution.StageInfo; +import io.trino.execution.StageStats; +import io.trino.execution.TableInfo; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.operator.StageExecutionDescriptor; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Marker; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.ColumnStatisticMetadata; +import io.trino.spi.statistics.TableStatisticType; +import io.trino.spi.type.Type; +import io.trino.sql.DynamicFilters; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.SubPlan; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExchangeNode.Scope; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.StatisticAggregations; +import io.trino.sql.planner.plan.StatisticAggregationsDescriptor; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableDeleteNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.planner.planprinter.NodeRepresentation.TypedSymbol; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SymbolReference; +import io.trino.util.GraphvizPrinter; import java.util.ArrayList; import java.util.Collection; @@ -126,17 +126,17 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.execution.StageInfo.getAllStages; -import static io.prestosql.metadata.ResolvedFunction.extractFunctionName; -import static io.prestosql.operator.StageExecutionDescriptor.ungroupedExecution; -import static io.prestosql.sql.DynamicFilters.extractDynamicFilters; -import static io.prestosql.sql.ExpressionUtils.combineConjunctsWithDuplicates; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.planprinter.PlanNodeStatsSummarizer.aggregateStageStats; -import static io.prestosql.sql.planner.planprinter.TextRenderer.formatDouble; -import static io.prestosql.sql.planner.planprinter.TextRenderer.formatPositions; -import static io.prestosql.sql.planner.planprinter.TextRenderer.indentString; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.execution.StageInfo.getAllStages; +import static io.trino.metadata.ResolvedFunction.extractFunctionName; +import static io.trino.operator.StageExecutionDescriptor.ungroupedExecution; +import static io.trino.sql.DynamicFilters.extractDynamicFilters; +import static io.trino.sql.ExpressionUtils.combineConjunctsWithDuplicates; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.planprinter.PlanNodeStatsSummarizer.aggregateStageStats; +import static io.trino.sql.planner.planprinter.TextRenderer.formatDouble; +import static io.trino.sql.planner.planprinter.TextRenderer.formatPositions; +import static io.trino.sql.planner.planprinter.TextRenderer.indentString; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.lang.String.format; import static java.util.Arrays.stream; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanRepresentation.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanRepresentation.java index 7b07485c44f7..465e8cbff8c5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanRepresentation.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanRepresentation.java @@ -14,9 +14,9 @@ package io.trino.sql.planner.planprinter; import io.airlift.units.Duration; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.HashMap; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/TableInfoSupplier.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/TableInfoSupplier.java index f6e977e54286..4d7b97a54841 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/TableInfoSupplier.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/TableInfoSupplier.java @@ -13,12 +13,12 @@ */ package io.trino.sql.planner.planprinter; -import io.prestosql.Session; -import io.prestosql.execution.TableInfo; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableMetadata; -import io.prestosql.metadata.TableProperties; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.execution.TableInfo; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableMetadata; +import io.trino.metadata.TableProperties; +import io.trino.sql.planner.plan.TableScanNode; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/TextRenderer.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/TextRenderer.java index eaf27a710713..c28f7971ea95 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/TextRenderer.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/TextRenderer.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableMap; import io.airlift.units.DataSize; -import io.prestosql.cost.PlanCostEstimate; -import io.prestosql.cost.PlanNodeStatsAndCostSummary; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.planprinter.NodeRepresentation.TypedSymbol; +import io.trino.cost.PlanCostEstimate; +import io.trino.cost.PlanNodeStatsAndCostSummary; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.planprinter.NodeRepresentation.TypedSymbol; import java.util.Iterator; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/ValuePrinter.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/ValuePrinter.java index 20ace423bcd8..e1742a75bda5 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/ValuePrinter.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/ValuePrinter.java @@ -14,14 +14,14 @@ package io.trino.sql.planner.planprinter; import io.airlift.slice.Slice; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.OperatorNotFoundException; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.InterpretedFunctionInvoker; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.OperatorNotFoundException; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.Type; +import io.trino.sql.InterpretedFunctionInvoker; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; public final class ValuePrinter diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/WindowOperatorStats.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/WindowOperatorStats.java index a54ab2dc2bd3..95cac8d41d71 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/WindowOperatorStats.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/WindowOperatorStats.java @@ -13,9 +13,9 @@ */ package io.trino.sql.planner.planprinter; -import io.prestosql.operator.WindowInfo; -import io.prestosql.operator.WindowInfo.DriverWindowInfo; -import io.prestosql.util.Mergeable; +import io.trino.operator.WindowInfo; +import io.trino.operator.WindowInfo.DriverWindowInfo; +import io.trino.util.Mergeable; class WindowOperatorStats implements Mergeable diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/WindowPlanNodeStats.java b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/WindowPlanNodeStats.java index 556a375d1735..2202426d7c69 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/WindowPlanNodeStats.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/planprinter/WindowPlanNodeStats.java @@ -15,7 +15,7 @@ import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/AllFunctionsResolved.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/AllFunctionsResolved.java index cacd7010ef66..aa49abce8a2b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/AllFunctionsResolved.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/AllFunctionsResolved.java @@ -14,19 +14,19 @@ package io.trino.sql.planner.sanity; import com.google.common.collect.ImmutableList.Builder; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.ExpressionExtractor; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.tree.DefaultExpressionTraversalVisitor; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.ExpressionExtractor; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.tree.DefaultExpressionTraversalVisitor; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/DynamicFiltersChecker.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/DynamicFiltersChecker.java index dcea13a87f40..42201e79c00f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/DynamicFiltersChecker.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/DynamicFiltersChecker.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.planner.SubExpressionExtractor; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.DynamicFilters; +import io.trino.sql.planner.SubExpressionExtractor; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.HashSet; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/NoDuplicatePlanNodeIdsChecker.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/NoDuplicatePlanNodeIdsChecker.java index 4e73605dafdf..f839c36d1c2b 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/NoDuplicatePlanNodeIdsChecker.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/NoDuplicatePlanNodeIdsChecker.java @@ -13,20 +13,20 @@ */ package io.trino.sql.planner.sanity; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.HashMap; import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/NoIdentifierLeftChecker.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/NoIdentifierLeftChecker.java index 7f70a29c8481..e06564b8e9c7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/NoIdentifierLeftChecker.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/NoIdentifierLeftChecker.java @@ -13,16 +13,16 @@ */ package io.trino.sql.planner.sanity; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.analyzer.ExpressionTreeUtils; -import io.prestosql.sql.planner.ExpressionExtractor; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.tree.Identifier; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.analyzer.ExpressionTreeUtils; +import io.trino.sql.planner.ExpressionExtractor; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.tree.Identifier; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/NoSubqueryExpressionLeftChecker.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/NoSubqueryExpressionLeftChecker.java index f2ebfdf76bc4..52cd9bc1a236 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/NoSubqueryExpressionLeftChecker.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/NoSubqueryExpressionLeftChecker.java @@ -13,17 +13,17 @@ */ package io.trino.sql.planner.sanity; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.ExpressionExtractor; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.tree.DefaultTraversalVisitor; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SubqueryExpression; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.ExpressionExtractor; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.tree.DefaultTraversalVisitor; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SubqueryExpression; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/PlanSanityChecker.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/PlanSanityChecker.java index 283ffb42838e..d17870bbcf32 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/PlanSanityChecker.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/PlanSanityChecker.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.Multimap; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNode; /** * It is going to be executed to verify logical planner correctness diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/SugarFreeChecker.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/SugarFreeChecker.java index 779aa101f2a2..b7c424adc241 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/SugarFreeChecker.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/SugarFreeChecker.java @@ -14,25 +14,25 @@ package io.trino.sql.planner.sanity; import com.google.common.collect.ImmutableList.Builder; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.ExpressionExtractor; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.tree.ArrayConstructor; -import io.prestosql.sql.tree.AtTimeZone; -import io.prestosql.sql.tree.CurrentPath; -import io.prestosql.sql.tree.CurrentUser; -import io.prestosql.sql.tree.DefaultExpressionTraversalVisitor; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Extract; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.TryExpression; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.ExpressionExtractor; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.tree.ArrayConstructor; +import io.trino.sql.tree.AtTimeZone; +import io.trino.sql.tree.CurrentPath; +import io.trino.sql.tree.CurrentUser; +import io.trino.sql.tree.DefaultExpressionTraversalVisitor; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Extract; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.TryExpression; /** * Verifies the plan does not contain any "syntactic sugar" from the AST. diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/TableScanValidator.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/TableScanValidator.java index 41865c84480a..281a66b902f0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/TableScanValidator.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/TableScanValidator.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.sanity; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.SimplePlanVisitor; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.SimplePlanVisitor; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; public class TableScanValidator implements PlanSanityChecker.Checker diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/TypeValidator.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/TypeValidator.java index b7fed69ff1cc..fca1c4e66f25 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/TypeValidator.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/TypeValidator.java @@ -14,27 +14,27 @@ package io.trino.sql.planner.sanity; import com.google.common.collect.ListMultimap; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.SimplePlanVisitor; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.type.FunctionType; -import io.prestosql.type.TypeCoercion; -import io.prestosql.type.UnknownType; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.SimplePlanVisitor; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; +import io.trino.type.FunctionType; +import io.trino.type.TypeCoercion; +import io.trino.type.UnknownType; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/ValidateAggregationsWithDefaultValues.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/ValidateAggregationsWithDefaultValues.java index eaaa9b5e66f4..79eb6e6127ff 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/ValidateAggregationsWithDefaultValues.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/ValidateAggregationsWithDefaultValues.java @@ -13,33 +13,33 @@ */ package io.trino.sql.planner.sanity; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.optimizations.ActualProperties; -import io.prestosql.sql.planner.optimizations.PropertyDerivations; -import io.prestosql.sql.planner.optimizations.StreamPropertyDerivations; -import io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.sanity.PlanSanityChecker.Checker; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.optimizations.ActualProperties; +import io.trino.sql.planner.optimizations.PropertyDerivations; +import io.trino.sql.planner.optimizations.StreamPropertyDerivations; +import io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.sanity.PlanSanityChecker.Checker; import java.util.List; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.FINAL; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.INTERMEDIATE; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.util.Optionals.combine; +import static io.trino.sql.planner.plan.AggregationNode.Step.FINAL; +import static io.trino.sql.planner.plan.AggregationNode.Step.INTERMEDIATE; +import static io.trino.sql.planner.plan.AggregationNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.util.Optionals.combine; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/ValidateDependenciesChecker.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/ValidateDependenciesChecker.java index e572aba99e28..2bea919f10b0 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/ValidateDependenciesChecker.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/ValidateDependenciesChecker.java @@ -16,58 +16,58 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SetOperationNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.StatisticAggregationsDescriptor; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableDeleteNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.Expression; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SetOperationNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.StatisticAggregationsDescriptor; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableDeleteNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.Expression; import java.util.Collection; import java.util.HashSet; @@ -79,8 +79,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.optimizations.IndexJoinOptimizer.IndexKeyTracer; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.planner.optimizations.IndexJoinOptimizer.IndexKeyTracer; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; /** * Ensures that all dependencies (i.e., symbols in expressions) for a plan node are provided by its source nodes diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/ValidateStreamingAggregations.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/ValidateStreamingAggregations.java index 953cd0b3f5a1..7fc7523cd1db 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/ValidateStreamingAggregations.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/ValidateStreamingAggregations.java @@ -15,28 +15,28 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterators; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.GroupingProperty; -import io.prestosql.spi.connector.LocalProperty; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.optimizations.LocalProperties; -import io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.sanity.PlanSanityChecker.Checker; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.GroupingProperty; +import io.trino.spi.connector.LocalProperty; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.optimizations.LocalProperties; +import io.trino.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.sanity.PlanSanityChecker.Checker; import java.util.Iterator; import java.util.List; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.sql.planner.optimizations.StreamPropertyDerivations.derivePropertiesRecursively; +import static io.trino.sql.planner.optimizations.StreamPropertyDerivations.derivePropertiesRecursively; /** * Verifies that input of streaming aggregations is grouped on the grouping keys diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/VerifyNoFilteredAggregations.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/VerifyNoFilteredAggregations.java index 852d3b99d4e1..a6e12452dc1e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/VerifyNoFilteredAggregations.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/VerifyNoFilteredAggregations.java @@ -13,16 +13,16 @@ */ package io.trino.sql.planner.sanity; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.PlanNode; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; public final class VerifyNoFilteredAggregations implements PlanSanityChecker.Checker diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/VerifyOnlyOneOutputNode.java b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/VerifyOnlyOneOutputNode.java index 0f4f1c01c7ca..73394fd1f801 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/sanity/VerifyOnlyOneOutputNode.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/sanity/VerifyOnlyOneOutputNode.java @@ -13,17 +13,17 @@ */ package io.trino.sql.planner.sanity; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; public final class VerifyOnlyOneOutputNode implements PlanSanityChecker.Checker diff --git a/core/trino-main/src/main/java/io/trino/sql/relational/CallExpression.java b/core/trino-main/src/main/java/io/trino/sql/relational/CallExpression.java index d6c5de3f2035..f126ed559f8c 100644 --- a/core/trino-main/src/main/java/io/trino/sql/relational/CallExpression.java +++ b/core/trino-main/src/main/java/io/trino/sql/relational/CallExpression.java @@ -15,8 +15,8 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.Type; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.Type; import java.util.List; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/sql/relational/ConstantExpression.java b/core/trino-main/src/main/java/io/trino/sql/relational/ConstantExpression.java index 9d0e1e7764fb..67e044a6bbcc 100644 --- a/core/trino-main/src/main/java/io/trino/sql/relational/ConstantExpression.java +++ b/core/trino-main/src/main/java/io/trino/sql/relational/ConstantExpression.java @@ -13,7 +13,7 @@ */ package io.trino.sql.relational; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/sql/relational/DeterminismEvaluator.java b/core/trino-main/src/main/java/io/trino/sql/relational/DeterminismEvaluator.java index b86d809784d4..f812e32d3f3d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/relational/DeterminismEvaluator.java +++ b/core/trino-main/src/main/java/io/trino/sql/relational/DeterminismEvaluator.java @@ -13,9 +13,9 @@ */ package io.trino.sql.relational; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.PrestoException; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.PrestoException; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/relational/Expressions.java b/core/trino-main/src/main/java/io/trino/sql/relational/Expressions.java index 50e3b71c568c..06aca1ad8a34 100644 --- a/core/trino-main/src/main/java/io/trino/sql/relational/Expressions.java +++ b/core/trino-main/src/main/java/io/trino/sql/relational/Expressions.java @@ -14,8 +14,8 @@ package io.trino.sql.relational; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.Type; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.Type; import java.util.Arrays; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/sql/relational/InputReferenceExpression.java b/core/trino-main/src/main/java/io/trino/sql/relational/InputReferenceExpression.java index b1552ff0e177..bcf513637ee1 100644 --- a/core/trino-main/src/main/java/io/trino/sql/relational/InputReferenceExpression.java +++ b/core/trino-main/src/main/java/io/trino/sql/relational/InputReferenceExpression.java @@ -14,7 +14,7 @@ package io.trino.sql.relational; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/sql/relational/LambdaDefinitionExpression.java b/core/trino-main/src/main/java/io/trino/sql/relational/LambdaDefinitionExpression.java index 4bd5341e5797..0ff3c3c301fc 100644 --- a/core/trino-main/src/main/java/io/trino/sql/relational/LambdaDefinitionExpression.java +++ b/core/trino-main/src/main/java/io/trino/sql/relational/LambdaDefinitionExpression.java @@ -15,8 +15,8 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.Type; -import io.prestosql.type.FunctionType; +import io.trino.spi.type.Type; +import io.trino.type.FunctionType; import java.util.List; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/sql/relational/RowExpression.java b/core/trino-main/src/main/java/io/trino/sql/relational/RowExpression.java index 4f07d3c81a01..484d79a115ad 100644 --- a/core/trino-main/src/main/java/io/trino/sql/relational/RowExpression.java +++ b/core/trino-main/src/main/java/io/trino/sql/relational/RowExpression.java @@ -13,7 +13,7 @@ */ package io.trino.sql.relational; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; public abstract class RowExpression { diff --git a/core/trino-main/src/main/java/io/trino/sql/relational/SpecialForm.java b/core/trino-main/src/main/java/io/trino/sql/relational/SpecialForm.java index c27fa619c357..63b3a087600d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/relational/SpecialForm.java +++ b/core/trino-main/src/main/java/io/trino/sql/relational/SpecialForm.java @@ -15,17 +15,17 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.metadata.Signature; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.ResolvedFunction; +import io.trino.metadata.Signature; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; import java.util.List; import java.util.Objects; import java.util.Optional; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.CAST; import static java.util.Objects.requireNonNull; public class SpecialForm diff --git a/core/trino-main/src/main/java/io/trino/sql/relational/SqlToRowExpressionTranslator.java b/core/trino-main/src/main/java/io/trino/sql/relational/SqlToRowExpressionTranslator.java index 7f52ebdb5132..2cd7028e4649 100644 --- a/core/trino-main/src/main/java/io/trino/sql/relational/SqlToRowExpressionTranslator.java +++ b/core/trino-main/src/main/java/io/trino/sql/relational/SqlToRowExpressionTranslator.java @@ -16,65 +16,65 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.type.DecimalParseResult; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.RowType.Field; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.relational.SpecialForm.Form; -import io.prestosql.sql.relational.optimizer.ExpressionOptimizer; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.BinaryLiteral; -import io.prestosql.sql.tree.BindExpression; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CharLiteral; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.ComparisonExpression.Operator; -import io.prestosql.sql.tree.DecimalLiteral; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FieldReference; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.InListExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.IntervalLiteral; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullIfExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SubscriptExpression; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.TimeLiteral; -import io.prestosql.sql.tree.TimestampLiteral; -import io.prestosql.sql.tree.WhenClause; -import io.prestosql.type.UnknownType; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.type.DecimalParseResult; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.RowType; +import io.trino.spi.type.RowType.Field; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Symbol; +import io.trino.sql.relational.SpecialForm.Form; +import io.trino.sql.relational.optimizer.ExpressionOptimizer; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArithmeticUnaryExpression; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.BinaryLiteral; +import io.trino.sql.tree.BindExpression; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CharLiteral; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.ComparisonExpression.Operator; +import io.trino.sql.tree.DecimalLiteral; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FieldReference; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.InListExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.IntervalLiteral; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullIfExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SubscriptExpression; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.TimeLiteral; +import io.trino.sql.tree.TimestampLiteral; +import io.trino.sql.tree.WhenClause; +import io.trino.type.UnknownType; import java.util.List; import java.util.Map; @@ -84,45 +84,45 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.SliceUtf8.countCodePoints; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.NEGATION; -import static io.prestosql.spi.function.OperatorType.SUBSCRIPT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.call; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.constantNull; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.sql.relational.SpecialForm.Form.AND; -import static io.prestosql.sql.relational.SpecialForm.Form.BETWEEN; -import static io.prestosql.sql.relational.SpecialForm.Form.BIND; -import static io.prestosql.sql.relational.SpecialForm.Form.COALESCE; -import static io.prestosql.sql.relational.SpecialForm.Form.DEREFERENCE; -import static io.prestosql.sql.relational.SpecialForm.Form.IF; -import static io.prestosql.sql.relational.SpecialForm.Form.IN; -import static io.prestosql.sql.relational.SpecialForm.Form.IS_NULL; -import static io.prestosql.sql.relational.SpecialForm.Form.NULL_IF; -import static io.prestosql.sql.relational.SpecialForm.Form.OR; -import static io.prestosql.sql.relational.SpecialForm.Form.ROW_CONSTRUCTOR; -import static io.prestosql.sql.relational.SpecialForm.Form.SWITCH; -import static io.prestosql.sql.relational.SpecialForm.Form.WHEN; -import static io.prestosql.type.DateTimes.parseTime; -import static io.prestosql.type.DateTimes.parseTimeWithTimeZone; -import static io.prestosql.type.DateTimes.parseTimestamp; -import static io.prestosql.type.DateTimes.parseTimestampWithTimeZone; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.DateTimeUtils.parseDayTimeInterval; -import static io.prestosql.util.DateTimeUtils.parseYearMonthInterval; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.NEGATION; +import static io.trino.spi.function.OperatorType.SUBSCRIPT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.call; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.constantNull; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.sql.relational.SpecialForm.Form.AND; +import static io.trino.sql.relational.SpecialForm.Form.BETWEEN; +import static io.trino.sql.relational.SpecialForm.Form.BIND; +import static io.trino.sql.relational.SpecialForm.Form.COALESCE; +import static io.trino.sql.relational.SpecialForm.Form.DEREFERENCE; +import static io.trino.sql.relational.SpecialForm.Form.IF; +import static io.trino.sql.relational.SpecialForm.Form.IN; +import static io.trino.sql.relational.SpecialForm.Form.IS_NULL; +import static io.trino.sql.relational.SpecialForm.Form.NULL_IF; +import static io.trino.sql.relational.SpecialForm.Form.OR; +import static io.trino.sql.relational.SpecialForm.Form.ROW_CONSTRUCTOR; +import static io.trino.sql.relational.SpecialForm.Form.SWITCH; +import static io.trino.sql.relational.SpecialForm.Form.WHEN; +import static io.trino.type.DateTimes.parseTime; +import static io.trino.type.DateTimes.parseTimeWithTimeZone; +import static io.trino.type.DateTimes.parseTimestamp; +import static io.trino.type.DateTimes.parseTimestampWithTimeZone; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.DateTimeUtils.parseDayTimeInterval; +import static io.trino.util.DateTimeUtils.parseYearMonthInterval; import static java.util.Objects.requireNonNull; public final class SqlToRowExpressionTranslator diff --git a/core/trino-main/src/main/java/io/trino/sql/relational/StandardFunctionResolution.java b/core/trino-main/src/main/java/io/trino/sql/relational/StandardFunctionResolution.java index fda8ed6d2f86..3d0598d2a068 100644 --- a/core/trino-main/src/main/java/io/trino/sql/relational/StandardFunctionResolution.java +++ b/core/trino-main/src/main/java/io/trino/sql/relational/StandardFunctionResolution.java @@ -14,22 +14,22 @@ package io.trino.sql.relational; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ComparisonExpression; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.Type; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ComparisonExpression; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.DIVIDE; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.IS_DISTINCT_FROM; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.MODULUS; -import static io.prestosql.spi.function.OperatorType.MULTIPLY; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.DIVIDE; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.IS_DISTINCT_FROM; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.MODULUS; +import static io.trino.spi.function.OperatorType.MULTIPLY; +import static io.trino.spi.function.OperatorType.SUBTRACT; import static java.util.Objects.requireNonNull; public final class StandardFunctionResolution diff --git a/core/trino-main/src/main/java/io/trino/sql/relational/VariableReferenceExpression.java b/core/trino-main/src/main/java/io/trino/sql/relational/VariableReferenceExpression.java index dbe03e3a4359..fd0cd59f8f6d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/relational/VariableReferenceExpression.java +++ b/core/trino-main/src/main/java/io/trino/sql/relational/VariableReferenceExpression.java @@ -13,7 +13,7 @@ */ package io.trino.sql.relational; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/core/trino-main/src/main/java/io/trino/sql/relational/optimizer/ExpressionOptimizer.java b/core/trino-main/src/main/java/io/trino/sql/relational/optimizer/ExpressionOptimizer.java index 49086f13d1fb..0a4f8eccbcb7 100644 --- a/core/trino-main/src/main/java/io/trino/sql/relational/optimizer/ExpressionOptimizer.java +++ b/core/trino-main/src/main/java/io/trino/sql/relational/optimizer/ExpressionOptimizer.java @@ -14,24 +14,24 @@ package io.trino.sql.relational.optimizer; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.InterpretedFunctionInvoker; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.InputReferenceExpression; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.RowExpressionVisitor; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.sql.relational.VariableReferenceExpression; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.Session; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.InterpretedFunctionInvoker; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.InputReferenceExpression; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.RowExpressionVisitor; +import io.trino.sql.relational.SpecialForm; +import io.trino.sql.relational.VariableReferenceExpression; +import io.trino.sql.tree.QualifiedName; import java.util.List; import java.util.stream.Collectors; @@ -39,17 +39,17 @@ 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.prestosql.metadata.Signature.mangleOperatorName; -import static io.prestosql.operator.scalar.JsonStringToArrayCast.JSON_STRING_TO_ARRAY_NAME; -import static io.prestosql.operator.scalar.JsonStringToMapCast.JSON_STRING_TO_MAP_NAME; -import static io.prestosql.operator.scalar.JsonStringToRowCast.JSON_STRING_TO_ROW_NAME; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.relational.Expressions.call; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.SpecialForm.Form.BIND; -import static io.prestosql.type.JsonType.JSON; +import static io.trino.metadata.Signature.mangleOperatorName; +import static io.trino.operator.scalar.JsonStringToArrayCast.JSON_STRING_TO_ARRAY_NAME; +import static io.trino.operator.scalar.JsonStringToMapCast.JSON_STRING_TO_MAP_NAME; +import static io.trino.operator.scalar.JsonStringToRowCast.JSON_STRING_TO_ROW_NAME; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.relational.Expressions.call; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.SpecialForm.Form.BIND; +import static io.trino.type.JsonType.JSON; public class ExpressionOptimizer { diff --git a/core/trino-main/src/main/java/io/trino/sql/rewrite/DescribeInputRewrite.java b/core/trino-main/src/main/java/io/trino/sql/rewrite/DescribeInputRewrite.java index 9291abee8003..28b6c75c7098 100644 --- a/core/trino-main/src/main/java/io/trino/sql/rewrite/DescribeInputRewrite.java +++ b/core/trino-main/src/main/java/io/trino/sql/rewrite/DescribeInputRewrite.java @@ -14,47 +14,47 @@ package io.trino.sql.rewrite; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.Analyzer; -import io.prestosql.sql.analyzer.QueryExplainer; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.DescribeInput; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Limit; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.Statement; -import io.prestosql.sql.tree.StringLiteral; +import io.trino.Session; +import io.trino.cost.StatsCalculator; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.type.Type; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.analyzer.Analyzer; +import io.trino.sql.analyzer.QueryExplainer; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.DescribeInput; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Limit; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.Statement; +import io.trino.sql.tree.StringLiteral; import java.util.List; import java.util.Map; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.isOmitDateTimeTypePrecision; -import static io.prestosql.execution.ParameterExtractor.getParameters; -import static io.prestosql.sql.ParsingUtil.createParsingOptions; -import static io.prestosql.sql.QueryUtil.aliased; -import static io.prestosql.sql.QueryUtil.ascending; -import static io.prestosql.sql.QueryUtil.identifier; -import static io.prestosql.sql.QueryUtil.ordering; -import static io.prestosql.sql.QueryUtil.row; -import static io.prestosql.sql.QueryUtil.selectList; -import static io.prestosql.sql.QueryUtil.simpleQuery; -import static io.prestosql.sql.QueryUtil.values; -import static io.prestosql.type.TypeUtils.getDisplayLabel; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.SystemSessionProperties.isOmitDateTimeTypePrecision; +import static io.trino.execution.ParameterExtractor.getParameters; +import static io.trino.sql.ParsingUtil.createParsingOptions; +import static io.trino.sql.QueryUtil.aliased; +import static io.trino.sql.QueryUtil.ascending; +import static io.trino.sql.QueryUtil.identifier; +import static io.trino.sql.QueryUtil.ordering; +import static io.trino.sql.QueryUtil.row; +import static io.trino.sql.QueryUtil.selectList; +import static io.trino.sql.QueryUtil.simpleQuery; +import static io.trino.sql.QueryUtil.values; +import static io.trino.type.TypeUtils.getDisplayLabel; +import static io.trino.type.UnknownType.UNKNOWN; import static java.util.Objects.requireNonNull; final class DescribeInputRewrite diff --git a/core/trino-main/src/main/java/io/trino/sql/rewrite/DescribeOutputRewrite.java b/core/trino-main/src/main/java/io/trino/sql/rewrite/DescribeOutputRewrite.java index 9d3b25c6289a..5ee44a10e24a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/rewrite/DescribeOutputRewrite.java +++ b/core/trino-main/src/main/java/io/trino/sql/rewrite/DescribeOutputRewrite.java @@ -14,46 +14,46 @@ package io.trino.sql.rewrite; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.type.FixedWidthType; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.Analyzer; -import io.prestosql.sql.analyzer.Field; -import io.prestosql.sql.analyzer.QueryExplainer; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.DescribeOutput; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Limit; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.Statement; -import io.prestosql.sql.tree.StringLiteral; +import io.trino.Session; +import io.trino.cost.StatsCalculator; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.security.AccessControl; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.type.FixedWidthType; +import io.trino.sql.analyzer.Analysis; +import io.trino.sql.analyzer.Analyzer; +import io.trino.sql.analyzer.Field; +import io.trino.sql.analyzer.QueryExplainer; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.DescribeOutput; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Limit; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.Statement; +import io.trino.sql.tree.StringLiteral; import java.util.List; import java.util.Map; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.isOmitDateTimeTypePrecision; -import static io.prestosql.sql.ParsingUtil.createParsingOptions; -import static io.prestosql.sql.QueryUtil.aliased; -import static io.prestosql.sql.QueryUtil.identifier; -import static io.prestosql.sql.QueryUtil.row; -import static io.prestosql.sql.QueryUtil.selectList; -import static io.prestosql.sql.QueryUtil.simpleQuery; -import static io.prestosql.sql.QueryUtil.values; -import static io.prestosql.type.TypeUtils.getDisplayLabel; +import static io.trino.SystemSessionProperties.isOmitDateTimeTypePrecision; +import static io.trino.sql.ParsingUtil.createParsingOptions; +import static io.trino.sql.QueryUtil.aliased; +import static io.trino.sql.QueryUtil.identifier; +import static io.trino.sql.QueryUtil.row; +import static io.trino.sql.QueryUtil.selectList; +import static io.trino.sql.QueryUtil.simpleQuery; +import static io.trino.sql.QueryUtil.values; +import static io.trino.type.TypeUtils.getDisplayLabel; import static java.util.Objects.requireNonNull; final class DescribeOutputRewrite diff --git a/core/trino-main/src/main/java/io/trino/sql/rewrite/ExplainRewrite.java b/core/trino-main/src/main/java/io/trino/sql/rewrite/ExplainRewrite.java index ad41949b173f..8cf4bc0b245e 100644 --- a/core/trino-main/src/main/java/io/trino/sql/rewrite/ExplainRewrite.java +++ b/core/trino-main/src/main/java/io/trino/sql/rewrite/ExplainRewrite.java @@ -13,37 +13,37 @@ */ package io.trino.sql.rewrite; -import io.prestosql.Session; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.execution.QueryPreparer; -import io.prestosql.execution.QueryPreparer.PreparedQuery; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.sql.analyzer.QueryExplainer; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.Explain; -import io.prestosql.sql.tree.ExplainFormat; -import io.prestosql.sql.tree.ExplainOption; -import io.prestosql.sql.tree.ExplainType; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.Statement; +import io.trino.Session; +import io.trino.cost.StatsCalculator; +import io.trino.execution.QueryPreparer; +import io.trino.execution.QueryPreparer.PreparedQuery; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.security.GroupProvider; +import io.trino.sql.analyzer.QueryExplainer; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.Explain; +import io.trino.sql.tree.ExplainFormat; +import io.trino.sql.tree.ExplainOption; +import io.trino.sql.tree.ExplainType; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.Statement; import java.util.List; import java.util.Map; import java.util.Optional; -import static io.prestosql.sql.QueryUtil.singleValueQuery; -import static io.prestosql.sql.tree.ExplainFormat.Type.JSON; -import static io.prestosql.sql.tree.ExplainFormat.Type.TEXT; -import static io.prestosql.sql.tree.ExplainType.Type.DISTRIBUTED; -import static io.prestosql.sql.tree.ExplainType.Type.IO; -import static io.prestosql.sql.tree.ExplainType.Type.VALIDATE; +import static io.trino.sql.QueryUtil.singleValueQuery; +import static io.trino.sql.tree.ExplainFormat.Type.JSON; +import static io.trino.sql.tree.ExplainFormat.Type.TEXT; +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.VALIDATE; import static java.util.Objects.requireNonNull; final class ExplainRewrite diff --git a/core/trino-main/src/main/java/io/trino/sql/rewrite/ShowQueriesRewrite.java b/core/trino-main/src/main/java/io/trino/sql/rewrite/ShowQueriesRewrite.java index 2a8426952b93..64f43da5d553 100644 --- a/core/trino-main/src/main/java/io/trino/sql/rewrite/ShowQueriesRewrite.java +++ b/core/trino-main/src/main/java/io/trino/sql/rewrite/ShowQueriesRewrite.java @@ -19,70 +19,70 @@ import com.google.common.collect.ImmutableSortedMap; import com.google.common.collect.Lists; import com.google.common.primitives.Primitives; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.FunctionKind; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.MetadataUtil; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.SessionPropertyManager.SessionPropertyValue; -import io.prestosql.metadata.TableHandle; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.ConnectorMaterializedViewDefinition; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.sql.analyzer.QueryExplainer; -import io.prestosql.sql.parser.ParsingException; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.ArrayConstructor; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.ColumnDefinition; -import io.prestosql.sql.tree.CreateMaterializedView; -import io.prestosql.sql.tree.CreateSchema; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.CreateView; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.Explain; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.PrincipalSpecification; -import io.prestosql.sql.tree.Property; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.Relation; -import io.prestosql.sql.tree.ShowCatalogs; -import io.prestosql.sql.tree.ShowColumns; -import io.prestosql.sql.tree.ShowCreate; -import io.prestosql.sql.tree.ShowFunctions; -import io.prestosql.sql.tree.ShowGrants; -import io.prestosql.sql.tree.ShowRoleGrants; -import io.prestosql.sql.tree.ShowRoles; -import io.prestosql.sql.tree.ShowSchemas; -import io.prestosql.sql.tree.ShowSession; -import io.prestosql.sql.tree.ShowTables; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.Statement; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.TableElement; -import io.prestosql.sql.tree.Values; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.cost.StatsCalculator; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.FunctionKind; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.metadata.MetadataUtil; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.SessionPropertyManager.SessionPropertyValue; +import io.trino.metadata.TableHandle; +import io.trino.security.AccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.ConnectorMaterializedViewDefinition; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.PrincipalType; +import io.trino.spi.session.PropertyMetadata; +import io.trino.sql.analyzer.QueryExplainer; +import io.trino.sql.parser.ParsingException; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.ArrayConstructor; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.ColumnDefinition; +import io.trino.sql.tree.CreateMaterializedView; +import io.trino.sql.tree.CreateSchema; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.CreateView; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.Explain; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.PrincipalSpecification; +import io.trino.sql.tree.Property; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.Relation; +import io.trino.sql.tree.ShowCatalogs; +import io.trino.sql.tree.ShowColumns; +import io.trino.sql.tree.ShowCreate; +import io.trino.sql.tree.ShowFunctions; +import io.trino.sql.tree.ShowGrants; +import io.trino.sql.tree.ShowRoleGrants; +import io.trino.sql.tree.ShowRoles; +import io.trino.sql.tree.ShowSchemas; +import io.trino.sql.tree.ShowSession; +import io.trino.sql.tree.ShowTables; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.Statement; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.TableElement; +import io.trino.sql.tree.Values; import java.util.ArrayList; import java.util.Collections; @@ -94,52 +94,52 @@ import static com.google.common.base.Strings.nullToEmpty; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.connector.informationschema.InformationSchemaTable.COLUMNS; -import static io.prestosql.connector.informationschema.InformationSchemaTable.ENABLED_ROLES; -import static io.prestosql.connector.informationschema.InformationSchemaTable.ROLES; -import static io.prestosql.connector.informationschema.InformationSchemaTable.SCHEMATA; -import static io.prestosql.connector.informationschema.InformationSchemaTable.TABLES; -import static io.prestosql.connector.informationschema.InformationSchemaTable.TABLE_PRIVILEGES; -import static io.prestosql.metadata.MetadataListing.listCatalogs; -import static io.prestosql.metadata.MetadataListing.listSchemas; -import static io.prestosql.metadata.MetadataUtil.createCatalogSchemaName; -import static io.prestosql.metadata.MetadataUtil.createQualifiedObjectName; -import static io.prestosql.spi.StandardErrorCode.CATALOG_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.INVALID_COLUMN_PROPERTY; -import static io.prestosql.spi.StandardErrorCode.INVALID_SCHEMA_PROPERTY; -import static io.prestosql.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; -import static io.prestosql.spi.StandardErrorCode.INVALID_VIEW; -import static io.prestosql.spi.StandardErrorCode.MISSING_CATALOG_NAME; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.ParsingUtil.createParsingOptions; -import static io.prestosql.sql.QueryUtil.aliased; -import static io.prestosql.sql.QueryUtil.aliasedName; -import static io.prestosql.sql.QueryUtil.aliasedNullToEmpty; -import static io.prestosql.sql.QueryUtil.ascending; -import static io.prestosql.sql.QueryUtil.equal; -import static io.prestosql.sql.QueryUtil.functionCall; -import static io.prestosql.sql.QueryUtil.identifier; -import static io.prestosql.sql.QueryUtil.logicalAnd; -import static io.prestosql.sql.QueryUtil.ordering; -import static io.prestosql.sql.QueryUtil.row; -import static io.prestosql.sql.QueryUtil.selectAll; -import static io.prestosql.sql.QueryUtil.selectList; -import static io.prestosql.sql.QueryUtil.simpleQuery; -import static io.prestosql.sql.QueryUtil.singleValueQuery; -import static io.prestosql.sql.QueryUtil.table; -import static io.prestosql.sql.SqlFormatter.formatSql; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.tree.BooleanLiteral.FALSE_LITERAL; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.LogicalBinaryExpression.and; -import static io.prestosql.sql.tree.ShowCreate.Type.MATERIALIZED_VIEW; -import static io.prestosql.sql.tree.ShowCreate.Type.SCHEMA; -import static io.prestosql.sql.tree.ShowCreate.Type.TABLE; -import static io.prestosql.sql.tree.ShowCreate.Type.VIEW; +import static io.trino.connector.informationschema.InformationSchemaTable.COLUMNS; +import static io.trino.connector.informationschema.InformationSchemaTable.ENABLED_ROLES; +import static io.trino.connector.informationschema.InformationSchemaTable.ROLES; +import static io.trino.connector.informationschema.InformationSchemaTable.SCHEMATA; +import static io.trino.connector.informationschema.InformationSchemaTable.TABLES; +import static io.trino.connector.informationschema.InformationSchemaTable.TABLE_PRIVILEGES; +import static io.trino.metadata.MetadataListing.listCatalogs; +import static io.trino.metadata.MetadataListing.listSchemas; +import static io.trino.metadata.MetadataUtil.createCatalogSchemaName; +import static io.trino.metadata.MetadataUtil.createQualifiedObjectName; +import static io.trino.spi.StandardErrorCode.CATALOG_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.INVALID_COLUMN_PROPERTY; +import static io.trino.spi.StandardErrorCode.INVALID_SCHEMA_PROPERTY; +import static io.trino.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; +import static io.trino.spi.StandardErrorCode.INVALID_VIEW; +import static io.trino.spi.StandardErrorCode.MISSING_CATALOG_NAME; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.ParsingUtil.createParsingOptions; +import static io.trino.sql.QueryUtil.aliased; +import static io.trino.sql.QueryUtil.aliasedName; +import static io.trino.sql.QueryUtil.aliasedNullToEmpty; +import static io.trino.sql.QueryUtil.ascending; +import static io.trino.sql.QueryUtil.equal; +import static io.trino.sql.QueryUtil.functionCall; +import static io.trino.sql.QueryUtil.identifier; +import static io.trino.sql.QueryUtil.logicalAnd; +import static io.trino.sql.QueryUtil.ordering; +import static io.trino.sql.QueryUtil.row; +import static io.trino.sql.QueryUtil.selectAll; +import static io.trino.sql.QueryUtil.selectList; +import static io.trino.sql.QueryUtil.simpleQuery; +import static io.trino.sql.QueryUtil.singleValueQuery; +import static io.trino.sql.QueryUtil.table; +import static io.trino.sql.SqlFormatter.formatSql; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.tree.BooleanLiteral.FALSE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.LogicalBinaryExpression.and; +import static io.trino.sql.tree.ShowCreate.Type.MATERIALIZED_VIEW; +import static io.trino.sql.tree.ShowCreate.Type.SCHEMA; +import static io.trino.sql.tree.ShowCreate.Type.TABLE; +import static io.trino.sql.tree.ShowCreate.Type.VIEW; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/rewrite/ShowStatsRewrite.java b/core/trino-main/src/main/java/io/trino/sql/rewrite/ShowStatsRewrite.java index accd7defe9bb..01d07017a62a 100644 --- a/core/trino-main/src/main/java/io/trino/sql/rewrite/ShowStatsRewrite.java +++ b/core/trino-main/src/main/java/io/trino/sql/rewrite/ShowStatsRewrite.java @@ -14,47 +14,47 @@ package io.trino.sql.rewrite; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.cost.CachingStatsProvider; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.cost.SymbolStatsEstimate; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.QueryUtil; -import io.prestosql.sql.analyzer.QueryExplainer; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.QuerySpecification; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SelectItem; -import io.prestosql.sql.tree.ShowStats; -import io.prestosql.sql.tree.Statement; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.Table; -import io.prestosql.sql.tree.TableSubquery; -import io.prestosql.sql.tree.Values; +import io.trino.Session; +import io.trino.cost.CachingStatsProvider; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.cost.StatsCalculator; +import io.trino.cost.SymbolStatsEstimate; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.sql.QueryUtil; +import io.trino.sql.analyzer.QueryExplainer; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.QuerySpecification; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SelectItem; +import io.trino.sql.tree.ShowStats; +import io.trino.sql.tree.Statement; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.Table; +import io.trino.sql.tree.TableSubquery; +import io.trino.sql.tree.Values; import java.time.LocalDate; import java.util.List; @@ -64,15 +64,15 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.QueryUtil.aliased; -import static io.prestosql.sql.QueryUtil.query; -import static io.prestosql.sql.QueryUtil.selectAll; -import static io.prestosql.sql.QueryUtil.selectList; -import static io.prestosql.sql.QueryUtil.simpleQuery; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.QueryUtil.aliased; +import static io.trino.sql.QueryUtil.query; +import static io.trino.sql.QueryUtil.selectAll; +import static io.trino.sql.QueryUtil.selectList; +import static io.trino.sql.QueryUtil.simpleQuery; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; import static java.lang.Double.isFinite; import static java.lang.Math.round; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/sql/rewrite/StatementRewrite.java b/core/trino-main/src/main/java/io/trino/sql/rewrite/StatementRewrite.java index f5496648160a..8c4e27ce0860 100644 --- a/core/trino-main/src/main/java/io/trino/sql/rewrite/StatementRewrite.java +++ b/core/trino-main/src/main/java/io/trino/sql/rewrite/StatementRewrite.java @@ -14,18 +14,18 @@ package io.trino.sql.rewrite; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.sql.analyzer.QueryExplainer; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.Statement; +import io.trino.Session; +import io.trino.cost.StatsCalculator; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.spi.security.GroupProvider; +import io.trino.sql.analyzer.QueryExplainer; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.Statement; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/testing/DateTimeTestingUtils.java b/core/trino-main/src/main/java/io/trino/testing/DateTimeTestingUtils.java index a259896fac9a..1738dddb66be 100644 --- a/core/trino-main/src/main/java/io/trino/testing/DateTimeTestingUtils.java +++ b/core/trino-main/src/main/java/io/trino/testing/DateTimeTestingUtils.java @@ -13,12 +13,12 @@ */ package io.trino.testing; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimeWithTimeZone; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimeWithTimeZone; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; import org.joda.time.DateTime; import java.time.LocalDate; @@ -26,10 +26,10 @@ import java.time.LocalTime; import java.time.ZonedDateTime; -import static io.prestosql.type.DateTimes.MILLISECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.MILLISECONDS_PER_SECOND; +import static io.trino.type.DateTimes.NANOSECONDS_PER_MILLISECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_NANOSECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; import static java.lang.Math.toIntExact; import static java.time.temporal.ChronoField.EPOCH_DAY; import static java.util.concurrent.TimeUnit.DAYS; 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 ebd960462700..c0b5e86f0392 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,164 +19,164 @@ import com.google.common.io.Closer; import io.airlift.node.NodeInfo; import io.airlift.units.Duration; -import io.prestosql.GroupByHashPageIndexerFactory; -import io.prestosql.PagesIndexPageSorter; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.ConnectorManager; -import io.prestosql.connector.system.AnalyzePropertiesSystemTable; -import io.prestosql.connector.system.CatalogSystemTable; -import io.prestosql.connector.system.ColumnPropertiesSystemTable; -import io.prestosql.connector.system.GlobalSystemConnector; -import io.prestosql.connector.system.GlobalSystemConnectorFactory; -import io.prestosql.connector.system.NodeSystemTable; -import io.prestosql.connector.system.SchemaPropertiesSystemTable; -import io.prestosql.connector.system.TableCommentSystemTable; -import io.prestosql.connector.system.TablePropertiesSystemTable; -import io.prestosql.connector.system.TransactionsSystemTable; -import io.prestosql.cost.CostCalculator; -import io.prestosql.cost.CostCalculatorUsingExchanges; -import io.prestosql.cost.CostCalculatorWithEstimatedExchanges; -import io.prestosql.cost.CostComparator; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.cost.TaskCountEstimator; -import io.prestosql.eventlistener.EventListenerConfig; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.execution.CommentTask; -import io.prestosql.execution.CommitTask; -import io.prestosql.execution.CreateTableTask; -import io.prestosql.execution.CreateViewTask; -import io.prestosql.execution.DataDefinitionTask; -import io.prestosql.execution.DeallocateTask; -import io.prestosql.execution.DropTableTask; -import io.prestosql.execution.DropViewTask; -import io.prestosql.execution.DynamicFilterConfig; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.NodeTaskMap; -import io.prestosql.execution.PrepareTask; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.execution.QueryPreparer; -import io.prestosql.execution.QueryPreparer.PreparedQuery; -import io.prestosql.execution.RenameColumnTask; -import io.prestosql.execution.RenameTableTask; -import io.prestosql.execution.RenameViewTask; -import io.prestosql.execution.ResetSessionTask; -import io.prestosql.execution.RollbackTask; -import io.prestosql.execution.ScheduledSplit; -import io.prestosql.execution.SetPathTask; -import io.prestosql.execution.SetSessionTask; -import io.prestosql.execution.StartTransactionTask; -import io.prestosql.execution.TaskManagerConfig; -import io.prestosql.execution.TaskSource; -import io.prestosql.execution.resourcegroups.NoOpResourceGroupManager; -import io.prestosql.execution.scheduler.NodeScheduler; -import io.prestosql.execution.scheduler.NodeSchedulerConfig; -import io.prestosql.execution.scheduler.UniformNodeSelectorFactory; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.index.IndexManager; -import io.prestosql.memory.MemoryManagerConfig; -import io.prestosql.memory.NodeMemoryConfig; -import io.prestosql.metadata.AnalyzePropertyManager; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.ColumnPropertyManager; -import io.prestosql.metadata.HandleResolver; -import io.prestosql.metadata.InMemoryNodeManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.metadata.MetadataUtil; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.QualifiedTablePrefix; -import io.prestosql.metadata.SchemaPropertyManager; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.metadata.Split; -import io.prestosql.metadata.SqlFunction; -import io.prestosql.metadata.TableHandle; -import io.prestosql.metadata.TablePropertyManager; -import io.prestosql.operator.Driver; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.DriverFactory; -import io.prestosql.operator.LookupJoinOperators; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OutputFactory; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.StageExecutionDescriptor; -import io.prestosql.operator.TaskContext; -import io.prestosql.operator.index.IndexJoinLookupStats; -import io.prestosql.plugin.base.security.AllowAllSystemAccessControl; -import io.prestosql.security.GroupProviderManager; -import io.prestosql.server.PluginManager; -import io.prestosql.server.PluginManagerConfig; -import io.prestosql.server.SessionPropertyDefaults; -import io.prestosql.server.security.CertificateAuthenticatorManager; -import io.prestosql.server.security.PasswordAuthenticatorManager; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spiller.FileSingleStreamSpillerFactory; -import io.prestosql.spiller.GenericPartitioningSpillerFactory; -import io.prestosql.spiller.GenericSpillerFactory; -import io.prestosql.spiller.NodeSpillConfig; -import io.prestosql.spiller.PartitioningSpillerFactory; -import io.prestosql.spiller.SpillerFactory; -import io.prestosql.spiller.SpillerStats; -import io.prestosql.split.PageSinkManager; -import io.prestosql.split.PageSourceManager; -import io.prestosql.split.SplitManager; -import io.prestosql.split.SplitSource; -import io.prestosql.sql.analyzer.Analysis; -import io.prestosql.sql.analyzer.Analyzer; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.analyzer.QueryExplainer; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.LocalExecutionPlanner; -import io.prestosql.sql.planner.LocalExecutionPlanner.LocalExecutionPlan; -import io.prestosql.sql.planner.LogicalPlanner; -import io.prestosql.sql.planner.NodePartitioningManager; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.PlanFragmenter; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.PlanOptimizers; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.SubPlan; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.planprinter.PlanPrinter; -import io.prestosql.sql.planner.sanity.PlanSanityChecker; -import io.prestosql.sql.tree.Comment; -import io.prestosql.sql.tree.Commit; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.CreateView; -import io.prestosql.sql.tree.Deallocate; -import io.prestosql.sql.tree.DropTable; -import io.prestosql.sql.tree.DropView; -import io.prestosql.sql.tree.Prepare; -import io.prestosql.sql.tree.RenameColumn; -import io.prestosql.sql.tree.RenameTable; -import io.prestosql.sql.tree.RenameView; -import io.prestosql.sql.tree.ResetSession; -import io.prestosql.sql.tree.Rollback; -import io.prestosql.sql.tree.SetPath; -import io.prestosql.sql.tree.SetSession; -import io.prestosql.sql.tree.StartTransaction; -import io.prestosql.sql.tree.Statement; -import io.prestosql.testing.PageConsumerOperator.PageConsumerOutputFactory; -import io.prestosql.transaction.InMemoryTransactionManager; -import io.prestosql.transaction.TransactionManager; -import io.prestosql.transaction.TransactionManagerConfig; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.util.FinalizerService; +import io.trino.GroupByHashPageIndexerFactory; +import io.trino.PagesIndexPageSorter; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.connector.CatalogName; +import io.trino.connector.ConnectorManager; +import io.trino.connector.system.AnalyzePropertiesSystemTable; +import io.trino.connector.system.CatalogSystemTable; +import io.trino.connector.system.ColumnPropertiesSystemTable; +import io.trino.connector.system.GlobalSystemConnector; +import io.trino.connector.system.GlobalSystemConnectorFactory; +import io.trino.connector.system.NodeSystemTable; +import io.trino.connector.system.SchemaPropertiesSystemTable; +import io.trino.connector.system.TableCommentSystemTable; +import io.trino.connector.system.TablePropertiesSystemTable; +import io.trino.connector.system.TransactionsSystemTable; +import io.trino.cost.CostCalculator; +import io.trino.cost.CostCalculatorUsingExchanges; +import io.trino.cost.CostCalculatorWithEstimatedExchanges; +import io.trino.cost.CostComparator; +import io.trino.cost.StatsCalculator; +import io.trino.cost.TaskCountEstimator; +import io.trino.eventlistener.EventListenerConfig; +import io.trino.eventlistener.EventListenerManager; +import io.trino.execution.CommentTask; +import io.trino.execution.CommitTask; +import io.trino.execution.CreateTableTask; +import io.trino.execution.CreateViewTask; +import io.trino.execution.DataDefinitionTask; +import io.trino.execution.DeallocateTask; +import io.trino.execution.DropTableTask; +import io.trino.execution.DropViewTask; +import io.trino.execution.DynamicFilterConfig; +import io.trino.execution.Lifespan; +import io.trino.execution.NodeTaskMap; +import io.trino.execution.PrepareTask; +import io.trino.execution.QueryManagerConfig; +import io.trino.execution.QueryPreparer; +import io.trino.execution.QueryPreparer.PreparedQuery; +import io.trino.execution.RenameColumnTask; +import io.trino.execution.RenameTableTask; +import io.trino.execution.RenameViewTask; +import io.trino.execution.ResetSessionTask; +import io.trino.execution.RollbackTask; +import io.trino.execution.ScheduledSplit; +import io.trino.execution.SetPathTask; +import io.trino.execution.SetSessionTask; +import io.trino.execution.StartTransactionTask; +import io.trino.execution.TaskManagerConfig; +import io.trino.execution.TaskSource; +import io.trino.execution.resourcegroups.NoOpResourceGroupManager; +import io.trino.execution.scheduler.NodeScheduler; +import io.trino.execution.scheduler.NodeSchedulerConfig; +import io.trino.execution.scheduler.UniformNodeSelectorFactory; +import io.trino.execution.warnings.WarningCollector; +import io.trino.index.IndexManager; +import io.trino.memory.MemoryManagerConfig; +import io.trino.memory.NodeMemoryConfig; +import io.trino.metadata.AnalyzePropertyManager; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.ColumnPropertyManager; +import io.trino.metadata.HandleResolver; +import io.trino.metadata.InMemoryNodeManager; +import io.trino.metadata.Metadata; +import io.trino.metadata.MetadataManager; +import io.trino.metadata.MetadataUtil; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.QualifiedTablePrefix; +import io.trino.metadata.SchemaPropertyManager; +import io.trino.metadata.SessionPropertyManager; +import io.trino.metadata.Split; +import io.trino.metadata.SqlFunction; +import io.trino.metadata.TableHandle; +import io.trino.metadata.TablePropertyManager; +import io.trino.operator.Driver; +import io.trino.operator.DriverContext; +import io.trino.operator.DriverFactory; +import io.trino.operator.LookupJoinOperators; +import io.trino.operator.OperatorContext; +import io.trino.operator.OutputFactory; +import io.trino.operator.PagesIndex; +import io.trino.operator.StageExecutionDescriptor; +import io.trino.operator.TaskContext; +import io.trino.operator.index.IndexJoinLookupStats; +import io.trino.plugin.base.security.AllowAllSystemAccessControl; +import io.trino.security.GroupProviderManager; +import io.trino.server.PluginManager; +import io.trino.server.PluginManagerConfig; +import io.trino.server.SessionPropertyDefaults; +import io.trino.server.security.CertificateAuthenticatorManager; +import io.trino.server.security.PasswordAuthenticatorManager; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.PageSorter; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.TypeOperators; +import io.trino.spiller.FileSingleStreamSpillerFactory; +import io.trino.spiller.GenericPartitioningSpillerFactory; +import io.trino.spiller.GenericSpillerFactory; +import io.trino.spiller.NodeSpillConfig; +import io.trino.spiller.PartitioningSpillerFactory; +import io.trino.spiller.SpillerFactory; +import io.trino.spiller.SpillerStats; +import io.trino.split.PageSinkManager; +import io.trino.split.PageSourceManager; +import io.trino.split.SplitManager; +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; +import io.trino.sql.gen.JoinFilterFunctionCompiler; +import io.trino.sql.gen.OrderingCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.LocalExecutionPlanner; +import io.trino.sql.planner.LocalExecutionPlanner.LocalExecutionPlan; +import io.trino.sql.planner.LogicalPlanner; +import io.trino.sql.planner.NodePartitioningManager; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.PlanFragmenter; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.PlanOptimizers; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.SubPlan; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.planprinter.PlanPrinter; +import io.trino.sql.planner.sanity.PlanSanityChecker; +import io.trino.sql.tree.Comment; +import io.trino.sql.tree.Commit; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.CreateView; +import io.trino.sql.tree.Deallocate; +import io.trino.sql.tree.DropTable; +import io.trino.sql.tree.DropView; +import io.trino.sql.tree.Prepare; +import io.trino.sql.tree.RenameColumn; +import io.trino.sql.tree.RenameTable; +import io.trino.sql.tree.RenameView; +import io.trino.sql.tree.ResetSession; +import io.trino.sql.tree.Rollback; +import io.trino.sql.tree.SetPath; +import io.trino.sql.tree.SetSession; +import io.trino.sql.tree.StartTransaction; +import io.trino.sql.tree.Statement; +import io.trino.testing.PageConsumerOperator.PageConsumerOutputFactory; +import io.trino.transaction.InMemoryTransactionManager; +import io.trino.transaction.TransactionManager; +import io.trino.transaction.TransactionManagerConfig; +import io.trino.type.BlockTypeOperators; +import io.trino.util.FinalizerService; import org.intellij.lang.annotations.Language; import org.weakref.jmx.MBeanExporter; import org.weakref.jmx.testing.TestingMBeanServer; @@ -202,20 +202,20 @@ import static com.google.common.base.Verify.verify; import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.cost.StatsCalculatorModule.createNewStatsCalculator; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.GROUPED_SCHEDULING; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; -import static io.prestosql.spi.connector.DynamicFilter.EMPTY; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.sql.ParameterUtils.parameterExtractor; -import static io.prestosql.sql.ParsingUtil.createParsingOptions; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; -import static io.prestosql.sql.testing.TreeAssertions.assertFormattedSql; -import static io.prestosql.testing.TestingSession.TESTING_CATALOG; -import static io.prestosql.testing.TestingSession.createBogusTestingCatalog; -import static io.prestosql.transaction.TransactionBuilder.transaction; -import static io.prestosql.version.EmbedVersion.testingVersionEmbedder; +import static io.trino.cost.StatsCalculatorModule.createNewStatsCalculator; +import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.GROUPED_SCHEDULING; +import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; +import static io.trino.spi.connector.DynamicFilter.EMPTY; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.sql.ParameterUtils.parameterExtractor; +import static io.trino.sql.ParsingUtil.createParsingOptions; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.sql.testing.TreeAssertions.assertFormattedSql; +import static io.trino.testing.TestingSession.TESTING_CATALOG; +import static io.trino.testing.TestingSession.createBogusTestingCatalog; +import static io.trino.transaction.TransactionBuilder.transaction; +import static io.trino.version.EmbedVersion.testingVersionEmbedder; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/main/java/io/trino/testing/MaterializedResult.java b/core/trino-main/src/main/java/io/trino/testing/MaterializedResult.java index c4545774bc93..6fa5b81a9bd8 100644 --- a/core/trino-main/src/main/java/io/trino/testing/MaterializedResult.java +++ b/core/trino-main/src/main/java/io/trino/testing/MaterializedResult.java @@ -17,31 +17,31 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slices; -import io.prestosql.Session; -import io.prestosql.client.Warning; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimeWithTimeZone; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.Session; +import io.trino.client.Warning; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimeWithTimeZone; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.time.LocalDate; import java.time.LocalTime; @@ -64,21 +64,21 @@ 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.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.spi.type.Timestamps.roundDiv; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.type.JsonType.JSON; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.spi.type.Timestamps.roundDiv; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.type.JsonType.JSON; import static java.lang.Float.floatToRawIntBits; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toSet; diff --git a/core/trino-main/src/main/java/io/trino/testing/MaterializedRow.java b/core/trino-main/src/main/java/io/trino/testing/MaterializedRow.java index edaf83f53151..0ad7e676991b 100644 --- a/core/trino-main/src/main/java/io/trino/testing/MaterializedRow.java +++ b/core/trino-main/src/main/java/io/trino/testing/MaterializedRow.java @@ -25,7 +25,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkElementIndex; -import static io.prestosql.testing.MaterializedResult.DEFAULT_PRECISION; +import static io.trino.testing.MaterializedResult.DEFAULT_PRECISION; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/main/java/io/trino/testing/NullOutputOperator.java b/core/trino-main/src/main/java/io/trino/testing/NullOutputOperator.java index d70bdcd87d30..d7fd40ebb7bf 100644 --- a/core/trino-main/src/main/java/io/trino/testing/NullOutputOperator.java +++ b/core/trino-main/src/main/java/io/trino/testing/NullOutputOperator.java @@ -13,15 +13,15 @@ */ package io.trino.testing; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.OutputFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.operator.DriverContext; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.OperatorFactory; +import io.trino.operator.OutputFactory; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/testing/PageConsumerOperator.java b/core/trino-main/src/main/java/io/trino/testing/PageConsumerOperator.java index 88330154ee98..4ad8413b364d 100644 --- a/core/trino-main/src/main/java/io/trino/testing/PageConsumerOperator.java +++ b/core/trino-main/src/main/java/io/trino/testing/PageConsumerOperator.java @@ -13,15 +13,15 @@ */ package io.trino.testing; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.OutputFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.operator.DriverContext; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.OperatorFactory; +import io.trino.operator.OutputFactory; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; import java.util.List; import java.util.function.Consumer; diff --git a/core/trino-main/src/main/java/io/trino/testing/QueryRunner.java b/core/trino-main/src/main/java/io/trino/testing/QueryRunner.java index e51a495a8f95..8bf1e86adae3 100644 --- a/core/trino-main/src/main/java/io/trino/testing/QueryRunner.java +++ b/core/trino-main/src/main/java/io/trino/testing/QueryRunner.java @@ -13,18 +13,18 @@ */ package io.trino.testing; -import io.prestosql.Session; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.SqlFunction; -import io.prestosql.spi.Plugin; -import io.prestosql.split.PageSourceManager; -import io.prestosql.split.SplitManager; -import io.prestosql.sql.planner.NodePartitioningManager; -import io.prestosql.sql.planner.Plan; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.cost.StatsCalculator; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.SqlFunction; +import io.trino.spi.Plugin; +import io.trino.split.PageSourceManager; +import io.trino.split.SplitManager; +import io.trino.sql.planner.NodePartitioningManager; +import io.trino.sql.planner.Plan; +import io.trino.transaction.TransactionManager; import org.intellij.lang.annotations.Language; import java.io.Closeable; diff --git a/core/trino-main/src/main/java/io/trino/testing/SqlVarbinaryTestingUtil.java b/core/trino-main/src/main/java/io/trino/testing/SqlVarbinaryTestingUtil.java index f17447ecb44b..004b9cd30115 100644 --- a/core/trino-main/src/main/java/io/trino/testing/SqlVarbinaryTestingUtil.java +++ b/core/trino-main/src/main/java/io/trino/testing/SqlVarbinaryTestingUtil.java @@ -14,7 +14,7 @@ package io.trino.testing; import com.google.common.primitives.UnsignedBytes; -import io.prestosql.spi.type.SqlVarbinary; +import io.trino.spi.type.SqlVarbinary; import static com.google.common.base.CharMatcher.ascii; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingAccessControlManager.java b/core/trino-main/src/main/java/io/trino/testing/TestingAccessControlManager.java index 82afb52e794e..986616efba43 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingAccessControlManager.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingAccessControlManager.java @@ -14,18 +14,18 @@ package io.trino.testing; import com.google.common.collect.ImmutableSet; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.security.AccessControlConfig; -import io.prestosql.security.AccessControlManager; -import io.prestosql.security.SecurityContext; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; -import io.prestosql.transaction.TransactionManager; +import io.trino.eventlistener.EventListenerManager; +import io.trino.metadata.QualifiedObjectName; +import io.trino.security.AccessControlConfig; +import io.trino.security.AccessControlManager; +import io.trino.security.SecurityContext; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.Identity; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; +import io.trino.transaction.TransactionManager; import javax.inject.Inject; @@ -44,63 +44,63 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.spi.security.AccessDeniedException.denyAddColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateView; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateViewWithSelect; -import static io.prestosql.spi.security.AccessDeniedException.denyDeleteTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyDropSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyDropTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropView; -import static io.prestosql.spi.security.AccessDeniedException.denyExecuteFunction; -import static io.prestosql.spi.security.AccessDeniedException.denyExecuteQuery; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantExecuteFunctionPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyImpersonateUser; -import static io.prestosql.spi.security.AccessDeniedException.denyInsertTable; -import static io.prestosql.spi.security.AccessDeniedException.denyKillQuery; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameView; -import static io.prestosql.spi.security.AccessDeniedException.denySelectColumns; -import static io.prestosql.spi.security.AccessDeniedException.denySetCatalogSessionProperty; -import static io.prestosql.spi.security.AccessDeniedException.denySetSystemSessionProperty; -import static io.prestosql.spi.security.AccessDeniedException.denySetUser; -import static io.prestosql.spi.security.AccessDeniedException.denyShowColumns; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyViewQuery; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.ADD_COLUMN; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.COMMENT_COLUMN; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.COMMENT_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_SCHEMA; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_VIEW; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_VIEW_WITH_SELECT_COLUMNS; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.DELETE_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_COLUMN; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_SCHEMA; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_VIEW; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.EXECUTE_FUNCTION; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.EXECUTE_QUERY; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.GRANT_EXECUTE_FUNCTION; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.IMPERSONATE_USER; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.INSERT_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.KILL_QUERY; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_COLUMN; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_SCHEMA; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_VIEW; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SELECT_COLUMN; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SET_SESSION; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SET_USER; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_COLUMNS; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_CREATE_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.VIEW_QUERY; +import static io.trino.spi.security.AccessDeniedException.denyAddColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateView; +import static io.trino.spi.security.AccessDeniedException.denyCreateViewWithSelect; +import static io.trino.spi.security.AccessDeniedException.denyDeleteTable; +import static io.trino.spi.security.AccessDeniedException.denyDropColumn; +import static io.trino.spi.security.AccessDeniedException.denyDropSchema; +import static io.trino.spi.security.AccessDeniedException.denyDropTable; +import static io.trino.spi.security.AccessDeniedException.denyDropView; +import static io.trino.spi.security.AccessDeniedException.denyExecuteFunction; +import static io.trino.spi.security.AccessDeniedException.denyExecuteQuery; +import static io.trino.spi.security.AccessDeniedException.denyGrantExecuteFunctionPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyImpersonateUser; +import static io.trino.spi.security.AccessDeniedException.denyInsertTable; +import static io.trino.spi.security.AccessDeniedException.denyKillQuery; +import static io.trino.spi.security.AccessDeniedException.denyRenameColumn; +import static io.trino.spi.security.AccessDeniedException.denyRenameSchema; +import static io.trino.spi.security.AccessDeniedException.denyRenameTable; +import static io.trino.spi.security.AccessDeniedException.denyRenameView; +import static io.trino.spi.security.AccessDeniedException.denySelectColumns; +import static io.trino.spi.security.AccessDeniedException.denySetCatalogSessionProperty; +import static io.trino.spi.security.AccessDeniedException.denySetSystemSessionProperty; +import static io.trino.spi.security.AccessDeniedException.denySetUser; +import static io.trino.spi.security.AccessDeniedException.denyShowColumns; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyViewQuery; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.ADD_COLUMN; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.COMMENT_COLUMN; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.COMMENT_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_SCHEMA; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_VIEW; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_VIEW_WITH_SELECT_COLUMNS; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.DELETE_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_COLUMN; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_SCHEMA; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_VIEW; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.EXECUTE_FUNCTION; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.EXECUTE_QUERY; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.GRANT_EXECUTE_FUNCTION; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.IMPERSONATE_USER; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.INSERT_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.KILL_QUERY; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_COLUMN; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_SCHEMA; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_VIEW; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SELECT_COLUMN; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SET_SESSION; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SET_USER; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_COLUMNS; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_CREATE_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.VIEW_QUERY; import static java.util.Objects.requireNonNull; public class TestingAccessControlManager diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingConnectorContext.java b/core/trino-main/src/main/java/io/trino/testing/TestingConnectorContext.java index 90a193ccb2db..9a0fe9e4ef39 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingConnectorContext.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingConnectorContext.java @@ -13,26 +13,26 @@ */ package io.trino.testing; -import io.prestosql.GroupByHashPageIndexerFactory; -import io.prestosql.PagesIndexPageSorter; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.ConnectorAwareNodeManager; -import io.prestosql.metadata.InMemoryNodeManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.PagesIndex; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.VersionEmbedder; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.InternalTypeManager; -import io.prestosql.version.EmbedVersion; +import io.trino.GroupByHashPageIndexerFactory; +import io.trino.PagesIndexPageSorter; +import io.trino.connector.CatalogName; +import io.trino.connector.ConnectorAwareNodeManager; +import io.trino.metadata.InMemoryNodeManager; +import io.trino.metadata.Metadata; +import io.trino.operator.PagesIndex; +import io.trino.spi.NodeManager; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.PageSorter; +import io.trino.spi.VersionEmbedder; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; +import io.trino.type.InternalTypeManager; +import io.trino.version.EmbedVersion; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; public final class TestingConnectorContext implements ConnectorContext diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingConnectorSession.java b/core/trino-main/src/main/java/io/trino/testing/TestingConnectorSession.java index bfade1db9fbc..8b3990ecf0d6 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingConnectorSession.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingConnectorSession.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; -import io.prestosql.execution.QueryIdGenerator; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.execution.QueryIdGenerator; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.TimeZoneKey; import java.time.Instant; import java.util.List; @@ -30,8 +30,8 @@ import java.util.Optional; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingEventListenerManager.java b/core/trino-main/src/main/java/io/trino/testing/TestingEventListenerManager.java index c66a667d1005..211c908833bc 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingEventListenerManager.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingEventListenerManager.java @@ -16,13 +16,13 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; import com.google.inject.Inject; -import io.prestosql.eventlistener.EventListenerConfig; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.eventlistener.EventListenerFactory; -import io.prestosql.spi.eventlistener.QueryCompletedEvent; -import io.prestosql.spi.eventlistener.QueryCreatedEvent; -import io.prestosql.spi.eventlistener.SplitCompletedEvent; +import io.trino.eventlistener.EventListenerConfig; +import io.trino.eventlistener.EventListenerManager; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.eventlistener.EventListenerFactory; +import io.trino.spi.eventlistener.QueryCompletedEvent; +import io.trino.spi.eventlistener.QueryCreatedEvent; +import io.trino.spi.eventlistener.SplitCompletedEvent; import java.util.Collections; import java.util.HashSet; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingGroupProvider.java b/core/trino-main/src/main/java/io/trino/testing/TestingGroupProvider.java index 7af59e413138..16ce08ddc669 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingGroupProvider.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingGroupProvider.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.security.GroupProvider; +import io.trino.spi.security.GroupProvider; import java.util.Map; import java.util.Set; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingHandle.java b/core/trino-main/src/main/java/io/trino/testing/TestingHandle.java index 20af7fc8f711..353bc2c922c3 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingHandle.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingHandle.java @@ -13,9 +13,9 @@ */ package io.trino.testing; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; public enum TestingHandle implements ConnectorOutputTableHandle, ConnectorInsertTableHandle, ConnectorTableLayoutHandle diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingHandleResolver.java b/core/trino-main/src/main/java/io/trino/testing/TestingHandleResolver.java index ab14e40371a2..24f3b0f1c29d 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingHandleResolver.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingHandleResolver.java @@ -13,16 +13,16 @@ */ package io.trino.testing; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.testing.TestingMetadata.TestingColumnHandle; -import io.prestosql.testing.TestingMetadata.TestingTableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.testing.TestingMetadata.TestingColumnHandle; +import io.trino.testing.TestingMetadata.TestingTableHandle; public class TestingHandleResolver implements ConnectorHandleResolver diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingHandles.java b/core/trino-main/src/main/java/io/trino/testing/TestingHandles.java index 0fcf99b9800a..5cf6ee8c75e7 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingHandles.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingHandles.java @@ -13,9 +13,9 @@ */ package io.trino.testing; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.testing.TestingMetadata.TestingTableHandle; +import io.trino.connector.CatalogName; +import io.trino.metadata.TableHandle; +import io.trino.testing.TestingMetadata.TestingTableHandle; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingMetadata.java b/core/trino-main/src/main/java/io/trino/testing/TestingMetadata.java index d9d11add111f..33ff4182d2a5 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingMetadata.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingMetadata.java @@ -19,26 +19,26 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.ViewNotFoundException; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.ViewNotFoundException; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.Collection; @@ -53,7 +53,7 @@ import java.util.concurrent.ConcurrentMap; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; import static java.util.Objects.requireNonNull; public class TestingMetadata diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingNodeManager.java b/core/trino-main/src/main/java/io/trino/testing/TestingNodeManager.java index ef703216e736..965212f6046f 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingNodeManager.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingNodeManager.java @@ -14,10 +14,10 @@ package io.trino.testing; import com.google.common.collect.ImmutableSet; -import io.prestosql.client.NodeVersion; -import io.prestosql.metadata.InternalNode; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; +import io.trino.client.NodeVersion; +import io.trino.metadata.InternalNode; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; import java.net.URI; import java.util.Collection; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingPageSinkProvider.java b/core/trino-main/src/main/java/io/trino/testing/TestingPageSinkProvider.java index cc66f8d96afe..5d05852fab2e 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingPageSinkProvider.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingPageSinkProvider.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Collection; import java.util.concurrent.CompletableFuture; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingSession.java b/core/trino-main/src/main/java/io/trino/testing/TestingSession.java index bf2baec97eb4..0c97d2b900d1 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingSession.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingSession.java @@ -14,27 +14,27 @@ package io.trino.testing; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.Session.SessionBuilder; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.system.StaticSystemTablesProvider; -import io.prestosql.connector.system.SystemTablesMetadata; -import io.prestosql.execution.QueryIdGenerator; -import io.prestosql.metadata.Catalog; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.transaction.IsolationLevel; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.sql.SqlPath; +import io.trino.Session; +import io.trino.Session.SessionBuilder; +import io.trino.connector.CatalogName; +import io.trino.connector.system.StaticSystemTablesProvider; +import io.trino.connector.system.SystemTablesMetadata; +import io.trino.execution.QueryIdGenerator; +import io.trino.metadata.Catalog; +import io.trino.metadata.SessionPropertyManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.security.Identity; +import io.trino.spi.transaction.IsolationLevel; +import io.trino.spi.type.TimeZoneKey; +import io.trino.sql.SqlPath; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.IGNORE_STATS_CALCULATOR_FAILURES; -import static io.prestosql.connector.CatalogName.createInformationSchemaCatalogName; -import static io.prestosql.connector.CatalogName.createSystemTablesCatalogName; +import static io.trino.SystemSessionProperties.IGNORE_STATS_CALCULATOR_FAILURES; +import static io.trino.connector.CatalogName.createInformationSchemaCatalogName; +import static io.trino.connector.CatalogName.createSystemTablesCatalogName; import static java.util.Locale.ENGLISH; public final class TestingSession diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingSplit.java b/core/trino-main/src/main/java/io/trino/testing/TestingSplit.java index fd577450f147..fb5d0b414645 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingSplit.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingSplitManager.java b/core/trino-main/src/main/java/io/trino/testing/TestingSplitManager.java index a48441e45a9f..0324bd6adf03 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingSplitManager.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingSplitManager.java @@ -14,14 +14,14 @@ package io.trino.testing; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingTaskContext.java b/core/trino-main/src/main/java/io/trino/testing/TestingTaskContext.java index b4fde29ccd4a..dd57d6b01bf6 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingTaskContext.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingTaskContext.java @@ -16,15 +16,15 @@ import io.airlift.stats.GcMonitor; import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskStateMachine; -import io.prestosql.memory.MemoryPool; -import io.prestosql.memory.QueryContext; -import io.prestosql.operator.TaskContext; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spiller.SpillSpaceTracker; +import io.trino.Session; +import io.trino.execution.TaskId; +import io.trino.execution.TaskStateMachine; +import io.trino.memory.MemoryPool; +import io.trino.memory.QueryContext; +import io.trino.operator.TaskContext; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spiller.SpillSpaceTracker; import java.util.OptionalInt; import java.util.concurrent.Executor; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingTransactionHandle.java b/core/trino-main/src/main/java/io/trino/testing/TestingTransactionHandle.java index 75f71e15285e..b58d17edcf10 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingTransactionHandle.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingTransactionHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Objects; import java.util.UUID; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingWarningCollector.java b/core/trino-main/src/main/java/io/trino/testing/TestingWarningCollector.java index 1af6dbbb7ac9..287ed553fee9 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingWarningCollector.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingWarningCollector.java @@ -15,10 +15,10 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.execution.warnings.WarningCollectorConfig; -import io.prestosql.spi.PrestoWarning; -import io.prestosql.spi.WarningCode; +import io.trino.execution.warnings.WarningCollector; +import io.trino.execution.warnings.WarningCollectorConfig; +import io.trino.spi.PrestoWarning; +import io.trino.spi.WarningCode; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingWarningCollectorFactory.java b/core/trino-main/src/main/java/io/trino/testing/TestingWarningCollectorFactory.java index 0b64f9f27407..26135656487f 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingWarningCollectorFactory.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingWarningCollectorFactory.java @@ -13,9 +13,9 @@ */ package io.trino.testing; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.execution.warnings.WarningCollectorConfig; -import io.prestosql.execution.warnings.WarningCollectorFactory; +import io.trino.execution.warnings.WarningCollector; +import io.trino.execution.warnings.WarningCollectorConfig; +import io.trino.execution.warnings.WarningCollectorFactory; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/testing/TestingWarningCollectorModule.java b/core/trino-main/src/main/java/io/trino/testing/TestingWarningCollectorModule.java index d275a1cca337..d780bab83abf 100644 --- a/core/trino-main/src/main/java/io/trino/testing/TestingWarningCollectorModule.java +++ b/core/trino-main/src/main/java/io/trino/testing/TestingWarningCollectorModule.java @@ -17,8 +17,8 @@ import com.google.inject.Module; import com.google.inject.Provides; import com.google.inject.Singleton; -import io.prestosql.execution.warnings.WarningCollectorConfig; -import io.prestosql.execution.warnings.WarningCollectorFactory; +import io.trino.execution.warnings.WarningCollectorConfig; +import io.trino.execution.warnings.WarningCollectorFactory; import static io.airlift.configuration.ConfigBinder.configBinder; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/testing/assertions/PrestoExceptionAssert.java b/core/trino-main/src/main/java/io/trino/testing/assertions/PrestoExceptionAssert.java index 00f38f19fb12..9cf20c256aac 100644 --- a/core/trino-main/src/main/java/io/trino/testing/assertions/PrestoExceptionAssert.java +++ b/core/trino-main/src/main/java/io/trino/testing/assertions/PrestoExceptionAssert.java @@ -13,8 +13,8 @@ */ package io.trino.testing.assertions; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.PrestoException; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.PrestoException; import org.assertj.core.api.AbstractThrowableAssert; import org.assertj.core.api.ThrowableAssert.ThrowingCallable; import org.assertj.core.util.CheckReturnValue; diff --git a/core/trino-main/src/main/java/io/trino/transaction/InMemoryTransactionManager.java b/core/trino-main/src/main/java/io/trino/transaction/InMemoryTransactionManager.java index a98708763f1a..8975036e7444 100644 --- a/core/trino-main/src/main/java/io/trino/transaction/InMemoryTransactionManager.java +++ b/core/trino-main/src/main/java/io/trino/transaction/InMemoryTransactionManager.java @@ -22,16 +22,16 @@ import io.airlift.concurrent.ExecutorServiceAdapter; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.NotInTransactionException; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Catalog; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.CatalogMetadata; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.NotInTransactionException; +import io.trino.connector.CatalogName; +import io.trino.metadata.Catalog; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.CatalogMetadata; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import org.joda.time.DateTime; import javax.annotation.concurrent.GuardedBy; @@ -62,11 +62,11 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static com.google.common.util.concurrent.MoreExecutors.listeningDecorator; import static io.airlift.concurrent.MoreFutures.addExceptionCallback; -import static io.prestosql.spi.StandardErrorCode.AUTOCOMMIT_WRITE_CONFLICT; -import static io.prestosql.spi.StandardErrorCode.MULTI_CATALOG_WRITE_CONFLICT; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.READ_ONLY_VIOLATION; -import static io.prestosql.spi.StandardErrorCode.TRANSACTION_ALREADY_ABORTED; +import static io.trino.spi.StandardErrorCode.AUTOCOMMIT_WRITE_CONFLICT; +import static io.trino.spi.StandardErrorCode.MULTI_CATALOG_WRITE_CONFLICT; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.READ_ONLY_VIOLATION; +import static io.trino.spi.StandardErrorCode.TRANSACTION_ALREADY_ABORTED; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/main/java/io/trino/transaction/InternalConnector.java b/core/trino-main/src/main/java/io/trino/transaction/InternalConnector.java index 96d053be0ea8..a46d27cee65e 100644 --- a/core/trino-main/src/main/java/io/trino/transaction/InternalConnector.java +++ b/core/trino-main/src/main/java/io/trino/transaction/InternalConnector.java @@ -13,9 +13,9 @@ */ package io.trino.transaction; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; public interface InternalConnector extends Connector diff --git a/core/trino-main/src/main/java/io/trino/transaction/NoOpTransactionManager.java b/core/trino-main/src/main/java/io/trino/transaction/NoOpTransactionManager.java index fbfcf336cc3b..ff0793a06c58 100644 --- a/core/trino-main/src/main/java/io/trino/transaction/NoOpTransactionManager.java +++ b/core/trino-main/src/main/java/io/trino/transaction/NoOpTransactionManager.java @@ -14,10 +14,10 @@ package io.trino.transaction; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.CatalogMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.connector.CatalogName; +import io.trino.metadata.CatalogMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/transaction/TransactionBuilder.java b/core/trino-main/src/main/java/io/trino/transaction/TransactionBuilder.java index 2700f0a5ddb9..18d51973c586 100644 --- a/core/trino-main/src/main/java/io/trino/transaction/TransactionBuilder.java +++ b/core/trino-main/src/main/java/io/trino/transaction/TransactionBuilder.java @@ -13,9 +13,9 @@ */ package io.trino.transaction; -import io.prestosql.Session; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.Session; +import io.trino.security.AccessControl; +import io.trino.spi.transaction.IsolationLevel; import java.util.function.Consumer; import java.util.function.Function; diff --git a/core/trino-main/src/main/java/io/trino/transaction/TransactionInfo.java b/core/trino-main/src/main/java/io/trino/transaction/TransactionInfo.java index a4f6ada66fc7..6a563f1378a4 100644 --- a/core/trino-main/src/main/java/io/trino/transaction/TransactionInfo.java +++ b/core/trino-main/src/main/java/io/trino/transaction/TransactionInfo.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.Duration; -import io.prestosql.connector.CatalogName; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.connector.CatalogName; +import io.trino.spi.transaction.IsolationLevel; import org.joda.time.DateTime; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/transaction/TransactionManager.java b/core/trino-main/src/main/java/io/trino/transaction/TransactionManager.java index 5efa6a7e9dd6..e98c52c70180 100644 --- a/core/trino-main/src/main/java/io/trino/transaction/TransactionManager.java +++ b/core/trino-main/src/main/java/io/trino/transaction/TransactionManager.java @@ -14,12 +14,12 @@ package io.trino.transaction; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.CatalogMetadata; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.CatalogMetadata; +import io.trino.security.AccessControl; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/main/java/io/trino/type/ArrayParametricType.java b/core/trino-main/src/main/java/io/trino/type/ArrayParametricType.java index d239d7537ef7..e6bb7dd37387 100644 --- a/core/trino-main/src/main/java/io/trino/type/ArrayParametricType.java +++ b/core/trino-main/src/main/java/io/trino/type/ArrayParametricType.java @@ -13,13 +13,13 @@ */ package io.trino.type; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.ParameterKind; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeParameter; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.ParameterKind; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeParameter; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/type/BigintOperators.java b/core/trino-main/src/main/java/io/trino/type/BigintOperators.java index 13725ca9a8ee..df4bc734214d 100644 --- a/core/trino-main/src/main/java/io/trino/type/BigintOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/BigintOperators.java @@ -17,23 +17,23 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.function.OperatorType.DIVIDE; -import static io.prestosql.spi.function.OperatorType.MODULUS; -import static io.prestosql.spi.function.OperatorType.MULTIPLY; -import static io.prestosql.spi.function.OperatorType.NEGATION; -import static io.prestosql.spi.function.OperatorType.SATURATED_FLOOR_CAST; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.DIVIDE; +import static io.trino.spi.function.OperatorType.MODULUS; +import static io.trino.spi.function.OperatorType.MULTIPLY; +import static io.trino.spi.function.OperatorType.NEGATION; +import static io.trino.spi.function.OperatorType.SATURATED_FLOOR_CAST; +import static io.trino.spi.function.OperatorType.SUBTRACT; import static java.lang.Float.floatToRawIntBits; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/type/BlockTypeOperators.java b/core/trino-main/src/main/java/io/trino/type/BlockTypeOperators.java index e1986126f1b4..e4dd56af6e61 100644 --- a/core/trino-main/src/main/java/io/trino/type/BlockTypeOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/BlockTypeOperators.java @@ -16,11 +16,11 @@ import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.google.common.util.concurrent.UncheckedExecutionException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.block.Block; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import org.weakref.jmx.Managed; import javax.annotation.concurrent.GuardedBy; @@ -34,12 +34,12 @@ import java.util.function.Supplier; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.type.SingleAccessMethodCompiler.compileSingleAccessMethod; -import static io.prestosql.type.TypeUtils.NULL_HASH_CODE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.type.SingleAccessMethodCompiler.compileSingleAccessMethod; +import static io.trino.type.TypeUtils.NULL_HASH_CODE; import static java.util.Objects.requireNonNull; public final class BlockTypeOperators diff --git a/core/trino-main/src/main/java/io/trino/type/BooleanOperators.java b/core/trino-main/src/main/java/io/trino/type/BooleanOperators.java index f2190904eaa4..c79082ada6b6 100644 --- a/core/trino-main/src/main/java/io/trino/type/BooleanOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/BooleanOperators.java @@ -15,13 +15,13 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.CAST; import static java.lang.Float.floatToRawIntBits; import static java.nio.charset.StandardCharsets.US_ASCII; diff --git a/core/trino-main/src/main/java/io/trino/type/CharParametricType.java b/core/trino-main/src/main/java/io/trino/type/CharParametricType.java index 055354161d85..50deafe3138b 100644 --- a/core/trino-main/src/main/java/io/trino/type/CharParametricType.java +++ b/core/trino-main/src/main/java/io/trino/type/CharParametricType.java @@ -13,15 +13,15 @@ */ package io.trino.type; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeParameter; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeParameter; import java.util.List; -import static io.prestosql.spi.type.CharType.createCharType; +import static io.trino.spi.type.CharType.createCharType; public class CharParametricType implements ParametricType diff --git a/core/trino-main/src/main/java/io/trino/type/CodePointsType.java b/core/trino-main/src/main/java/io/trino/type/CodePointsType.java index a6a9c48dfc7a..768918af9597 100644 --- a/core/trino-main/src/main/java/io/trino/type/CodePointsType.java +++ b/core/trino-main/src/main/java/io/trino/type/CodePointsType.java @@ -15,11 +15,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.TypeSignature; public class CodePointsType extends AbstractVariableWidthType diff --git a/core/trino-main/src/main/java/io/trino/type/ColorType.java b/core/trino-main/src/main/java/io/trino/type/ColorType.java index d4143f4eda82..369adf8999a0 100644 --- a/core/trino-main/src/main/java/io/trino/type/ColorType.java +++ b/core/trino-main/src/main/java/io/trino/type/ColorType.java @@ -13,11 +13,11 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.ColorFunctions; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractIntType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.operator.scalar.ColorFunctions; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractIntType; +import io.trino.spi.type.TypeSignature; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/type/DateOperators.java b/core/trino-main/src/main/java/io/trino/type/DateOperators.java index 7d5391436065..04a3642352e2 100644 --- a/core/trino-main/src/main/java/io/trino/type/DateOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/DateOperators.java @@ -14,19 +14,19 @@ package io.trino.type; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static io.airlift.slice.SliceUtf8.trim; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.util.DateTimeUtils.parseDate; -import static io.prestosql.util.DateTimeUtils.printDate; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.util.DateTimeUtils.parseDate; +import static io.trino.util.DateTimeUtils.printDate; public final class DateOperators { diff --git a/core/trino-main/src/main/java/io/trino/type/DateTimeOperators.java b/core/trino-main/src/main/java/io/trino/type/DateTimeOperators.java index 234c379f3676..68a0896b499f 100644 --- a/core/trino-main/src/main/java/io/trino/type/DateTimeOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/DateTimeOperators.java @@ -13,18 +13,18 @@ */ package io.trino.type; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import org.joda.time.DateTimeField; import org.joda.time.chrono.ISOChronology; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.SUBTRACT; public final class DateTimeOperators { diff --git a/core/trino-main/src/main/java/io/trino/type/DateTimes.java b/core/trino-main/src/main/java/io/trino/type/DateTimes.java index 4829184d4c41..43359224d4c1 100644 --- a/core/trino-main/src/main/java/io/trino/type/DateTimes.java +++ b/core/trino-main/src/main/java/io/trino/type/DateTimes.java @@ -13,16 +13,16 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.DateTimeEncoding; -import io.prestosql.spi.type.LongTimeWithTimeZone; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.block.Block; +import io.trino.spi.type.DateTimeEncoding; +import io.trino.spi.type.LongTimeWithTimeZone; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; import java.time.Instant; import java.time.LocalDateTime; @@ -36,11 +36,11 @@ import java.util.regex.Pattern; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimestampType.MAX_SHORT_PRECISION; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimestampType.MAX_SHORT_PRECISION; import static java.lang.Math.floorMod; import static java.lang.Math.multiplyExact; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/type/DecimalCasts.java b/core/trino-main/src/main/java/io/trino/type/DecimalCasts.java index edd71e209600..9e24dc5e4be5 100644 --- a/core/trino-main/src/main/java/io/trino/type/DecimalCasts.java +++ b/core/trino-main/src/main/java/io/trino/type/DecimalCasts.java @@ -21,53 +21,53 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.PolymorphicScalarFunctionBuilder; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.DecimalConversions; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.util.JsonCastException; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.PolymorphicScalarFunctionBuilder; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.PrestoException; +import io.trino.spi.type.DecimalConversions; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TypeSignature; +import io.trino.util.JsonCastException; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.operator.scalar.JsonOperators.JSON_FACTORY; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.Decimals.bigIntegerTenToNth; -import static io.prestosql.spi.type.Decimals.decodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.encodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.Decimals.longTenToNth; -import static io.prestosql.spi.type.Decimals.overflows; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.TypeSignatureParameter.typeVariable; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.multiply; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.overflows; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.rescale; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToUnscaledLong; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.Failures.checkCondition; -import static io.prestosql.util.JsonUtil.createJsonGenerator; -import static io.prestosql.util.JsonUtil.createJsonParser; -import static io.prestosql.util.JsonUtil.currentTokenAsLongDecimal; -import static io.prestosql.util.JsonUtil.currentTokenAsShortDecimal; +import static io.trino.operator.scalar.JsonOperators.JSON_FACTORY; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.Decimals.bigIntegerTenToNth; +import static io.trino.spi.type.Decimals.decodeUnscaledValue; +import static io.trino.spi.type.Decimals.encodeUnscaledValue; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.Decimals.longTenToNth; +import static io.trino.spi.type.Decimals.overflows; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TypeSignatureParameter.typeVariable; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.multiply; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.overflows; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.rescale; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToUnscaledLong; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.Failures.checkCondition; +import static io.trino.util.JsonUtil.createJsonGenerator; +import static io.trino.util.JsonUtil.createJsonParser; +import static io.trino.util.JsonUtil.currentTokenAsLongDecimal; +import static io.trino.util.JsonUtil.currentTokenAsShortDecimal; import static java.lang.Math.multiplyExact; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/type/DecimalOperators.java b/core/trino-main/src/main/java/io/trino/type/DecimalOperators.java index 1605ba149b78..19df8aab83cf 100644 --- a/core/trino-main/src/main/java/io/trino/type/DecimalOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/DecimalOperators.java @@ -15,45 +15,45 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.PolymorphicScalarFunctionBuilder; -import io.prestosql.metadata.PolymorphicScalarFunctionBuilder.SpecializeContext; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SignatureBuilder; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.TypeSignature; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.PolymorphicScalarFunctionBuilder; +import io.trino.metadata.PolymorphicScalarFunctionBuilder.SpecializeContext; +import io.trino.metadata.Signature; +import io.trino.metadata.SignatureBuilder; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.TypeSignature; import java.math.BigInteger; import java.util.List; -import static io.prestosql.metadata.Signature.longVariableExpression; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.DIVIDE; -import static io.prestosql.spi.function.OperatorType.MODULUS; -import static io.prestosql.spi.function.OperatorType.MULTIPLY; -import static io.prestosql.spi.function.OperatorType.NEGATION; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; -import static io.prestosql.spi.type.Decimals.encodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.longTenToNth; -import static io.prestosql.spi.type.TypeSignatureParameter.typeVariable; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.add; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.divideRoundUp; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.isZero; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.multiply; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.remainder; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.rescale; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.subtract; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.throwIfOverflows; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToUnscaledLong; +import static io.trino.metadata.Signature.longVariableExpression; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.DIVIDE; +import static io.trino.spi.function.OperatorType.MODULUS; +import static io.trino.spi.function.OperatorType.MULTIPLY; +import static io.trino.spi.function.OperatorType.NEGATION; +import static io.trino.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.type.Decimals.encodeUnscaledValue; +import static io.trino.spi.type.Decimals.longTenToNth; +import static io.trino.spi.type.TypeSignatureParameter.typeVariable; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.add; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.divideRoundUp; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.isZero; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.multiply; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.remainder; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.rescale; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.subtract; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.throwIfOverflows; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToUnscaledLong; import static java.lang.Integer.max; import static java.lang.Long.signum; import static java.lang.Math.abs; diff --git a/core/trino-main/src/main/java/io/trino/type/DecimalParametricType.java b/core/trino-main/src/main/java/io/trino/type/DecimalParametricType.java index 0a4846f205b7..d174c0ef3bc7 100644 --- a/core/trino-main/src/main/java/io/trino/type/DecimalParametricType.java +++ b/core/trino-main/src/main/java/io/trino/type/DecimalParametricType.java @@ -13,12 +13,12 @@ */ package io.trino.type; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeParameter; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeParameter; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/type/DecimalSaturatedFloorCasts.java b/core/trino-main/src/main/java/io/trino/type/DecimalSaturatedFloorCasts.java index 1c1e420419fe..3e83e1b0f790 100644 --- a/core/trino-main/src/main/java/io/trino/type/DecimalSaturatedFloorCasts.java +++ b/core/trino-main/src/main/java/io/trino/type/DecimalSaturatedFloorCasts.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.PolymorphicScalarFunctionBuilder; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.PolymorphicScalarFunctionBuilder; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.math.BigDecimal; import java.math.BigInteger; -import static io.prestosql.spi.function.OperatorType.SATURATED_FLOOR_CAST; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.Decimals.bigIntegerTenToNth; -import static io.prestosql.spi.type.Decimals.decodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.encodeUnscaledValue; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.TypeSignatureParameter.typeVariable; +import static io.trino.spi.function.OperatorType.SATURATED_FLOOR_CAST; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.Decimals.bigIntegerTenToNth; +import static io.trino.spi.type.Decimals.decodeUnscaledValue; +import static io.trino.spi.type.Decimals.encodeUnscaledValue; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TypeSignatureParameter.typeVariable; import static java.lang.Math.toIntExact; import static java.math.BigInteger.ONE; import static java.math.RoundingMode.FLOOR; diff --git a/core/trino-main/src/main/java/io/trino/type/DecimalToDecimalCasts.java b/core/trino-main/src/main/java/io/trino/type/DecimalToDecimalCasts.java index 28ee1db44dc2..bf554dd7d7c5 100644 --- a/core/trino-main/src/main/java/io/trino/type/DecimalToDecimalCasts.java +++ b/core/trino-main/src/main/java/io/trino/type/DecimalToDecimalCasts.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.PolymorphicScalarFunctionBuilder; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.type.DecimalConversions; -import io.prestosql.spi.type.DecimalType; +import io.trino.metadata.PolymorphicScalarFunctionBuilder; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.type.DecimalConversions; +import io.trino.spi.type.DecimalType; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.Decimals.longTenToNth; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.Decimals.longTenToNth; +import static io.trino.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; public final class DecimalToDecimalCasts { diff --git a/core/trino-main/src/main/java/io/trino/type/DoubleOperators.java b/core/trino-main/src/main/java/io/trino/type/DoubleOperators.java index 1cbca6220807..c00432f6eeb2 100644 --- a/core/trino-main/src/main/java/io/trino/type/DoubleOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/DoubleOperators.java @@ -17,25 +17,25 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.operator.scalar.MathFunctions; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.scalar.MathFunctions; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.function.OperatorType.DIVIDE; -import static io.prestosql.spi.function.OperatorType.MODULUS; -import static io.prestosql.spi.function.OperatorType.MULTIPLY; -import static io.prestosql.spi.function.OperatorType.NEGATION; -import static io.prestosql.spi.function.OperatorType.SATURATED_FLOOR_CAST; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.DIVIDE; +import static io.trino.spi.function.OperatorType.MODULUS; +import static io.trino.spi.function.OperatorType.MULTIPLY; +import static io.trino.spi.function.OperatorType.NEGATION; +import static io.trino.spi.function.OperatorType.SATURATED_FLOOR_CAST; +import static io.trino.spi.function.OperatorType.SUBTRACT; import static java.lang.Float.floatToIntBits; import static java.lang.Float.floatToRawIntBits; import static java.lang.Math.toIntExact; diff --git a/core/trino-main/src/main/java/io/trino/type/FunctionParametricType.java b/core/trino-main/src/main/java/io/trino/type/FunctionParametricType.java index 76b7414a8aa0..2ae250500c05 100644 --- a/core/trino-main/src/main/java/io/trino/type/FunctionParametricType.java +++ b/core/trino-main/src/main/java/io/trino/type/FunctionParametricType.java @@ -13,16 +13,16 @@ */ package io.trino.type; -import io.prestosql.spi.type.ParameterKind; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeParameter; +import io.trino.spi.type.ParameterKind; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeParameter; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.type.FunctionType.NAME; +import static io.trino.type.FunctionType.NAME; import static java.util.stream.Collectors.toList; public final class FunctionParametricType diff --git a/core/trino-main/src/main/java/io/trino/type/FunctionType.java b/core/trino-main/src/main/java/io/trino/type/FunctionType.java index 9f583c5d03b0..35fd362971c1 100644 --- a/core/trino-main/src/main/java/io/trino/type/FunctionType.java +++ b/core/trino-main/src/main/java/io/trino/type/FunctionType.java @@ -16,13 +16,13 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/type/HyperLogLogOperators.java b/core/trino-main/src/main/java/io/trino/type/HyperLogLogOperators.java index a903dadd260c..7edbdf2ba77c 100644 --- a/core/trino-main/src/main/java/io/trino/type/HyperLogLogOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/HyperLogLogOperators.java @@ -15,11 +15,11 @@ import io.airlift.slice.Slice; import io.airlift.stats.cardinality.HyperLogLog; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.CAST; public final class HyperLogLogOperators { diff --git a/core/trino-main/src/main/java/io/trino/type/IntegerOperators.java b/core/trino-main/src/main/java/io/trino/type/IntegerOperators.java index 900d3d92d1f8..3dc0d31ec752 100644 --- a/core/trino-main/src/main/java/io/trino/type/IntegerOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/IntegerOperators.java @@ -16,23 +16,23 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.function.OperatorType.DIVIDE; -import static io.prestosql.spi.function.OperatorType.MODULUS; -import static io.prestosql.spi.function.OperatorType.MULTIPLY; -import static io.prestosql.spi.function.OperatorType.NEGATION; -import static io.prestosql.spi.function.OperatorType.SATURATED_FLOOR_CAST; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.DIVIDE; +import static io.trino.spi.function.OperatorType.MODULUS; +import static io.trino.spi.function.OperatorType.MULTIPLY; +import static io.trino.spi.function.OperatorType.NEGATION; +import static io.trino.spi.function.OperatorType.SATURATED_FLOOR_CAST; +import static io.trino.spi.function.OperatorType.SUBTRACT; import static java.lang.Float.floatToRawIntBits; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/type/InternalTypeManager.java b/core/trino-main/src/main/java/io/trino/type/InternalTypeManager.java index da4f5a5a291e..90fe3acbadc2 100644 --- a/core/trino-main/src/main/java/io/trino/type/InternalTypeManager.java +++ b/core/trino-main/src/main/java/io/trino/type/InternalTypeManager.java @@ -13,12 +13,12 @@ */ package io.trino.type; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/type/IntervalDayTimeOperators.java b/core/trino-main/src/main/java/io/trino/type/IntervalDayTimeOperators.java index 55797215a86c..baba4178a990 100644 --- a/core/trino-main/src/main/java/io/trino/type/IntervalDayTimeOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/IntervalDayTimeOperators.java @@ -14,21 +14,21 @@ package io.trino.type; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.client.IntervalDayTime.formatMillis; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.function.OperatorType.DIVIDE; -import static io.prestosql.spi.function.OperatorType.MULTIPLY; -import static io.prestosql.spi.function.OperatorType.NEGATION; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; +import static io.trino.client.IntervalDayTime.formatMillis; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.DIVIDE; +import static io.trino.spi.function.OperatorType.MULTIPLY; +import static io.trino.spi.function.OperatorType.NEGATION; +import static io.trino.spi.function.OperatorType.SUBTRACT; import static java.lang.String.format; public final class IntervalDayTimeOperators diff --git a/core/trino-main/src/main/java/io/trino/type/IntervalDayTimeType.java b/core/trino-main/src/main/java/io/trino/type/IntervalDayTimeType.java index dcb80f439f9b..1fa2555bb9e2 100644 --- a/core/trino-main/src/main/java/io/trino/type/IntervalDayTimeType.java +++ b/core/trino-main/src/main/java/io/trino/type/IntervalDayTimeType.java @@ -13,11 +13,11 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractLongType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractLongType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TypeSignature; public final class IntervalDayTimeType extends AbstractLongType diff --git a/core/trino-main/src/main/java/io/trino/type/IntervalYearMonthOperators.java b/core/trino-main/src/main/java/io/trino/type/IntervalYearMonthOperators.java index 29a80e53c031..68cfbddd8cf7 100644 --- a/core/trino-main/src/main/java/io/trino/type/IntervalYearMonthOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/IntervalYearMonthOperators.java @@ -14,21 +14,21 @@ package io.trino.type; import io.airlift.slice.Slice; -import io.prestosql.client.IntervalYearMonth; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.client.IntervalYearMonth; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.function.OperatorType.DIVIDE; -import static io.prestosql.spi.function.OperatorType.MULTIPLY; -import static io.prestosql.spi.function.OperatorType.NEGATION; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.DIVIDE; +import static io.trino.spi.function.OperatorType.MULTIPLY; +import static io.trino.spi.function.OperatorType.NEGATION; +import static io.trino.spi.function.OperatorType.SUBTRACT; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/type/IntervalYearMonthType.java b/core/trino-main/src/main/java/io/trino/type/IntervalYearMonthType.java index 71dcd368ef2c..0cb9ed359e9d 100644 --- a/core/trino-main/src/main/java/io/trino/type/IntervalYearMonthType.java +++ b/core/trino-main/src/main/java/io/trino/type/IntervalYearMonthType.java @@ -13,11 +13,11 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractIntType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractIntType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TypeSignature; public final class IntervalYearMonthType extends AbstractIntType diff --git a/core/trino-main/src/main/java/io/trino/type/IpAddressOperators.java b/core/trino-main/src/main/java/io/trino/type/IpAddressOperators.java index 952dd0f9c11a..35371cd440b5 100644 --- a/core/trino-main/src/main/java/io/trino/type/IpAddressOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/IpAddressOperators.java @@ -15,20 +15,20 @@ import com.google.common.net.InetAddresses; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import java.net.InetAddress; import java.net.UnknownHostException; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.CAST; import static java.lang.System.arraycopy; public final class IpAddressOperators diff --git a/core/trino-main/src/main/java/io/trino/type/IpAddressType.java b/core/trino-main/src/main/java/io/trino/type/IpAddressType.java index 2b59147b97f5..fa0077b5a330 100644 --- a/core/trino-main/src/main/java/io/trino/type/IpAddressType.java +++ b/core/trino-main/src/main/java/io/trino/type/IpAddressType.java @@ -17,31 +17,31 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.Int128ArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.type.AbstractType; -import io.prestosql.spi.type.FixedWidthType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TypeOperatorDeclaration; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.Int128ArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.type.AbstractType; +import io.trino.spi.type.FixedWidthType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TypeOperatorDeclaration; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import java.net.InetAddress; import java.net.UnknownHostException; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; -import static io.prestosql.spi.block.Int128ArrayBlock.INT128_BYTES; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.block.Int128ArrayBlock.INT128_BYTES; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.Long.reverseBytes; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-main/src/main/java/io/trino/type/JoniRegexpType.java b/core/trino-main/src/main/java/io/trino/type/JoniRegexpType.java index 46ad4479bf02..881de477ffae 100644 --- a/core/trino-main/src/main/java/io/trino/type/JoniRegexpType.java +++ b/core/trino-main/src/main/java/io/trino/type/JoniRegexpType.java @@ -14,13 +14,13 @@ package io.trino.type; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.TypeSignature; -import static io.prestosql.operator.scalar.JoniRegexpCasts.joniRegexp; +import static io.trino.operator.scalar.JoniRegexpCasts.joniRegexp; public class JoniRegexpType extends AbstractVariableWidthType diff --git a/core/trino-main/src/main/java/io/trino/type/JsonPathType.java b/core/trino-main/src/main/java/io/trino/type/JsonPathType.java index 0227ae7a23c6..b7d7eb68225f 100644 --- a/core/trino-main/src/main/java/io/trino/type/JsonPathType.java +++ b/core/trino-main/src/main/java/io/trino/type/JsonPathType.java @@ -15,12 +15,12 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.operator.scalar.JsonPath; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.operator.scalar.JsonPath; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.TypeSignature; public class JsonPathType extends AbstractVariableWidthType diff --git a/core/trino-main/src/main/java/io/trino/type/JsonType.java b/core/trino-main/src/main/java/io/trino/type/JsonType.java index f7025e6f6a33..f1bc0d3869f2 100644 --- a/core/trino-main/src/main/java/io/trino/type/JsonType.java +++ b/core/trino-main/src/main/java/io/trino/type/JsonType.java @@ -16,21 +16,21 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TypeOperatorDeclaration; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; - -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TypeOperatorDeclaration; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; + +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.invoke.MethodHandles.lookup; /** diff --git a/core/trino-main/src/main/java/io/trino/type/LikeFunctions.java b/core/trino-main/src/main/java/io/trino/type/LikeFunctions.java index 907a38f43822..33d82ed11fb3 100644 --- a/core/trino-main/src/main/java/io/trino/type/LikeFunctions.java +++ b/core/trino-main/src/main/java/io/trino/type/LikeFunctions.java @@ -21,12 +21,12 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameter; +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 java.util.Optional; @@ -36,9 +36,9 @@ import static io.airlift.joni.constants.SyntaxProperties.OP_LINE_ANCHOR; import static io.airlift.slice.SliceUtf8.getCodePointAt; import static io.airlift.slice.SliceUtf8.lengthOfCodePoint; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.util.Failures.checkCondition; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.util.Failures.checkCondition; import static java.nio.charset.StandardCharsets.UTF_8; public final class LikeFunctions diff --git a/core/trino-main/src/main/java/io/trino/type/LikePatternType.java b/core/trino-main/src/main/java/io/trino/type/LikePatternType.java index d082098b5760..63cc636a072c 100644 --- a/core/trino-main/src/main/java/io/trino/type/LikePatternType.java +++ b/core/trino-main/src/main/java/io/trino/type/LikePatternType.java @@ -14,13 +14,13 @@ package io.trino.type; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.TypeSignature; -import static io.prestosql.operator.scalar.JoniRegexpCasts.joniRegexp; +import static io.trino.operator.scalar.JoniRegexpCasts.joniRegexp; public class LikePatternType extends AbstractVariableWidthType diff --git a/core/trino-main/src/main/java/io/trino/type/MapParametricType.java b/core/trino-main/src/main/java/io/trino/type/MapParametricType.java index 3ac6d0fdf4a3..ef1b0aac9305 100644 --- a/core/trino-main/src/main/java/io/trino/type/MapParametricType.java +++ b/core/trino-main/src/main/java/io/trino/type/MapParametricType.java @@ -13,13 +13,13 @@ */ package io.trino.type; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.ParameterKind; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeParameter; +import io.trino.spi.type.MapType; +import io.trino.spi.type.ParameterKind; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeParameter; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/type/QuantileDigestOperators.java b/core/trino-main/src/main/java/io/trino/type/QuantileDigestOperators.java index 405572fdc485..12f2240988e7 100644 --- a/core/trino-main/src/main/java/io/trino/type/QuantileDigestOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/QuantileDigestOperators.java @@ -14,11 +14,11 @@ package io.trino.type; import io.airlift.slice.Slice; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.CAST; public final class QuantileDigestOperators { diff --git a/core/trino-main/src/main/java/io/trino/type/Re2JRegexp.java b/core/trino-main/src/main/java/io/trino/type/Re2JRegexp.java index 26f51fc79b8e..ae1cf2356a9e 100644 --- a/core/trino-main/src/main/java/io/trino/type/Re2JRegexp.java +++ b/core/trino-main/src/main/java/io/trino/type/Re2JRegexp.java @@ -18,14 +18,14 @@ import com.google.re2j.Pattern; import io.airlift.log.Logger; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import static com.google.common.base.Preconditions.checkState; import static com.google.re2j.Options.Algorithm.DFA_FALLBACK_TO_NFA; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/type/Re2JRegexpType.java b/core/trino-main/src/main/java/io/trino/type/Re2JRegexpType.java index 3370e7949b9c..08d3f41bd8eb 100644 --- a/core/trino-main/src/main/java/io/trino/type/Re2JRegexpType.java +++ b/core/trino-main/src/main/java/io/trino/type/Re2JRegexpType.java @@ -15,14 +15,14 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.TypeSignature; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; public class Re2JRegexpType extends AbstractVariableWidthType diff --git a/core/trino-main/src/main/java/io/trino/type/RealOperators.java b/core/trino-main/src/main/java/io/trino/type/RealOperators.java index 3c977c91da5f..8792fe86ed3a 100644 --- a/core/trino-main/src/main/java/io/trino/type/RealOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/RealOperators.java @@ -17,24 +17,24 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.operator.scalar.MathFunctions; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.scalar.MathFunctions; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.function.OperatorType.DIVIDE; -import static io.prestosql.spi.function.OperatorType.MODULUS; -import static io.prestosql.spi.function.OperatorType.MULTIPLY; -import static io.prestosql.spi.function.OperatorType.NEGATION; -import static io.prestosql.spi.function.OperatorType.SATURATED_FLOOR_CAST; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.DIVIDE; +import static io.trino.spi.function.OperatorType.MODULUS; +import static io.trino.spi.function.OperatorType.MULTIPLY; +import static io.trino.spi.function.OperatorType.NEGATION; +import static io.trino.spi.function.OperatorType.SATURATED_FLOOR_CAST; +import static io.trino.spi.function.OperatorType.SUBTRACT; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; diff --git a/core/trino-main/src/main/java/io/trino/type/RowParametricType.java b/core/trino-main/src/main/java/io/trino/type/RowParametricType.java index 6cbde994f32e..d56472fb01d8 100644 --- a/core/trino-main/src/main/java/io/trino/type/RowParametricType.java +++ b/core/trino-main/src/main/java/io/trino/type/RowParametricType.java @@ -13,17 +13,17 @@ */ package io.trino.type; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.ParameterKind; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.RowFieldName; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeParameter; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.ParameterKind; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.RowFieldName; +import io.trino.spi.type.RowType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeParameter; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import java.util.List; diff --git a/core/trino-main/src/main/java/io/trino/type/SingleAccessMethodCompiler.java b/core/trino-main/src/main/java/io/trino/type/SingleAccessMethodCompiler.java index d3769f80d2a9..1c5b1eca096a 100644 --- a/core/trino-main/src/main/java/io/trino/type/SingleAccessMethodCompiler.java +++ b/core/trino-main/src/main/java/io/trino/type/SingleAccessMethodCompiler.java @@ -17,7 +17,7 @@ import io.airlift.bytecode.ClassDefinition; import io.airlift.bytecode.MethodDefinition; import io.airlift.bytecode.expression.BytecodeExpression; -import io.prestosql.sql.gen.CallSiteBinder; +import io.trino.sql.gen.CallSiteBinder; import java.lang.invoke.MethodHandle; import java.lang.reflect.Method; @@ -34,9 +34,9 @@ import static io.airlift.bytecode.Parameter.arg; import static io.airlift.bytecode.ParameterizedType.type; import static io.airlift.bytecode.expression.BytecodeExpressions.invokeDynamic; -import static io.prestosql.sql.gen.Bootstrap.BOOTSTRAP_METHOD; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; +import static io.trino.sql.gen.Bootstrap.BOOTSTRAP_METHOD; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; import static java.lang.invoke.MethodType.methodType; final class SingleAccessMethodCompiler diff --git a/core/trino-main/src/main/java/io/trino/type/SmallintOperators.java b/core/trino-main/src/main/java/io/trino/type/SmallintOperators.java index 8c07177d2566..aabc56e80b95 100644 --- a/core/trino-main/src/main/java/io/trino/type/SmallintOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/SmallintOperators.java @@ -16,23 +16,23 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.function.OperatorType.DIVIDE; -import static io.prestosql.spi.function.OperatorType.MODULUS; -import static io.prestosql.spi.function.OperatorType.MULTIPLY; -import static io.prestosql.spi.function.OperatorType.NEGATION; -import static io.prestosql.spi.function.OperatorType.SATURATED_FLOOR_CAST; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.DIVIDE; +import static io.trino.spi.function.OperatorType.MODULUS; +import static io.trino.spi.function.OperatorType.MULTIPLY; +import static io.trino.spi.function.OperatorType.NEGATION; +import static io.trino.spi.function.OperatorType.SATURATED_FLOOR_CAST; +import static io.trino.spi.function.OperatorType.SUBTRACT; import static java.lang.Float.floatToRawIntBits; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/type/SqlIntervalDayTime.java b/core/trino-main/src/main/java/io/trino/type/SqlIntervalDayTime.java index 6630a17b3fb6..867e2a76f360 100644 --- a/core/trino-main/src/main/java/io/trino/type/SqlIntervalDayTime.java +++ b/core/trino-main/src/main/java/io/trino/type/SqlIntervalDayTime.java @@ -17,8 +17,8 @@ import java.util.Objects; -import static io.prestosql.client.IntervalDayTime.formatMillis; -import static io.prestosql.client.IntervalDayTime.toMillis; +import static io.trino.client.IntervalDayTime.formatMillis; +import static io.trino.client.IntervalDayTime.toMillis; public class SqlIntervalDayTime { diff --git a/core/trino-main/src/main/java/io/trino/type/SqlIntervalYearMonth.java b/core/trino-main/src/main/java/io/trino/type/SqlIntervalYearMonth.java index 18f0fc25c118..2a73ab1f5bc7 100644 --- a/core/trino-main/src/main/java/io/trino/type/SqlIntervalYearMonth.java +++ b/core/trino-main/src/main/java/io/trino/type/SqlIntervalYearMonth.java @@ -17,8 +17,8 @@ import java.util.Objects; -import static io.prestosql.client.IntervalYearMonth.formatMonths; -import static io.prestosql.client.IntervalYearMonth.toMonths; +import static io.trino.client.IntervalYearMonth.formatMonths; +import static io.trino.client.IntervalYearMonth.toMonths; public class SqlIntervalYearMonth { diff --git a/core/trino-main/src/main/java/io/trino/type/TDigestOperators.java b/core/trino-main/src/main/java/io/trino/type/TDigestOperators.java index 8c34e41e7d0c..f19ae8452aa4 100644 --- a/core/trino-main/src/main/java/io/trino/type/TDigestOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/TDigestOperators.java @@ -15,11 +15,11 @@ import io.airlift.slice.Slice; import io.airlift.stats.TDigest; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.CAST; public final class TDigestOperators { diff --git a/core/trino-main/src/main/java/io/trino/type/TDigestType.java b/core/trino-main/src/main/java/io/trino/type/TDigestType.java index 4d54647a8f0f..5c6a95b8438c 100644 --- a/core/trino-main/src/main/java/io/trino/type/TDigestType.java +++ b/core/trino-main/src/main/java/io/trino/type/TDigestType.java @@ -15,13 +15,13 @@ import io.airlift.slice.Slice; import io.airlift.stats.TDigest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TypeSignature; public class TDigestType extends AbstractVariableWidthType diff --git a/core/trino-main/src/main/java/io/trino/type/TinyintOperators.java b/core/trino-main/src/main/java/io/trino/type/TinyintOperators.java index 2c2f8aec6995..8604247e6e12 100644 --- a/core/trino-main/src/main/java/io/trino/type/TinyintOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/TinyintOperators.java @@ -15,22 +15,22 @@ import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.function.OperatorType.DIVIDE; -import static io.prestosql.spi.function.OperatorType.MODULUS; -import static io.prestosql.spi.function.OperatorType.MULTIPLY; -import static io.prestosql.spi.function.OperatorType.NEGATION; -import static io.prestosql.spi.function.OperatorType.SUBTRACT; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.DIVIDE; +import static io.trino.spi.function.OperatorType.MODULUS; +import static io.trino.spi.function.OperatorType.MULTIPLY; +import static io.trino.spi.function.OperatorType.NEGATION; +import static io.trino.spi.function.OperatorType.SUBTRACT; import static java.lang.Float.floatToRawIntBits; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/type/TypeCoercion.java b/core/trino-main/src/main/java/io/trino/type/TypeCoercion.java index 61dacd3f971e..b705df416f83 100644 --- a/core/trino-main/src/main/java/io/trino/type/TypeCoercion.java +++ b/core/trino-main/src/main/java/io/trino/type/TypeCoercion.java @@ -14,21 +14,21 @@ package io.trino.type; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.type.setdigest.SetDigestType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarcharType; +import io.trino.type.setdigest.SetDigestType; import java.util.List; import java.util.Optional; @@ -36,27 +36,27 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.RowType.Field; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.createTimeType; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimeWithTimeZoneType.createTimeWithTimeZoneType; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.CodePointsType.CODE_POINTS; -import static io.prestosql.type.JoniRegexpType.JONI_REGEXP; -import static io.prestosql.type.JsonPathType.JSON_PATH; -import static io.prestosql.type.Re2JRegexpType.RE2J_REGEXP_SIGNATURE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.RowType.Field; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.createTimeType; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimeWithTimeZoneType.createTimeWithTimeZoneType; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.type.CodePointsType.CODE_POINTS; +import static io.trino.type.JoniRegexpType.JONI_REGEXP; +import static io.trino.type.JsonPathType.JSON_PATH; +import static io.trino.type.Re2JRegexpType.RE2J_REGEXP_SIGNATURE; import static java.util.Objects.requireNonNull; public final class TypeCoercion diff --git a/core/trino-main/src/main/java/io/trino/type/TypeDeserializer.java b/core/trino-main/src/main/java/io/trino/type/TypeDeserializer.java index 8c6518d277ae..9c9328d348d4 100644 --- a/core/trino-main/src/main/java/io/trino/type/TypeDeserializer.java +++ b/core/trino-main/src/main/java/io/trino/type/TypeDeserializer.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.deser.std.FromStringDeserializer; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/type/TypeSignatureDeserializer.java b/core/trino-main/src/main/java/io/trino/type/TypeSignatureDeserializer.java index fabae48818ba..4ee8e00a8378 100644 --- a/core/trino-main/src/main/java/io/trino/type/TypeSignatureDeserializer.java +++ b/core/trino-main/src/main/java/io/trino/type/TypeSignatureDeserializer.java @@ -16,11 +16,11 @@ import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.deser.std.FromStringDeserializer; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignature; import javax.inject.Inject; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; public final class TypeSignatureDeserializer extends FromStringDeserializer diff --git a/core/trino-main/src/main/java/io/trino/type/TypeSignatureKeyDeserializer.java b/core/trino-main/src/main/java/io/trino/type/TypeSignatureKeyDeserializer.java index 961ca79cadd1..7efaf633396f 100644 --- a/core/trino-main/src/main/java/io/trino/type/TypeSignatureKeyDeserializer.java +++ b/core/trino-main/src/main/java/io/trino/type/TypeSignatureKeyDeserializer.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.databind.KeyDeserializer; import com.google.common.collect.ImmutableSet; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; public final class TypeSignatureKeyDeserializer extends KeyDeserializer diff --git a/core/trino-main/src/main/java/io/trino/type/TypeUtils.java b/core/trino-main/src/main/java/io/trino/type/TypeUtils.java index 12833f003ba0..223d3c3419c0 100644 --- a/core/trino-main/src/main/java/io/trino/type/TypeUtils.java +++ b/core/trino-main/src/main/java/io/trino/type/TypeUtils.java @@ -14,27 +14,27 @@ package io.trino.type; import com.google.common.base.Joiner; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.FixedWidthType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.FixedWidthType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.StandardTypes.ARRAY; -import static io.prestosql.spi.type.StandardTypes.MAP; -import static io.prestosql.spi.type.StandardTypes.ROW; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.StandardTypes.ARRAY; +import static io.trino.spi.type.StandardTypes.MAP; +import static io.trino.spi.type.StandardTypes.ROW; import static java.lang.String.format; public final class TypeUtils diff --git a/core/trino-main/src/main/java/io/trino/type/UnknownType.java b/core/trino-main/src/main/java/io/trino/type/UnknownType.java index 4b4c995a6207..5191820eca8c 100644 --- a/core/trino-main/src/main/java/io/trino/type/UnknownType.java +++ b/core/trino-main/src/main/java/io/trino/type/UnknownType.java @@ -13,24 +13,24 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.ByteArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.type.AbstractType; -import io.prestosql.spi.type.FixedWidthType; -import io.prestosql.spi.type.TypeOperatorDeclaration; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.ByteArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.type.AbstractType; +import io.trino.spi.type.FixedWidthType; +import io.trino.spi.type.TypeOperatorDeclaration; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.invoke.MethodHandles.lookup; public final class UnknownType diff --git a/core/trino-main/src/main/java/io/trino/type/UuidOperators.java b/core/trino-main/src/main/java/io/trino/type/UuidOperators.java index 6f6e87d37078..824e2fb632c4 100644 --- a/core/trino-main/src/main/java/io/trino/type/UuidOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/UuidOperators.java @@ -14,20 +14,20 @@ package io.trino.type; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; import static io.airlift.slice.Slices.wrappedLongArray; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.CAST; import static java.lang.Long.reverseBytes; import static java.util.UUID.randomUUID; diff --git a/core/trino-main/src/main/java/io/trino/type/UuidType.java b/core/trino-main/src/main/java/io/trino/type/UuidType.java index b8dfc2422ccf..5e572e2212a5 100644 --- a/core/trino-main/src/main/java/io/trino/type/UuidType.java +++ b/core/trino-main/src/main/java/io/trino/type/UuidType.java @@ -16,30 +16,30 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.Int128ArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.type.AbstractType; -import io.prestosql.spi.type.FixedWidthType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TypeOperatorDeclaration; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.Int128ArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.type.AbstractType; +import io.trino.spi.type.FixedWidthType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TypeOperatorDeclaration; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import java.util.UUID; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; -import static io.prestosql.spi.block.Int128ArrayBlock.INT128_BYTES; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.block.Int128ArrayBlock.INT128_BYTES; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.Long.reverseBytes; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-main/src/main/java/io/trino/type/VarcharOperators.java b/core/trino-main/src/main/java/io/trino/type/VarcharOperators.java index 6b591784b809..6b567ab859e6 100644 --- a/core/trino-main/src/main/java/io/trino/type/VarcharOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/VarcharOperators.java @@ -14,14 +14,14 @@ package io.trino.type; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.CAST; import static java.lang.String.format; public final class VarcharOperators diff --git a/core/trino-main/src/main/java/io/trino/type/VarcharParametricType.java b/core/trino-main/src/main/java/io/trino/type/VarcharParametricType.java index 7d4ca440f69d..2fca08209914 100644 --- a/core/trino-main/src/main/java/io/trino/type/VarcharParametricType.java +++ b/core/trino-main/src/main/java/io/trino/type/VarcharParametricType.java @@ -13,16 +13,16 @@ */ package io.trino.type; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeParameter; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeParameter; +import io.trino.spi.type.VarcharType; import java.util.List; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; public class VarcharParametricType implements ParametricType diff --git a/core/trino-main/src/main/java/io/trino/type/setdigest/BuildSetDigestAggregation.java b/core/trino-main/src/main/java/io/trino/type/setdigest/BuildSetDigestAggregation.java index 9e93a9947fa9..6f17380f6057 100644 --- a/core/trino-main/src/main/java/io/trino/type/setdigest/BuildSetDigestAggregation.java +++ b/core/trino-main/src/main/java/io/trino/type/setdigest/BuildSetDigestAggregation.java @@ -14,13 +14,13 @@ package io.trino.type.setdigest; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; @AggregationFunction("make_set_digest") public final class BuildSetDigestAggregation diff --git a/core/trino-main/src/main/java/io/trino/type/setdigest/MergeSetDigestAggregation.java b/core/trino-main/src/main/java/io/trino/type/setdigest/MergeSetDigestAggregation.java index e5c92790de37..7476d869431d 100644 --- a/core/trino-main/src/main/java/io/trino/type/setdigest/MergeSetDigestAggregation.java +++ b/core/trino-main/src/main/java/io/trino/type/setdigest/MergeSetDigestAggregation.java @@ -15,14 +15,14 @@ package io.trino.type.setdigest; import io.airlift.slice.Slice; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; -import static io.prestosql.type.setdigest.SetDigestType.SET_DIGEST; +import static io.trino.type.setdigest.SetDigestType.SET_DIGEST; @AggregationFunction("merge_set_digest") public final class MergeSetDigestAggregation diff --git a/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestFunctions.java b/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestFunctions.java index eae82d72cf4a..d95cb4268dbc 100644 --- a/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestFunctions.java +++ b/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestFunctions.java @@ -19,20 +19,20 @@ import io.airlift.json.ObjectMapperProvider; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import java.io.UncheckedIOException; import java.util.Map; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.type.setdigest.SetDigest.exactIntersectionCardinality; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.type.setdigest.SetDigest.exactIntersectionCardinality; public final class SetDigestFunctions { diff --git a/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestOperators.java b/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestOperators.java index fd68f1c3976d..3464aae18c57 100644 --- a/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestOperators.java +++ b/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestOperators.java @@ -16,14 +16,14 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.SizeOf.SIZE_OF_BYTE; import static io.airlift.slice.SizeOf.SIZE_OF_INT; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.function.OperatorType.CAST; public final class SetDigestOperators { diff --git a/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestState.java b/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestState.java index eff2f86eb531..f348aa9a1d4d 100644 --- a/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestState.java +++ b/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestState.java @@ -14,8 +14,8 @@ package io.trino.type.setdigest; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; @AccumulatorStateMetadata(stateSerializerClass = SetDigestStateSerializer.class, stateFactoryClass = SetDigestStateFactory.class) public interface SetDigestState diff --git a/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestStateFactory.java b/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestStateFactory.java index d20c7a170eab..e3efa074b5bc 100644 --- a/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestStateFactory.java +++ b/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestStateFactory.java @@ -14,9 +14,9 @@ package io.trino.type.setdigest; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.GroupedAccumulatorState; +import io.trino.array.ObjectBigArray; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.GroupedAccumulatorState; import org.openjdk.jol.info.ClassLayout; public class SetDigestStateFactory diff --git a/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestStateSerializer.java b/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestStateSerializer.java index 1f89e16a6162..99002b982bc4 100644 --- a/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestStateSerializer.java +++ b/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestStateSerializer.java @@ -14,12 +14,12 @@ package io.trino.type.setdigest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.type.setdigest.SetDigestType.SET_DIGEST; +import static io.trino.type.setdigest.SetDigestType.SET_DIGEST; public class SetDigestStateSerializer implements AccumulatorStateSerializer diff --git a/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestType.java b/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestType.java index 69aeef7bffb5..a45b95b5f2b0 100644 --- a/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestType.java +++ b/core/trino-main/src/main/java/io/trino/type/setdigest/SetDigestType.java @@ -15,12 +15,12 @@ package io.trino.type.setdigest; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.TypeSignature; // Layout is :, where // size: is an int describing the length of the set digest bytes diff --git a/core/trino-main/src/main/java/io/trino/util/DateTimeUtils.java b/core/trino-main/src/main/java/io/trino/util/DateTimeUtils.java index 8f3c7d4d2e38..bc8421a76d1f 100644 --- a/core/trino-main/src/main/java/io/trino/util/DateTimeUtils.java +++ b/core/trino-main/src/main/java/io/trino/util/DateTimeUtils.java @@ -13,11 +13,11 @@ */ package io.trino.util; -import io.prestosql.client.IntervalDayTime; -import io.prestosql.client.IntervalYearMonth; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.sql.tree.IntervalLiteral.IntervalField; +import io.trino.client.IntervalDayTime; +import io.trino.client.IntervalYearMonth; +import io.trino.spi.PrestoException; +import io.trino.spi.type.TimeZoneKey; +import io.trino.sql.tree.IntervalLiteral.IntervalField; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.DurationFieldType; @@ -43,13 +43,13 @@ import java.util.stream.Stream; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.util.DateTimeZoneIndex.getChronology; -import static io.prestosql.util.DateTimeZoneIndex.getDateTimeZone; -import static io.prestosql.util.DateTimeZoneIndex.packDateTimeWithZone; -import static io.prestosql.util.DateTimeZoneIndex.unpackChronology; -import static io.prestosql.util.DateTimeZoneIndex.unpackDateTimeZone; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.util.DateTimeZoneIndex.getChronology; +import static io.trino.util.DateTimeZoneIndex.getDateTimeZone; +import static io.trino.util.DateTimeZoneIndex.packDateTimeWithZone; +import static io.trino.util.DateTimeZoneIndex.unpackChronology; +import static io.trino.util.DateTimeZoneIndex.unpackDateTimeZone; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/util/DateTimeZoneIndex.java b/core/trino-main/src/main/java/io/trino/util/DateTimeZoneIndex.java index dcc323917948..f1c5a53f66be 100644 --- a/core/trino-main/src/main/java/io/trino/util/DateTimeZoneIndex.java +++ b/core/trino-main/src/main/java/io/trino/util/DateTimeZoneIndex.java @@ -13,16 +13,16 @@ */ package io.trino.util; -import io.prestosql.spi.type.DateTimeEncoding; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.spi.type.DateTimeEncoding; +import io.trino.spi.type.TimeZoneKey; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.chrono.ISOChronology; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.MAX_TIME_ZONE_KEY; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeys; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TimeZoneKey.MAX_TIME_ZONE_KEY; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeys; public final class DateTimeZoneIndex { diff --git a/core/trino-main/src/main/java/io/trino/util/Failures.java b/core/trino-main/src/main/java/io/trino/util/Failures.java index 087135c57af0..f61827ce4d0c 100644 --- a/core/trino-main/src/main/java/io/trino/util/Failures.java +++ b/core/trino-main/src/main/java/io/trino/util/Failures.java @@ -14,16 +14,16 @@ package io.trino.util; import com.google.common.collect.ImmutableList; -import io.prestosql.client.ErrorLocation; -import io.prestosql.execution.ExecutionFailureInfo; -import io.prestosql.execution.Failure; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.PrestoTransportException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.sql.parser.ParsingException; +import io.trino.client.ErrorLocation; +import io.trino.execution.ExecutionFailureInfo; +import io.trino.execution.Failure; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.HostAddress; +import io.trino.spi.PrestoException; +import io.trino.spi.PrestoTransportException; +import io.trino.spi.StandardErrorCode; +import io.trino.sql.parser.ParsingException; import javax.annotation.Nullable; @@ -37,8 +37,8 @@ import static com.google.common.base.Throwables.throwIfInstanceOf; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Sets.newIdentityHashSet; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.SYNTAX_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.SYNTAX_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/util/FastutilSetHelper.java b/core/trino-main/src/main/java/io/trino/util/FastutilSetHelper.java index 98770a795428..c5afd31cb1f7 100644 --- a/core/trino-main/src/main/java/io/trino/util/FastutilSetHelper.java +++ b/core/trino-main/src/main/java/io/trino/util/FastutilSetHelper.java @@ -13,8 +13,8 @@ */ package io.trino.util; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Type; import it.unimi.dsi.fastutil.Hash; import it.unimi.dsi.fastutil.booleans.BooleanOpenHashSet; import it.unimi.dsi.fastutil.doubles.DoubleHash; @@ -29,7 +29,7 @@ import static com.google.common.base.Throwables.throwIfInstanceOf; import static com.google.common.base.Verify.verifyNotNull; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.lang.Boolean.TRUE; import static java.lang.invoke.MethodType.methodType; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/main/java/io/trino/util/GenerateTimeZoneIndex.java b/core/trino-main/src/main/java/io/trino/util/GenerateTimeZoneIndex.java index 9f86a9cf33d0..dddaa77c25a0 100644 --- a/core/trino-main/src/main/java/io/trino/util/GenerateTimeZoneIndex.java +++ b/core/trino-main/src/main/java/io/trino/util/GenerateTimeZoneIndex.java @@ -24,7 +24,7 @@ import static com.google.common.base.Predicates.not; import static com.google.common.collect.Sets.filter; import static com.google.common.collect.Sets.intersection; -import static io.prestosql.spi.type.TimeZoneKey.isUtcZoneId; +import static io.trino.spi.type.TimeZoneKey.isUtcZoneId; import static java.lang.Math.abs; import static java.lang.String.format; diff --git a/core/trino-main/src/main/java/io/trino/util/GraphvizPrinter.java b/core/trino-main/src/main/java/io/trino/util/GraphvizPrinter.java index 67ea243fb120..99ae7b4ec914 100644 --- a/core/trino-main/src/main/java/io/trino/util/GraphvizPrinter.java +++ b/core/trino-main/src/main/java/io/trino/util/GraphvizPrinter.java @@ -16,49 +16,49 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; -import io.prestosql.sql.planner.Partitioning.ArgumentBinding; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.SubPlan; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.Partitioning.ArgumentBinding; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.SubPlan; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.ArrayList; import java.util.HashMap; @@ -70,9 +70,9 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Maps.immutableEnumMap; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.sql.planner.planprinter.PlanPrinter.formatAggregation; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.planprinter.PlanPrinter.formatAggregation; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.lang.String.format; public final class GraphvizPrinter diff --git a/core/trino-main/src/main/java/io/trino/util/JsonUtil.java b/core/trino-main/src/main/java/io/trino/util/JsonUtil.java index c84e06842771..428a511e07d5 100644 --- a/core/trino-main/src/main/java/io/trino/util/JsonUtil.java +++ b/core/trino-main/src/main/java/io/trino/util/JsonUtil.java @@ -23,37 +23,37 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.DuplicateMapKeyException; -import io.prestosql.spi.block.SingleMapBlockWriter; -import io.prestosql.spi.block.SingleRowBlockWriter; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.RowType.Field; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.type.BigintOperators; -import io.prestosql.type.BooleanOperators; -import io.prestosql.type.DoubleOperators; -import io.prestosql.type.JsonType; -import io.prestosql.type.UnknownType; -import io.prestosql.type.VarcharOperators; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.DuplicateMapKeyException; +import io.trino.spi.block.SingleMapBlockWriter; +import io.trino.spi.block.SingleRowBlockWriter; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.RowType.Field; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.type.BigintOperators; +import io.trino.type.BooleanOperators; +import io.trino.type.DoubleOperators; +import io.trino.type.JsonType; +import io.trino.type.UnknownType; +import io.trino.type.VarcharOperators; import java.io.IOException; import java.io.InputStreamReader; @@ -74,23 +74,23 @@ import static com.fasterxml.jackson.core.JsonToken.START_ARRAY; import static com.fasterxml.jackson.core.JsonToken.START_OBJECT; import static com.google.common.base.Verify.verify; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.decodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.encodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.type.DateTimes.formatTimestamp; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.DateTimeUtils.printDate; -import static io.prestosql.util.JsonUtil.ObjectKeyProvider.createObjectKeyProvider; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.decodeUnscaledValue; +import static io.trino.spi.type.Decimals.encodeUnscaledValue; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.type.DateTimes.formatTimestamp; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.DateTimeUtils.printDate; +import static io.trino.util.JsonUtil.ObjectKeyProvider.createObjectKeyProvider; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; diff --git a/core/trino-main/src/main/java/io/trino/util/Long2LongOpenBigHashMap.java b/core/trino-main/src/main/java/io/trino/util/Long2LongOpenBigHashMap.java index 8878e5cde292..1a7c64746089 100644 --- a/core/trino-main/src/main/java/io/trino/util/Long2LongOpenBigHashMap.java +++ b/core/trino-main/src/main/java/io/trino/util/Long2LongOpenBigHashMap.java @@ -13,8 +13,8 @@ */ package io.trino.util; -import io.prestosql.array.BigArrays; -import io.prestosql.array.LongBigArray; +import io.trino.array.BigArrays; +import io.trino.array.LongBigArray; import it.unimi.dsi.fastutil.Hash; import it.unimi.dsi.fastutil.longs.AbstractLong2LongMap; import it.unimi.dsi.fastutil.longs.AbstractLongCollection; diff --git a/core/trino-main/src/main/java/io/trino/util/LongBigArrayFIFOQueue.java b/core/trino-main/src/main/java/io/trino/util/LongBigArrayFIFOQueue.java index 83f6f8c351d6..ca116c8f19b2 100644 --- a/core/trino-main/src/main/java/io/trino/util/LongBigArrayFIFOQueue.java +++ b/core/trino-main/src/main/java/io/trino/util/LongBigArrayFIFOQueue.java @@ -13,8 +13,8 @@ */ package io.trino.util; -import io.prestosql.array.BigArrays; -import io.prestosql.array.LongBigArray; +import io.trino.array.BigArrays; +import io.trino.array.LongBigArray; import it.unimi.dsi.fastutil.PriorityQueue; import it.unimi.dsi.fastutil.longs.LongComparator; import it.unimi.dsi.fastutil.longs.LongPriorityQueue; diff --git a/core/trino-main/src/main/java/io/trino/util/LongLong2LongOpenCustomBigHashMap.java b/core/trino-main/src/main/java/io/trino/util/LongLong2LongOpenCustomBigHashMap.java index d971808cb31a..617d349babe1 100644 --- a/core/trino-main/src/main/java/io/trino/util/LongLong2LongOpenCustomBigHashMap.java +++ b/core/trino-main/src/main/java/io/trino/util/LongLong2LongOpenCustomBigHashMap.java @@ -13,8 +13,8 @@ */ package io.trino.util; -import io.prestosql.array.BigArrays; -import io.prestosql.array.LongBigArray; +import io.trino.array.BigArrays; +import io.trino.array.LongBigArray; import it.unimi.dsi.fastutil.Hash; import it.unimi.dsi.fastutil.HashCommon; import org.openjdk.jol.info.ClassLayout; diff --git a/core/trino-main/src/main/java/io/trino/util/MergeSortedPages.java b/core/trino-main/src/main/java/io/trino/util/MergeSortedPages.java index ddbea400e0c2..10f5747f2789 100644 --- a/core/trino-main/src/main/java/io/trino/util/MergeSortedPages.java +++ b/core/trino-main/src/main/java/io/trino/util/MergeSortedPages.java @@ -13,17 +13,17 @@ */ package io.trino.util; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.PageWithPositionComparator; -import io.prestosql.operator.WorkProcessor; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.PageWithPositionComparator; +import io.trino.operator.WorkProcessor; +import io.trino.operator.WorkProcessor.ProcessState; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import java.util.Comparator; import java.util.List; @@ -31,7 +31,7 @@ import java.util.stream.IntStream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.operator.WorkProcessor.mergeSorted; +import static io.trino.operator.WorkProcessor.mergeSorted; import static java.util.Objects.requireNonNull; public final class MergeSortedPages diff --git a/core/trino-main/src/main/java/io/trino/util/MinMaxCompare.java b/core/trino-main/src/main/java/io/trino/util/MinMaxCompare.java index 73e082777c88..c2d9f0234bb7 100644 --- a/core/trino-main/src/main/java/io/trino/util/MinMaxCompare.java +++ b/core/trino-main/src/main/java/io/trino/util/MinMaxCompare.java @@ -13,20 +13,20 @@ */ package io.trino.util; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.Type; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionDependencies; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.Type; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; import java.lang.invoke.MethodHandle; import java.util.List; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Float.intBitsToFloat; import static java.lang.invoke.MethodHandles.filterReturnValue; diff --git a/core/trino-main/src/main/java/io/trino/util/Reflection.java b/core/trino-main/src/main/java/io/trino/util/Reflection.java index 20efafeb60e0..6f133234b941 100644 --- a/core/trino-main/src/main/java/io/trino/util/Reflection.java +++ b/core/trino-main/src/main/java/io/trino/util/Reflection.java @@ -13,8 +13,8 @@ */ package io.trino.util; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -22,7 +22,7 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; public final class Reflection { diff --git a/core/trino-main/src/main/java/io/trino/util/SpatialJoinUtils.java b/core/trino-main/src/main/java/io/trino/util/SpatialJoinUtils.java index 79101374491c..31aa83bf8a8a 100644 --- a/core/trino-main/src/main/java/io/trino/util/SpatialJoinUtils.java +++ b/core/trino-main/src/main/java/io/trino/util/SpatialJoinUtils.java @@ -13,13 +13,13 @@ */ package io.trino.util; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.Literal; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.Literal; +import io.trino.sql.tree.SymbolReference; import java.util.Collection; import java.util.List; @@ -28,10 +28,10 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.metadata.ResolvedFunction.extractFunctionName; -import static io.prestosql.sql.ExpressionUtils.extractConjuncts; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.metadata.ResolvedFunction.extractFunctionName; +import static io.trino.sql.ExpressionUtils.extractConjuncts; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; public final class SpatialJoinUtils { diff --git a/core/trino-main/src/main/java/io/trino/util/StatementUtils.java b/core/trino-main/src/main/java/io/trino/util/StatementUtils.java index f6075a5feaa5..0d9a68afe0f7 100644 --- a/core/trino-main/src/main/java/io/trino/util/StatementUtils.java +++ b/core/trino-main/src/main/java/io/trino/util/StatementUtils.java @@ -14,63 +14,63 @@ package io.trino.util; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.resourcegroups.QueryType; -import io.prestosql.sql.tree.AddColumn; -import io.prestosql.sql.tree.Analyze; -import io.prestosql.sql.tree.Call; -import io.prestosql.sql.tree.Comment; -import io.prestosql.sql.tree.Commit; -import io.prestosql.sql.tree.CreateMaterializedView; -import io.prestosql.sql.tree.CreateRole; -import io.prestosql.sql.tree.CreateSchema; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.CreateTableAsSelect; -import io.prestosql.sql.tree.CreateView; -import io.prestosql.sql.tree.Deallocate; -import io.prestosql.sql.tree.Delete; -import io.prestosql.sql.tree.DescribeInput; -import io.prestosql.sql.tree.DescribeOutput; -import io.prestosql.sql.tree.DropColumn; -import io.prestosql.sql.tree.DropMaterializedView; -import io.prestosql.sql.tree.DropRole; -import io.prestosql.sql.tree.DropSchema; -import io.prestosql.sql.tree.DropTable; -import io.prestosql.sql.tree.DropView; -import io.prestosql.sql.tree.Explain; -import io.prestosql.sql.tree.Grant; -import io.prestosql.sql.tree.GrantRoles; -import io.prestosql.sql.tree.Insert; -import io.prestosql.sql.tree.Prepare; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.RefreshMaterializedView; -import io.prestosql.sql.tree.RenameColumn; -import io.prestosql.sql.tree.RenameSchema; -import io.prestosql.sql.tree.RenameTable; -import io.prestosql.sql.tree.RenameView; -import io.prestosql.sql.tree.ResetSession; -import io.prestosql.sql.tree.Revoke; -import io.prestosql.sql.tree.RevokeRoles; -import io.prestosql.sql.tree.Rollback; -import io.prestosql.sql.tree.SetPath; -import io.prestosql.sql.tree.SetRole; -import io.prestosql.sql.tree.SetSchemaAuthorization; -import io.prestosql.sql.tree.SetSession; -import io.prestosql.sql.tree.SetTableAuthorization; -import io.prestosql.sql.tree.SetViewAuthorization; -import io.prestosql.sql.tree.ShowCatalogs; -import io.prestosql.sql.tree.ShowColumns; -import io.prestosql.sql.tree.ShowCreate; -import io.prestosql.sql.tree.ShowFunctions; -import io.prestosql.sql.tree.ShowGrants; -import io.prestosql.sql.tree.ShowRoleGrants; -import io.prestosql.sql.tree.ShowRoles; -import io.prestosql.sql.tree.ShowSchemas; -import io.prestosql.sql.tree.ShowSession; -import io.prestosql.sql.tree.ShowStats; -import io.prestosql.sql.tree.ShowTables; -import io.prestosql.sql.tree.StartTransaction; -import io.prestosql.sql.tree.Statement; -import io.prestosql.sql.tree.Use; +import io.trino.spi.resourcegroups.QueryType; +import io.trino.sql.tree.AddColumn; +import io.trino.sql.tree.Analyze; +import io.trino.sql.tree.Call; +import io.trino.sql.tree.Comment; +import io.trino.sql.tree.Commit; +import io.trino.sql.tree.CreateMaterializedView; +import io.trino.sql.tree.CreateRole; +import io.trino.sql.tree.CreateSchema; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.CreateTableAsSelect; +import io.trino.sql.tree.CreateView; +import io.trino.sql.tree.Deallocate; +import io.trino.sql.tree.Delete; +import io.trino.sql.tree.DescribeInput; +import io.trino.sql.tree.DescribeOutput; +import io.trino.sql.tree.DropColumn; +import io.trino.sql.tree.DropMaterializedView; +import io.trino.sql.tree.DropRole; +import io.trino.sql.tree.DropSchema; +import io.trino.sql.tree.DropTable; +import io.trino.sql.tree.DropView; +import io.trino.sql.tree.Explain; +import io.trino.sql.tree.Grant; +import io.trino.sql.tree.GrantRoles; +import io.trino.sql.tree.Insert; +import io.trino.sql.tree.Prepare; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.RefreshMaterializedView; +import io.trino.sql.tree.RenameColumn; +import io.trino.sql.tree.RenameSchema; +import io.trino.sql.tree.RenameTable; +import io.trino.sql.tree.RenameView; +import io.trino.sql.tree.ResetSession; +import io.trino.sql.tree.Revoke; +import io.trino.sql.tree.RevokeRoles; +import io.trino.sql.tree.Rollback; +import io.trino.sql.tree.SetPath; +import io.trino.sql.tree.SetRole; +import io.trino.sql.tree.SetSchemaAuthorization; +import io.trino.sql.tree.SetSession; +import io.trino.sql.tree.SetTableAuthorization; +import io.trino.sql.tree.SetViewAuthorization; +import io.trino.sql.tree.ShowCatalogs; +import io.trino.sql.tree.ShowColumns; +import io.trino.sql.tree.ShowCreate; +import io.trino.sql.tree.ShowFunctions; +import io.trino.sql.tree.ShowGrants; +import io.trino.sql.tree.ShowRoleGrants; +import io.trino.sql.tree.ShowRoles; +import io.trino.sql.tree.ShowSchemas; +import io.trino.sql.tree.ShowSession; +import io.trino.sql.tree.ShowStats; +import io.trino.sql.tree.ShowTables; +import io.trino.sql.tree.StartTransaction; +import io.trino.sql.tree.Statement; +import io.trino.sql.tree.Use; import java.util.Map; import java.util.Optional; diff --git a/core/trino-main/src/main/java/io/trino/version/EmbedVersion.java b/core/trino-main/src/main/java/io/trino/version/EmbedVersion.java index 7d3b565847e8..b5af49183cf2 100644 --- a/core/trino-main/src/main/java/io/trino/version/EmbedVersion.java +++ b/core/trino-main/src/main/java/io/trino/version/EmbedVersion.java @@ -18,8 +18,8 @@ import io.airlift.bytecode.FieldDefinition; import io.airlift.bytecode.MethodDefinition; import io.airlift.bytecode.Parameter; -import io.prestosql.client.NodeVersion; -import io.prestosql.spi.VersionEmbedder; +import io.trino.client.NodeVersion; +import io.trino.spi.VersionEmbedder; import javax.inject.Inject; @@ -33,9 +33,9 @@ import static io.airlift.bytecode.Access.a; import static io.airlift.bytecode.Parameter.arg; import static io.airlift.bytecode.ParameterizedType.type; -import static io.prestosql.util.CompilerUtils.defineClass; -import static io.prestosql.util.CompilerUtils.makeClassName; -import static io.prestosql.util.Reflection.constructorMethodHandle; +import static io.trino.util.CompilerUtils.defineClass; +import static io.trino.util.CompilerUtils.makeClassName; +import static io.trino.util.Reflection.constructorMethodHandle; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/BenchmarkPagesIndexPageSorter.java b/core/trino-main/src/test/java/io/trino/BenchmarkPagesIndexPageSorter.java index 4d5c0b125005..4cb7987dc662 100644 --- a/core/trino-main/src/test/java/io/trino/BenchmarkPagesIndexPageSorter.java +++ b/core/trino-main/src/test/java/io/trino/BenchmarkPagesIndexPageSorter.java @@ -13,13 +13,13 @@ */ package io.trino; -import io.prestosql.block.BlockAssertions; -import io.prestosql.operator.PagesIndex; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.type.Type; +import io.trino.block.BlockAssertions; +import io.trino.operator.PagesIndex; +import io.trino.spi.Page; +import io.trino.spi.PageSorter; +import io.trino.spi.block.Block; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.type.Type; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Measurement; @@ -39,11 +39,11 @@ import java.util.List; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Collections.nCopies; @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/RowPageBuilder.java b/core/trino-main/src/test/java/io/trino/RowPageBuilder.java index f3482b25f23a..24582218ee4c 100644 --- a/core/trino-main/src/test/java/io/trino/RowPageBuilder.java +++ b/core/trino-main/src/test/java/io/trino/RowPageBuilder.java @@ -14,15 +14,15 @@ package io.trino; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.util.StructuralTestUtil.appendToBlockBuilder; +import static io.trino.util.StructuralTestUtil.appendToBlockBuilder; import static java.util.Objects.requireNonNull; public class RowPageBuilder diff --git a/core/trino-main/src/test/java/io/trino/RowPagesBuilder.java b/core/trino-main/src/test/java/io/trino/RowPagesBuilder.java index ba4c6d50097d..1544002e10e7 100644 --- a/core/trino-main/src/test/java/io/trino/RowPagesBuilder.java +++ b/core/trino-main/src/test/java/io/trino/RowPagesBuilder.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.Type; -import io.prestosql.type.TypeTestUtils; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.Type; +import io.trino.type.TypeTestUtils; import java.util.List; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.RowPageBuilder.rowPageBuilder; +import static io.trino.RowPageBuilder.rowPageBuilder; import static java.util.Objects.requireNonNull; public class RowPagesBuilder diff --git a/core/trino-main/src/test/java/io/trino/SequencePageBuilder.java b/core/trino-main/src/test/java/io/trino/SequencePageBuilder.java index 423848544aba..947b8619ac0d 100644 --- a/core/trino-main/src/test/java/io/trino/SequencePageBuilder.java +++ b/core/trino-main/src/test/java/io/trino/SequencePageBuilder.java @@ -13,24 +13,24 @@ */ package io.trino; -import io.prestosql.block.BlockAssertions; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.block.BlockAssertions; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.isLongDecimal; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.isLongDecimal; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarcharType.VARCHAR; public final class SequencePageBuilder { diff --git a/core/trino-main/src/test/java/io/trino/SessionTestUtils.java b/core/trino-main/src/test/java/io/trino/SessionTestUtils.java index 3a6afbcc01e6..ca2943976adf 100644 --- a/core/trino-main/src/test/java/io/trino/SessionTestUtils.java +++ b/core/trino-main/src/test/java/io/trino/SessionTestUtils.java @@ -13,11 +13,11 @@ */ package io.trino; -import io.prestosql.client.ClientCapabilities; +import io.trino.client.ClientCapabilities; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Arrays.stream; public final class SessionTestUtils diff --git a/core/trino-main/src/test/java/io/trino/TestHiddenColumns.java b/core/trino-main/src/test/java/io/trino/TestHiddenColumns.java index ae6823aeeb1c..cbd0f27adc67 100644 --- a/core/trino-main/src/test/java/io/trino/TestHiddenColumns.java +++ b/core/trino-main/src/test/java/io/trino/TestHiddenColumns.java @@ -14,16 +14,16 @@ package io.trino; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.MaterializedResult; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.MaterializedResult; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.assertions.Assert.assertEquals; public class TestHiddenColumns { diff --git a/core/trino-main/src/test/java/io/trino/TestPagesIndexPageSorter.java b/core/trino-main/src/test/java/io/trino/TestPagesIndexPageSorter.java index a633349dbc4e..b1ae94ed7c6a 100644 --- a/core/trino-main/src/test/java/io/trino/TestPagesIndexPageSorter.java +++ b/core/trino-main/src/test/java/io/trino/TestPagesIndexPageSorter.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.operator.PagesIndex; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.MaterializedResult; +import io.trino.operator.PagesIndex; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.testing.MaterializedResult; import org.testng.annotations.Test; import java.util.Collections; import java.util.List; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.OperatorAssertion.toMaterializedResult; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.OperatorAssertion.toMaterializedResult; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +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 org.testng.Assert.assertEquals; public class TestPagesIndexPageSorter diff --git a/core/trino-main/src/test/java/io/trino/TestSession.java b/core/trino-main/src/test/java/io/trino/TestSession.java index 1a297d5e80a6..d34bc14490bb 100644 --- a/core/trino-main/src/test/java/io/trino/TestSession.java +++ b/core/trino-main/src/test/java/io/trino/TestSession.java @@ -13,12 +13,12 @@ */ package io.trino; -import io.prestosql.connector.CatalogName; +import io.trino.connector.CatalogName; import org.testng.annotations.Test; import java.util.Map; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; public class TestSession diff --git a/core/trino-main/src/test/java/io/trino/block/AbstractTestBlock.java b/core/trino-main/src/test/java/io/trino/block/AbstractTestBlock.java index 0fcc0aa9002f..e5dc5afed342 100644 --- a/core/trino-main/src/test/java/io/trino/block/AbstractTestBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/AbstractTestBlock.java @@ -18,12 +18,12 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.DictionaryId; -import io.prestosql.spi.block.MapHashTables; +import io.trino.metadata.Metadata; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.DictionaryId; +import io.trino.spi.block.MapHashTables; import org.openjdk.jol.info.ClassLayout; import org.testng.annotations.Test; @@ -41,10 +41,10 @@ import static io.airlift.slice.SizeOf.SIZE_OF_LONG; import static io.airlift.slice.SizeOf.SIZE_OF_SHORT; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.util.Arrays.fill; diff --git a/core/trino-main/src/test/java/io/trino/block/BenchmarkMapCopy.java b/core/trino-main/src/test/java/io/trino/block/BenchmarkMapCopy.java index f937b14b2940..7eb5bada8192 100644 --- a/core/trino-main/src/test/java/io/trino/block/BenchmarkMapCopy.java +++ b/core/trino-main/src/test/java/io/trino/block/BenchmarkMapCopy.java @@ -13,10 +13,10 @@ */ package io.trino.block; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.type.MapType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.type.MapType; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -37,9 +37,9 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.StructuralTestUtil.mapType; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/block/BlockAssertions.java b/core/trino-main/src/test/java/io/trino/block/BlockAssertions.java index c9d68c5463ff..6e66623d259b 100644 --- a/core/trino-main/src/test/java/io/trino/block/BlockAssertions.java +++ b/core/trino-main/src/test/java/io/trino/block/BlockAssertions.java @@ -14,14 +14,14 @@ package io.trino.block; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.RowBlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.RowBlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; import java.math.BigDecimal; import java.math.BigInteger; @@ -32,22 +32,22 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.MAX_SHORT_PRECISION; -import static io.prestosql.spi.type.Decimals.encodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.writeBigDecimal; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.type.ColorType.COLOR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.MAX_SHORT_PRECISION; +import static io.trino.spi.type.Decimals.encodeUnscaledValue; +import static io.trino.spi.type.Decimals.writeBigDecimal; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.type.ColorType.COLOR; import static java.lang.Float.floatToRawIntBits; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/block/ColumnarTestUtils.java b/core/trino-main/src/test/java/io/trino/block/ColumnarTestUtils.java index ebf6514d68cf..1f3b6aca5601 100644 --- a/core/trino-main/src/test/java/io/trino/block/ColumnarTestUtils.java +++ b/core/trino-main/src/test/java/io/trino/block/ColumnarTestUtils.java @@ -15,15 +15,15 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; +import io.trino.metadata.Metadata; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.RunLengthEncodedBlock; import java.lang.reflect.Array; import java.util.Arrays; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/block/TestArrayBlock.java b/core/trino-main/src/test/java/io/trino/block/TestArrayBlock.java index 5794f8e1d601..da9ff4ce0cd3 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestArrayBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/TestArrayBlock.java @@ -15,18 +15,18 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.ArrayBlockBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ByteArrayBlock; +import io.trino.spi.block.ArrayBlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ByteArrayBlock; import org.testng.annotations.Test; import java.util.Optional; import java.util.Random; -import static io.prestosql.spi.block.ArrayBlock.fromElementBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.block.ArrayBlock.fromElementBlock; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/block/TestBlockBuilder.java b/core/trino-main/src/test/java/io/trino/block/TestBlockBuilder.java index b1e817901f8a..7e778ec67006 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestBlockBuilder.java +++ b/core/trino-main/src/test/java/io/trino/block/TestBlockBuilder.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; -import static io.prestosql.block.BlockAssertions.assertBlockEquals; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.block.BlockAssertions.assertBlockEquals; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/block/TestByteArrayBlock.java b/core/trino-main/src/test/java/io/trino/block/TestByteArrayBlock.java index 2a86a3a93a5b..6d7c96ff9bc4 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestByteArrayBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/TestByteArrayBlock.java @@ -15,9 +15,9 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ByteArrayBlock; -import io.prestosql.spi.block.ByteArrayBlockBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ByteArrayBlock; +import io.trino.spi.block.ByteArrayBlockBuilder; import org.testng.annotations.Test; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/block/TestColumnarArray.java b/core/trino-main/src/test/java/io/trino/block/TestColumnarArray.java index 3e265143e352..297394b38684 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestColumnarArray.java +++ b/core/trino-main/src/test/java/io/trino/block/TestColumnarArray.java @@ -15,26 +15,26 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.ArrayBlockBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ColumnarArray; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; +import io.trino.spi.block.ArrayBlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ColumnarArray; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.RunLengthEncodedBlock; import org.testng.annotations.Test; import java.lang.reflect.Array; import java.util.Arrays; -import static io.prestosql.block.ColumnarTestUtils.alternatingNullValues; -import static io.prestosql.block.ColumnarTestUtils.assertBlock; -import static io.prestosql.block.ColumnarTestUtils.assertBlockPosition; -import static io.prestosql.block.ColumnarTestUtils.createTestDictionaryBlock; -import static io.prestosql.block.ColumnarTestUtils.createTestDictionaryExpectedValues; -import static io.prestosql.block.ColumnarTestUtils.createTestRleBlock; -import static io.prestosql.block.ColumnarTestUtils.createTestRleExpectedValues; -import static io.prestosql.spi.block.ColumnarArray.toColumnarArray; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.block.ColumnarTestUtils.alternatingNullValues; +import static io.trino.block.ColumnarTestUtils.assertBlock; +import static io.trino.block.ColumnarTestUtils.assertBlockPosition; +import static io.trino.block.ColumnarTestUtils.createTestDictionaryBlock; +import static io.trino.block.ColumnarTestUtils.createTestDictionaryExpectedValues; +import static io.trino.block.ColumnarTestUtils.createTestRleBlock; +import static io.trino.block.ColumnarTestUtils.createTestRleExpectedValues; +import static io.trino.spi.block.ColumnarArray.toColumnarArray; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/block/TestColumnarMap.java b/core/trino-main/src/test/java/io/trino/block/TestColumnarMap.java index 85de71da1381..63731f24f427 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestColumnarMap.java +++ b/core/trino-main/src/test/java/io/trino/block/TestColumnarMap.java @@ -15,30 +15,30 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ColumnarMap; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.MapBlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ColumnarMap; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.MapBlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.MapType; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import org.testng.annotations.Test; import java.util.Arrays; -import static io.prestosql.block.ColumnarTestUtils.alternatingNullValues; -import static io.prestosql.block.ColumnarTestUtils.assertBlock; -import static io.prestosql.block.ColumnarTestUtils.assertBlockPosition; -import static io.prestosql.block.ColumnarTestUtils.createTestDictionaryBlock; -import static io.prestosql.block.ColumnarTestUtils.createTestDictionaryExpectedValues; -import static io.prestosql.block.ColumnarTestUtils.createTestRleBlock; -import static io.prestosql.block.ColumnarTestUtils.createTestRleExpectedValues; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.block.ColumnarMap.toColumnarMap; -import static io.prestosql.spi.type.StandardTypes.MAP; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.block.ColumnarTestUtils.alternatingNullValues; +import static io.trino.block.ColumnarTestUtils.assertBlock; +import static io.trino.block.ColumnarTestUtils.assertBlockPosition; +import static io.trino.block.ColumnarTestUtils.createTestDictionaryBlock; +import static io.trino.block.ColumnarTestUtils.createTestDictionaryExpectedValues; +import static io.trino.block.ColumnarTestUtils.createTestRleBlock; +import static io.trino.block.ColumnarTestUtils.createTestRleExpectedValues; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.block.ColumnarMap.toColumnarMap; +import static io.trino.spi.type.StandardTypes.MAP; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/core/trino-main/src/test/java/io/trino/block/TestColumnarRow.java b/core/trino-main/src/test/java/io/trino/block/TestColumnarRow.java index 248b46df3141..f65db3127c0b 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestColumnarRow.java +++ b/core/trino-main/src/test/java/io/trino/block/TestColumnarRow.java @@ -15,28 +15,28 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.ColumnarRow; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.RowBlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.ColumnarRow; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.RowBlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; import org.testng.annotations.Test; import java.lang.reflect.Array; import java.util.Arrays; import java.util.Collections; -import static io.prestosql.block.ColumnarTestUtils.alternatingNullValues; -import static io.prestosql.block.ColumnarTestUtils.assertBlock; -import static io.prestosql.block.ColumnarTestUtils.assertBlockPosition; -import static io.prestosql.block.ColumnarTestUtils.createTestDictionaryBlock; -import static io.prestosql.block.ColumnarTestUtils.createTestDictionaryExpectedValues; -import static io.prestosql.block.ColumnarTestUtils.createTestRleBlock; -import static io.prestosql.block.ColumnarTestUtils.createTestRleExpectedValues; -import static io.prestosql.spi.block.ColumnarRow.toColumnarRow; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.block.ColumnarTestUtils.alternatingNullValues; +import static io.trino.block.ColumnarTestUtils.assertBlock; +import static io.trino.block.ColumnarTestUtils.assertBlockPosition; +import static io.trino.block.ColumnarTestUtils.createTestDictionaryBlock; +import static io.trino.block.ColumnarTestUtils.createTestDictionaryExpectedValues; +import static io.trino.block.ColumnarTestUtils.createTestRleBlock; +import static io.trino.block.ColumnarTestUtils.createTestRleExpectedValues; +import static io.trino.spi.block.ColumnarRow.toColumnarRow; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/block/TestDictionaryBlock.java b/core/trino-main/src/test/java/io/trino/block/TestDictionaryBlock.java index cdbac8d8b536..73166ad843b0 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestDictionaryBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/TestDictionaryBlock.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.DictionaryId; -import io.prestosql.spi.block.VariableWidthBlock; -import io.prestosql.spi.block.VariableWidthBlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.DictionaryId; +import io.trino.spi.block.VariableWidthBlock; +import io.trino.spi.block.VariableWidthBlockBuilder; import org.testng.annotations.Test; import static io.airlift.slice.SizeOf.SIZE_OF_INT; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.block.BlockAssertions.createSlicesBlock; +import static io.trino.block.BlockAssertions.createSlicesBlock; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotEquals; diff --git a/core/trino-main/src/test/java/io/trino/block/TestInt128ArrayBlock.java b/core/trino-main/src/test/java/io/trino/block/TestInt128ArrayBlock.java index 3322595366fa..05110695223f 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestInt128ArrayBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/TestInt128ArrayBlock.java @@ -14,15 +14,15 @@ package io.trino.block; import io.airlift.slice.Slice; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.Int128ArrayBlock; -import io.prestosql.spi.block.Int128ArrayBlockBuilder; -import io.prestosql.spi.block.VariableWidthBlockBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.Int128ArrayBlock; +import io.trino.spi.block.Int128ArrayBlockBuilder; +import io.trino.spi.block.VariableWidthBlockBuilder; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.block.Int128ArrayBlock.INT128_BYTES; +import static io.trino.spi.block.Int128ArrayBlock.INT128_BYTES; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/block/TestInt96ArrayBlock.java b/core/trino-main/src/test/java/io/trino/block/TestInt96ArrayBlock.java index 64992de7ab68..08ab9c0e3a68 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestInt96ArrayBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/TestInt96ArrayBlock.java @@ -14,16 +14,16 @@ package io.trino.block; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.Int96ArrayBlock; -import io.prestosql.spi.block.Int96ArrayBlockBuilder; -import io.prestosql.spi.block.VariableWidthBlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.Int96ArrayBlock; +import io.trino.spi.block.Int96ArrayBlockBuilder; +import io.trino.spi.block.VariableWidthBlockBuilder; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.block.Int96ArrayBlock.INT96_BYTES; +import static io.trino.spi.block.Int96ArrayBlock.INT96_BYTES; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/block/TestIntArrayBlock.java b/core/trino-main/src/test/java/io/trino/block/TestIntArrayBlock.java index 8aa9aa3735f6..6147646e3197 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestIntArrayBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/TestIntArrayBlock.java @@ -14,9 +14,9 @@ package io.trino.block; import io.airlift.slice.Slice; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.IntArrayBlock; -import io.prestosql.spi.block.IntArrayBlockBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.IntArrayBlock; +import io.trino.spi.block.IntArrayBlockBuilder; import org.testng.annotations.Test; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/block/TestLongArrayBlock.java b/core/trino-main/src/test/java/io/trino/block/TestLongArrayBlock.java index 5eca0fc8c43f..e7ff94cc3523 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestLongArrayBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/TestLongArrayBlock.java @@ -14,10 +14,10 @@ package io.trino.block; import io.airlift.slice.Slice; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.block.LongArrayBlockBuilder; -import io.prestosql.spi.block.VariableWidthBlockBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.block.LongArrayBlockBuilder; +import io.trino.spi.block.VariableWidthBlockBuilder; import org.testng.annotations.Test; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/block/TestMapBlock.java b/core/trino-main/src/test/java/io/trino/block/TestMapBlock.java index cacda8597f9a..7f58cc69fdc8 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestMapBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/TestMapBlock.java @@ -14,14 +14,14 @@ package io.trino.block; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ByteArrayBlock; -import io.prestosql.spi.block.DuplicateMapKeyException; -import io.prestosql.spi.block.MapBlock; -import io.prestosql.spi.block.MapBlockBuilder; -import io.prestosql.spi.block.SingleMapBlock; -import io.prestosql.spi.type.MapType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ByteArrayBlock; +import io.trino.spi.block.DuplicateMapKeyException; +import io.trino.spi.block.MapBlock; +import io.trino.spi.block.MapBlockBuilder; +import io.trino.spi.block.SingleMapBlock; +import io.trino.spi.type.MapType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -32,12 +32,12 @@ import java.util.Optional; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.StructuralTestUtil.mapType; import static java.util.Objects.requireNonNull; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/block/TestRowBlock.java b/core/trino-main/src/test/java/io/trino/block/TestRowBlock.java index 0b31d0a28b59..df46143445a1 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestRowBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/TestRowBlock.java @@ -15,12 +15,12 @@ package io.trino.block; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ByteArrayBlock; -import io.prestosql.spi.block.RowBlockBuilder; -import io.prestosql.spi.block.SingleRowBlock; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ByteArrayBlock; +import io.trino.spi.block.RowBlockBuilder; +import io.trino.spi.block.SingleRowBlock; +import io.trino.spi.type.Type; import it.unimi.dsi.fastutil.ints.IntArrayList; import org.testng.annotations.Test; @@ -30,9 +30,9 @@ import java.util.Optional; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.block.RowBlock.fromFieldBlocks; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.block.RowBlock.fromFieldBlocks; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/block/TestRunLengthEncodedBlock.java b/core/trino-main/src/test/java/io/trino/block/TestRunLengthEncodedBlock.java index ae4f936df6f1..3c0c3a89ed05 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestRunLengthEncodedBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/TestRunLengthEncodedBlock.java @@ -14,15 +14,15 @@ package io.trino.block; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ByteArrayBlockBuilder; -import io.prestosql.spi.block.IntArrayBlockBuilder; -import io.prestosql.spi.block.LongArrayBlockBuilder; -import io.prestosql.spi.block.RunLengthBlockEncoding; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.block.ShortArrayBlockBuilder; -import io.prestosql.spi.block.VariableWidthBlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ByteArrayBlockBuilder; +import io.trino.spi.block.IntArrayBlockBuilder; +import io.trino.spi.block.LongArrayBlockBuilder; +import io.trino.spi.block.RunLengthBlockEncoding; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.block.ShortArrayBlockBuilder; +import io.trino.spi.block.VariableWidthBlockBuilder; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/block/TestShortArrayBlock.java b/core/trino-main/src/test/java/io/trino/block/TestShortArrayBlock.java index 0506dfd72e65..83d8981a0dae 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestShortArrayBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/TestShortArrayBlock.java @@ -14,9 +14,9 @@ package io.trino.block; import io.airlift.slice.Slice; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ShortArrayBlock; -import io.prestosql.spi.block.ShortArrayBlockBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ShortArrayBlock; +import io.trino.spi.block.ShortArrayBlockBuilder; import org.testng.annotations.Test; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/block/TestVariableWidthBlock.java b/core/trino-main/src/test/java/io/trino/block/TestVariableWidthBlock.java index 2851bdc94a37..de35bbe7d27d 100644 --- a/core/trino-main/src/test/java/io/trino/block/TestVariableWidthBlock.java +++ b/core/trino-main/src/test/java/io/trino/block/TestVariableWidthBlock.java @@ -15,11 +15,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.VariableWidthBlock; -import io.prestosql.spi.block.VariableWidthBlockBuilder; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.VariableWidthBlock; +import io.trino.spi.block.VariableWidthBlockBuilder; +import io.trino.spi.type.VarcharType; import org.testng.annotations.Test; import java.util.List; @@ -27,7 +27,7 @@ import java.util.concurrent.ThreadLocalRandom; import static io.airlift.slice.Slices.EMPTY_SLICE; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.lang.String.format; import static java.util.Arrays.copyOfRange; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/connector/AllowAllGrants.java b/core/trino-main/src/test/java/io/trino/connector/AllowAllGrants.java index 64ef15b8c4ee..66fdfaa519f7 100644 --- a/core/trino-main/src/test/java/io/trino/connector/AllowAllGrants.java +++ b/core/trino-main/src/test/java/io/trino/connector/AllowAllGrants.java @@ -13,13 +13,13 @@ */ package io.trino.connector; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; +import io.trino.spi.PrestoException; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; import java.util.Set; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; public class AllowAllGrants implements Grants diff --git a/core/trino-main/src/test/java/io/trino/connector/Grants.java b/core/trino-main/src/test/java/io/trino/connector/Grants.java index c39bdf7280d6..e3117e20203e 100644 --- a/core/trino-main/src/test/java/io/trino/connector/Grants.java +++ b/core/trino-main/src/test/java/io/trino/connector/Grants.java @@ -13,8 +13,8 @@ */ package io.trino.connector; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; import java.util.Set; diff --git a/core/trino-main/src/test/java/io/trino/connector/MockConnector.java b/core/trino-main/src/test/java/io/trino/connector/MockConnector.java index 42e688475606..592ccc0f1064 100644 --- a/core/trino-main/src/test/java/io/trino/connector/MockConnector.java +++ b/core/trino-main/src/test/java/io/trino/connector/MockConnector.java @@ -14,37 +14,37 @@ package io.trino.connector; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.AggregationApplicationResult; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.SortItem; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.connector.TopNApplicationResult; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.AggregationApplicationResult; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.SortItem; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.connector.TopNApplicationResult; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.transaction.IsolationLevel; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/test/java/io/trino/connector/MockConnectorAccessControl.java b/core/trino-main/src/test/java/io/trino/connector/MockConnectorAccessControl.java index 95756d127ca9..2a15532845ca 100644 --- a/core/trino-main/src/test/java/io/trino/connector/MockConnectorAccessControl.java +++ b/core/trino-main/src/test/java/io/trino/connector/MockConnectorAccessControl.java @@ -13,21 +13,21 @@ */ package io.trino.connector; -import io.prestosql.plugin.base.security.AllowAllAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; +import io.trino.plugin.base.security.AllowAllAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; import java.util.Arrays; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantSchemaPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeSchemaPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denyGrantSchemaPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyGrantTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denyRevokeSchemaPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyRevokeTablePrivilege; import static java.util.Objects.requireNonNull; class MockConnectorAccessControl diff --git a/core/trino-main/src/test/java/io/trino/connector/MockConnectorColumnHandle.java b/core/trino-main/src/test/java/io/trino/connector/MockConnectorColumnHandle.java index 63b5764aed2d..b1ed25a32eac 100644 --- a/core/trino-main/src/test/java/io/trino/connector/MockConnectorColumnHandle.java +++ b/core/trino-main/src/test/java/io/trino/connector/MockConnectorColumnHandle.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/core/trino-main/src/test/java/io/trino/connector/MockConnectorFactory.java b/core/trino-main/src/test/java/io/trino/connector/MockConnectorFactory.java index 2c0932da70b1..6d64b6e6263f 100644 --- a/core/trino-main/src/test/java/io/trino/connector/MockConnectorFactory.java +++ b/core/trino-main/src/test/java/io/trino/connector/MockConnectorFactory.java @@ -16,30 +16,30 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.AggregationApplicationResult; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.SortItem; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.connector.TopNApplicationResult; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.security.RoleGrant; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.AggregationApplicationResult; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.SortItem; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.connector.TopNApplicationResult; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.security.RoleGrant; import java.util.List; import java.util.Map; @@ -52,7 +52,7 @@ import java.util.stream.IntStream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class MockConnectorFactory diff --git a/core/trino-main/src/test/java/io/trino/connector/MockConnectorHandleResolver.java b/core/trino-main/src/test/java/io/trino/connector/MockConnectorHandleResolver.java index 0c4b0378f06c..8c940a220130 100644 --- a/core/trino-main/src/test/java/io/trino/connector/MockConnectorHandleResolver.java +++ b/core/trino-main/src/test/java/io/trino/connector/MockConnectorHandleResolver.java @@ -13,10 +13,10 @@ */ package io.trino.connector; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class MockConnectorHandleResolver implements ConnectorHandleResolver diff --git a/core/trino-main/src/test/java/io/trino/connector/MockConnectorInsertTableHandle.java b/core/trino-main/src/test/java/io/trino/connector/MockConnectorInsertTableHandle.java index ee98ed627421..0884563b8479 100644 --- a/core/trino-main/src/test/java/io/trino/connector/MockConnectorInsertTableHandle.java +++ b/core/trino-main/src/test/java/io/trino/connector/MockConnectorInsertTableHandle.java @@ -13,7 +13,7 @@ */ package io.trino.connector; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; class MockConnectorInsertTableHandle implements ConnectorInsertTableHandle diff --git a/core/trino-main/src/test/java/io/trino/connector/MockConnectorOutputTableHandle.java b/core/trino-main/src/test/java/io/trino/connector/MockConnectorOutputTableHandle.java index 700b7cd40be3..015bca74a6f5 100644 --- a/core/trino-main/src/test/java/io/trino/connector/MockConnectorOutputTableHandle.java +++ b/core/trino-main/src/test/java/io/trino/connector/MockConnectorOutputTableHandle.java @@ -13,7 +13,7 @@ */ package io.trino.connector; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; class MockConnectorOutputTableHandle implements ConnectorOutputTableHandle diff --git a/core/trino-main/src/test/java/io/trino/connector/MockConnectorPlugin.java b/core/trino-main/src/test/java/io/trino/connector/MockConnectorPlugin.java index 26287ef3f62d..32d38862132e 100644 --- a/core/trino-main/src/test/java/io/trino/connector/MockConnectorPlugin.java +++ b/core/trino-main/src/test/java/io/trino/connector/MockConnectorPlugin.java @@ -14,8 +14,8 @@ package io.trino.connector; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/connector/MockConnectorTableHandle.java b/core/trino-main/src/test/java/io/trino/connector/MockConnectorTableHandle.java index 5ab445025f99..ff633bc7b179 100644 --- a/core/trino-main/src/test/java/io/trino/connector/MockConnectorTableHandle.java +++ b/core/trino-main/src/test/java/io/trino/connector/MockConnectorTableHandle.java @@ -16,10 +16,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.List; import java.util.Objects; diff --git a/core/trino-main/src/test/java/io/trino/connector/MockConnectorTransactionHandle.java b/core/trino-main/src/test/java/io/trino/connector/MockConnectorTransactionHandle.java index b825b35fb84f..80c353237250 100644 --- a/core/trino-main/src/test/java/io/trino/connector/MockConnectorTransactionHandle.java +++ b/core/trino-main/src/test/java/io/trino/connector/MockConnectorTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.connector; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum MockConnectorTransactionHandle implements ConnectorTransactionHandle diff --git a/core/trino-main/src/test/java/io/trino/connector/MutableGrants.java b/core/trino-main/src/test/java/io/trino/connector/MutableGrants.java index e412936ce28c..66fc309e11bf 100644 --- a/core/trino-main/src/test/java/io/trino/connector/MutableGrants.java +++ b/core/trino-main/src/test/java/io/trino/connector/MutableGrants.java @@ -13,15 +13,15 @@ */ package io.trino.connector; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.Set; -import static io.prestosql.spi.security.PrincipalType.USER; +import static io.trino.spi.security.PrincipalType.USER; import static java.util.Objects.requireNonNull; public class MutableGrants diff --git a/core/trino-main/src/test/java/io/trino/connector/system/TestSystemSplit.java b/core/trino-main/src/test/java/io/trino/connector/system/TestSystemSplit.java index e5c8497df023..9ba0bf4a5198 100644 --- a/core/trino-main/src/test/java/io/trino/connector/system/TestSystemSplit.java +++ b/core/trino-main/src/test/java/io/trino/connector/system/TestSystemSplit.java @@ -14,8 +14,8 @@ package io.trino.connector.system; import io.airlift.json.JsonCodec; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.HostAddress; +import io.trino.spi.predicate.TupleDomain; import org.testng.annotations.Test; import static io.airlift.json.JsonCodec.jsonCodec; diff --git a/core/trino-main/src/test/java/io/trino/cost/EstimateAssertion.java b/core/trino-main/src/test/java/io/trino/cost/EstimateAssertion.java index 313d4220901e..8d231a6559cd 100644 --- a/core/trino-main/src/test/java/io/trino/cost/EstimateAssertion.java +++ b/core/trino-main/src/test/java/io/trino/cost/EstimateAssertion.java @@ -13,7 +13,7 @@ */ package io.trino.cost; -import io.prestosql.util.MoreMath; +import io.trino.util.MoreMath; import static java.lang.Double.isNaN; import static java.lang.String.format; diff --git a/core/trino-main/src/test/java/io/trino/cost/PlanNodeStatsAssertion.java b/core/trino-main/src/test/java/io/trino/cost/PlanNodeStatsAssertion.java index a22a1fd778d3..8dd9738064fb 100644 --- a/core/trino-main/src/test/java/io/trino/cost/PlanNodeStatsAssertion.java +++ b/core/trino-main/src/test/java/io/trino/cost/PlanNodeStatsAssertion.java @@ -14,12 +14,12 @@ package io.trino.cost; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import java.util.function.Consumer; import static com.google.common.collect.Sets.union; -import static io.prestosql.cost.EstimateAssertion.assertEstimateEquals; +import static io.trino.cost.EstimateAssertion.assertEstimateEquals; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/cost/StatsCalculatorAssertion.java b/core/trino-main/src/test/java/io/trino/cost/StatsCalculatorAssertion.java index 68cf2db1d52f..9adcfa4205fa 100644 --- a/core/trino-main/src/test/java/io/trino/cost/StatsCalculatorAssertion.java +++ b/core/trino-main/src/test/java/io/trino/cost/StatsCalculatorAssertion.java @@ -13,15 +13,15 @@ */ package io.trino.cost; -import io.prestosql.Session; -import io.prestosql.cost.ComposableStatsCalculator.Rule; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.optimizations.PlanNodeSearcher; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.transaction.TestingTransactionManager; +import io.trino.Session; +import io.trino.cost.ComposableStatsCalculator.Rule; +import io.trino.security.AllowAllAccessControl; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.optimizations.PlanNodeSearcher; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.transaction.TestingTransactionManager; import java.util.HashMap; import java.util.Map; @@ -30,8 +30,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.iterative.Lookup.noLookup; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.sql.planner.iterative.Lookup.noLookup; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.util.Objects.requireNonNull; public class StatsCalculatorAssertion diff --git a/core/trino-main/src/test/java/io/trino/cost/StatsCalculatorTester.java b/core/trino-main/src/test/java/io/trino/cost/StatsCalculatorTester.java index 93c5ee4fc443..e81368f5596c 100644 --- a/core/trino-main/src/test/java/io/trino/cost/StatsCalculatorTester.java +++ b/core/trino-main/src/test/java/io/trino/cost/StatsCalculatorTester.java @@ -14,17 +14,17 @@ package io.trino.cost; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.testing.LocalQueryRunner; import java.util.function.Function; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; public class StatsCalculatorTester implements AutoCloseable diff --git a/core/trino-main/src/test/java/io/trino/cost/SymbolStatsAssertion.java b/core/trino-main/src/test/java/io/trino/cost/SymbolStatsAssertion.java index af4034c73c7a..ee6f083d01c4 100644 --- a/core/trino-main/src/test/java/io/trino/cost/SymbolStatsAssertion.java +++ b/core/trino-main/src/test/java/io/trino/cost/SymbolStatsAssertion.java @@ -13,7 +13,7 @@ */ package io.trino.cost; -import static io.prestosql.cost.EstimateAssertion.assertEstimateEquals; +import static io.trino.cost.EstimateAssertion.assertEstimateEquals; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.POSITIVE_INFINITY; import static java.lang.Double.isNaN; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestAggregationStatsRule.java b/core/trino-main/src/test/java/io/trino/cost/TestAggregationStatsRule.java index 19cd5e950935..7f024396e5b1 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestAggregationStatsRule.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestAggregationStatsRule.java @@ -14,13 +14,13 @@ package io.trino.cost; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import org.testng.annotations.Test; import java.util.function.Consumer; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestAggregationStatsRule extends BaseStatsCalculatorTest diff --git a/core/trino-main/src/test/java/io/trino/cost/TestComparisonStatsCalculator.java b/core/trino-main/src/test/java/io/trino/cost/TestComparisonStatsCalculator.java index 4a5f67e08a79..777e5a4da4a2 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestComparisonStatsCalculator.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestComparisonStatsCalculator.java @@ -14,22 +14,22 @@ package io.trino.cost; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -39,14 +39,14 @@ import java.util.Objects; import java.util.function.Consumer; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.NOT_EQUAL; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.NOT_EQUAL; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.NaN; import static java.lang.Double.POSITIVE_INFINITY; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestCostCalculator.java b/core/trino-main/src/test/java/io/trino/cost/TestCostCalculator.java index eb9704a86d2a..d0af5ecdf2f0 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestCostCalculator.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestCostCalculator.java @@ -17,42 +17,42 @@ import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.plugin.tpch.TpchTableLayoutHandle; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.PlanFragmenter; -import io.prestosql.sql.planner.SubPlan; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.execution.QueryManagerConfig; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.plugin.tpch.TpchTableLayoutHandle; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.PlanFragmenter; +import io.trino.sql.planner.SubPlan; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -67,17 +67,17 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.plugin.tpch.TpchTransactionHandle.INSTANCE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.partitionedExchange; -import static io.prestosql.sql.planner.plan.ExchangeNode.replicatedExchange; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.plugin.tpch.TpchTransactionHandle.INSTANCE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.partitionedExchange; +import static io.trino.sql.planner.plan.ExchangeNode.replicatedExchange; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestCostComparator.java b/core/trino-main/src/test/java/io/trino/cost/TestCostComparator.java index 1cd6c3ba26dc..392f6148feab 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestCostComparator.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestCostComparator.java @@ -13,11 +13,11 @@ */ package io.trino.cost; -import io.prestosql.Session; +import io.trino.Session; import org.testng.annotations.Test; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestExchangeStatsRule.java b/core/trino-main/src/test/java/io/trino/cost/TestExchangeStatsRule.java index c1a59dfcbbde..fe4632abaedb 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestExchangeStatsRule.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestExchangeStatsRule.java @@ -15,10 +15,10 @@ package io.trino.cost; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Collections.emptyList; public class TestExchangeStatsRule diff --git a/core/trino-main/src/test/java/io/trino/cost/TestFilterStatsCalculator.java b/core/trino-main/src/test/java/io/trino/cost/TestFilterStatsCalculator.java index 23293198f91f..9953de20fb3e 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestFilterStatsCalculator.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestFilterStatsCalculator.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TestingTransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TestingTransactionManager; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.sql.ExpressionTestUtils.planExpression; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.sql.ExpressionTestUtils.planExpression; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.NaN; import static java.lang.Double.POSITIVE_INFINITY; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestFilterStatsRule.java b/core/trino-main/src/test/java/io/trino/cost/TestFilterStatsRule.java index 2b0ffda678a8..af836d3583d1 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestFilterStatsRule.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestFilterStatsRule.java @@ -14,20 +14,20 @@ package io.trino.cost; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.ComparisonExpression.Operator; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.ComparisonExpression.Operator; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestFilterStatsRule extends BaseStatsCalculatorTest diff --git a/core/trino-main/src/test/java/io/trino/cost/TestJoinStatsRule.java b/core/trino-main/src/test/java/io/trino/cost/TestJoinStatsRule.java index b3242f086556..f0abe15ff2dd 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestJoinStatsRule.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestJoinStatsRule.java @@ -15,29 +15,29 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.JoinNode.EquiJoinClause; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.LongLiteral; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode.EquiJoinClause; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.LongLiteral; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.cost.FilterStatsCalculator.UNKNOWN_FILTER_COEFFICIENT; -import static io.prestosql.cost.PlanNodeStatsAssertion.assertThat; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.planner.plan.JoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.cost.FilterStatsCalculator.UNKNOWN_FILTER_COEFFICIENT; +import static io.trino.cost.PlanNodeStatsAssertion.assertThat; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.planner.plan.JoinNode.Type.FULL; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; import static java.lang.Double.NaN; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestOutputNodeStats.java b/core/trino-main/src/test/java/io/trino/cost/TestOutputNodeStats.java index a58d53ac3841..82b453a8f1e7 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestOutputNodeStats.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestOutputNodeStats.java @@ -13,11 +13,11 @@ */ package io.trino.cost; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.Double.POSITIVE_INFINITY; public class TestOutputNodeStats diff --git a/core/trino-main/src/test/java/io/trino/cost/TestPlanNodeStatsEstimateMath.java b/core/trino-main/src/test/java/io/trino/cost/TestPlanNodeStatsEstimateMath.java index a3d72c9e4e6a..2a29318db708 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestPlanNodeStatsEstimateMath.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestPlanNodeStatsEstimateMath.java @@ -13,14 +13,14 @@ */ package io.trino.cost; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import org.testng.annotations.Test; -import static io.prestosql.cost.PlanNodeStatsEstimateMath.addStatsAndMaxDistinctValues; -import static io.prestosql.cost.PlanNodeStatsEstimateMath.addStatsAndSumDistinctValues; -import static io.prestosql.cost.PlanNodeStatsEstimateMath.capStats; -import static io.prestosql.cost.PlanNodeStatsEstimateMath.subtractSubsetStats; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.cost.PlanNodeStatsEstimateMath.addStatsAndMaxDistinctValues; +import static io.trino.cost.PlanNodeStatsEstimateMath.addStatsAndSumDistinctValues; +import static io.trino.cost.PlanNodeStatsEstimateMath.capStats; +import static io.trino.cost.PlanNodeStatsEstimateMath.subtractSubsetStats; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.NaN; import static java.lang.Double.POSITIVE_INFINITY; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestRowNumberStatsRule.java b/core/trino-main/src/test/java/io/trino/cost/TestRowNumberStatsRule.java index 189e3a131a23..35d006b6e016 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestRowNumberStatsRule.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestRowNumberStatsRule.java @@ -14,12 +14,12 @@ package io.trino.cost; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestRowNumberStatsRule extends BaseStatsCalculatorTest diff --git a/core/trino-main/src/test/java/io/trino/cost/TestScalarStatsCalculator.java b/core/trino-main/src/test/java/io/trino/cost/TestScalarStatsCalculator.java index 2d656b9cae81..3566cc02d770 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestScalarStatsCalculator.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestScalarStatsCalculator.java @@ -15,38 +15,38 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slices; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.LiteralEncoder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.DecimalLiteral; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.transaction.TestingTransactionManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.security.AllowAllAccessControl; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.LiteralEncoder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.DecimalLiteral; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SymbolReference; +import io.trino.transaction.TestingTransactionManager; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.POSITIVE_INFINITY; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestSemiJoinStatsCalculator.java b/core/trino-main/src/test/java/io/trino/cost/TestSemiJoinStatsCalculator.java index 50e2f4855ef3..1c18eaea3c62 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestSemiJoinStatsCalculator.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestSemiJoinStatsCalculator.java @@ -14,13 +14,13 @@ package io.trino.cost; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.cost.PlanNodeStatsAssertion.assertThat; -import static io.prestosql.cost.SemiJoinStatsCalculator.computeAntiJoin; -import static io.prestosql.cost.SemiJoinStatsCalculator.computeSemiJoin; +import static io.trino.cost.PlanNodeStatsAssertion.assertThat; +import static io.trino.cost.SemiJoinStatsCalculator.computeAntiJoin; +import static io.trino.cost.SemiJoinStatsCalculator.computeSemiJoin; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.NaN; import static java.lang.Double.POSITIVE_INFINITY; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestSemiJoinStatsRule.java b/core/trino-main/src/test/java/io/trino/cost/TestSemiJoinStatsRule.java index 720401a9664b..886f9c527863 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestSemiJoinStatsRule.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestSemiJoinStatsRule.java @@ -13,13 +13,13 @@ */ package io.trino.cost; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; public class TestSemiJoinStatsRule extends BaseStatsCalculatorTest diff --git a/core/trino-main/src/test/java/io/trino/cost/TestSimpleFilterProjectSemiJoinStatsRule.java b/core/trino-main/src/test/java/io/trino/cost/TestSimpleFilterProjectSemiJoinStatsRule.java index 22774993f7c5..df06685af746 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestSimpleFilterProjectSemiJoinStatsRule.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestSimpleFilterProjectSemiJoinStatsRule.java @@ -13,16 +13,16 @@ */ package io.trino.cost; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNodeId; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestSimpleFilterProjectSemiJoinStatsRule extends BaseStatsCalculatorTest diff --git a/core/trino-main/src/test/java/io/trino/cost/TestSortStatsRule.java b/core/trino-main/src/test/java/io/trino/cost/TestSortStatsRule.java index 261d1a2aa280..ab32151d83df 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestSortStatsRule.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestSortStatsRule.java @@ -13,11 +13,11 @@ */ package io.trino.cost; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.Double.POSITIVE_INFINITY; public class TestSortStatsRule diff --git a/core/trino-main/src/test/java/io/trino/cost/TestStatisticRange.java b/core/trino-main/src/test/java/io/trino/cost/TestStatisticRange.java index b6888d409e71..c4681f778d0b 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestStatisticRange.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestStatisticRange.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static io.prestosql.cost.EstimateAssertion.assertEstimateEquals; +import static io.trino.cost.EstimateAssertion.assertEstimateEquals; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.NaN; import static java.lang.Double.POSITIVE_INFINITY; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestStatsCalculator.java b/core/trino-main/src/test/java/io/trino/cost/TestStatsCalculator.java index ef43cb546d5e..0b43464f5fa3 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestStatsCalculator.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestStatsCalculator.java @@ -14,20 +14,20 @@ package io.trino.cost; import com.google.common.collect.ImmutableMap; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.sql.planner.LogicalPlanner; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.assertions.PlanAssert; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.execution.warnings.WarningCollector; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.sql.planner.LogicalPlanner; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.assertions.PlanAssert; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestStatsCalculator { diff --git a/core/trino-main/src/test/java/io/trino/cost/TestStatsNormalizer.java b/core/trino-main/src/test/java/io/trino/cost/TestStatsNormalizer.java index afebf91efa66..ff71563e65da 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestStatsNormalizer.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestStatsNormalizer.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; import org.testng.annotations.Test; import java.time.LocalDate; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.cost.StatsUtil.toStatsRepresentation; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.cost.StatsUtil.toStatsRepresentation; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Double.NaN; import static java.util.function.Function.identity; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestTopNStatsRule.java b/core/trino-main/src/test/java/io/trino/cost/TestTopNStatsRule.java index 441c92d596ae..bf4d287da8fd 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestTopNStatsRule.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestTopNStatsRule.java @@ -15,9 +15,9 @@ package io.trino.cost; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.TopNNode; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.TopNNode; import org.testng.annotations.Test; public class TestTopNStatsRule diff --git a/core/trino-main/src/test/java/io/trino/cost/TestUnionStatsRule.java b/core/trino-main/src/test/java/io/trino/cost/TestUnionStatsRule.java index 879739789ad8..9ee39aaa3758 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestUnionStatsRule.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestUnionStatsRule.java @@ -16,10 +16,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.POSITIVE_INFINITY; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestValuesNodeStats.java b/core/trino-main/src/test/java/io/trino/cost/TestValuesNodeStats.java index 3b7597b97aa0..a7d96b9b0658 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestValuesNodeStats.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestValuesNodeStats.java @@ -14,14 +14,14 @@ package io.trino.cost; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.type.UnknownType.UNKNOWN; public class TestValuesNodeStats extends BaseStatsCalculatorTest diff --git a/core/trino-main/src/test/java/io/trino/dispatcher/TestDecoratingListeningExecutorService.java b/core/trino-main/src/test/java/io/trino/dispatcher/TestDecoratingListeningExecutorService.java index fd90206fefb7..9a46c9516566 100644 --- a/core/trino-main/src/test/java/io/trino/dispatcher/TestDecoratingListeningExecutorService.java +++ b/core/trino-main/src/test/java/io/trino/dispatcher/TestDecoratingListeningExecutorService.java @@ -16,7 +16,7 @@ import com.google.common.util.concurrent.ListeningExecutorService; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; public class TestDecoratingListeningExecutorService { diff --git a/core/trino-main/src/test/java/io/trino/eventlistener/TestConnectorEventListener.java b/core/trino-main/src/test/java/io/trino/eventlistener/TestConnectorEventListener.java index 0af5868c3255..32b9e4482f10 100644 --- a/core/trino-main/src/test/java/io/trino/eventlistener/TestConnectorEventListener.java +++ b/core/trino-main/src/test/java/io/trino/eventlistener/TestConnectorEventListener.java @@ -14,15 +14,15 @@ package io.trino.eventlistener; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.connector.MockConnectorFactory; +import io.trino.spi.eventlistener.EventListener; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.Test; import java.util.concurrent.atomic.AtomicLong; import java.util.function.Supplier; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatCode; diff --git a/core/trino-main/src/test/java/io/trino/execution/BenchmarkNodeScheduler.java b/core/trino-main/src/test/java/io/trino/execution/BenchmarkNodeScheduler.java index 55b0e3a005e0..46dd4846b494 100644 --- a/core/trino-main/src/test/java/io/trino/execution/BenchmarkNodeScheduler.java +++ b/core/trino-main/src/test/java/io/trino/execution/BenchmarkNodeScheduler.java @@ -18,25 +18,25 @@ import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Iterators; import com.google.common.collect.Multimap; -import io.prestosql.client.NodeVersion; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.scheduler.FlatNetworkTopology; -import io.prestosql.execution.scheduler.NetworkLocation; -import io.prestosql.execution.scheduler.NetworkTopology; -import io.prestosql.execution.scheduler.NodeScheduler; -import io.prestosql.execution.scheduler.NodeSchedulerConfig; -import io.prestosql.execution.scheduler.NodeSelector; -import io.prestosql.execution.scheduler.NodeSelectorFactory; -import io.prestosql.execution.scheduler.TopologyAwareNodeSelectorConfig; -import io.prestosql.execution.scheduler.TopologyAwareNodeSelectorFactory; -import io.prestosql.execution.scheduler.UniformNodeSelectorFactory; -import io.prestosql.metadata.InMemoryNodeManager; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.util.FinalizerService; +import io.trino.client.NodeVersion; +import io.trino.connector.CatalogName; +import io.trino.execution.scheduler.FlatNetworkTopology; +import io.trino.execution.scheduler.NetworkLocation; +import io.trino.execution.scheduler.NetworkTopology; +import io.trino.execution.scheduler.NodeScheduler; +import io.trino.execution.scheduler.NodeSchedulerConfig; +import io.trino.execution.scheduler.NodeSelector; +import io.trino.execution.scheduler.NodeSelectorFactory; +import io.trino.execution.scheduler.TopologyAwareNodeSelectorConfig; +import io.trino.execution.scheduler.TopologyAwareNodeSelectorFactory; +import io.trino.execution.scheduler.UniformNodeSelectorFactory; +import io.trino.metadata.InMemoryNodeManager; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.util.FinalizerService; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; diff --git a/core/trino-main/src/test/java/io/trino/execution/MockManagedQueryExecution.java b/core/trino-main/src/test/java/io/trino/execution/MockManagedQueryExecution.java index c2b023b9c7df..e178538c571a 100644 --- a/core/trino-main/src/test/java/io/trino/execution/MockManagedQueryExecution.java +++ b/core/trino-main/src/test/java/io/trino/execution/MockManagedQueryExecution.java @@ -18,13 +18,13 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.StateMachine.StateChangeListener; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.BasicQueryStats; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; +import io.trino.Session; +import io.trino.execution.StateMachine.StateChangeListener; +import io.trino.server.BasicQueryInfo; +import io.trino.server.BasicQueryStats; +import io.trino.spi.ErrorCode; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; import org.joda.time.DateTime; import java.net.URI; @@ -34,13 +34,13 @@ import java.util.OptionalDouble; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.SystemSessionProperties.QUERY_PRIORITY; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.FINISHED; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.server.DynamicFilterService.DynamicFiltersStats; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.QUERY_PRIORITY; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.FINISHED; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.server.DynamicFilterService.DynamicFiltersStats; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/test/java/io/trino/execution/MockRemoteTaskFactory.java b/core/trino-main/src/test/java/io/trino/execution/MockRemoteTaskFactory.java index 79a28b6c5b75..1789555b9667 100644 --- a/core/trino-main/src/test/java/io/trino/execution/MockRemoteTaskFactory.java +++ b/core/trino-main/src/test/java/io/trino/execution/MockRemoteTaskFactory.java @@ -24,30 +24,30 @@ import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.execution.NodeTaskMap.PartitionedSplitCountTracker; -import io.prestosql.execution.buffer.LazyOutputBuffer; -import io.prestosql.execution.buffer.OutputBuffer; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.memory.MemoryPool; -import io.prestosql.memory.QueryContext; -import io.prestosql.memory.context.SimpleLocalMemoryContext; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; -import io.prestosql.operator.TaskContext; -import io.prestosql.operator.TaskStats; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spiller.SpillSpaceTracker; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.testing.TestingMetadata.TestingColumnHandle; +import io.trino.Session; +import io.trino.cost.StatsAndCosts; +import io.trino.execution.NodeTaskMap.PartitionedSplitCountTracker; +import io.trino.execution.buffer.LazyOutputBuffer; +import io.trino.execution.buffer.OutputBuffer; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.memory.MemoryPool; +import io.trino.memory.QueryContext; +import io.trino.memory.context.SimpleLocalMemoryContext; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; +import io.trino.operator.TaskContext; +import io.trino.operator.TaskStats; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spiller.SpillSpaceTracker; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.testing.TestingMetadata.TestingColumnHandle; import org.joda.time.DateTime; import javax.annotation.concurrent.GuardedBy; @@ -72,18 +72,18 @@ import static com.google.common.util.concurrent.Futures.nonCancellationPropagating; import static io.airlift.units.DataSize.Unit.GIGABYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; -import static io.prestosql.execution.StateMachine.StateChangeListener; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.BROADCAST; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.operator.StageExecutionDescriptor.ungroupedExecution; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; -import static io.prestosql.testing.TestingHandles.TEST_TABLE_HANDLE; -import static io.prestosql.util.Failures.toFailures; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; +import static io.trino.execution.StateMachine.StateChangeListener; +import static io.trino.execution.buffer.OutputBuffers.BufferType.BROADCAST; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.operator.StageExecutionDescriptor.ungroupedExecution; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; +import static io.trino.testing.TestingHandles.TEST_TABLE_HANDLE; +import static io.trino.util.Failures.toFailures; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/test/java/io/trino/execution/TaskTestUtils.java b/core/trino-main/src/test/java/io/trino/execution/TaskTestUtils.java index 2ffa28d45b36..e2190e938e6c 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TaskTestUtils.java +++ b/core/trino-main/src/test/java/io/trino/execution/TaskTestUtils.java @@ -16,60 +16,60 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.connector.CatalogName; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.event.SplitMonitor; -import io.prestosql.eventlistener.EventListenerConfig; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.execution.TestSqlTaskManager.MockExchangeClientSupplier; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.scheduler.NodeScheduler; -import io.prestosql.execution.scheduler.NodeSchedulerConfig; -import io.prestosql.execution.scheduler.UniformNodeSelectorFactory; -import io.prestosql.index.IndexManager; -import io.prestosql.metadata.InMemoryNodeManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.Split; -import io.prestosql.operator.LookupJoinOperators; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.index.IndexJoinLookupStats; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spiller.GenericSpillerFactory; -import io.prestosql.split.PageSinkManager; -import io.prestosql.split.PageSourceManager; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.LocalExecutionPlanner; -import io.prestosql.sql.planner.NodePartitioningManager; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.testing.TestingMetadata.TestingColumnHandle; -import io.prestosql.testing.TestingSplit; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.util.FinalizerService; +import io.trino.connector.CatalogName; +import io.trino.cost.StatsAndCosts; +import io.trino.event.SplitMonitor; +import io.trino.eventlistener.EventListenerConfig; +import io.trino.eventlistener.EventListenerManager; +import io.trino.execution.TestSqlTaskManager.MockExchangeClientSupplier; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.scheduler.NodeScheduler; +import io.trino.execution.scheduler.NodeSchedulerConfig; +import io.trino.execution.scheduler.UniformNodeSelectorFactory; +import io.trino.index.IndexManager; +import io.trino.metadata.InMemoryNodeManager; +import io.trino.metadata.Metadata; +import io.trino.metadata.Split; +import io.trino.operator.LookupJoinOperators; +import io.trino.operator.PagesIndex; +import io.trino.operator.index.IndexJoinLookupStats; +import io.trino.spi.type.TypeOperators; +import io.trino.spiller.GenericSpillerFactory; +import io.trino.split.PageSinkManager; +import io.trino.split.PageSourceManager; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.gen.JoinFilterFunctionCompiler; +import io.trino.sql.gen.OrderingCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.LocalExecutionPlanner; +import io.trino.sql.planner.NodePartitioningManager; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.testing.TestingMetadata.TestingColumnHandle; +import io.trino.testing.TestingSplit; +import io.trino.type.BlockTypeOperators; +import io.trino.util.FinalizerService; import java.util.List; import java.util.Optional; import java.util.OptionalInt; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.StageExecutionDescriptor.ungroupedExecution; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; -import static io.prestosql.testing.TestingHandles.TEST_TABLE_HANDLE; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.StageExecutionDescriptor.ungroupedExecution; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; +import static io.trino.testing.TestingHandles.TEST_TABLE_HANDLE; public final class TaskTestUtils { 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 6a2889a619b1..62d613855ba4 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,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.plugin.base.security.AllowAllSystemAccessControl; -import io.prestosql.security.AccessControl; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.security.DenyAllAccessControl; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.tree.Call; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.testing.TestingAccessControlManager; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.MetadataManager; +import io.trino.plugin.base.security.AllowAllSystemAccessControl; +import io.trino.security.AccessControl; +import io.trino.security.AllowAllAccessControl; +import io.trino.security.DenyAllAccessControl; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.SchemaTableName; +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; +import io.trino.transaction.TransactionManager; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; @@ -46,14 +46,14 @@ import java.util.function.Function; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.block.MethodHandleUtil.methodHandle; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.INSERT_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.privilege; -import static io.prestosql.testing.TestingEventListenerManager.emptyEventListenerManager; -import static io.prestosql.testing.TestingSession.createBogusTestingCatalog; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.block.MethodHandleUtil.methodHandle; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.INSERT_TABLE; +import static io.trino.testing.TestingAccessControlManager.privilege; +import static io.trino.testing.TestingEventListenerManager.emptyEventListenerManager; +import static io.trino.testing.TestingSession.createBogusTestingCatalog; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.concurrent.Executors.newCachedThreadPool; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestCommitTask.java b/core/trino-main/src/test/java/io/trino/execution/TestCommitTask.java index 742630e734e5..b009a6cc9f0e 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestCommitTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestCommitTask.java @@ -14,17 +14,17 @@ */ package io.trino.execution; -import io.prestosql.Session; -import io.prestosql.Session.SessionBuilder; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControlConfig; -import io.prestosql.security.AccessControlManager; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.sql.tree.Commit; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.Session.SessionBuilder; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControlConfig; +import io.trino.security.AccessControlManager; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.sql.tree.Commit; +import io.trino.transaction.TransactionId; +import io.trino.transaction.TransactionManager; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -35,14 +35,14 @@ import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.spi.StandardErrorCode.NOT_IN_TRANSACTION; -import static io.prestosql.spi.StandardErrorCode.UNKNOWN_TRANSACTION; -import static io.prestosql.testing.TestingEventListenerManager.emptyEventListenerManager; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.spi.StandardErrorCode.NOT_IN_TRANSACTION; +import static io.trino.spi.StandardErrorCode.UNKNOWN_TRANSACTION; +import static io.trino.testing.TestingEventListenerManager.emptyEventListenerManager; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.Collections.emptyList; import static java.util.concurrent.Executors.newCachedThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestCreateSchemaTask.java b/core/trino-main/src/test/java/io/trino/execution/TestCreateSchemaTask.java index 802afd1adf25..e4e9b0bf994d 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestCreateSchemaTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestCreateSchemaTask.java @@ -14,19 +14,19 @@ package io.trino.execution; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.AbstractMockMetadata; -import io.prestosql.metadata.Catalog; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.SchemaPropertyManager; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.sql.tree.CreateSchema; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.AbstractMockMetadata; +import io.trino.metadata.Catalog; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.SchemaPropertyManager; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.sql.tree.CreateSchema; +import io.trino.sql.tree.QualifiedName; +import io.trino.transaction.TransactionManager; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -36,10 +36,10 @@ import java.util.concurrent.CopyOnWriteArrayList; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.testing.TestingSession.createBogusTestingCatalog; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.testing.TestingSession.createBogusTestingCatalog; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.Collections.emptyList; import static java.util.Objects.requireNonNull; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; 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 1d8bb4250d92..d1374174bd33 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,39 +15,39 @@ package io.trino.execution; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.eventlistener.EventListenerConfig; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.metadata.AbstractMockMetadata; -import io.prestosql.metadata.Catalog; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.ColumnPropertyManager; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.metadata.TableMetadata; -import io.prestosql.metadata.TablePropertyManager; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorCapabilities; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.planner.TestingConnectorTransactionHandle; -import io.prestosql.sql.tree.ColumnDefinition; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.LikeClause; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.TableElement; -import io.prestosql.testing.TestingAccessControlManager; -import io.prestosql.testing.TestingMetadata.TestingTableHandle; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.eventlistener.EventListenerConfig; +import io.trino.eventlistener.EventListenerManager; +import io.trino.metadata.AbstractMockMetadata; +import io.trino.metadata.Catalog; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.ColumnPropertyManager; +import io.trino.metadata.MetadataManager; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.metadata.TableMetadata; +import io.trino.metadata.TablePropertyManager; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorCapabilities; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.planner.TestingConnectorTransactionHandle; +import io.trino.sql.tree.ColumnDefinition; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.LikeClause; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.TableElement; +import io.trino.testing.TestingAccessControlManager; +import io.trino.testing.TestingMetadata.TestingTableHandle; +import io.trino.transaction.TransactionManager; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -59,26 +59,26 @@ import static com.google.common.collect.Sets.immutableEnumSet; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.connector.ConnectorCapabilities.NOT_NULL_COLUMN_CONSTRAINT; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.QueryUtil.identifier; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.tree.LikeClause.PropertiesOption.INCLUDING; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SELECT_COLUMN; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_CREATE_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.privilege; -import static io.prestosql.testing.TestingSession.createBogusTestingCatalog; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.connector.ConnectorCapabilities.NOT_NULL_COLUMN_CONSTRAINT; +import static io.trino.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.QueryUtil.identifier; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.tree.LikeClause.PropertiesOption.INCLUDING; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SELECT_COLUMN; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_CREATE_TABLE; +import static io.trino.testing.TestingAccessControlManager.privilege; +import static io.trino.testing.TestingSession.createBogusTestingCatalog; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.Collections.emptyList; import static java.util.Collections.emptySet; import static java.util.Locale.ENGLISH; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestDeallocateTask.java b/core/trino-main/src/test/java/io/trino/execution/TestDeallocateTask.java index f378f02bd98f..42daccf3e4fe 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestDeallocateTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestDeallocateTask.java @@ -14,17 +14,17 @@ package io.trino.execution; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.plugin.base.security.AllowAllSystemAccessControl; -import io.prestosql.security.AccessControlConfig; -import io.prestosql.security.AccessControlManager; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.sql.tree.Deallocate; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.plugin.base.security.AllowAllSystemAccessControl; +import io.trino.security.AccessControlConfig; +import io.trino.security.AccessControlManager; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.sql.tree.Deallocate; +import io.trino.sql.tree.Identifier; +import io.trino.transaction.TransactionManager; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -35,13 +35,13 @@ import java.util.concurrent.ExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.testing.TestingEventListenerManager.emptyEventListenerManager; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.testing.TestingEventListenerManager.emptyEventListenerManager; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.Collections.emptyList; import static java.util.concurrent.Executors.newCachedThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestDynamicFiltersCollector.java b/core/trino-main/src/test/java/io/trino/execution/TestDynamicFiltersCollector.java index 20281b70ab85..2dca9179a948 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestDynamicFiltersCollector.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestDynamicFiltersCollector.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.sql.planner.plan.DynamicFilterId; +import io.trino.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; +import io.trino.spi.predicate.Domain; +import io.trino.sql.planner.plan.DynamicFilterId; import org.testng.annotations.Test; -import static io.prestosql.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; -import static io.prestosql.spi.predicate.Domain.multipleValues; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; +import static io.trino.spi.predicate.Domain.multipleValues; +import static io.trino.spi.predicate.Domain.singleValue; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; public class TestDynamicFiltersCollector diff --git a/core/trino-main/src/test/java/io/trino/execution/TestInput.java b/core/trino-main/src/test/java/io/trino/execution/TestInput.java index d92cdb270562..44ef3f261717 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestInput.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestInput.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import io.airlift.json.JsonCodec; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNodeId; import org.testng.annotations.Test; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestMemoryRevokingScheduler.java b/core/trino-main/src/test/java/io/trino/execution/TestMemoryRevokingScheduler.java index ac8fc153540f..aef655ed81c8 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestMemoryRevokingScheduler.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestMemoryRevokingScheduler.java @@ -22,21 +22,21 @@ import io.airlift.stats.CounterStat; import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.execution.executor.TaskExecutor; -import io.prestosql.memory.MemoryPool; -import io.prestosql.memory.QueryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.PipelineContext; -import io.prestosql.operator.TaskContext; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spiller.SpillSpaceTracker; -import io.prestosql.sql.planner.LocalExecutionPlanner; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.TestingSession; +import io.trino.Session; +import io.trino.execution.executor.TaskExecutor; +import io.trino.memory.MemoryPool; +import io.trino.memory.QueryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.DriverContext; +import io.trino.operator.OperatorContext; +import io.trino.operator.PipelineContext; +import io.trino.operator.TaskContext; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spiller.SpillSpaceTracker; +import io.trino.sql.planner.LocalExecutionPlanner; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.TestingSession; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -53,10 +53,10 @@ import static io.airlift.concurrent.Threads.threadsNamed; import static io.airlift.units.DataSize.Unit.GIGABYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.execution.SqlTask.createSqlTask; -import static io.prestosql.execution.TaskTestUtils.createTestSplitMonitor; -import static io.prestosql.execution.TaskTestUtils.createTestingPlanner; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.execution.SqlTask.createSqlTask; +import static io.trino.execution.TaskTestUtils.createTestSplitMonitor; +import static io.trino.execution.TaskTestUtils.createTestingPlanner; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestNodeScheduler.java b/core/trino-main/src/test/java/io/trino/execution/TestNodeScheduler.java index 9d00fcf8b859..d4b42ddc2e6a 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestNodeScheduler.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestNodeScheduler.java @@ -23,25 +23,25 @@ import com.google.common.collect.Multimap; import com.google.common.collect.Sets; import com.google.common.hash.Hashing; -import io.prestosql.client.NodeVersion; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.scheduler.NetworkLocation; -import io.prestosql.execution.scheduler.NetworkTopology; -import io.prestosql.execution.scheduler.NodeScheduler; -import io.prestosql.execution.scheduler.NodeSchedulerConfig; -import io.prestosql.execution.scheduler.NodeSelector; -import io.prestosql.execution.scheduler.NodeSelectorFactory; -import io.prestosql.execution.scheduler.TopologyAwareNodeSelectorConfig; -import io.prestosql.execution.scheduler.TopologyAwareNodeSelectorFactory; -import io.prestosql.execution.scheduler.UniformNodeSelector; -import io.prestosql.execution.scheduler.UniformNodeSelectorFactory; -import io.prestosql.metadata.InMemoryNodeManager; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Split; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.util.FinalizerService; +import io.trino.client.NodeVersion; +import io.trino.connector.CatalogName; +import io.trino.execution.scheduler.NetworkLocation; +import io.trino.execution.scheduler.NetworkTopology; +import io.trino.execution.scheduler.NodeScheduler; +import io.trino.execution.scheduler.NodeSchedulerConfig; +import io.trino.execution.scheduler.NodeSelector; +import io.trino.execution.scheduler.NodeSelectorFactory; +import io.trino.execution.scheduler.TopologyAwareNodeSelectorConfig; +import io.trino.execution.scheduler.TopologyAwareNodeSelectorFactory; +import io.trino.execution.scheduler.UniformNodeSelector; +import io.trino.execution.scheduler.UniformNodeSelectorFactory; +import io.trino.metadata.InMemoryNodeManager; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Split; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.util.FinalizerService; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -68,8 +68,8 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertLessThanOrEqual; -import static io.prestosql.spi.StandardErrorCode.NO_NODES_AVAILABLE; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.spi.StandardErrorCode.NO_NODES_AVAILABLE; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestNodeSchedulerConfig.java b/core/trino-main/src/test/java/io/trino/execution/TestNodeSchedulerConfig.java index 91506a81febe..506f0af9f2c1 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestNodeSchedulerConfig.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestNodeSchedulerConfig.java @@ -14,7 +14,7 @@ package io.trino.execution; import com.google.common.collect.ImmutableMap; -import io.prestosql.execution.scheduler.NodeSchedulerConfig; +import io.trino.execution.scheduler.NodeSchedulerConfig; import org.testng.annotations.Test; import java.util.Map; @@ -22,7 +22,7 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertFullMapping; import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; -import static io.prestosql.execution.scheduler.NodeSchedulerConfig.NodeSchedulerPolicy.UNIFORM; +import static io.trino.execution.scheduler.NodeSchedulerConfig.NodeSchedulerPolicy.UNIFORM; public class TestNodeSchedulerConfig { diff --git a/core/trino-main/src/test/java/io/trino/execution/TestPageSplitterUtil.java b/core/trino-main/src/test/java/io/trino/execution/TestPageSplitterUtil.java index 8da1566f8e14..32a23be1860d 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestPageSplitterUtil.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestPageSplitterUtil.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.MaterializedResult; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.Type; +import io.trino.testing.MaterializedResult; import org.testng.annotations.Test; import java.util.List; @@ -28,13 +28,13 @@ import static io.airlift.slice.Slices.wrappedBuffer; import static io.airlift.testing.Assertions.assertGreaterThan; import static io.airlift.testing.Assertions.assertLessThanOrEqual; -import static io.prestosql.SequencePageBuilder.createSequencePage; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.buffer.PageSplitterUtil.splitPage; -import static io.prestosql.operator.OperatorAssertion.toMaterializedResult; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.SequencePageBuilder.createSequencePage; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.buffer.PageSplitterUtil.splitPage; +import static io.trino.operator.OperatorAssertion.toMaterializedResult; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.nio.charset.StandardCharsets.UTF_8; public class TestPageSplitterUtil diff --git a/core/trino-main/src/test/java/io/trino/execution/TestParameterExtractor.java b/core/trino-main/src/test/java/io/trino/execution/TestParameterExtractor.java index ebf6cc25cab5..6c06e6f4051d 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestParameterExtractor.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestParameterExtractor.java @@ -13,11 +13,11 @@ */ package io.trino.execution; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.NodeLocation; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.Statement; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.NodeLocation; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.Statement; import org.testng.annotations.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestPlannerWarnings.java b/core/trino-main/src/test/java/io/trino/execution/TestPlannerWarnings.java index 0b119eadd893..334116e8a5a8 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestPlannerWarnings.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestPlannerWarnings.java @@ -16,23 +16,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.execution.warnings.DefaultWarningCollector; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.execution.warnings.WarningCollectorConfig; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.PrestoWarning; -import io.prestosql.spi.WarningCode; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.iterative.IterativeOptimizer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.execution.warnings.DefaultWarningCollector; +import io.trino.execution.warnings.WarningCollector; +import io.trino.execution.warnings.WarningCollectorConfig; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.spi.PrestoException; +import io.trino.spi.PrestoWarning; +import io.trino.spi.WarningCode; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.iterative.IterativeOptimizer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.testing.LocalQueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -46,10 +46,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.CREATED; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; -import static io.prestosql.sql.planner.plan.Patterns.project; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.sql.planner.LogicalPlanner.Stage.CREATED; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; +import static io.trino.sql.planner.plan.Patterns.project; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Objects.requireNonNull; import static java.util.stream.IntStream.range; import static org.testng.Assert.fail; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestPrepareTask.java b/core/trino-main/src/test/java/io/trino/execution/TestPrepareTask.java index 52fb75232a0b..47028d171d9a 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestPrepareTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestPrepareTask.java @@ -14,22 +14,22 @@ package io.trino.execution; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.plugin.base.security.AllowAllSystemAccessControl; -import io.prestosql.security.AccessControlConfig; -import io.prestosql.security.AccessControlManager; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.Execute; -import io.prestosql.sql.tree.Prepare; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.Statement; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.plugin.base.security.AllowAllSystemAccessControl; +import io.trino.security.AccessControlConfig; +import io.trino.security.AccessControlManager; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.Execute; +import io.trino.sql.tree.Prepare; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.Statement; +import io.trino.transaction.TransactionManager; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -40,17 +40,17 @@ import java.util.concurrent.ExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.sql.QueryUtil.identifier; -import static io.prestosql.sql.QueryUtil.selectList; -import static io.prestosql.sql.QueryUtil.simpleQuery; -import static io.prestosql.sql.QueryUtil.table; -import static io.prestosql.testing.TestingEventListenerManager.emptyEventListenerManager; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.sql.QueryUtil.identifier; +import static io.trino.sql.QueryUtil.selectList; +import static io.trino.sql.QueryUtil.simpleQuery; +import static io.trino.sql.QueryUtil.table; +import static io.trino.testing.TestingEventListenerManager.emptyEventListenerManager; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.Collections.emptyList; import static java.util.concurrent.Executors.newCachedThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestQueryIdGenerator.java b/core/trino-main/src/test/java/io/trino/execution/TestQueryIdGenerator.java index 0bdf5e6334f5..149f1e6549d4 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestQueryIdGenerator.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestQueryIdGenerator.java @@ -13,7 +13,7 @@ */ package io.trino.execution; -import io.prestosql.spi.QueryId; +import io.trino.spi.QueryId; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestQueryPreparer.java b/core/trino-main/src/test/java/io/trino/execution/TestQueryPreparer.java index b5ddce12db4f..f81f49165578 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestQueryPreparer.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestQueryPreparer.java @@ -13,21 +13,21 @@ */ package io.trino.execution; -import io.prestosql.Session; -import io.prestosql.execution.QueryPreparer.PreparedQuery; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.Session; +import io.trino.execution.QueryPreparer.PreparedQuery; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.StandardErrorCode.INVALID_PARAMETER_USAGE; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.sql.QueryUtil.selectList; -import static io.prestosql.sql.QueryUtil.simpleQuery; -import static io.prestosql.sql.QueryUtil.table; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.StandardErrorCode.INVALID_PARAMETER_USAGE; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.sql.QueryUtil.selectList; +import static io.trino.sql.QueryUtil.simpleQuery; +import static io.trino.sql.QueryUtil.table; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static org.testng.Assert.assertEquals; public class TestQueryPreparer diff --git a/core/trino-main/src/test/java/io/trino/execution/TestQueryStateMachine.java b/core/trino-main/src/test/java/io/trino/execution/TestQueryStateMachine.java index d16f306d5ce1..97744557bfa3 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestQueryStateMachine.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestQueryStateMachine.java @@ -18,23 +18,23 @@ import com.google.common.collect.ImmutableMap; import io.airlift.testing.TestingTicker; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.client.FailureInfo; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.memory.VersionedMemoryPoolId; -import io.prestosql.metadata.Metadata; -import io.prestosql.plugin.base.security.AllowAllSystemAccessControl; -import io.prestosql.security.AccessControlConfig; -import io.prestosql.security.AccessControlManager; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.resourcegroups.QueryType; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.Output; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.client.FailureInfo; +import io.trino.execution.warnings.WarningCollector; +import io.trino.memory.VersionedMemoryPoolId; +import io.trino.metadata.Metadata; +import io.trino.plugin.base.security.AllowAllSystemAccessControl; +import io.trino.security.AccessControlConfig; +import io.trino.security.AccessControlManager; +import io.trino.spi.PrestoException; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.resourcegroups.QueryType; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.type.Type; +import io.trino.sql.analyzer.Output; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.transaction.TransactionManager; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -50,22 +50,22 @@ import static io.airlift.concurrent.MoreFutures.tryGetFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.QueryState.DISPATCHING; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.FINISHED; -import static io.prestosql.execution.QueryState.FINISHING; -import static io.prestosql.execution.QueryState.PLANNING; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.execution.QueryState.STARTING; -import static io.prestosql.execution.QueryState.WAITING_FOR_RESOURCES; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.USER_CANCELED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.TestingEventListenerManager.emptyEventListenerManager; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.QueryState.DISPATCHING; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.FINISHED; +import static io.trino.execution.QueryState.FINISHING; +import static io.trino.execution.QueryState.PLANNING; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.execution.QueryState.STARTING; +import static io.trino.execution.QueryState.WAITING_FOR_RESOURCES; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.USER_CANCELED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.TestingEventListenerManager.emptyEventListenerManager; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestQueryStats.java b/core/trino-main/src/test/java/io/trino/execution/TestQueryStats.java index 66a4aca0031a..34ff5221d532 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestQueryStats.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestQueryStats.java @@ -18,11 +18,11 @@ import io.airlift.json.JsonCodec; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.operator.FilterAndProjectOperator; -import io.prestosql.operator.OperatorStats; -import io.prestosql.operator.TableWriterOperator; -import io.prestosql.spi.eventlistener.StageGcStatistics; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.operator.FilterAndProjectOperator; +import io.trino.operator.OperatorStats; +import io.trino.operator.TableWriterOperator; +import io.trino.spi.eventlistener.StageGcStatistics; +import io.trino.sql.planner.plan.PlanNodeId; import org.joda.time.DateTime; import org.testng.annotations.Test; @@ -30,7 +30,7 @@ import java.util.Optional; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.server.DynamicFilterService.DynamicFiltersStats; +import static io.trino.server.DynamicFilterService.DynamicFiltersStats; import static java.util.concurrent.TimeUnit.NANOSECONDS; import static org.joda.time.DateTimeZone.UTC; import static org.testng.Assert.assertEquals; 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 48dcfd05a75c..7236d8aedec4 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,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Catalog; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.ResetSession; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Catalog; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.Metadata; +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; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -37,11 +37,11 @@ import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; -import static io.prestosql.testing.TestingSession.createBogusTestingCatalog; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.session.PropertyMetadata.stringProperty; +import static io.trino.testing.TestingSession.createBogusTestingCatalog; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.Collections.emptyList; import static java.util.concurrent.Executors.newCachedThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestResettableRandomizedIterator.java b/core/trino-main/src/test/java/io/trino/execution/TestResettableRandomizedIterator.java index 88d16e944943..fc38769dbc3b 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestResettableRandomizedIterator.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestResettableRandomizedIterator.java @@ -14,7 +14,7 @@ package io.trino.execution; import com.google.common.collect.ImmutableSet; -import io.prestosql.execution.scheduler.ResettableRandomizedIterator; +import io.trino.execution.scheduler.ResettableRandomizedIterator; import org.testng.annotations.Test; import java.util.ArrayList; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestRollbackTask.java b/core/trino-main/src/test/java/io/trino/execution/TestRollbackTask.java index 7d0d17a53b9d..eea4945cf627 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestRollbackTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestRollbackTask.java @@ -14,15 +14,15 @@ */ package io.trino.execution; -import io.prestosql.Session; -import io.prestosql.Session.SessionBuilder; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.sql.tree.Rollback; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.Session.SessionBuilder; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.sql.tree.Rollback; +import io.trino.transaction.TransactionId; +import io.trino.transaction.TransactionManager; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -33,12 +33,12 @@ import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.spi.StandardErrorCode.NOT_IN_TRANSACTION; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.spi.StandardErrorCode.NOT_IN_TRANSACTION; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.Collections.emptyList; import static java.util.concurrent.Executors.newCachedThreadPool; import static org.testng.Assert.assertEquals; 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 a8cd2e02bf18..dc752ebeb786 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,19 +14,19 @@ package io.trino.execution; import com.google.common.collect.ImmutableList; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.PathElement; -import io.prestosql.sql.tree.PathSpecification; -import io.prestosql.sql.tree.SetPath; -import io.prestosql.transaction.TransactionManager; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.PrestoException; +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; +import io.trino.sql.tree.SetPath; +import io.trino.transaction.TransactionManager; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -36,9 +36,9 @@ import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.Collections.emptyList; import static java.util.concurrent.Executors.newCachedThreadPool; import static org.testng.Assert.assertEquals; 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 6545bdceebcf..0ab0d9ed6ca7 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 @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.SetRole; -import io.prestosql.transaction.TransactionManager; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.security.SelectedRole; +import io.trino.sql.analyzer.FeaturesConfig; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.SetRole; +import io.trino.transaction.TransactionManager; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -37,12 +37,12 @@ import java.util.concurrent.ExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.testing.TestingSession.createBogusTestingCatalog; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.testing.TestingSession.createBogusTestingCatalog; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.concurrent.Executors.newCachedThreadPool; import static org.testng.Assert.assertEquals; 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 9bf00288e9b6..d4bea605a6ac 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,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Catalog; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SetSession; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.transaction.TransactionManager; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Catalog; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.session.PropertyMetadata; +import io.trino.sql.analyzer.FeaturesConfig; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SetSession; +import io.trino.sql.tree.StringLiteral; +import io.trino.transaction.TransactionManager; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -45,15 +45,15 @@ import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.TestingSession.createBogusTestingCatalog; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; +import static io.trino.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.TestingSession.createBogusTestingCatalog; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.lang.String.format; import static java.util.Collections.emptyList; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestSqlStageExecution.java b/core/trino-main/src/test/java/io/trino/execution/TestSqlStageExecution.java index 2d25fb7ef2f4..84a9776cc116 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestSqlStageExecution.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestSqlStageExecution.java @@ -16,25 +16,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.client.NodeVersion; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.execution.MockRemoteTaskFactory.MockRemoteTask; -import io.prestosql.execution.scheduler.SplitSchedulerStats; -import io.prestosql.failuredetector.NoOpFailureDetector; -import io.prestosql.metadata.InternalNode; -import io.prestosql.server.DynamicFilterService; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.util.FinalizerService; +import io.trino.client.NodeVersion; +import io.trino.cost.StatsAndCosts; +import io.trino.execution.MockRemoteTaskFactory.MockRemoteTask; +import io.trino.execution.scheduler.SplitSchedulerStats; +import io.trino.failuredetector.NoOpFailureDetector; +import io.trino.metadata.InternalNode; +import io.trino.server.DynamicFilterService; +import io.trino.spi.QueryId; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.util.FinalizerService; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -48,16 +48,16 @@ import java.util.concurrent.ScheduledExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.SqlStageExecution.createSqlStageExecution; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.ARBITRARY; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.StageExecutionDescriptor.ungroupedExecution; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.SqlStageExecution.createSqlStageExecution; +import static io.trino.execution.buffer.OutputBuffers.BufferType.ARBITRARY; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.StageExecutionDescriptor.ungroupedExecution; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; import static java.util.concurrent.Executors.newFixedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static java.util.concurrent.TimeUnit.MINUTES; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestSqlTask.java b/core/trino-main/src/test/java/io/trino/execution/TestSqlTask.java index 437d59ed4b0c..654de60045e1 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestSqlTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestSqlTask.java @@ -22,20 +22,20 @@ import io.airlift.stats.CounterStat; import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; -import io.prestosql.execution.buffer.BufferResult; -import io.prestosql.execution.buffer.BufferState; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.execution.executor.TaskExecutor; -import io.prestosql.memory.MemoryPool; -import io.prestosql.memory.QueryContext; -import io.prestosql.operator.TaskContext; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spiller.SpillSpaceTracker; -import io.prestosql.sql.planner.LocalExecutionPlanner; -import io.prestosql.sql.planner.plan.DynamicFilterId; +import io.trino.execution.buffer.BufferResult; +import io.trino.execution.buffer.BufferState; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.executor.TaskExecutor; +import io.trino.memory.MemoryPool; +import io.trino.memory.QueryContext; +import io.trino.operator.TaskContext; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.predicate.Domain; +import io.trino.spiller.SpillSpaceTracker; +import io.trino.sql.planner.LocalExecutionPlanner; +import io.trino.sql.planner.plan.DynamicFilterId; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -49,21 +49,21 @@ import static io.airlift.concurrent.Threads.threadsNamed; import static io.airlift.units.DataSize.Unit.GIGABYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; -import static io.prestosql.execution.SqlTask.createSqlTask; -import static io.prestosql.execution.TaskStatus.STARTING_VERSION; -import static io.prestosql.execution.TaskTestUtils.EMPTY_SOURCES; -import static io.prestosql.execution.TaskTestUtils.PLAN_FRAGMENT; -import static io.prestosql.execution.TaskTestUtils.SPLIT; -import static io.prestosql.execution.TaskTestUtils.TABLE_SCAN_NODE_ID; -import static io.prestosql.execution.TaskTestUtils.createTestSplitMonitor; -import static io.prestosql.execution.TaskTestUtils.createTestingPlanner; -import static io.prestosql.execution.TaskTestUtils.updateTask; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.PARTITIONED; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; +import static io.trino.execution.SqlTask.createSqlTask; +import static io.trino.execution.TaskStatus.STARTING_VERSION; +import static io.trino.execution.TaskTestUtils.EMPTY_SOURCES; +import static io.trino.execution.TaskTestUtils.PLAN_FRAGMENT; +import static io.trino.execution.TaskTestUtils.SPLIT; +import static io.trino.execution.TaskTestUtils.TABLE_SCAN_NODE_ID; +import static io.trino.execution.TaskTestUtils.createTestSplitMonitor; +import static io.trino.execution.TaskTestUtils.createTestingPlanner; +import static io.trino.execution.TaskTestUtils.updateTask; +import static io.trino.execution.buffer.OutputBuffers.BufferType.PARTITIONED; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.concurrent.Executors.newScheduledThreadPool; import static java.util.concurrent.TimeUnit.SECONDS; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestSqlTaskExecution.java b/core/trino-main/src/test/java/io/trino/execution/TestSqlTaskExecution.java index 8ceeb7aab167..208f75e4325e 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestSqlTaskExecution.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestSqlTaskExecution.java @@ -24,41 +24,41 @@ import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.buffer.BufferResult; -import io.prestosql.execution.buffer.BufferState; -import io.prestosql.execution.buffer.OutputBuffer; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.execution.buffer.PartitionedOutputBuffer; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.execution.executor.TaskExecutor; -import io.prestosql.memory.MemoryPool; -import io.prestosql.memory.QueryContext; -import io.prestosql.memory.context.SimpleLocalMemoryContext; -import io.prestosql.metadata.Split; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.DriverFactory; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.PipelineExecutionStrategy; -import io.prestosql.operator.SourceOperator; -import io.prestosql.operator.SourceOperatorFactory; -import io.prestosql.operator.StageExecutionDescriptor; -import io.prestosql.operator.TaskContext; -import io.prestosql.operator.TaskOutputOperator.TaskOutputOperatorFactory; -import io.prestosql.operator.ValuesOperator.ValuesOperatorFactory; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.Page; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.SpillSpaceTracker; -import io.prestosql.sql.planner.LocalExecutionPlanner.LocalExecutionPlan; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.connector.CatalogName; +import io.trino.execution.buffer.BufferResult; +import io.trino.execution.buffer.BufferState; +import io.trino.execution.buffer.OutputBuffer; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.execution.buffer.PartitionedOutputBuffer; +import io.trino.execution.buffer.SerializedPage; +import io.trino.execution.executor.TaskExecutor; +import io.trino.memory.MemoryPool; +import io.trino.memory.QueryContext; +import io.trino.memory.context.SimpleLocalMemoryContext; +import io.trino.metadata.Split; +import io.trino.operator.DriverContext; +import io.trino.operator.DriverFactory; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.OperatorFactory; +import io.trino.operator.PipelineExecutionStrategy; +import io.trino.operator.SourceOperator; +import io.trino.operator.SourceOperatorFactory; +import io.trino.operator.StageExecutionDescriptor; +import io.trino.operator.TaskContext; +import io.trino.operator.TaskOutputOperator.TaskOutputOperatorFactory; +import io.trino.operator.ValuesOperator.ValuesOperatorFactory; +import io.trino.spi.HostAddress; +import io.trino.spi.Page; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.type.Type; +import io.trino.spiller.SpillSpaceTracker; +import io.trino.sql.planner.LocalExecutionPlanner.LocalExecutionPlan; +import io.trino.sql.planner.plan.PlanNodeId; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -85,23 +85,23 @@ import static io.airlift.concurrent.Threads.threadsNamed; import static io.airlift.units.DataSize.Unit.GIGABYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.block.BlockAssertions.createStringSequenceBlock; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.execution.TaskState.FINISHED; -import static io.prestosql.execution.TaskState.FLUSHING; -import static io.prestosql.execution.TaskState.RUNNING; -import static io.prestosql.execution.TaskTestUtils.TABLE_SCAN_NODE_ID; -import static io.prestosql.execution.TaskTestUtils.createTestSplitMonitor; -import static io.prestosql.execution.buffer.BufferState.OPEN; -import static io.prestosql.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.PARTITIONED; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.PipelineExecutionStrategy.GROUPED_EXECUTION; -import static io.prestosql.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.block.BlockAssertions.createStringSequenceBlock; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.execution.TaskState.FINISHED; +import static io.trino.execution.TaskState.FLUSHING; +import static io.trino.execution.TaskState.RUNNING; +import static io.trino.execution.TaskTestUtils.TABLE_SCAN_NODE_ID; +import static io.trino.execution.TaskTestUtils.createTestSplitMonitor; +import static io.trino.execution.buffer.BufferState.OPEN; +import static io.trino.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; +import static io.trino.execution.buffer.OutputBuffers.BufferType.PARTITIONED; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.PipelineExecutionStrategy.GROUPED_EXECUTION; +import static io.trino.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newScheduledThreadPool; import static java.util.concurrent.TimeUnit.HOURS; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestSqlTaskManager.java b/core/trino-main/src/test/java/io/trino/execution/TestSqlTaskManager.java index 2301263de78a..4143a7465d3b 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestSqlTaskManager.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestSqlTaskManager.java @@ -21,21 +21,21 @@ import io.airlift.units.DataSize; import io.airlift.units.DataSize.Unit; import io.airlift.units.Duration; -import io.prestosql.execution.buffer.BufferResult; -import io.prestosql.execution.buffer.BufferState; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.execution.executor.TaskExecutor; -import io.prestosql.memory.LocalMemoryManager; -import io.prestosql.memory.NodeMemoryConfig; -import io.prestosql.memory.QueryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.metadata.InternalNode; -import io.prestosql.operator.ExchangeClient; -import io.prestosql.operator.ExchangeClientSupplier; -import io.prestosql.spi.QueryId; -import io.prestosql.spiller.LocalSpillManager; -import io.prestosql.spiller.NodeSpillConfig; +import io.trino.execution.buffer.BufferResult; +import io.trino.execution.buffer.BufferState; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.executor.TaskExecutor; +import io.trino.memory.LocalMemoryManager; +import io.trino.memory.NodeMemoryConfig; +import io.trino.memory.QueryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.metadata.InternalNode; +import io.trino.operator.ExchangeClient; +import io.trino.operator.ExchangeClientSupplier; +import io.trino.spi.QueryId; +import io.trino.spiller.LocalSpillManager; +import io.trino.spiller.NodeSpillConfig; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -45,17 +45,17 @@ import java.util.concurrent.TimeUnit; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.SystemSessionProperties.QUERY_MAX_MEMORY_PER_NODE; -import static io.prestosql.SystemSessionProperties.QUERY_MAX_TOTAL_MEMORY_PER_NODE; -import static io.prestosql.execution.TaskTestUtils.PLAN_FRAGMENT; -import static io.prestosql.execution.TaskTestUtils.SPLIT; -import static io.prestosql.execution.TaskTestUtils.TABLE_SCAN_NODE_ID; -import static io.prestosql.execution.TaskTestUtils.createTestSplitMonitor; -import static io.prestosql.execution.TaskTestUtils.createTestingPlanner; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.PARTITIONED; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.SystemSessionProperties.QUERY_MAX_MEMORY_PER_NODE; +import static io.trino.SystemSessionProperties.QUERY_MAX_TOTAL_MEMORY_PER_NODE; +import static io.trino.execution.TaskTestUtils.PLAN_FRAGMENT; +import static io.trino.execution.TaskTestUtils.SPLIT; +import static io.trino.execution.TaskTestUtils.TABLE_SCAN_NODE_ID; +import static io.trino.execution.TaskTestUtils.createTestSplitMonitor; +import static io.trino.execution.TaskTestUtils.createTestingPlanner; +import static io.trino.execution.buffer.OutputBuffers.BufferType.PARTITIONED; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotEquals; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestStageStateMachine.java b/core/trino-main/src/test/java/io/trino/execution/TestStageStateMachine.java index ef9cd1b27ee2..e3694ea733f4 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestStageStateMachine.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestStageStateMachine.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.execution.scheduler.SplitSchedulerStats; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.StringLiteral; +import io.trino.cost.StatsAndCosts; +import io.trino.execution.scheduler.SplitSchedulerStats; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.StringLiteral; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -35,11 +35,11 @@ import java.util.concurrent.ExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.StageExecutionDescriptor.ungroupedExecution; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.StageExecutionDescriptor.ungroupedExecution; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; import static java.util.concurrent.Executors.newCachedThreadPool; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestStageStats.java b/core/trino-main/src/test/java/io/trino/execution/TestStageStats.java index 262de6b8123f..20a61e954383 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestStageStats.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestStageStats.java @@ -20,7 +20,7 @@ import io.airlift.stats.Distribution.DistributionSnapshot; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.spi.eventlistener.StageGcStatistics; +import io.trino.spi.eventlistener.StageGcStatistics; import org.joda.time.DateTime; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestStartTransactionTask.java b/core/trino-main/src/test/java/io/trino/execution/TestStartTransactionTask.java index 9e4b6dff15b9..708f57b43d01 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestStartTransactionTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestStartTransactionTask.java @@ -15,24 +15,24 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.Session.SessionBuilder; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControlConfig; -import io.prestosql.security.AccessControlManager; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.transaction.IsolationLevel; -import io.prestosql.sql.tree.Isolation; -import io.prestosql.sql.tree.StartTransaction; -import io.prestosql.sql.tree.TransactionAccessMode; -import io.prestosql.transaction.InMemoryTransactionManager; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionInfo; -import io.prestosql.transaction.TransactionManager; -import io.prestosql.transaction.TransactionManagerConfig; +import io.trino.Session; +import io.trino.Session.SessionBuilder; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControlConfig; +import io.trino.security.AccessControlManager; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.transaction.IsolationLevel; +import io.trino.sql.tree.Isolation; +import io.trino.sql.tree.StartTransaction; +import io.trino.sql.tree.TransactionAccessMode; +import io.trino.transaction.InMemoryTransactionManager; +import io.trino.transaction.TransactionId; +import io.trino.transaction.TransactionInfo; +import io.trino.transaction.TransactionManager; +import io.trino.transaction.TransactionManagerConfig; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -45,15 +45,15 @@ import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.spi.StandardErrorCode.INCOMPATIBLE_CLIENT; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.SYNTAX_ERROR; -import static io.prestosql.testing.TestingEventListenerManager.emptyEventListenerManager; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.spi.StandardErrorCode.INCOMPATIBLE_CLIENT; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.SYNTAX_ERROR; +import static io.trino.testing.TestingEventListenerManager.emptyEventListenerManager; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.Collections.emptyList; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestingPageSourceProvider.java b/core/trino-main/src/test/java/io/trino/execution/TestingPageSourceProvider.java index 8b5ea5c43040..6e78244cb0a7 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestingPageSourceProvider.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestingPageSourceProvider.java @@ -14,18 +14,18 @@ package io.trino.execution; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ByteArrayBlock; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.ByteArrayBlock; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.predicate.TupleDomain; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java b/core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java index a1a0e215175b..d50f017f947f 100644 --- a/core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java +++ b/core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java @@ -18,16 +18,16 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.OutputStreamSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.execution.buffer.PagesSerde.PagesSerdeContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.TestingBlockEncodingSerde; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.execution.buffer.PagesSerde.PagesSerdeContext; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.TestingBlockEncodingSerde; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -53,18 +53,18 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.execution.buffer.BenchmarkDataGenerator.createValues; -import static io.prestosql.execution.buffer.PagesSerdeUtil.readPages; -import static io.prestosql.execution.buffer.PagesSerdeUtil.writePages; -import static io.prestosql.plugin.tpch.TpchTables.getTablePages; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_PICOS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.Varchars.truncateToLength; +import static io.trino.execution.buffer.BenchmarkDataGenerator.createValues; +import static io.trino.execution.buffer.PagesSerdeUtil.readPages; +import static io.trino.execution.buffer.PagesSerdeUtil.writePages; +import static io.trino.plugin.tpch.TpchTables.getTablePages; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_PICOS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.Varchars.truncateToLength; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.openjdk.jmh.annotations.Scope.Thread; diff --git a/core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkDataGenerator.java b/core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkDataGenerator.java index c7e22e69ab5d..b9efb4711f23 100644 --- a/core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkDataGenerator.java +++ b/core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkDataGenerator.java @@ -13,8 +13,8 @@ */ package io.trino.execution.buffer; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.SqlDecimal; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.SqlDecimal; import java.math.BigInteger; import java.util.ArrayList; @@ -23,7 +23,7 @@ import java.util.Random; import java.util.function.Function; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; public class BenchmarkDataGenerator { diff --git a/core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkPagesSerde.java b/core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkPagesSerde.java index acf73d71089e..15740b411450 100644 --- a/core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkPagesSerde.java +++ b/core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkPagesSerde.java @@ -14,11 +14,11 @@ package io.trino.execution.buffer; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.AesSpillCipher; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spiller.AesSpillCipher; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -45,9 +45,9 @@ import java.util.Random; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.nio.charset.StandardCharsets.ISO_8859_1; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/trino-main/src/test/java/io/trino/execution/buffer/BufferTestUtils.java b/core/trino-main/src/test/java/io/trino/execution/buffer/BufferTestUtils.java index 2dad28131b10..7589888de9db 100644 --- a/core/trino-main/src/test/java/io/trino/execution/buffer/BufferTestUtils.java +++ b/core/trino-main/src/test/java/io/trino/execution/buffer/BufferTestUtils.java @@ -17,11 +17,11 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.block.BlockAssertions; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.operator.PageAssertions; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; +import io.trino.block.BlockAssertions; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.operator.PageAssertions; +import io.trino.spi.Page; +import io.trino.spi.type.Type; import java.util.List; import java.util.Optional; @@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.concurrent.MoreFutures.tryGetFutureValue; -import static io.prestosql.execution.buffer.TestingPagesSerdeFactory.testingPagesSerde; +import static io.trino.execution.buffer.TestingPagesSerdeFactory.testingPagesSerde; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/execution/buffer/TestArbitraryOutputBuffer.java b/core/trino-main/src/test/java/io/trino/execution/buffer/TestArbitraryOutputBuffer.java index 004fd3d661da..8641a47b1de9 100644 --- a/core/trino-main/src/test/java/io/trino/execution/buffer/TestArbitraryOutputBuffer.java +++ b/core/trino-main/src/test/java/io/trino/execution/buffer/TestArbitraryOutputBuffer.java @@ -17,11 +17,11 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.StateMachine; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.memory.context.SimpleLocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.BigintType; +import io.trino.execution.StateMachine; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.memory.context.SimpleLocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.type.BigintType; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -34,25 +34,25 @@ import java.util.concurrent.ScheduledExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.execution.buffer.BufferResult.emptyResults; -import static io.prestosql.execution.buffer.BufferState.OPEN; -import static io.prestosql.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; -import static io.prestosql.execution.buffer.BufferTestUtils.MAX_WAIT; -import static io.prestosql.execution.buffer.BufferTestUtils.NO_WAIT; -import static io.prestosql.execution.buffer.BufferTestUtils.acknowledgeBufferResult; -import static io.prestosql.execution.buffer.BufferTestUtils.assertBufferResultEquals; -import static io.prestosql.execution.buffer.BufferTestUtils.assertFinished; -import static io.prestosql.execution.buffer.BufferTestUtils.assertFutureIsDone; -import static io.prestosql.execution.buffer.BufferTestUtils.createBufferResult; -import static io.prestosql.execution.buffer.BufferTestUtils.createPage; -import static io.prestosql.execution.buffer.BufferTestUtils.getFuture; -import static io.prestosql.execution.buffer.BufferTestUtils.serializePage; -import static io.prestosql.execution.buffer.BufferTestUtils.sizeOfPages; -import static io.prestosql.execution.buffer.OutputBuffers.BROADCAST_PARTITION_ID; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.ARBITRARY; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.execution.buffer.BufferResult.emptyResults; +import static io.trino.execution.buffer.BufferState.OPEN; +import static io.trino.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; +import static io.trino.execution.buffer.BufferTestUtils.MAX_WAIT; +import static io.trino.execution.buffer.BufferTestUtils.NO_WAIT; +import static io.trino.execution.buffer.BufferTestUtils.acknowledgeBufferResult; +import static io.trino.execution.buffer.BufferTestUtils.assertBufferResultEquals; +import static io.trino.execution.buffer.BufferTestUtils.assertFinished; +import static io.trino.execution.buffer.BufferTestUtils.assertFutureIsDone; +import static io.trino.execution.buffer.BufferTestUtils.createBufferResult; +import static io.trino.execution.buffer.BufferTestUtils.createPage; +import static io.trino.execution.buffer.BufferTestUtils.getFuture; +import static io.trino.execution.buffer.BufferTestUtils.serializePage; +import static io.trino.execution.buffer.BufferTestUtils.sizeOfPages; +import static io.trino.execution.buffer.OutputBuffers.BROADCAST_PARTITION_ID; +import static io.trino.execution.buffer.OutputBuffers.BufferType.ARBITRARY; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.concurrent.Executors.newScheduledThreadPool; import static java.util.stream.Collectors.toList; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/trino-main/src/test/java/io/trino/execution/buffer/TestBroadcastOutputBuffer.java b/core/trino-main/src/test/java/io/trino/execution/buffer/TestBroadcastOutputBuffer.java index 369431e01c58..26eb835b0720 100644 --- a/core/trino-main/src/test/java/io/trino/execution/buffer/TestBroadcastOutputBuffer.java +++ b/core/trino-main/src/test/java/io/trino/execution/buffer/TestBroadcastOutputBuffer.java @@ -17,13 +17,13 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import io.airlift.units.DataSize; -import io.prestosql.execution.StateMachine; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.MemoryReservationHandler; -import io.prestosql.memory.context.SimpleLocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.BigintType; +import io.trino.execution.StateMachine; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.MemoryReservationHandler; +import io.trino.memory.context.SimpleLocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.type.BigintType; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -36,31 +36,31 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.execution.buffer.BufferResult.emptyResults; -import static io.prestosql.execution.buffer.BufferState.OPEN; -import static io.prestosql.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; -import static io.prestosql.execution.buffer.BufferTestUtils.MAX_WAIT; -import static io.prestosql.execution.buffer.BufferTestUtils.NO_WAIT; -import static io.prestosql.execution.buffer.BufferTestUtils.acknowledgeBufferResult; -import static io.prestosql.execution.buffer.BufferTestUtils.addPage; -import static io.prestosql.execution.buffer.BufferTestUtils.assertBufferResultEquals; -import static io.prestosql.execution.buffer.BufferTestUtils.assertFinished; -import static io.prestosql.execution.buffer.BufferTestUtils.assertFutureIsDone; -import static io.prestosql.execution.buffer.BufferTestUtils.assertQueueClosed; -import static io.prestosql.execution.buffer.BufferTestUtils.assertQueueState; -import static io.prestosql.execution.buffer.BufferTestUtils.createBufferResult; -import static io.prestosql.execution.buffer.BufferTestUtils.createPage; -import static io.prestosql.execution.buffer.BufferTestUtils.enqueuePage; -import static io.prestosql.execution.buffer.BufferTestUtils.getBufferResult; -import static io.prestosql.execution.buffer.BufferTestUtils.getFuture; -import static io.prestosql.execution.buffer.BufferTestUtils.serializePage; -import static io.prestosql.execution.buffer.BufferTestUtils.sizeOfPages; -import static io.prestosql.execution.buffer.OutputBuffers.BROADCAST_PARTITION_ID; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.BROADCAST; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.memory.context.AggregatedMemoryContext.newRootAggregatedMemoryContext; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.execution.buffer.BufferResult.emptyResults; +import static io.trino.execution.buffer.BufferState.OPEN; +import static io.trino.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; +import static io.trino.execution.buffer.BufferTestUtils.MAX_WAIT; +import static io.trino.execution.buffer.BufferTestUtils.NO_WAIT; +import static io.trino.execution.buffer.BufferTestUtils.acknowledgeBufferResult; +import static io.trino.execution.buffer.BufferTestUtils.addPage; +import static io.trino.execution.buffer.BufferTestUtils.assertBufferResultEquals; +import static io.trino.execution.buffer.BufferTestUtils.assertFinished; +import static io.trino.execution.buffer.BufferTestUtils.assertFutureIsDone; +import static io.trino.execution.buffer.BufferTestUtils.assertQueueClosed; +import static io.trino.execution.buffer.BufferTestUtils.assertQueueState; +import static io.trino.execution.buffer.BufferTestUtils.createBufferResult; +import static io.trino.execution.buffer.BufferTestUtils.createPage; +import static io.trino.execution.buffer.BufferTestUtils.enqueuePage; +import static io.trino.execution.buffer.BufferTestUtils.getBufferResult; +import static io.trino.execution.buffer.BufferTestUtils.getFuture; +import static io.trino.execution.buffer.BufferTestUtils.serializePage; +import static io.trino.execution.buffer.BufferTestUtils.sizeOfPages; +import static io.trino.execution.buffer.OutputBuffers.BROADCAST_PARTITION_ID; +import static io.trino.execution.buffer.OutputBuffers.BufferType.BROADCAST; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.memory.context.AggregatedMemoryContext.newRootAggregatedMemoryContext; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/execution/buffer/TestClientBuffer.java b/core/trino-main/src/test/java/io/trino/execution/buffer/TestClientBuffer.java index 6d6c28da005b..f083d6c4ef15 100644 --- a/core/trino-main/src/test/java/io/trino/execution/buffer/TestClientBuffer.java +++ b/core/trino-main/src/test/java/io/trino/execution/buffer/TestClientBuffer.java @@ -17,11 +17,11 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.buffer.ClientBuffer.PagesSupplier; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.execution.buffer.SerializedPageReference.PagesReleasedListener; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.BigintType; +import io.trino.execution.buffer.ClientBuffer.PagesSupplier; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.SerializedPageReference.PagesReleasedListener; +import io.trino.spi.Page; +import io.trino.spi.type.BigintType; import org.testng.annotations.Test; import javax.annotation.concurrent.GuardedBy; @@ -35,16 +35,16 @@ import java.util.concurrent.atomic.AtomicInteger; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.execution.buffer.BufferResult.emptyResults; -import static io.prestosql.execution.buffer.BufferTestUtils.NO_WAIT; -import static io.prestosql.execution.buffer.BufferTestUtils.assertBufferResultEquals; -import static io.prestosql.execution.buffer.BufferTestUtils.createBufferResult; -import static io.prestosql.execution.buffer.BufferTestUtils.createPage; -import static io.prestosql.execution.buffer.BufferTestUtils.getFuture; -import static io.prestosql.execution.buffer.BufferTestUtils.serializePage; -import static io.prestosql.execution.buffer.BufferTestUtils.sizeOfPages; -import static io.prestosql.execution.buffer.SerializedPageReference.dereferencePages; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.execution.buffer.BufferResult.emptyResults; +import static io.trino.execution.buffer.BufferTestUtils.NO_WAIT; +import static io.trino.execution.buffer.BufferTestUtils.assertBufferResultEquals; +import static io.trino.execution.buffer.BufferTestUtils.createBufferResult; +import static io.trino.execution.buffer.BufferTestUtils.createPage; +import static io.trino.execution.buffer.BufferTestUtils.getFuture; +import static io.trino.execution.buffer.BufferTestUtils.serializePage; +import static io.trino.execution.buffer.BufferTestUtils.sizeOfPages; +import static io.trino.execution.buffer.SerializedPageReference.dereferencePages; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/execution/buffer/TestPageCodecMarker.java b/core/trino-main/src/test/java/io/trino/execution/buffer/TestPageCodecMarker.java index be2c55400218..126e0d4bb247 100644 --- a/core/trino-main/src/test/java/io/trino/execution/buffer/TestPageCodecMarker.java +++ b/core/trino-main/src/test/java/io/trino/execution/buffer/TestPageCodecMarker.java @@ -15,8 +15,8 @@ import org.testng.annotations.Test; -import static io.prestosql.execution.buffer.PageCodecMarker.COMPRESSED; -import static io.prestosql.execution.buffer.PageCodecMarker.ENCRYPTED; +import static io.trino.execution.buffer.PageCodecMarker.COMPRESSED; +import static io.trino.execution.buffer.PageCodecMarker.ENCRYPTED; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/execution/buffer/TestPagesSerde.java b/core/trino-main/src/test/java/io/trino/execution/buffer/TestPagesSerde.java index f68a1f435afb..5b1694872f71 100644 --- a/core/trino-main/src/test/java/io/trino/execution/buffer/TestPagesSerde.java +++ b/core/trino-main/src/test/java/io/trino/execution/buffer/TestPagesSerde.java @@ -16,20 +16,20 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.Iterator; import java.util.List; -import static io.prestosql.execution.buffer.PagesSerdeUtil.readPages; -import static io.prestosql.execution.buffer.PagesSerdeUtil.writePages; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.execution.buffer.PagesSerdeUtil.readPages; +import static io.trino.execution.buffer.PagesSerdeUtil.writePages; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.fail; diff --git a/core/trino-main/src/test/java/io/trino/execution/buffer/TestPartitionedOutputBuffer.java b/core/trino-main/src/test/java/io/trino/execution/buffer/TestPartitionedOutputBuffer.java index 6ea5c7c4ee5a..236315ada898 100644 --- a/core/trino-main/src/test/java/io/trino/execution/buffer/TestPartitionedOutputBuffer.java +++ b/core/trino-main/src/test/java/io/trino/execution/buffer/TestPartitionedOutputBuffer.java @@ -16,11 +16,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.execution.StateMachine; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.memory.context.SimpleLocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.BigintType; +import io.trino.execution.StateMachine; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.memory.context.SimpleLocalMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.type.BigintType; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -30,29 +30,29 @@ import java.util.concurrent.ScheduledExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.execution.buffer.BufferResult.emptyResults; -import static io.prestosql.execution.buffer.BufferState.OPEN; -import static io.prestosql.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; -import static io.prestosql.execution.buffer.BufferTestUtils.MAX_WAIT; -import static io.prestosql.execution.buffer.BufferTestUtils.NO_WAIT; -import static io.prestosql.execution.buffer.BufferTestUtils.acknowledgeBufferResult; -import static io.prestosql.execution.buffer.BufferTestUtils.addPage; -import static io.prestosql.execution.buffer.BufferTestUtils.assertBufferResultEquals; -import static io.prestosql.execution.buffer.BufferTestUtils.assertFinished; -import static io.prestosql.execution.buffer.BufferTestUtils.assertFutureIsDone; -import static io.prestosql.execution.buffer.BufferTestUtils.assertQueueClosed; -import static io.prestosql.execution.buffer.BufferTestUtils.assertQueueState; -import static io.prestosql.execution.buffer.BufferTestUtils.createBufferResult; -import static io.prestosql.execution.buffer.BufferTestUtils.createPage; -import static io.prestosql.execution.buffer.BufferTestUtils.enqueuePage; -import static io.prestosql.execution.buffer.BufferTestUtils.getBufferResult; -import static io.prestosql.execution.buffer.BufferTestUtils.getFuture; -import static io.prestosql.execution.buffer.BufferTestUtils.serializePage; -import static io.prestosql.execution.buffer.BufferTestUtils.sizeOfPages; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.PARTITIONED; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.execution.buffer.BufferResult.emptyResults; +import static io.trino.execution.buffer.BufferState.OPEN; +import static io.trino.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; +import static io.trino.execution.buffer.BufferTestUtils.MAX_WAIT; +import static io.trino.execution.buffer.BufferTestUtils.NO_WAIT; +import static io.trino.execution.buffer.BufferTestUtils.acknowledgeBufferResult; +import static io.trino.execution.buffer.BufferTestUtils.addPage; +import static io.trino.execution.buffer.BufferTestUtils.assertBufferResultEquals; +import static io.trino.execution.buffer.BufferTestUtils.assertFinished; +import static io.trino.execution.buffer.BufferTestUtils.assertFutureIsDone; +import static io.trino.execution.buffer.BufferTestUtils.assertQueueClosed; +import static io.trino.execution.buffer.BufferTestUtils.assertQueueState; +import static io.trino.execution.buffer.BufferTestUtils.createBufferResult; +import static io.trino.execution.buffer.BufferTestUtils.createPage; +import static io.trino.execution.buffer.BufferTestUtils.enqueuePage; +import static io.trino.execution.buffer.BufferTestUtils.getBufferResult; +import static io.trino.execution.buffer.BufferTestUtils.getFuture; +import static io.trino.execution.buffer.BufferTestUtils.serializePage; +import static io.trino.execution.buffer.BufferTestUtils.sizeOfPages; +import static io.trino.execution.buffer.OutputBuffers.BufferType.PARTITIONED; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/execution/buffer/TestingPagesSerdeFactory.java b/core/trino-main/src/test/java/io/trino/execution/buffer/TestingPagesSerdeFactory.java index de9cc842f9f5..f5de8b61b5b3 100644 --- a/core/trino-main/src/test/java/io/trino/execution/buffer/TestingPagesSerdeFactory.java +++ b/core/trino-main/src/test/java/io/trino/execution/buffer/TestingPagesSerdeFactory.java @@ -17,13 +17,13 @@ import io.airlift.compress.Decompressor; import io.airlift.compress.lz4.Lz4Compressor; import io.airlift.compress.lz4.Lz4Decompressor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spiller.SpillCipher; +import io.trino.spi.Page; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spiller.SpillCipher; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; public class TestingPagesSerdeFactory extends PagesSerdeFactory diff --git a/core/trino-main/src/test/java/io/trino/execution/executor/SimulationController.java b/core/trino-main/src/test/java/io/trino/execution/executor/SimulationController.java index 1d156de277e5..a78414d63a61 100644 --- a/core/trino-main/src/test/java/io/trino/execution/executor/SimulationController.java +++ b/core/trino-main/src/test/java/io/trino/execution/executor/SimulationController.java @@ -16,10 +16,10 @@ import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; import com.google.common.collect.Multimaps; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.executor.SimulationTask.IntermediateTask; -import io.prestosql.execution.executor.SimulationTask.LeafTask; -import io.prestosql.execution.executor.SplitGenerators.SplitGenerator; +import io.trino.execution.TaskId; +import io.trino.execution.executor.SimulationTask.IntermediateTask; +import io.trino.execution.executor.SimulationTask.LeafTask; +import io.trino.execution.executor.SplitGenerators.SplitGenerator; import java.util.Map; import java.util.OptionalInt; @@ -28,7 +28,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.BiConsumer; -import static io.prestosql.execution.executor.SimulationController.TaskSpecification.Type.LEAF; +import static io.trino.execution.executor.SimulationController.TaskSpecification.Type.LEAF; import static java.util.concurrent.Executors.newSingleThreadExecutor; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/test/java/io/trino/execution/executor/SimulationSplit.java b/core/trino-main/src/test/java/io/trino/execution/executor/SimulationSplit.java index 7e9612941680..84a4416ad5db 100644 --- a/core/trino-main/src/test/java/io/trino/execution/executor/SimulationSplit.java +++ b/core/trino-main/src/test/java/io/trino/execution/executor/SimulationSplit.java @@ -16,7 +16,7 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import io.airlift.units.Duration; -import io.prestosql.execution.SplitRunner; +import io.trino.execution.SplitRunner; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.ScheduledExecutorService; @@ -26,7 +26,7 @@ import static com.google.common.util.concurrent.Futures.immediateFuture; import static io.airlift.units.Duration.succinctNanos; -import static io.prestosql.operator.Operator.NOT_BLOCKED; +import static io.trino.operator.Operator.NOT_BLOCKED; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/test/java/io/trino/execution/executor/SimulationTask.java b/core/trino-main/src/test/java/io/trino/execution/executor/SimulationTask.java index 2d0f46844c13..58a3a640283a 100644 --- a/core/trino-main/src/test/java/io/trino/execution/executor/SimulationTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/executor/SimulationTask.java @@ -16,8 +16,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Sets; import io.airlift.units.Duration; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.executor.SimulationController.TaskSpecification; +import io.trino.execution.TaskId; +import io.trino.execution.executor.SimulationController.TaskSpecification; import java.util.OptionalInt; import java.util.Set; diff --git a/core/trino-main/src/test/java/io/trino/execution/executor/SplitGenerators.java b/core/trino-main/src/test/java/io/trino/execution/executor/SplitGenerators.java index f968c2e56c1b..9a4aebdd0895 100644 --- a/core/trino-main/src/test/java/io/trino/execution/executor/SplitGenerators.java +++ b/core/trino-main/src/test/java/io/trino/execution/executor/SplitGenerators.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.Duration; -import io.prestosql.execution.executor.SplitSpecification.IntermediateSplitSpecification; -import io.prestosql.execution.executor.SplitSpecification.LeafSplitSpecification; +import io.trino.execution.executor.SplitSpecification.IntermediateSplitSpecification; +import io.trino.execution.executor.SplitSpecification.LeafSplitSpecification; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.execution.executor.Histogram.fromContinuous; +import static io.trino.execution.executor.Histogram.fromContinuous; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.MICROSECONDS; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/test/java/io/trino/execution/executor/SplitSpecification.java b/core/trino-main/src/test/java/io/trino/execution/executor/SplitSpecification.java index c0343776ca01..f998ea8f7a7c 100644 --- a/core/trino-main/src/test/java/io/trino/execution/executor/SplitSpecification.java +++ b/core/trino-main/src/test/java/io/trino/execution/executor/SplitSpecification.java @@ -13,8 +13,8 @@ */ package io.trino.execution.executor; -import io.prestosql.execution.executor.SimulationSplit.IntermediateSplit; -import io.prestosql.execution.executor.SimulationSplit.LeafSplit; +import io.trino.execution.executor.SimulationSplit.IntermediateSplit; +import io.trino.execution.executor.SimulationSplit.LeafSplit; import java.util.concurrent.ScheduledExecutorService; diff --git a/core/trino-main/src/test/java/io/trino/execution/executor/TaskExecutorSimulator.java b/core/trino-main/src/test/java/io/trino/execution/executor/TaskExecutorSimulator.java index ddb9eb1d8278..ccf334cdb6fc 100644 --- a/core/trino-main/src/test/java/io/trino/execution/executor/TaskExecutorSimulator.java +++ b/core/trino-main/src/test/java/io/trino/execution/executor/TaskExecutorSimulator.java @@ -19,14 +19,14 @@ import com.google.common.collect.ListMultimap; import com.google.common.util.concurrent.ListeningExecutorService; import io.airlift.units.Duration; -import io.prestosql.execution.executor.SimulationController.TaskSpecification; -import io.prestosql.execution.executor.SplitGenerators.AggregatedLeafSplitGenerator; -import io.prestosql.execution.executor.SplitGenerators.FastLeafSplitGenerator; -import io.prestosql.execution.executor.SplitGenerators.IntermediateSplitGenerator; -import io.prestosql.execution.executor.SplitGenerators.L4LeafSplitGenerator; -import io.prestosql.execution.executor.SplitGenerators.QuantaExceedingSplitGenerator; -import io.prestosql.execution.executor.SplitGenerators.SimpleLeafSplitGenerator; -import io.prestosql.execution.executor.SplitGenerators.SlowLeafSplitGenerator; +import io.trino.execution.executor.SimulationController.TaskSpecification; +import io.trino.execution.executor.SplitGenerators.AggregatedLeafSplitGenerator; +import io.trino.execution.executor.SplitGenerators.FastLeafSplitGenerator; +import io.trino.execution.executor.SplitGenerators.IntermediateSplitGenerator; +import io.trino.execution.executor.SplitGenerators.L4LeafSplitGenerator; +import io.trino.execution.executor.SplitGenerators.QuantaExceedingSplitGenerator; +import io.trino.execution.executor.SplitGenerators.SimpleLeafSplitGenerator; +import io.trino.execution.executor.SplitGenerators.SlowLeafSplitGenerator; import org.joda.time.DateTime; import java.io.Closeable; @@ -42,10 +42,10 @@ import static io.airlift.concurrent.Threads.threadsNamed; import static io.airlift.units.Duration.nanosSince; import static io.airlift.units.Duration.succinctNanos; -import static io.prestosql.execution.executor.Histogram.fromContinuous; -import static io.prestosql.execution.executor.Histogram.fromDiscrete; -import static io.prestosql.execution.executor.SimulationController.TaskSpecification.Type.INTERMEDIATE; -import static io.prestosql.execution.executor.SimulationController.TaskSpecification.Type.LEAF; +import static io.trino.execution.executor.Histogram.fromContinuous; +import static io.trino.execution.executor.Histogram.fromDiscrete; +import static io.trino.execution.executor.SimulationController.TaskSpecification.Type.INTERMEDIATE; +import static io.trino.execution.executor.SimulationController.TaskSpecification.Type.LEAF; import static java.lang.String.format; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/execution/executor/TestTaskExecutor.java b/core/trino-main/src/test/java/io/trino/execution/executor/TestTaskExecutor.java index 685f5bb9f30b..558905adf701 100644 --- a/core/trino-main/src/test/java/io/trino/execution/executor/TestTaskExecutor.java +++ b/core/trino-main/src/test/java/io/trino/execution/executor/TestTaskExecutor.java @@ -19,8 +19,8 @@ import com.google.common.util.concurrent.SettableFuture; import io.airlift.testing.TestingTicker; import io.airlift.units.Duration; -import io.prestosql.execution.SplitRunner; -import io.prestosql.execution.TaskId; +import io.trino.execution.SplitRunner; +import io.trino.execution.TaskId; import org.testng.annotations.Test; import java.util.Arrays; @@ -34,8 +34,8 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static io.airlift.testing.Assertions.assertGreaterThan; import static io.airlift.testing.Assertions.assertLessThan; -import static io.prestosql.execution.executor.MultilevelSplitQueue.LEVEL_CONTRIBUTION_CAP; -import static io.prestosql.execution.executor.MultilevelSplitQueue.LEVEL_THRESHOLD_SECONDS; +import static io.trino.execution.executor.MultilevelSplitQueue.LEVEL_CONTRIBUTION_CAP; +import static io.trino.execution.executor.MultilevelSplitQueue.LEVEL_THRESHOLD_SECONDS; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/trino-main/src/test/java/io/trino/execution/resourcegroups/BenchmarkResourceGroup.java b/core/trino-main/src/test/java/io/trino/execution/resourcegroups/BenchmarkResourceGroup.java index 1b0a19448e5d..e22f19329f38 100644 --- a/core/trino-main/src/test/java/io/trino/execution/resourcegroups/BenchmarkResourceGroup.java +++ b/core/trino-main/src/test/java/io/trino/execution/resourcegroups/BenchmarkResourceGroup.java @@ -14,8 +14,8 @@ package io.trino.execution.resourcegroups; import io.airlift.units.DataSize; -import io.prestosql.execution.MockManagedQueryExecution; -import io.prestosql.execution.MockManagedQueryExecution.MockManagedQueryExecutionBuilder; +import io.trino.execution.MockManagedQueryExecution; +import io.trino.execution.MockManagedQueryExecution.MockManagedQueryExecutionBuilder; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; diff --git a/core/trino-main/src/test/java/io/trino/execution/resourcegroups/TestResourceGroups.java b/core/trino-main/src/test/java/io/trino/execution/resourcegroups/TestResourceGroups.java index 009c34044054..ced0c990eac0 100644 --- a/core/trino-main/src/test/java/io/trino/execution/resourcegroups/TestResourceGroups.java +++ b/core/trino-main/src/test/java/io/trino/execution/resourcegroups/TestResourceGroups.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; -import io.prestosql.execution.MockManagedQueryExecution; -import io.prestosql.execution.MockManagedQueryExecution.MockManagedQueryExecutionBuilder; -import io.prestosql.server.QueryStateInfo; -import io.prestosql.server.ResourceGroupInfo; +import io.trino.execution.MockManagedQueryExecution; +import io.trino.execution.MockManagedQueryExecution.MockManagedQueryExecutionBuilder; +import io.trino.server.QueryStateInfo; +import io.trino.server.ResourceGroupInfo; import org.apache.commons.math3.distribution.BinomialDistribution; import org.testng.annotations.Test; @@ -41,15 +41,15 @@ import static io.airlift.testing.Assertions.assertLessThan; import static io.airlift.units.DataSize.Unit.GIGABYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.spi.resourcegroups.ResourceGroupState.CAN_QUEUE; -import static io.prestosql.spi.resourcegroups.ResourceGroupState.CAN_RUN; -import static io.prestosql.spi.resourcegroups.SchedulingPolicy.FAIR; -import static io.prestosql.spi.resourcegroups.SchedulingPolicy.QUERY_PRIORITY; -import static io.prestosql.spi.resourcegroups.SchedulingPolicy.WEIGHTED; -import static io.prestosql.spi.resourcegroups.SchedulingPolicy.WEIGHTED_FAIR; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.spi.resourcegroups.ResourceGroupState.CAN_QUEUE; +import static io.trino.spi.resourcegroups.ResourceGroupState.CAN_RUN; +import static io.trino.spi.resourcegroups.SchedulingPolicy.FAIR; +import static io.trino.spi.resourcegroups.SchedulingPolicy.QUERY_PRIORITY; +import static io.trino.spi.resourcegroups.SchedulingPolicy.WEIGHTED; +import static io.trino.spi.resourcegroups.SchedulingPolicy.WEIGHTED_FAIR; import static java.util.Collections.reverse; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/execution/resourcegroups/TestUpdateablePriorityQueue.java b/core/trino-main/src/test/java/io/trino/execution/resourcegroups/TestUpdateablePriorityQueue.java index aa9d90ba1567..49d7eb71a5e5 100644 --- a/core/trino-main/src/test/java/io/trino/execution/resourcegroups/TestUpdateablePriorityQueue.java +++ b/core/trino-main/src/test/java/io/trino/execution/resourcegroups/TestUpdateablePriorityQueue.java @@ -18,7 +18,7 @@ import java.util.List; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.testing.assertions.Assert.assertEquals; import static org.testng.Assert.assertTrue; public class TestUpdateablePriorityQueue diff --git a/core/trino-main/src/test/java/io/trino/execution/resourcegroups/TestWeightedFairQueue.java b/core/trino-main/src/test/java/io/trino/execution/resourcegroups/TestWeightedFairQueue.java index c4c144a08724..34bb932a9bf3 100644 --- a/core/trino-main/src/test/java/io/trino/execution/resourcegroups/TestWeightedFairQueue.java +++ b/core/trino-main/src/test/java/io/trino/execution/resourcegroups/TestWeightedFairQueue.java @@ -13,7 +13,7 @@ */ package io.trino.execution.resourcegroups; -import io.prestosql.execution.resourcegroups.WeightedFairQueue.Usage; +import io.trino.execution.resourcegroups.WeightedFairQueue.Usage; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestBroadcastOutputBufferManager.java b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestBroadcastOutputBufferManager.java index 7268c0218b47..e951a17a3f7e 100644 --- a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestBroadcastOutputBufferManager.java +++ b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestBroadcastOutputBufferManager.java @@ -14,15 +14,15 @@ package io.trino.execution.scheduler; import com.google.common.collect.ImmutableList; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; import org.testng.annotations.Test; import java.util.concurrent.atomic.AtomicReference; -import static io.prestosql.execution.buffer.OutputBuffers.BROADCAST_PARTITION_ID; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.BROADCAST; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.execution.buffer.OutputBuffers.BROADCAST_PARTITION_ID; +import static io.trino.execution.buffer.OutputBuffers.BufferType.BROADCAST; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; import static org.testng.Assert.assertEquals; public class TestBroadcastOutputBufferManager diff --git a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestFileBasedNetworkTopology.java b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestFileBasedNetworkTopology.java index 9b4349639b9d..bb1b388f4258 100644 --- a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestFileBasedNetworkTopology.java +++ b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestFileBasedNetworkTopology.java @@ -18,7 +18,7 @@ import io.airlift.testing.TempFile; import io.airlift.testing.TestingTicker; import io.airlift.units.Duration; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestFixedCountScheduler.java b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestFixedCountScheduler.java index d99140f71f04..a731e06274d9 100644 --- a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestFixedCountScheduler.java +++ b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestFixedCountScheduler.java @@ -14,12 +14,12 @@ package io.trino.execution.scheduler; import com.google.common.collect.ImmutableList; -import io.prestosql.client.NodeVersion; -import io.prestosql.execution.MockRemoteTaskFactory; -import io.prestosql.execution.NodeTaskMap.PartitionedSplitCountTracker; -import io.prestosql.execution.RemoteTask; -import io.prestosql.execution.TaskId; -import io.prestosql.metadata.InternalNode; +import io.trino.client.NodeVersion; +import io.trino.execution.MockRemoteTaskFactory; +import io.trino.execution.NodeTaskMap.PartitionedSplitCountTracker; +import io.trino.execution.RemoteTask; +import io.trino.execution.TaskId; +import io.trino.metadata.InternalNode; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestPartitionedOutputBufferManager.java b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestPartitionedOutputBufferManager.java index 098dfddd264a..fe4033678149 100644 --- a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestPartitionedOutputBufferManager.java +++ b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestPartitionedOutputBufferManager.java @@ -14,14 +14,14 @@ package io.trino.execution.scheduler; import com.google.common.collect.ImmutableList; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; import org.testng.annotations.Test; import java.util.Map; import java.util.concurrent.atomic.AtomicReference; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestPhasedExecutionSchedule.java b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestPhasedExecutionSchedule.java index 9a8e58d6db76..19e3d570a356 100644 --- a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestPhasedExecutionSchedule.java +++ b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestPhasedExecutionSchedule.java @@ -17,20 +17,20 @@ import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.testing.TestingMetadata.TestingColumnHandle; +import io.trino.cost.StatsAndCosts; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.testing.TestingMetadata.TestingColumnHandle; import org.testng.annotations.Test; import java.util.List; @@ -39,16 +39,16 @@ import java.util.stream.Stream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.operator.StageExecutionDescriptor.ungroupedExecution; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPLICATE; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.REPLICATED; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; -import static io.prestosql.testing.TestingHandles.TEST_TABLE_HANDLE; +import static io.trino.operator.StageExecutionDescriptor.ungroupedExecution; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPLICATE; +import static io.trino.sql.planner.plan.JoinNode.DistributionType.REPLICATED; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.testing.TestingHandles.TEST_TABLE_HANDLE; import static org.testng.Assert.assertEquals; public class TestPhasedExecutionSchedule diff --git a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestSourcePartitionedScheduler.java b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestSourcePartitionedScheduler.java index 041b26ab2517..2c8c8f40a573 100644 --- a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestSourcePartitionedScheduler.java +++ b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestSourcePartitionedScheduler.java @@ -18,52 +18,52 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import io.airlift.units.Duration; -import io.prestosql.client.NodeVersion; -import io.prestosql.connector.CatalogName; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.execution.DynamicFilterConfig; -import io.prestosql.execution.MockRemoteTaskFactory; -import io.prestosql.execution.MockRemoteTaskFactory.MockRemoteTask; -import io.prestosql.execution.NodeTaskMap; -import io.prestosql.execution.RemoteTask; -import io.prestosql.execution.SqlStageExecution; -import io.prestosql.execution.StageId; -import io.prestosql.execution.TableInfo; -import io.prestosql.execution.buffer.OutputBuffers.OutputBufferId; -import io.prestosql.failuredetector.NoOpFailureDetector; -import io.prestosql.metadata.InMemoryNodeManager; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.server.DynamicFilterService; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.split.ConnectorAwareSplitSource; -import io.prestosql.split.SplitSource; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.StageExecutionPlan; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.testing.TestingMetadata.TestingColumnHandle; -import io.prestosql.testing.TestingSplit; -import io.prestosql.util.FinalizerService; +import io.trino.client.NodeVersion; +import io.trino.connector.CatalogName; +import io.trino.cost.StatsAndCosts; +import io.trino.execution.DynamicFilterConfig; +import io.trino.execution.MockRemoteTaskFactory; +import io.trino.execution.MockRemoteTaskFactory.MockRemoteTask; +import io.trino.execution.NodeTaskMap; +import io.trino.execution.RemoteTask; +import io.trino.execution.SqlStageExecution; +import io.trino.execution.StageId; +import io.trino.execution.TableInfo; +import io.trino.execution.buffer.OutputBuffers.OutputBufferId; +import io.trino.failuredetector.NoOpFailureDetector; +import io.trino.metadata.InMemoryNodeManager; +import io.trino.metadata.InternalNode; +import io.trino.metadata.InternalNodeManager; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.server.DynamicFilterService; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeOperators; +import io.trino.split.ConnectorAwareSplitSource; +import io.trino.split.SplitSource; +import io.trino.sql.DynamicFilters; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.StageExecutionPlan; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.testing.TestingMetadata.TestingColumnHandle; +import io.trino.testing.TestingSplit; +import io.trino.util.FinalizerService; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -80,24 +80,24 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.PARTITIONED; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.execution.scheduler.ScheduleResult.BlockedReason.SPLIT_QUEUES_FULL; -import static io.prestosql.execution.scheduler.SourcePartitionedScheduler.newSourcePartitionedSchedulerAsStageScheduler; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.StageExecutionDescriptor.ungroupedExecution; -import static io.prestosql.spi.StandardErrorCode.NO_NODES_AVAILABLE; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.DynamicFilters.createDynamicFilterExpression; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPLICATE; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.testing.TestingHandles.TEST_TABLE_HANDLE; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.buffer.OutputBuffers.BufferType.PARTITIONED; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.execution.scheduler.ScheduleResult.BlockedReason.SPLIT_QUEUES_FULL; +import static io.trino.execution.scheduler.SourcePartitionedScheduler.newSourcePartitionedSchedulerAsStageScheduler; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.StageExecutionDescriptor.ungroupedExecution; +import static io.trino.spi.StandardErrorCode.NO_NODES_AVAILABLE; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.DynamicFilters.createDynamicFilterExpression; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPLICATE; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.testing.TestingHandles.TEST_TABLE_HANDLE; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static java.lang.Integer.min; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestSubnetTopology.java b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestSubnetTopology.java index f6b4c2a3cfee..89c99b4bc4e2 100644 --- a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestSubnetTopology.java +++ b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestSubnetTopology.java @@ -14,12 +14,12 @@ package io.trino.execution.scheduler; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import org.testng.annotations.Test; -import static io.prestosql.execution.scheduler.NetworkLocation.ROOT_LOCATION; -import static io.prestosql.execution.scheduler.SubnetBasedTopology.AddressProtocol.IPv4; -import static io.prestosql.execution.scheduler.SubnetBasedTopology.AddressProtocol.IPv6; +import static io.trino.execution.scheduler.NetworkLocation.ROOT_LOCATION; +import static io.trino.execution.scheduler.SubnetBasedTopology.AddressProtocol.IPv4; +import static io.trino.execution.scheduler.SubnetBasedTopology.AddressProtocol.IPv6; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestSubnetTopologyConfig.java b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestSubnetTopologyConfig.java index c074a69fd98c..89477c5b84a5 100644 --- a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestSubnetTopologyConfig.java +++ b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestSubnetTopologyConfig.java @@ -20,8 +20,8 @@ import java.io.IOException; import java.util.Map; -import static io.prestosql.execution.scheduler.SubnetBasedTopology.AddressProtocol.IPv4; -import static io.prestosql.execution.scheduler.SubnetBasedTopology.AddressProtocol.IPv6; +import static io.trino.execution.scheduler.SubnetBasedTopology.AddressProtocol.IPv4; +import static io.trino.execution.scheduler.SubnetBasedTopology.AddressProtocol.IPv6; public class TestSubnetTopologyConfig { diff --git a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestTopologyAwareNodeSelectorConfig.java b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestTopologyAwareNodeSelectorConfig.java index a21061adca71..b487d8dcfd68 100644 --- a/core/trino-main/src/test/java/io/trino/execution/scheduler/TestTopologyAwareNodeSelectorConfig.java +++ b/core/trino-main/src/test/java/io/trino/execution/scheduler/TestTopologyAwareNodeSelectorConfig.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.configuration.testing.ConfigAssertions; -import io.prestosql.execution.scheduler.TopologyAwareNodeSelectorConfig.TopologyType; +import io.trino.execution.scheduler.TopologyAwareNodeSelectorConfig.TopologyType; import org.testng.annotations.Test; import java.util.Map; diff --git a/core/trino-main/src/test/java/io/trino/execution/warnings/TestDefaultWarningCollector.java b/core/trino-main/src/test/java/io/trino/execution/warnings/TestDefaultWarningCollector.java index ebf897c286c2..0f0b84760654 100644 --- a/core/trino-main/src/test/java/io/trino/execution/warnings/TestDefaultWarningCollector.java +++ b/core/trino-main/src/test/java/io/trino/execution/warnings/TestDefaultWarningCollector.java @@ -13,8 +13,8 @@ */ package io.trino.execution.warnings; -import io.prestosql.spi.PrestoWarning; -import io.prestosql.spi.WarningCode; +import io.trino.spi.PrestoWarning; +import io.trino.spi.WarningCode; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/execution/warnings/TestTestingWarningCollector.java b/core/trino-main/src/test/java/io/trino/execution/warnings/TestTestingWarningCollector.java index 684f2b0356e3..fce958d4307f 100644 --- a/core/trino-main/src/test/java/io/trino/execution/warnings/TestTestingWarningCollector.java +++ b/core/trino-main/src/test/java/io/trino/execution/warnings/TestTestingWarningCollector.java @@ -14,12 +14,12 @@ package io.trino.execution.warnings; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoWarning; -import io.prestosql.testing.TestingWarningCollector; -import io.prestosql.testing.TestingWarningCollectorConfig; +import io.trino.spi.PrestoWarning; +import io.trino.testing.TestingWarningCollector; +import io.trino.testing.TestingWarningCollectorConfig; import org.testng.annotations.Test; -import static io.prestosql.testing.TestingWarningCollector.createTestWarning; +import static io.trino.testing.TestingWarningCollector.createTestWarning; import static org.testng.Assert.assertEquals; public class TestTestingWarningCollector diff --git a/core/trino-main/src/test/java/io/trino/failuredetector/TestHeartbeatFailureDetector.java b/core/trino-main/src/test/java/io/trino/failuredetector/TestHeartbeatFailureDetector.java index 206cda427c41..3b60531c216f 100644 --- a/core/trino-main/src/test/java/io/trino/failuredetector/TestHeartbeatFailureDetector.java +++ b/core/trino-main/src/test/java/io/trino/failuredetector/TestHeartbeatFailureDetector.java @@ -27,9 +27,9 @@ import io.airlift.json.ObjectMapperProvider; import io.airlift.node.testing.TestingNodeModule; import io.airlift.tracetoken.TraceTokenModule; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.failuredetector.HeartbeatFailureDetector.Stats; -import io.prestosql.server.InternalCommunicationConfig; +import io.trino.execution.QueryManagerConfig; +import io.trino.failuredetector.HeartbeatFailureDetector.Stats; +import io.trino.server.InternalCommunicationConfig; import org.testng.annotations.Test; import javax.ws.rs.GET; diff --git a/core/trino-main/src/test/java/io/trino/memory/LowMemoryKillerTestingUtils.java b/core/trino-main/src/test/java/io/trino/memory/LowMemoryKillerTestingUtils.java index 5586d11d9819..1024de36b0d5 100644 --- a/core/trino-main/src/test/java/io/trino/memory/LowMemoryKillerTestingUtils.java +++ b/core/trino-main/src/test/java/io/trino/memory/LowMemoryKillerTestingUtils.java @@ -17,19 +17,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.units.DataSize; -import io.prestosql.client.NodeVersion; -import io.prestosql.metadata.InternalNode; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.memory.MemoryPoolInfo; +import io.trino.client.NodeVersion; +import io.trino.metadata.InternalNode; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.memory.MemoryPoolInfo; import java.net.URI; import java.util.HashMap; import java.util.List; import java.util.Map; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; -import static io.prestosql.memory.LocalMemoryManager.RESERVED_POOL; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.memory.LocalMemoryManager.RESERVED_POOL; public final class LowMemoryKillerTestingUtils { diff --git a/core/trino-main/src/test/java/io/trino/memory/TestMemoryManagerConfig.java b/core/trino-main/src/test/java/io/trino/memory/TestMemoryManagerConfig.java index e13818c9d6c9..3ea46ac4346c 100644 --- a/core/trino-main/src/test/java/io/trino/memory/TestMemoryManagerConfig.java +++ b/core/trino-main/src/test/java/io/trino/memory/TestMemoryManagerConfig.java @@ -24,8 +24,8 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.memory.MemoryManagerConfig.LowMemoryKillerPolicy.NONE; -import static io.prestosql.memory.MemoryManagerConfig.LowMemoryKillerPolicy.TOTAL_RESERVATION_ON_BLOCKED_NODES; +import static io.trino.memory.MemoryManagerConfig.LowMemoryKillerPolicy.NONE; +import static io.trino.memory.MemoryManagerConfig.LowMemoryKillerPolicy.TOTAL_RESERVATION_ON_BLOCKED_NODES; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/trino-main/src/test/java/io/trino/memory/TestMemoryPools.java b/core/trino-main/src/test/java/io/trino/memory/TestMemoryPools.java index 73c88f769d60..da316777c2be 100644 --- a/core/trino-main/src/test/java/io/trino/memory/TestMemoryPools.java +++ b/core/trino-main/src/test/java/io/trino/memory/TestMemoryPools.java @@ -20,24 +20,24 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.execution.buffer.TestingPagesSerdeFactory; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.Driver; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OutputFactory; -import io.prestosql.operator.TableScanOperator; -import io.prestosql.operator.TaskContext; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spiller.SpillSpaceTracker; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.PageConsumerOperator.PageConsumerOutputFactory; +import io.trino.Session; +import io.trino.execution.buffer.TestingPagesSerdeFactory; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.Driver; +import io.trino.operator.DriverContext; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.OutputFactory; +import io.trino.operator.TableScanOperator; +import io.trino.operator.TaskContext; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.spi.Page; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spiller.SpillSpaceTracker; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.PageConsumerOperator.PageConsumerOutputFactory; import org.testng.annotations.AfterMethod; import org.testng.annotations.Test; @@ -51,8 +51,8 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.units.DataSize.Unit.GIGABYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/memory/TestMemoryTracking.java b/core/trino-main/src/test/java/io/trino/memory/TestMemoryTracking.java index 3d585b15ef52..f8df1f872f45 100644 --- a/core/trino-main/src/test/java/io/trino/memory/TestMemoryTracking.java +++ b/core/trino-main/src/test/java/io/trino/memory/TestMemoryTracking.java @@ -15,23 +15,23 @@ import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; -import io.prestosql.ExceededMemoryLimitException; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskStateMachine; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.DriverStats; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OperatorStats; -import io.prestosql.operator.PipelineContext; -import io.prestosql.operator.PipelineStats; -import io.prestosql.operator.TaskContext; -import io.prestosql.operator.TaskStats; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spiller.SpillSpaceTracker; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.ExceededMemoryLimitException; +import io.trino.execution.TaskId; +import io.trino.execution.TaskStateMachine; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.operator.DriverContext; +import io.trino.operator.DriverStats; +import io.trino.operator.OperatorContext; +import io.trino.operator.OperatorStats; +import io.trino.operator.PipelineContext; +import io.trino.operator.PipelineStats; +import io.trino.operator.TaskContext; +import io.trino.operator.TaskStats; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spiller.SpillSpaceTracker; +import io.trino.sql.planner.plan.PlanNodeId; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; @@ -43,7 +43,7 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/memory/TestNodeMemoryConfig.java b/core/trino-main/src/test/java/io/trino/memory/TestNodeMemoryConfig.java index 3c8db3d2453c..1ee999c20e73 100644 --- a/core/trino-main/src/test/java/io/trino/memory/TestNodeMemoryConfig.java +++ b/core/trino-main/src/test/java/io/trino/memory/TestNodeMemoryConfig.java @@ -23,7 +23,7 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.memory.NodeMemoryConfig.AVAILABLE_HEAP_MEMORY; +import static io.trino.memory.NodeMemoryConfig.AVAILABLE_HEAP_MEMORY; public class TestNodeMemoryConfig { diff --git a/core/trino-main/src/test/java/io/trino/memory/TestQueryContext.java b/core/trino-main/src/test/java/io/trino/memory/TestQueryContext.java index 853484ec6dd7..37788531c8ad 100644 --- a/core/trino-main/src/test/java/io/trino/memory/TestQueryContext.java +++ b/core/trino-main/src/test/java/io/trino/memory/TestQueryContext.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableMap; import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskStateMachine; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.TaskContext; -import io.prestosql.spi.QueryId; -import io.prestosql.spiller.SpillSpaceTracker; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.execution.TaskId; +import io.trino.execution.TaskStateMachine; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.DriverContext; +import io.trino.operator.OperatorContext; +import io.trino.operator.TaskContext; +import io.trino.spi.QueryId; +import io.trino.spiller.SpillSpaceTracker; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -35,9 +35,9 @@ import java.util.concurrent.ScheduledExecutorService; import static io.airlift.concurrent.Threads.threadsNamed; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; -import static io.prestosql.memory.LocalMemoryManager.RESERVED_POOL; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.memory.LocalMemoryManager.RESERVED_POOL; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/core/trino-main/src/test/java/io/trino/memory/TestSystemMemoryBlocking.java b/core/trino-main/src/test/java/io/trino/memory/TestSystemMemoryBlocking.java index 18a1d569f76a..f3ebc654d041 100644 --- a/core/trino-main/src/test/java/io/trino/memory/TestSystemMemoryBlocking.java +++ b/core/trino-main/src/test/java/io/trino/memory/TestSystemMemoryBlocking.java @@ -18,25 +18,25 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.ScheduledSplit; -import io.prestosql.execution.TaskSource; -import io.prestosql.metadata.Split; -import io.prestosql.operator.Driver; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.TableScanOperator; -import io.prestosql.operator.TaskContext; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.PageConsumerOperator; -import io.prestosql.testing.TestingTaskContext; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.execution.ScheduledSplit; +import io.trino.execution.TaskSource; +import io.trino.metadata.Split; +import io.trino.operator.Driver; +import io.trino.operator.DriverContext; +import io.trino.operator.TableScanOperator; +import io.trino.operator.TaskContext; +import io.trino.spi.HostAddress; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; +import io.trino.testing.PageConsumerOperator; +import io.trino.testing.TestingTaskContext; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -47,10 +47,10 @@ import java.util.function.Function; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.TestingHandles.TEST_TABLE_HANDLE; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.TestingHandles.TEST_TABLE_HANDLE; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/core/trino-main/src/test/java/io/trino/memory/TestTotalReservationLowMemoryKiller.java b/core/trino-main/src/test/java/io/trino/memory/TestTotalReservationLowMemoryKiller.java index 9566294cb5a5..b8f24529392f 100644 --- a/core/trino-main/src/test/java/io/trino/memory/TestTotalReservationLowMemoryKiller.java +++ b/core/trino-main/src/test/java/io/trino/memory/TestTotalReservationLowMemoryKiller.java @@ -15,15 +15,15 @@ package io.trino.memory; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.QueryId; +import io.trino.spi.QueryId; import org.testng.annotations.Test; import java.util.Map; import java.util.Optional; -import static io.prestosql.memory.LowMemoryKillerTestingUtils.toNodeMemoryInfoList; -import static io.prestosql.memory.LowMemoryKillerTestingUtils.toQueryMemoryInfoList; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.memory.LowMemoryKillerTestingUtils.toNodeMemoryInfoList; +import static io.trino.memory.LowMemoryKillerTestingUtils.toQueryMemoryInfoList; +import static io.trino.testing.assertions.Assert.assertEquals; @Test public class TestTotalReservationLowMemoryKiller diff --git a/core/trino-main/src/test/java/io/trino/memory/TestTotalReservationOnBlockedNodesLowMemoryKiller.java b/core/trino-main/src/test/java/io/trino/memory/TestTotalReservationOnBlockedNodesLowMemoryKiller.java index e1fbecb5e069..dd32176dc13b 100644 --- a/core/trino-main/src/test/java/io/trino/memory/TestTotalReservationOnBlockedNodesLowMemoryKiller.java +++ b/core/trino-main/src/test/java/io/trino/memory/TestTotalReservationOnBlockedNodesLowMemoryKiller.java @@ -15,15 +15,15 @@ package io.trino.memory; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.QueryId; +import io.trino.spi.QueryId; import org.testng.annotations.Test; import java.util.Map; import java.util.Optional; -import static io.prestosql.memory.LowMemoryKillerTestingUtils.toNodeMemoryInfoList; -import static io.prestosql.memory.LowMemoryKillerTestingUtils.toQueryMemoryInfoList; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.memory.LowMemoryKillerTestingUtils.toNodeMemoryInfoList; +import static io.trino.memory.LowMemoryKillerTestingUtils.toQueryMemoryInfoList; +import static io.trino.testing.assertions.Assert.assertEquals; @Test public class TestTotalReservationOnBlockedNodesLowMemoryKiller diff --git a/core/trino-main/src/test/java/io/trino/metadata/AbstractMockMetadata.java b/core/trino-main/src/test/java/io/trino/metadata/AbstractMockMetadata.java index a5e4f3042143..1a9c642f6503 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/AbstractMockMetadata.java +++ b/core/trino-main/src/test/java/io/trino/metadata/AbstractMockMetadata.java @@ -18,52 +18,52 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.ResolvedFunction.ResolvedFunctionDecoder; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.window.WindowFunctionSupplier; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.AggregationApplicationResult; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorCapabilities; -import io.prestosql.spi.connector.ConnectorMaterializedViewDefinition; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.LimitApplicationResult; -import io.prestosql.spi.connector.MaterializedViewFreshness; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SampleType; -import io.prestosql.spi.connector.SortItem; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.connector.TopNApplicationResult; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.GrantInfo; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.statistics.TableStatisticsMetadata; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.analyzer.TypeSignatureProvider; -import io.prestosql.sql.planner.PartitioningHandle; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.ResolvedFunction.ResolvedFunctionDecoder; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.window.WindowFunctionSupplier; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.AggregationApplicationResult; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorCapabilities; +import io.trino.spi.connector.ConnectorMaterializedViewDefinition; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.LimitApplicationResult; +import io.trino.spi.connector.MaterializedViewFreshness; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SampleType; +import io.trino.spi.connector.SortItem; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.connector.TopNApplicationResult; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.OperatorType; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.GrantInfo; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.statistics.TableStatisticsMetadata; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.analyzer.TypeSignatureProvider; +import io.trino.sql.planner.PartitioningHandle; +import io.trino.sql.tree.QualifiedName; import java.util.Collection; import java.util.List; @@ -72,10 +72,10 @@ import java.util.OptionalLong; import java.util.Set; -import static io.prestosql.metadata.FunctionId.toFunctionId; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_NOT_FOUND; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.metadata.FunctionId.toFunctionId; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.spi.StandardErrorCode.FUNCTION_NOT_FOUND; +import static io.trino.spi.type.DoubleType.DOUBLE; public abstract class AbstractMockMetadata implements Metadata diff --git a/core/trino-main/src/test/java/io/trino/metadata/TestDiscoveryNodeManager.java b/core/trino-main/src/test/java/io/trino/metadata/TestDiscoveryNodeManager.java index 96d288abc7a6..9eaa76751309 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/TestDiscoveryNodeManager.java +++ b/core/trino-main/src/test/java/io/trino/metadata/TestDiscoveryNodeManager.java @@ -25,9 +25,9 @@ import io.airlift.http.client.testing.TestingResponse; import io.airlift.node.NodeConfig; import io.airlift.node.NodeInfo; -import io.prestosql.client.NodeVersion; -import io.prestosql.failuredetector.NoOpFailureDetector; -import io.prestosql.server.InternalCommunicationConfig; +import io.trino.client.NodeVersion; +import io.trino.failuredetector.NoOpFailureDetector; +import io.trino.server.InternalCommunicationConfig; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -44,8 +44,8 @@ import static io.airlift.discovery.client.ServiceSelectorConfig.DEFAULT_POOL; import static io.airlift.http.client.HttpStatus.OK; import static io.airlift.testing.Assertions.assertEqualsIgnoreOrder; -import static io.prestosql.metadata.NodeState.ACTIVE; -import static io.prestosql.metadata.NodeState.INACTIVE; +import static io.trino.metadata.NodeState.ACTIVE; +import static io.trino.metadata.NodeState.INACTIVE; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotSame; diff --git a/core/trino-main/src/test/java/io/trino/metadata/TestFunctionRegistry.java b/core/trino-main/src/test/java/io/trino/metadata/TestFunctionRegistry.java index a895602d2528..cbe0aaafb83c 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/TestFunctionRegistry.java +++ b/core/trino-main/src/test/java/io/trino/metadata/TestFunctionRegistry.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.operator.scalar.ChoicesScalarFunctionImplementation; -import io.prestosql.operator.scalar.CustomFunctions; -import io.prestosql.operator.scalar.ScalarFunctionImplementation; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.operator.scalar.ChoicesScalarFunctionImplementation; +import io.trino.operator.scalar.CustomFunctions; +import io.trino.operator.scalar.ScalarFunctionImplementation; +import io.trino.spi.function.OperatorType; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.lang.invoke.MethodHandles; @@ -35,19 +35,19 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.metadata.Signature.mangleOperatorName; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.metadata.Signature.unmangleOperator; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypeSignatures; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.Signature.mangleOperatorName; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.metadata.Signature.unmangleOperator; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypeSignatures; +import static io.trino.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.String.format; import static java.util.Collections.nCopies; import static java.util.stream.Collectors.toList; 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 8684a4042bab..da8b42a7e49e 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,42 +18,42 @@ import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.client.ClientCapabilities; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.connector.informationschema.InformationSchemaColumnHandle; -import io.prestosql.connector.informationschema.InformationSchemaMetadata; -import io.prestosql.connector.informationschema.InformationSchemaTableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.ConnectorViewDefinition.ViewColumn; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.testing.TestingConnectorContext; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionManager; +import io.trino.client.ClientCapabilities; +import io.trino.connector.CatalogName; +import io.trino.connector.MockConnectorFactory; +import io.trino.connector.informationschema.InformationSchemaColumnHandle; +import io.trino.connector.informationschema.InformationSchemaMetadata; +import io.trino.connector.informationschema.InformationSchemaTableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.ConnectorViewDefinition.ViewColumn; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.SchemaTableName; +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; import org.testng.annotations.Test; import java.util.Map; import java.util.Optional; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.connector.CatalogName.createInformationSchemaCatalogName; -import static io.prestosql.connector.CatalogName.createSystemTablesCatalogName; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.connector.CatalogName.createInformationSchemaCatalogName; +import static io.trino.connector.CatalogName.createSystemTablesCatalogName; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static java.util.Arrays.stream; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/metadata/TestInformationSchemaTableHandle.java b/core/trino-main/src/test/java/io/trino/metadata/TestInformationSchemaTableHandle.java index d612dbfbbf9c..83e6490a474a 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/TestInformationSchemaTableHandle.java +++ b/core/trino-main/src/test/java/io/trino/metadata/TestInformationSchemaTableHandle.java @@ -21,8 +21,8 @@ import com.google.inject.Guice; import com.google.inject.Injector; import io.airlift.json.JsonModule; -import io.prestosql.connector.informationschema.InformationSchemaTableHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; +import io.trino.connector.informationschema.InformationSchemaTableHandle; +import io.trino.spi.connector.ConnectorTableHandle; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -31,8 +31,8 @@ import java.util.OptionalLong; import static io.airlift.testing.Assertions.assertEqualsIgnoreOrder; -import static io.prestosql.connector.informationschema.InformationSchemaTable.COLUMNS; -import static io.prestosql.connector.informationschema.InformationSchemaTable.INFORMATION_SCHEMA; +import static io.trino.connector.informationschema.InformationSchemaTable.COLUMNS; +import static io.trino.connector.informationschema.InformationSchemaTable.INFORMATION_SCHEMA; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/metadata/TestInternalBlockEncodingSerde.java b/core/trino-main/src/test/java/io/trino/metadata/TestInternalBlockEncodingSerde.java index b4eb4a5eefab..4c77cfd809e1 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/TestInternalBlockEncodingSerde.java +++ b/core/trino-main/src/test/java/io/trino/metadata/TestInternalBlockEncodingSerde.java @@ -16,19 +16,19 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockEncoding; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.block.VariableWidthBlockEncoding; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockEncoding; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.block.VariableWidthBlockEncoding; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.Map; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; public class TestInternalBlockEncodingSerde diff --git a/core/trino-main/src/test/java/io/trino/metadata/TestPolymorphicScalarFunction.java b/core/trino-main/src/test/java/io/trino/metadata/TestPolymorphicScalarFunction.java index edf0adacdad4..ea9c3bd08646 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/TestPolymorphicScalarFunction.java +++ b/core/trino-main/src/test/java/io/trino/metadata/TestPolymorphicScalarFunction.java @@ -18,33 +18,33 @@ import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.operator.scalar.ChoicesScalarFunctionImplementation; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.operator.scalar.ChoicesScalarFunctionImplementation; +import io.trino.spi.block.Block; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import org.testng.annotations.Test; import java.util.Map; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.metadata.Signature.comparableWithVariadicBound; -import static io.prestosql.metadata.TestPolymorphicScalarFunction.TestMethods.VARCHAR_TO_BIGINT_RETURN_VALUE; -import static io.prestosql.metadata.TestPolymorphicScalarFunction.TestMethods.VARCHAR_TO_VARCHAR_RETURN_VALUE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.IS_DISTINCT_FROM; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.Decimals.MAX_SHORT_PRECISION; -import static io.prestosql.spi.type.TypeSignatureParameter.typeVariable; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.Signature.comparableWithVariadicBound; +import static io.trino.metadata.TestPolymorphicScalarFunction.TestMethods.VARCHAR_TO_BIGINT_RETURN_VALUE; +import static io.trino.metadata.TestPolymorphicScalarFunction.TestMethods.VARCHAR_TO_VARCHAR_RETURN_VALUE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.IS_DISTINCT_FROM; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.Decimals.MAX_SHORT_PRECISION; +import static io.trino.spi.type.TypeSignatureParameter.typeVariable; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.util.Arrays.asList; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/metadata/TestResolvedFunction.java b/core/trino-main/src/test/java/io/trino/metadata/TestResolvedFunction.java index a760d7758d3d..899241385c82 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/TestResolvedFunction.java +++ b/core/trino-main/src/test/java/io/trino/metadata/TestResolvedFunction.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.ResolvedFunction.ResolvedFunctionDecoder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.ResolvedFunction.ResolvedFunctionDecoder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeSignature; import org.testng.annotations.Test; import java.util.Optional; @@ -27,7 +27,7 @@ import java.util.regex.Pattern; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.Integer.parseInt; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/metadata/TestSignature.java b/core/trino-main/src/test/java/io/trino/metadata/TestSignature.java index 005820f3b036..0d1bf698b2f0 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/TestSignature.java +++ b/core/trino-main/src/test/java/io/trino/metadata/TestSignature.java @@ -18,17 +18,17 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.type.TypeDeserializer; -import io.prestosql.type.TypeSignatureDeserializer; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.type.TypeDeserializer; +import io.trino.type.TypeSignatureDeserializer; import org.testng.annotations.Test; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; public class TestSignature diff --git a/core/trino-main/src/test/java/io/trino/metadata/TestSignatureBinder.java b/core/trino-main/src/test/java/io/trino/metadata/TestSignatureBinder.java index 599cc1751af9..c3a2698db881 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/TestSignatureBinder.java +++ b/core/trino-main/src/test/java/io/trino/metadata/TestSignatureBinder.java @@ -15,47 +15,47 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.sql.analyzer.TypeSignatureProvider; -import io.prestosql.type.FunctionType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.sql.analyzer.TypeSignatureProvider; +import io.trino.type.FunctionType; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.metadata.Signature.castableFromTypeParameter; -import static io.prestosql.metadata.Signature.castableToTypeParameter; -import static io.prestosql.metadata.Signature.comparableTypeParameter; -import static io.prestosql.metadata.Signature.orderableTypeParameter; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.metadata.Signature.withVariadicBound; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.TypeSignature.functionType; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.TypeSignature.rowType; -import static io.prestosql.spi.type.TypeSignatureParameter.anonymousField; -import static io.prestosql.spi.type.TypeSignatureParameter.numericParameter; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.Signature.castableFromTypeParameter; +import static io.trino.metadata.Signature.castableToTypeParameter; +import static io.trino.metadata.Signature.comparableTypeParameter; +import static io.trino.metadata.Signature.orderableTypeParameter; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.metadata.Signature.withVariadicBound; +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.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.TypeSignature.functionType; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.TypeSignature.rowType; +import static io.trino.spi.type.TypeSignatureParameter.anonymousField; +import static io.trino.spi.type.TypeSignatureParameter.numericParameter; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.type.JsonType.JSON; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-main/src/test/java/io/trino/metadata/TestSystemTableHandle.java b/core/trino-main/src/test/java/io/trino/metadata/TestSystemTableHandle.java index d9b147b63d16..a52e0c45489e 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/TestSystemTableHandle.java +++ b/core/trino-main/src/test/java/io/trino/metadata/TestSystemTableHandle.java @@ -20,10 +20,10 @@ import com.google.inject.Guice; import com.google.inject.Injector; import io.airlift.json.JsonModule; -import io.prestosql.connector.system.SystemTableHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.connector.system.SystemTableHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/metadata/TestTableLayoutResult.java b/core/trino-main/src/test/java/io/trino/metadata/TestTableLayoutResult.java index b276ea0d5482..15022aea9aa3 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/TestTableLayoutResult.java +++ b/core/trino-main/src/test/java/io/trino/metadata/TestTableLayoutResult.java @@ -15,15 +15,15 @@ package io.trino.metadata; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.TestingColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.TestingColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; import org.testng.annotations.Test; -import static io.prestosql.metadata.TableLayoutResult.computeEnforced; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.metadata.TableLayoutResult.computeEnforced; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.lang.String.format; import static org.testng.Assert.fail; diff --git a/core/trino-main/src/test/java/io/trino/operator/BenchmarkDynamicFilterSourceOperator.java b/core/trino-main/src/test/java/io/trino/operator/BenchmarkDynamicFilterSourceOperator.java index 5c9fdfe2ebcd..9e71e147a6bb 100644 --- a/core/trino-main/src/test/java/io/trino/operator/BenchmarkDynamicFilterSourceOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/BenchmarkDynamicFilterSourceOperator.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.TestingTaskContext; -import io.prestosql.type.BlockTypeOperators; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.TestingTaskContext; import io.trino.tpch.LineItem; import io.trino.tpch.LineItemGenerator; +import io.trino.type.BlockTypeOperators; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -51,8 +51,8 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/BenchmarkGroupByHash.java b/core/trino-main/src/test/java/io/trino/operator/BenchmarkGroupByHash.java index 68540dab0f2f..cb1f55653f7b 100644 --- a/core/trino-main/src/test/java/io/trino/operator/BenchmarkGroupByHash.java +++ b/core/trino-main/src/test/java/io/trino/operator/BenchmarkGroupByHash.java @@ -18,15 +18,15 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.slice.XxHash64; -import io.prestosql.array.LongBigArray; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.AbstractLongType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.array.LongBigArray; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.AbstractLongType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -54,9 +54,9 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.operator.UpdateMemory.NOOP; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.operator.UpdateMemory.NOOP; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static it.unimi.dsi.fastutil.HashCommon.arraySize; @SuppressWarnings("MethodMayBeStatic") diff --git a/core/trino-main/src/test/java/io/trino/operator/BenchmarkGroupedTopNBuilder.java b/core/trino-main/src/test/java/io/trino/operator/BenchmarkGroupedTopNBuilder.java index 36100379993f..e00b8a8aacef 100644 --- a/core/trino-main/src/test/java/io/trino/operator/BenchmarkGroupedTopNBuilder.java +++ b/core/trino-main/src/test/java/io/trino/operator/BenchmarkGroupedTopNBuilder.java @@ -14,10 +14,10 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import io.trino.tpch.LineItem; import io.trino.tpch.LineItemGenerator; import org.openjdk.jmh.annotations.Benchmark; @@ -40,11 +40,11 @@ import java.util.List; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.connector.SortOrder.DESC_NULLS_LAST; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.connector.SortOrder.DESC_NULLS_LAST; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; @State(Scope.Thread) @OutputTimeUnit(TimeUnit.SECONDS) diff --git a/core/trino-main/src/test/java/io/trino/operator/BenchmarkHashAndStreamingAggregationOperators.java b/core/trino-main/src/test/java/io/trino/operator/BenchmarkHashAndStreamingAggregationOperators.java index d2ed1b5a5d14..e2a6ac2c0441 100644 --- a/core/trino-main/src/test/java/io/trino/operator/BenchmarkHashAndStreamingAggregationOperators.java +++ b/core/trino-main/src/test/java/io/trino/operator/BenchmarkHashAndStreamingAggregationOperators.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.RowPagesBuilder; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.HashAggregationOperator.HashAggregationOperatorFactory; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spiller.SpillerFactory; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.testing.TestingTaskContext; -import io.prestosql.type.BlockTypeOperators; +import io.trino.RowPagesBuilder; +import io.trino.metadata.Metadata; +import io.trino.operator.HashAggregationOperator.HashAggregationOperatorFactory; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.Page; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.TypeOperators; +import io.trino.spiller.SpillerFactory; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.tree.QualifiedName; +import io.trino.testing.TestingTaskContext; +import io.trino.type.BlockTypeOperators; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -56,14 +56,14 @@ import static io.airlift.units.DataSize.Unit.GIGABYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.BenchmarkHashAndStreamingAggregationOperators.Context.ROWS_PER_PAGE; -import static io.prestosql.operator.BenchmarkHashAndStreamingAggregationOperators.Context.TOTAL_PAGES; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.BenchmarkHashAndStreamingAggregationOperators.Context.ROWS_PER_PAGE; +import static io.trino.operator.BenchmarkHashAndStreamingAggregationOperators.Context.TOTAL_PAGES; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static java.lang.String.format; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/BenchmarkHashBuildAndJoinOperators.java b/core/trino-main/src/test/java/io/trino/operator/BenchmarkHashBuildAndJoinOperators.java index 0829563769e8..e33e6f7035de 100644 --- a/core/trino-main/src/test/java/io/trino/operator/BenchmarkHashBuildAndJoinOperators.java +++ b/core/trino-main/src/test/java/io/trino/operator/BenchmarkHashBuildAndJoinOperators.java @@ -17,16 +17,16 @@ import com.google.common.primitives.Ints; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.RowPagesBuilder; -import io.prestosql.execution.Lifespan; -import io.prestosql.operator.HashBuilderOperator.HashBuilderOperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spiller.SingleStreamSpillerFactory; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.TestingTaskContext; -import io.prestosql.type.BlockTypeOperators; +import io.trino.RowPagesBuilder; +import io.trino.execution.Lifespan; +import io.trino.operator.HashBuilderOperator.HashBuilderOperatorFactory; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spiller.SingleStreamSpillerFactory; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.TestingTaskContext; +import io.trino.type.BlockTypeOperators; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -56,12 +56,12 @@ import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.JoinBridgeManager.lookupAllAtOnce; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spiller.PartitioningSpillerFactory.unsupportedPartitioningSpillerFactory; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.JoinBridgeManager.lookupAllAtOnce; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spiller.PartitioningSpillerFactory.unsupportedPartitioningSpillerFactory; import static java.lang.String.format; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/BenchmarkPartitionedOutputOperator.java b/core/trino-main/src/test/java/io/trino/operator/BenchmarkPartitionedOutputOperator.java index 1a3de2d635a3..e46f393d225f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/BenchmarkPartitionedOutputOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/BenchmarkPartitionedOutputOperator.java @@ -15,22 +15,22 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.execution.StateMachine; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.execution.buffer.PartitionedOutputBuffer; -import io.prestosql.memory.context.SimpleLocalMemoryContext; -import io.prestosql.operator.PartitionedOutputOperator.PartitionedOutputFactory; -import io.prestosql.operator.exchange.LocalPartitionGenerator; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.TestingTaskContext; -import io.prestosql.type.BlockTypeOperators; +import io.trino.execution.StateMachine; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.execution.buffer.PartitionedOutputBuffer; +import io.trino.memory.context.SimpleLocalMemoryContext; +import io.trino.operator.PartitionedOutputOperator.PartitionedOutputFactory; +import io.trino.operator.exchange.LocalPartitionGenerator; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.TestingTaskContext; +import io.trino.type.BlockTypeOperators; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -58,15 +58,15 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.buffer.BufferState.OPEN; -import static io.prestosql.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.PARTITIONED; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.buffer.BufferState.OPEN; +import static io.trino.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; +import static io.trino.execution.buffer.OutputBuffers.BufferType.PARTITIONED; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.nio.charset.StandardCharsets.ISO_8859_1; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/BenchmarkScanFilterAndProjectOperator.java b/core/trino-main/src/test/java/io/trino/operator/BenchmarkScanFilterAndProjectOperator.java index 3a425342544d..d8a162fe8a57 100644 --- a/core/trino-main/src/test/java/io/trino/operator/BenchmarkScanFilterAndProjectOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/BenchmarkScanFilterAndProjectOperator.java @@ -16,31 +16,31 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.units.DataSize; -import io.prestosql.SequencePageBuilder; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.Split; -import io.prestosql.operator.ScanFilterAndProjectOperator.ScanFilterAndProjectOperatorFactory; -import io.prestosql.operator.project.CursorProcessor; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SqlToRowExpressionTranslator; -import io.prestosql.sql.tree.Expression; -import io.prestosql.testing.TestingMetadata.TestingColumnHandle; -import io.prestosql.testing.TestingSession; -import io.prestosql.testing.TestingTaskContext; +import io.trino.SequencePageBuilder; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.metadata.Metadata; +import io.trino.metadata.Split; +import io.trino.operator.ScanFilterAndProjectOperator.ScanFilterAndProjectOperatorFactory; +import io.trino.operator.project.CursorProcessor; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SqlToRowExpressionTranslator; +import io.trino.sql.tree.Expression; +import io.trino.testing.TestingMetadata.TestingColumnHandle; +import io.trino.testing.TestingSession; +import io.trino.testing.TestingTaskContext; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -73,13 +73,13 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.DataSize.Unit.GIGABYTE; import static io.airlift.units.DataSize.Unit.KILOBYTE; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.ExpressionTestUtils.createExpression; -import static io.prestosql.sql.ExpressionTestUtils.getTypes; -import static io.prestosql.testing.TestingHandles.TEST_TABLE_HANDLE; -import static io.prestosql.testing.TestingSplit.createLocalSplit; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.ExpressionTestUtils.createExpression; +import static io.trino.sql.ExpressionTestUtils.getTypes; +import static io.trino.testing.TestingHandles.TEST_TABLE_HANDLE; +import static io.trino.testing.TestingSplit.createLocalSplit; import static java.util.Locale.ENGLISH; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/BenchmarkTopNOperator.java b/core/trino-main/src/test/java/io/trino/operator/BenchmarkTopNOperator.java index 5975bf282924..68035b150295 100644 --- a/core/trino-main/src/test/java/io/trino/operator/BenchmarkTopNOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/BenchmarkTopNOperator.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.TestingTaskContext; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.TestingTaskContext; import io.trino.tpch.LineItem; import io.trino.tpch.LineItemGenerator; import org.openjdk.jmh.annotations.Benchmark; @@ -48,12 +48,12 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.connector.SortOrder.DESC_NULLS_LAST; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.connector.SortOrder.DESC_NULLS_LAST; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/BenchmarkUnnestOperator.java b/core/trino-main/src/test/java/io/trino/operator/BenchmarkUnnestOperator.java index cd68e4746ae5..688731c1fed9 100644 --- a/core/trino-main/src/test/java/io/trino/operator/BenchmarkUnnestOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/BenchmarkUnnestOperator.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.unnest.UnnestOperator.UnnestOperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RowBlock; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.TestingTaskContext; +import io.trino.metadata.Metadata; +import io.trino.operator.unnest.UnnestOperator.UnnestOperatorFactory; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RowBlock; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.TestingTaskContext; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Measurement; @@ -57,11 +57,11 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.StructuralTestUtil.mapType; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/BenchmarkWindowOperator.java b/core/trino-main/src/test/java/io/trino/operator/BenchmarkWindowOperator.java index 5bb5f03683a8..77b3ae720ba7 100644 --- a/core/trino-main/src/test/java/io/trino/operator/BenchmarkWindowOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/BenchmarkWindowOperator.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; import io.airlift.units.DataSize; -import io.prestosql.RowPagesBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.TestingTaskContext; +import io.trino.RowPagesBuilder; +import io.trino.spi.Page; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.testing.TestingTaskContext; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -47,13 +47,13 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.operator.BenchmarkWindowOperator.Context.ROWS_PER_PAGE; -import static io.prestosql.operator.BenchmarkWindowOperator.Context.TOTAL_PAGES; -import static io.prestosql.operator.TestWindowOperator.ROW_NUMBER; -import static io.prestosql.operator.TestWindowOperator.createFactoryUnbounded; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.operator.BenchmarkWindowOperator.Context.ROWS_PER_PAGE; +import static io.trino.operator.BenchmarkWindowOperator.Context.TOTAL_PAGES; +import static io.trino.operator.TestWindowOperator.ROW_NUMBER; +import static io.trino.operator.TestWindowOperator.createFactoryUnbounded; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/trino-main/src/test/java/io/trino/operator/CyclingGroupByHash.java b/core/trino-main/src/test/java/io/trino/operator/CyclingGroupByHash.java index e76b57735d96..e8e5ab4133ad 100644 --- a/core/trino-main/src/test/java/io/trino/operator/CyclingGroupByHash.java +++ b/core/trino-main/src/test/java/io/trino/operator/CyclingGroupByHash.java @@ -14,15 +14,15 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; /** * GroupByHash that provides a round robin group ID assignment. diff --git a/core/trino-main/src/test/java/io/trino/operator/DummySpillerFactory.java b/core/trino-main/src/test/java/io/trino/operator/DummySpillerFactory.java index 1cf4c6af6eef..91e92e297f87 100644 --- a/core/trino-main/src/test/java/io/trino/operator/DummySpillerFactory.java +++ b/core/trino-main/src/test/java/io/trino/operator/DummySpillerFactory.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.Spiller; -import io.prestosql.spiller.SpillerFactory; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.spiller.Spiller; +import io.trino.spiller.SpillerFactory; import java.util.ArrayList; import java.util.Iterator; diff --git a/core/trino-main/src/test/java/io/trino/operator/GenericLongFunction.java b/core/trino-main/src/test/java/io/trino/operator/GenericLongFunction.java index af72818f7216..3605e95de4e6 100644 --- a/core/trino-main/src/test/java/io/trino/operator/GenericLongFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/GenericLongFunction.java @@ -14,22 +14,22 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.operator.scalar.ChoicesScalarFunctionImplementation; -import io.prestosql.operator.scalar.ScalarFunctionImplementation; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.operator.scalar.ChoicesScalarFunctionImplementation; +import io.trino.operator.scalar.ScalarFunctionImplementation; import java.lang.invoke.MethodHandle; import java.util.function.LongUnaryOperator; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.util.Reflection.methodHandle; import static java.util.Objects.requireNonNull; public final class GenericLongFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/GroupByHashYieldAssertion.java b/core/trino-main/src/test/java/io/trino/operator/GroupByHashYieldAssertion.java index e49cddd721eb..0d325f32d750 100644 --- a/core/trino-main/src/test/java/io/trino/operator/GroupByHashYieldAssertion.java +++ b/core/trino-main/src/test/java/io/trino/operator/GroupByHashYieldAssertion.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableList; import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; -import io.prestosql.RowPagesBuilder; -import io.prestosql.memory.MemoryPool; -import io.prestosql.memory.QueryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.SpillSpaceTracker; +import io.trino.RowPagesBuilder; +import io.trino.memory.MemoryPool; +import io.trino.memory.QueryContext; +import io.trino.spi.Page; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.type.Type; +import io.trino.spiller.SpillSpaceTracker; import java.util.LinkedList; import java.util.List; @@ -37,12 +37,12 @@ import static io.airlift.testing.Assertions.assertLessThan; import static io.airlift.units.DataSize.Unit.GIGABYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.OperatorAssertion.finishOperator; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.OperatorAssertion.finishOperator; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.TestingTaskContext.createTaskContext; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/MockExchangeRequestProcessor.java b/core/trino-main/src/test/java/io/trino/operator/MockExchangeRequestProcessor.java index 319c19bc3bcb..fffce6647d92 100644 --- a/core/trino-main/src/test/java/io/trino/operator/MockExchangeRequestProcessor.java +++ b/core/trino-main/src/test/java/io/trino/operator/MockExchangeRequestProcessor.java @@ -24,11 +24,11 @@ import io.airlift.http.client.testing.TestingResponse; import io.airlift.slice.DynamicSliceOutput; import io.airlift.units.DataSize; -import io.prestosql.client.PrestoHeaders; -import io.prestosql.execution.buffer.BufferResult; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.spi.Page; +import io.trino.client.PrestoHeaders; +import io.trino.execution.buffer.BufferResult; +import io.trino.execution.buffer.PagesSerde; +import io.trino.execution.buffer.SerializedPage; +import io.trino.spi.Page; import java.net.URI; import java.util.ArrayList; @@ -41,15 +41,15 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.net.HttpHeaders.CONTENT_TYPE; -import static io.prestosql.PrestoMediaTypes.PRESTO_PAGES; -import static io.prestosql.client.PrestoHeaders.PRESTO_BUFFER_COMPLETE; -import static io.prestosql.client.PrestoHeaders.PRESTO_PAGE_NEXT_TOKEN; -import static io.prestosql.client.PrestoHeaders.PRESTO_PAGE_TOKEN; -import static io.prestosql.client.PrestoHeaders.PRESTO_TASK_INSTANCE_ID; -import static io.prestosql.execution.buffer.PagesSerdeUtil.calculateChecksum; -import static io.prestosql.execution.buffer.PagesSerdeUtil.writeSerializedPages; -import static io.prestosql.execution.buffer.TestingPagesSerdeFactory.testingPagesSerde; -import static io.prestosql.server.PagesResponseWriter.SERIALIZED_PAGES_MAGIC; +import static io.trino.PrestoMediaTypes.PRESTO_PAGES; +import static io.trino.client.PrestoHeaders.PRESTO_BUFFER_COMPLETE; +import static io.trino.client.PrestoHeaders.PRESTO_PAGE_NEXT_TOKEN; +import static io.trino.client.PrestoHeaders.PRESTO_PAGE_TOKEN; +import static io.trino.client.PrestoHeaders.PRESTO_TASK_INSTANCE_ID; +import static io.trino.execution.buffer.PagesSerdeUtil.calculateChecksum; +import static io.trino.execution.buffer.PagesSerdeUtil.writeSerializedPages; +import static io.trino.execution.buffer.TestingPagesSerdeFactory.testingPagesSerde; +import static io.trino.server.PagesResponseWriter.SERIALIZED_PAGES_MAGIC; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/OperatorAssertion.java b/core/trino-main/src/test/java/io/trino/operator/OperatorAssertion.java index 75554f282220..e89519f360c5 100644 --- a/core/trino-main/src/test/java/io/trino/operator/OperatorAssertion.java +++ b/core/trino-main/src/test/java/io/trino/operator/OperatorAssertion.java @@ -17,14 +17,14 @@ import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RowBlockBuilder; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.MaterializedResult; +import io.trino.Session; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RowBlockBuilder; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.testing.MaterializedResult; import java.util.ArrayList; import java.util.Collection; @@ -43,9 +43,9 @@ import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.MoreFutures.tryGetFutureValue; import static io.airlift.testing.Assertions.assertEqualsIgnoreOrder; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.testing.assertions.Assert.assertEquals; -import static io.prestosql.util.StructuralTestUtil.appendToBlockBuilder; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.testing.assertions.Assert.assertEquals; +import static io.trino.util.StructuralTestUtil.appendToBlockBuilder; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; import static org.testng.Assert.fail; diff --git a/core/trino-main/src/test/java/io/trino/operator/PageAssertions.java b/core/trino-main/src/test/java/io/trino/operator/PageAssertions.java index 31c999512c31..8a1a21bf2d8a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/PageAssertions.java +++ b/core/trino-main/src/test/java/io/trino/operator/PageAssertions.java @@ -13,12 +13,12 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.block.BlockAssertions.assertBlockEquals; +import static io.trino.block.BlockAssertions.assertBlockEquals; import static org.testng.Assert.assertEquals; public final class PageAssertions diff --git a/core/trino-main/src/test/java/io/trino/operator/TestAggregationOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestAggregationOperator.java index 6cb01916880d..bc2106eb85f6 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestAggregationOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestAggregationOperator.java @@ -14,16 +14,16 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.block.BlockAssertions; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.AggregationOperator.AggregationOperatorFactory; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.ByteArrayBlock; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.testing.MaterializedResult; +import io.trino.block.BlockAssertions; +import io.trino.metadata.Metadata; +import io.trino.operator.AggregationOperator.AggregationOperatorFactory; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.Page; +import io.trino.spi.block.ByteArrayBlock; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.tree.QualifiedName; +import io.trino.testing.MaterializedResult; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -35,18 +35,18 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEquals; -import static io.prestosql.operator.OperatorAssertion.toPages; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.OperatorAssertion.assertOperatorEquals; +import static io.trino.operator.OperatorAssertion.toPages; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.Collections.emptyIterator; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestAnnotationEngine.java b/core/trino-main/src/test/java/io/trino/operator/TestAnnotationEngine.java index 33a5de18169d..ce97ab55dd2c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestAnnotationEngine.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestAnnotationEngine.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.operator.aggregation.AggregationImplementation; -import io.prestosql.operator.scalar.ParametricScalar; +import io.trino.operator.aggregation.AggregationImplementation; +import io.trino.operator.scalar.ParametricScalar; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestAnnotationEngineForAggregates.java b/core/trino-main/src/test/java/io/trino/operator/TestAnnotationEngineForAggregates.java index 7d044f649d09..8b7e6de1bd14 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestAnnotationEngineForAggregates.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestAnnotationEngineForAggregates.java @@ -17,49 +17,49 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.metadata.AggregationFunctionMetadata; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.LongVariableConstraint; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlAggregationFunction; -import io.prestosql.operator.aggregation.AggregationImplementation; -import io.prestosql.operator.aggregation.AggregationMetadata; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.aggregation.ParametricAggregation; -import io.prestosql.operator.aggregation.state.NullableDoubleState; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.operator.aggregation.state.SliceState; -import io.prestosql.operator.annotations.LiteralImplementationDependency; -import io.prestosql.operator.annotations.OperatorImplementationDependency; -import io.prestosql.operator.annotations.TypeImplementationDependency; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.function.TypeParameterSpecialization; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.type.Constraint; +import io.trino.metadata.AggregationFunctionMetadata; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.LongVariableConstraint; +import io.trino.metadata.MetadataManager; +import io.trino.metadata.ResolvedFunction; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlAggregationFunction; +import io.trino.operator.aggregation.AggregationImplementation; +import io.trino.operator.aggregation.AggregationMetadata; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.aggregation.ParametricAggregation; +import io.trino.operator.aggregation.state.NullableDoubleState; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.operator.aggregation.state.SliceState; +import io.trino.operator.annotations.LiteralImplementationDependency; +import io.trino.operator.annotations.OperatorImplementationDependency; +import io.trino.operator.annotations.TypeImplementationDependency; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.function.TypeParameterSpecialization; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.type.Constraint; import org.testng.annotations.Test; import java.lang.invoke.MethodHandle; @@ -67,18 +67,18 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.aggregation.AggregationFromAnnotationsParser.parseFunctionDefinition; -import static io.prestosql.operator.aggregation.AggregationFromAnnotationsParser.parseFunctionDefinitions; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.type.StandardTypes.ARRAY; -import static io.prestosql.spi.type.StandardTypes.DOUBLE; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.aggregation.AggregationFromAnnotationsParser.parseFunctionDefinition; +import static io.trino.operator.aggregation.AggregationFromAnnotationsParser.parseFunctionDefinitions; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.type.StandardTypes.ARRAY; +import static io.trino.spi.type.StandardTypes.DOUBLE; +import static io.trino.spi.type.VarcharType.createVarcharType; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestAnnotationEngineForScalars.java b/core/trino-main/src/test/java/io/trino/operator/TestAnnotationEngineForScalars.java index d7f89c137e9d..382b59f5a0b8 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestAnnotationEngineForScalars.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestAnnotationEngineForScalars.java @@ -17,46 +17,46 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.operator.annotations.ImplementationDependency; -import io.prestosql.operator.annotations.LiteralImplementationDependency; -import io.prestosql.operator.annotations.TypeImplementationDependency; -import io.prestosql.operator.scalar.ChoicesScalarFunctionImplementation; -import io.prestosql.operator.scalar.ParametricScalar; -import io.prestosql.operator.scalar.annotations.ParametricScalarImplementation.ParametricScalarImplementationChoice; -import io.prestosql.operator.scalar.annotations.ScalarFromAnnotationsParser; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.IsNull; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.operator.annotations.ImplementationDependency; +import io.trino.operator.annotations.LiteralImplementationDependency; +import io.trino.operator.annotations.TypeImplementationDependency; +import io.trino.operator.scalar.ChoicesScalarFunctionImplementation; +import io.trino.operator.scalar.ParametricScalar; +import io.trino.operator.scalar.annotations.ParametricScalarImplementation.ParametricScalarImplementationChoice; +import io.trino.operator.scalar.annotations.ScalarFromAnnotationsParser; +import io.trino.spi.block.Block; +import io.trino.spi.function.Description; +import io.trino.spi.function.IsNull; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import org.testng.annotations.Test; import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestColumnarPageProcessor.java b/core/trino-main/src/test/java/io/trino/operator/TestColumnarPageProcessor.java index f93d954fa59e..8c1023cd4955 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestColumnarPageProcessor.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestColumnarPageProcessor.java @@ -14,28 +14,28 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; +import io.trino.metadata.Metadata; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; import static com.google.common.collect.Iterators.getOnlyElement; -import static io.prestosql.SequencePageBuilder.createSequencePage; -import static io.prestosql.SequencePageBuilder.createSequencePageWithDictionaryBlocks; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.operator.project.PageProcessor.MAX_BATCH_SIZE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.SequencePageBuilder.createSequencePage; +import static io.trino.SequencePageBuilder.createSequencePageWithDictionaryBlocks; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.operator.project.PageProcessor.MAX_BATCH_SIZE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; public class TestColumnarPageProcessor { diff --git a/core/trino-main/src/test/java/io/trino/operator/TestCyclingGroupByHash.java b/core/trino-main/src/test/java/io/trino/operator/TestCyclingGroupByHash.java index 8a5f3e1ffd10..08af6388e39a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestCyclingGroupByHash.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestCyclingGroupByHash.java @@ -13,12 +13,12 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; public class TestCyclingGroupByHash diff --git a/core/trino-main/src/test/java/io/trino/operator/TestDistinctLimitOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestDistinctLimitOperator.java index 3f4563946fd0..e5ff25fa33bd 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestDistinctLimitOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestDistinctLimitOperator.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.RowPagesBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.type.BlockTypeOperators; +import io.trino.RowPagesBuilder; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -35,15 +35,15 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertGreaterThan; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.GroupByHashYieldAssertion.createPagesWithDistinctHashKeys; -import static io.prestosql.operator.GroupByHashYieldAssertion.finishOperatorWithYieldingGroupByHash; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEquals; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.GroupByHashYieldAssertion.createPagesWithDistinctHashKeys; +import static io.trino.operator.GroupByHashYieldAssertion.finishOperatorWithYieldingGroupByHash; +import static io.trino.operator.OperatorAssertion.assertOperatorEquals; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestDriver.java b/core/trino-main/src/test/java/io/trino/operator/TestDriver.java index f8eb505f3676..5150fd90a432 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestDriver.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestDriver.java @@ -19,25 +19,25 @@ import com.google.common.util.concurrent.SettableFuture; import com.google.common.util.concurrent.Uninterruptibles; import io.airlift.units.Duration; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.ScheduledSplit; -import io.prestosql.execution.TaskSource; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.metadata.Split; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.type.Type; -import io.prestosql.split.PageSourceProvider; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.PageConsumerOperator; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.execution.ScheduledSplit; +import io.trino.execution.TaskSource; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.metadata.Split; +import io.trino.metadata.TableHandle; +import io.trino.spi.HostAddress; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.type.Type; +import io.trino.split.PageSourceProvider; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; +import io.trino.testing.PageConsumerOperator; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -54,13 +54,13 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.TestingHandles.TEST_TABLE_HANDLE; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.TestingHandles.TEST_TABLE_HANDLE; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestDriverStats.java b/core/trino-main/src/test/java/io/trino/operator/TestDriverStats.java index 628a5eb7e87f..2800edc43606 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestDriverStats.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestDriverStats.java @@ -18,11 +18,11 @@ import io.airlift.json.JsonCodec; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.Lifespan; +import io.trino.execution.Lifespan; import org.joda.time.DateTime; import org.testng.annotations.Test; -import static io.prestosql.operator.TestOperatorStats.assertExpectedOperatorStats; +import static io.trino.operator.TestOperatorStats.assertExpectedOperatorStats; import static java.util.concurrent.TimeUnit.NANOSECONDS; import static org.joda.time.DateTimeZone.UTC; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestDynamicFilterSourceOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestDynamicFilterSourceOperator.java index 0071de7a7a3d..16b325c2c378 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestDynamicFilterSourceOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestDynamicFilterSourceOperator.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.units.DataSize; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.type.BlockTypeOperators; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -44,33 +44,33 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.units.DataSize.Unit.KILOBYTE; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.block.BlockAssertions.createBlockOfReals; -import static io.prestosql.block.BlockAssertions.createBooleansBlock; -import static io.prestosql.block.BlockAssertions.createColorRepeatBlock; -import static io.prestosql.block.BlockAssertions.createColorSequenceBlock; -import static io.prestosql.block.BlockAssertions.createDoubleRepeatBlock; -import static io.prestosql.block.BlockAssertions.createDoubleSequenceBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.block.BlockAssertions.createLongRepeatBlock; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createSequenceBlockOfReal; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.operator.OperatorAssertion.toMaterializedResult; -import static io.prestosql.operator.OperatorAssertion.toPages; -import static io.prestosql.spi.predicate.Range.equal; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; -import static io.prestosql.testing.assertions.Assert.assertEquals; -import static io.prestosql.type.ColorType.COLOR; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.block.BlockAssertions.createBlockOfReals; +import static io.trino.block.BlockAssertions.createBooleansBlock; +import static io.trino.block.BlockAssertions.createColorRepeatBlock; +import static io.trino.block.BlockAssertions.createColorSequenceBlock; +import static io.trino.block.BlockAssertions.createDoubleRepeatBlock; +import static io.trino.block.BlockAssertions.createDoubleSequenceBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.block.BlockAssertions.createLongRepeatBlock; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createSequenceBlockOfReal; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.operator.OperatorAssertion.toMaterializedResult; +import static io.trino.operator.OperatorAssertion.toPages; +import static io.trino.spi.predicate.Range.equal; +import static io.trino.spi.predicate.Range.range; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.TestingTaskContext.createTaskContext; +import static io.trino.testing.assertions.Assert.assertEquals; +import static io.trino.type.ColorType.COLOR; import static java.lang.Float.floatToRawIntBits; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; 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 82901535ebc4..ad6198090792 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.prestosql.block.BlockAssertions; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.memory.context.SimpleLocalMemoryContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.analyzer.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.PrestoException; +import io.trino.sql.analyzer.FeaturesConfig.DataIntegrityVerification; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -53,8 +53,8 @@ import static io.airlift.concurrent.MoreFutures.tryGetFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertLessThan; -import static io.prestosql.execution.buffer.TestingPagesSerdeFactory.testingPagesSerde; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.execution.buffer.TestingPagesSerdeFactory.testingPagesSerde; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static java.util.concurrent.TimeUnit.MILLISECONDS; 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 a5235c9781cc..d36a43f7bfd1 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,16 +21,16 @@ import io.airlift.http.client.testing.TestingHttpClient; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.execution.buffer.TestingPagesSerdeFactory; -import io.prestosql.metadata.Split; -import io.prestosql.operator.ExchangeOperator.ExchangeOperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.split.RemoteSplit; -import io.prestosql.sql.analyzer.FeaturesConfig.DataIntegrityVerification; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.execution.buffer.TestingPagesSerdeFactory; +import io.trino.metadata.Split; +import io.trino.operator.ExchangeOperator.ExchangeOperatorFactory; +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; import org.testng.annotations.BeforeMethod; @@ -46,12 +46,12 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.ExchangeOperator.REMOTE_CONNECTOR_ID; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.operator.TestingTaskBuffer.PAGE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.ExchangeOperator.REMOTE_CONNECTOR_ID; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.operator.TestingTaskBuffer.PAGE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestFilterAndProjectOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestFilterAndProjectOperator.java index cc3dfb88a417..0ef40e265898 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestFilterAndProjectOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestFilterAndProjectOperator.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.testing.MaterializedResult; +import io.trino.metadata.Metadata; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.relational.RowExpression; +import io.trino.testing.MaterializedResult; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -35,19 +35,19 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.DataSize.Unit.KILOBYTE; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEquals; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.relational.Expressions.call; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.OperatorAssertion.assertOperatorEquals; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.relational.Expressions.call; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestGroupByHash.java b/core/trino-main/src/test/java/io/trino/operator/TestGroupByHash.java index 0e0ea27331a7..21aaad8b2644 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestGroupByHash.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestGroupByHash.java @@ -14,19 +14,19 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.block.BlockAssertions; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.DictionaryId; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.testing.TestingSession; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.TypeTestUtils; +import io.trino.Session; +import io.trino.block.BlockAssertions; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.DictionaryId; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.testing.TestingSession; +import io.trino.type.BlockTypeOperators; +import io.trino.type.TypeTestUtils; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -38,15 +38,15 @@ import java.util.stream.IntStream; import static com.google.common.math.DoubleMath.log2; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createStringSequenceBlock; -import static io.prestosql.operator.GroupByHash.createGroupByHash; -import static io.prestosql.spi.block.DictionaryId.randomDictionaryId; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.type.TypeTestUtils.getHashBlock; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createStringSequenceBlock; +import static io.trino.operator.GroupByHash.createGroupByHash; +import static io.trino.spi.block.DictionaryId.randomDictionaryId; +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.type.TypeTestUtils.getHashBlock; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestGroupIdOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestGroupIdOperator.java index a4722b55f776..ea82f2f21d08 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestGroupIdOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestGroupIdOperator.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.RowPagesBuilder; -import io.prestosql.operator.GroupIdOperator.GroupIdOperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; +import io.trino.RowPagesBuilder; +import io.trino.operator.GroupIdOperator.GroupIdOperatorFactory; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -29,14 +29,14 @@ import java.util.concurrent.ScheduledExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEqualsIgnoreOrder; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.OperatorAssertion.assertOperatorEqualsIgnoreOrder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestGroupedTopNBuilder.java b/core/trino-main/src/test/java/io/trino/operator/TestGroupedTopNBuilder.java index 6f37148d977b..61211ba04e07 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestGroupedTopNBuilder.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestGroupedTopNBuilder.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.type.BlockTypeOperators; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -27,12 +27,12 @@ import java.util.Optional; import java.util.concurrent.atomic.AtomicBoolean; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.operator.UpdateMemory.NOOP; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_LAST; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.operator.UpdateMemory.NOOP; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_LAST; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestGroupedTopNRowNumberAccumulator.java b/core/trino-main/src/test/java/io/trino/operator/TestGroupedTopNRowNumberAccumulator.java index 8853bf3f3c73..ce4bd2f2a843 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestGroupedTopNRowNumberAccumulator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestGroupedTopNRowNumberAccumulator.java @@ -13,8 +13,8 @@ */ package io.trino.operator; -import io.prestosql.array.LongBigArray; -import io.prestosql.operator.GroupedTopNRowNumberAccumulator.RowReference; +import io.trino.array.LongBigArray; +import io.trino.operator.GroupedTopNRowNumberAccumulator.RowReference; import it.unimi.dsi.fastutil.longs.LongArrayList; import it.unimi.dsi.fastutil.longs.LongArraySet; import it.unimi.dsi.fastutil.longs.LongComparator; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestHashAggregationOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestHashAggregationOperator.java index b8082d68f4f7..5e900785d22a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestHashAggregationOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestHashAggregationOperator.java @@ -19,28 +19,28 @@ import io.airlift.slice.Slices; import io.airlift.units.DataSize; import io.airlift.units.DataSize.Unit; -import io.prestosql.ExceededMemoryLimitException; -import io.prestosql.RowPagesBuilder; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.HashAggregationOperator.HashAggregationOperatorFactory; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.aggregation.builder.HashAggregationBuilder; -import io.prestosql.operator.aggregation.builder.InMemoryHashAggregationBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spiller.Spiller; -import io.prestosql.spiller.SpillerFactory; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.TestingTaskContext; -import io.prestosql.type.BlockTypeOperators; +import io.trino.ExceededMemoryLimitException; +import io.trino.RowPagesBuilder; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.metadata.Metadata; +import io.trino.operator.HashAggregationOperator.HashAggregationOperatorFactory; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.aggregation.builder.HashAggregationBuilder; +import io.trino.operator.aggregation.builder.InMemoryHashAggregationBuilder; +import io.trino.spi.Page; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spiller.Spiller; +import io.trino.spiller.SpillerFactory; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.tree.QualifiedName; +import io.trino.testing.MaterializedResult; +import io.trino.testing.TestingTaskContext; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -65,24 +65,24 @@ import static io.airlift.units.DataSize.Unit.KILOBYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.GroupByHashYieldAssertion.GroupByHashYieldResult; -import static io.prestosql.operator.GroupByHashYieldAssertion.createPagesWithDistinctHashKeys; -import static io.prestosql.operator.GroupByHashYieldAssertion.finishOperatorWithYieldingGroupByHash; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEqualsIgnoreOrder; -import static io.prestosql.operator.OperatorAssertion.assertPagesEqualIgnoreOrder; -import static io.prestosql.operator.OperatorAssertion.dropChannel; -import static io.prestosql.operator.OperatorAssertion.toMaterializedResult; -import static io.prestosql.operator.OperatorAssertion.toPages; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.GroupByHashYieldAssertion.GroupByHashYieldResult; +import static io.trino.operator.GroupByHashYieldAssertion.createPagesWithDistinctHashKeys; +import static io.trino.operator.GroupByHashYieldAssertion.finishOperatorWithYieldingGroupByHash; +import static io.trino.operator.OperatorAssertion.assertOperatorEqualsIgnoreOrder; +import static io.trino.operator.OperatorAssertion.assertPagesEqualIgnoreOrder; +import static io.trino.operator.OperatorAssertion.dropChannel; +import static io.trino.operator.OperatorAssertion.toMaterializedResult; +import static io.trino.operator.OperatorAssertion.toPages; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.lang.String.format; import static java.util.Collections.emptyIterator; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestHashJoinOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestHashJoinOperator.java index 89c4b6f78cdd..4cbbcd4b6f26 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestHashJoinOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestHashJoinOperator.java @@ -20,34 +20,34 @@ import com.google.common.primitives.Ints; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.ExceededMemoryLimitException; -import io.prestosql.RowPagesBuilder; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskStateMachine; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.HashBuilderOperator.HashBuilderOperatorFactory; -import io.prestosql.operator.ValuesOperator.ValuesOperatorFactory; -import io.prestosql.operator.exchange.LocalExchange.LocalExchangeFactory; -import io.prestosql.operator.exchange.LocalExchange.LocalExchangeSinkFactoryId; -import io.prestosql.operator.exchange.LocalExchangeSinkOperator.LocalExchangeSinkOperatorFactory; -import io.prestosql.operator.exchange.LocalExchangeSourceOperator.LocalExchangeSourceOperatorFactory; -import io.prestosql.operator.index.PageBuffer; -import io.prestosql.operator.index.PageBufferOperator.PageBufferOperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spiller.GenericPartitioningSpillerFactory; -import io.prestosql.spiller.PartitioningSpillerFactory; -import io.prestosql.spiller.SingleStreamSpiller; -import io.prestosql.spiller.SingleStreamSpillerFactory; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.TestingTaskContext; -import io.prestosql.type.BlockTypeOperators; +import io.trino.ExceededMemoryLimitException; +import io.trino.RowPagesBuilder; +import io.trino.execution.Lifespan; +import io.trino.execution.TaskId; +import io.trino.execution.TaskStateMachine; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.HashBuilderOperator.HashBuilderOperatorFactory; +import io.trino.operator.ValuesOperator.ValuesOperatorFactory; +import io.trino.operator.exchange.LocalExchange.LocalExchangeFactory; +import io.trino.operator.exchange.LocalExchange.LocalExchangeSinkFactoryId; +import io.trino.operator.exchange.LocalExchangeSinkOperator.LocalExchangeSinkOperatorFactory; +import io.trino.operator.exchange.LocalExchangeSourceOperator.LocalExchangeSourceOperatorFactory; +import io.trino.operator.index.PageBuffer; +import io.trino.operator.index.PageBufferOperator.PageBufferOperatorFactory; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spiller.GenericPartitioningSpillerFactory; +import io.trino.spiller.PartitioningSpillerFactory; +import io.trino.spiller.SingleStreamSpiller; +import io.trino.spiller.SingleStreamSpillerFactory; +import io.trino.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; +import io.trino.testing.TestingTaskContext; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -80,20 +80,20 @@ import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertEqualsIgnoreOrder; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEquals; -import static io.prestosql.operator.OperatorAssertion.dropChannel; -import static io.prestosql.operator.OperatorAssertion.without; -import static io.prestosql.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; -import static io.prestosql.operator.WorkProcessor.ProcessState.finished; -import static io.prestosql.operator.WorkProcessor.ProcessState.ofResult; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.OperatorAssertion.assertOperatorEquals; +import static io.trino.operator.OperatorAssertion.dropChannel; +import static io.trino.operator.OperatorAssertion.without; +import static io.trino.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.operator.WorkProcessor.ProcessState.finished; +import static io.trino.operator.WorkProcessor.ProcessState.ofResult; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.String.format; import static java.util.Arrays.asList; import static java.util.Collections.nCopies; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestHashSemiJoinOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestHashSemiJoinOperator.java index 797ab192b9b4..e3d2c72174c3 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestHashSemiJoinOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestHashSemiJoinOperator.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; import io.airlift.units.DataSize; -import io.prestosql.ExceededMemoryLimitException; -import io.prestosql.RowPagesBuilder; -import io.prestosql.operator.SetBuilderOperator.SetBuilderOperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.type.BlockTypeOperators; +import io.trino.ExceededMemoryLimitException; +import io.trino.RowPagesBuilder; +import io.trino.operator.SetBuilderOperator.SetBuilderOperatorFactory; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -40,15 +40,15 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertGreaterThan; import static io.airlift.testing.Assertions.assertGreaterThanOrEqual; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.GroupByHashYieldAssertion.createPagesWithDistinctHashKeys; -import static io.prestosql.operator.GroupByHashYieldAssertion.finishOperatorWithYieldingGroupByHash; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.GroupByHashYieldAssertion.createPagesWithDistinctHashKeys; +import static io.trino.operator.GroupByHashYieldAssertion.finishOperatorWithYieldingGroupByHash; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; 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 e2b1255ddee7..a6404ce0517b 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,14 +23,14 @@ import io.airlift.units.DataSize; import io.airlift.units.DataSize.Unit; import io.airlift.units.Duration; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.operator.HttpPageBufferClient.ClientCallback; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.sql.analyzer.FeaturesConfig.DataIntegrityVerification; +import io.trino.execution.buffer.PagesSerde; +import io.trino.execution.buffer.SerializedPage; +import io.trino.operator.HttpPageBufferClient.ClientCallback; +import io.trino.spi.HostAddress; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +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; @@ -56,14 +56,14 @@ import static io.airlift.testing.Assertions.assertContains; import static io.airlift.testing.Assertions.assertInstanceOf; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.PrestoMediaTypes.PRESTO_PAGES; -import static io.prestosql.execution.buffer.TestingPagesSerdeFactory.testingPagesSerde; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_LOCAL_MEMORY_LIMIT; -import static io.prestosql.spi.StandardErrorCode.PAGE_TOO_LARGE; -import static io.prestosql.spi.StandardErrorCode.PAGE_TRANSPORT_ERROR; -import static io.prestosql.spi.StandardErrorCode.PAGE_TRANSPORT_TIMEOUT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.util.Failures.WORKER_NODE_ERROR; +import static io.trino.PrestoMediaTypes.PRESTO_PAGES; +import static io.trino.execution.buffer.TestingPagesSerdeFactory.testingPagesSerde; +import static io.trino.spi.StandardErrorCode.EXCEEDED_LOCAL_MEMORY_LIMIT; +import static io.trino.spi.StandardErrorCode.PAGE_TOO_LARGE; +import static io.trino.spi.StandardErrorCode.PAGE_TRANSPORT_ERROR; +import static io.trino.spi.StandardErrorCode.PAGE_TRANSPORT_TIMEOUT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.util.Failures.WORKER_NODE_ERROR; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestJoinOperatorInfo.java b/core/trino-main/src/test/java/io/trino/operator/TestJoinOperatorInfo.java index 81bc32815165..407506bf9779 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestJoinOperatorInfo.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestJoinOperatorInfo.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.operator.LookupJoinOperators.JoinType; +import io.trino.operator.LookupJoinOperators.JoinType; import org.testng.annotations.Test; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestJoinStatisticsCounter.java b/core/trino-main/src/test/java/io/trino/operator/TestJoinStatisticsCounter.java index ae3acf007f1f..a3ff0cd73d4d 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestJoinStatisticsCounter.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestJoinStatisticsCounter.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.operator.LookupJoinOperators.JoinType; +import io.trino.operator.LookupJoinOperators.JoinType; import org.testng.annotations.Test; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestLimitOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestLimitOperator.java index 133fcd8ce306..c69203efc95c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestLimitOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestLimitOperator.java @@ -14,10 +14,10 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.LimitOperator.LimitOperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; +import io.trino.operator.LimitOperator.LimitOperatorFactory; +import io.trino.spi.Page; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -27,12 +27,12 @@ import java.util.concurrent.ScheduledExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SequencePageBuilder.createSequencePage; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SequencePageBuilder.createSequencePage; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestLookupJoinPageBuilder.java b/core/trino-main/src/test/java/io/trino/operator/TestLookupJoinPageBuilder.java index 7a82a2f8d5eb..96745c044603 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestLookupJoinPageBuilder.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestLookupJoinPageBuilder.java @@ -14,19 +14,19 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.JoinProbe.JoinProbeFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.type.Type; +import io.trino.operator.JoinProbe.JoinProbeFactory; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.List; import java.util.OptionalInt; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestMarkDistinctOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestMarkDistinctOperator.java index fd7dd7fe72b2..857202894f41 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestMarkDistinctOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestMarkDistinctOperator.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.RowPagesBuilder; -import io.prestosql.operator.MarkDistinctOperator.MarkDistinctOperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.type.BlockTypeOperators; +import io.trino.RowPagesBuilder; +import io.trino.operator.MarkDistinctOperator.MarkDistinctOperatorFactory; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -36,15 +36,15 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertGreaterThan; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.GroupByHashYieldAssertion.createPagesWithDistinctHashKeys; -import static io.prestosql.operator.GroupByHashYieldAssertion.finishOperatorWithYieldingGroupByHash; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.GroupByHashYieldAssertion.createPagesWithDistinctHashKeys; +import static io.trino.operator.GroupByHashYieldAssertion.finishOperatorWithYieldingGroupByHash; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestMergeHashSort.java b/core/trino-main/src/test/java/io/trino/operator/TestMergeHashSort.java index 8906c6b6e949..27a6c725ba69 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestMergeHashSort.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestMergeHashSort.java @@ -14,16 +14,16 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.BlockTypeOperators; +import io.trino.spi.Page; +import io.trino.spi.type.TypeOperators; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.Test; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.operator.WorkProcessorAssertion.assertFinishes; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.operator.WorkProcessorAssertion.assertFinishes; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; 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 9af7c5f3b446..2aac7f4aa037 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,18 +20,18 @@ import io.airlift.http.client.HttpClient; import io.airlift.http.client.testing.TestingHttpClient; import io.airlift.node.NodeInfo; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.execution.buffer.TestingPagesSerdeFactory; -import io.prestosql.metadata.Split; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.split.RemoteSplit; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.execution.Lifespan; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.execution.buffer.TestingPagesSerdeFactory; +import io.trino.metadata.Split; +import io.trino.spi.Page; +import io.trino.spi.connector.SortOrder; +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; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -45,16 +45,16 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.OperatorAssertion.assertOperatorIsBlocked; -import static io.prestosql.operator.OperatorAssertion.assertOperatorIsUnblocked; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.connector.SortOrder.DESC_NULLS_FIRST; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.OperatorAssertion.assertOperatorIsBlocked; +import static io.trino.operator.OperatorAssertion.assertOperatorIsUnblocked; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.connector.SortOrder.DESC_NULLS_FIRST; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNull; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestNestedLoopBuildOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestNestedLoopBuildOperator.java index 212bf9a51968..6e6988570657 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestNestedLoopBuildOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestNestedLoopBuildOperator.java @@ -14,13 +14,13 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.execution.Lifespan; -import io.prestosql.operator.NestedLoopBuildOperator.NestedLoopBuildOperatorFactory; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.TestingTaskContext; +import io.trino.execution.Lifespan; +import io.trino.operator.NestedLoopBuildOperator.NestedLoopBuildOperatorFactory; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.TestingTaskContext; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -30,9 +30,9 @@ import java.util.concurrent.ScheduledExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestNestedLoopJoinOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestNestedLoopJoinOperator.java index f49285ff0a2d..dd9d347a51b5 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestNestedLoopJoinOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestNestedLoopJoinOperator.java @@ -14,15 +14,15 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.RowPagesBuilder; -import io.prestosql.operator.NestedLoopBuildOperator.NestedLoopBuildOperatorFactory; -import io.prestosql.operator.NestedLoopJoinOperator.NestedLoopJoinOperatorFactory; -import io.prestosql.operator.NestedLoopJoinOperator.NestedLoopOutputIterator; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.TestingTaskContext; +import io.trino.RowPagesBuilder; +import io.trino.operator.NestedLoopBuildOperator.NestedLoopBuildOperatorFactory; +import io.trino.operator.NestedLoopJoinOperator.NestedLoopJoinOperatorFactory; +import io.trino.operator.NestedLoopJoinOperator.NestedLoopOutputIterator; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; +import io.trino.testing.TestingTaskContext; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -33,13 +33,13 @@ import static com.google.common.collect.Iterables.concat; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEquals; -import static io.prestosql.operator.ValuesOperator.ValuesOperatorFactory; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.OperatorAssertion.assertOperatorEquals; +import static io.trino.operator.ValuesOperator.ValuesOperatorFactory; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestOperationTimer.java b/core/trino-main/src/test/java/io/trino/operator/TestOperationTimer.java index e37b8d33a85c..bd86945a96d6 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestOperationTimer.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestOperationTimer.java @@ -14,7 +14,7 @@ package io.trino.operator; import io.airlift.slice.XxHash64; -import io.prestosql.operator.OperationTimer.OperationTiming; +import io.trino.operator.OperationTimer.OperationTiming; import org.testng.annotations.Test; import java.util.Random; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestOperatorAssertion.java b/core/trino-main/src/test/java/io/trino/operator/TestOperatorAssertion.java index 5a0383944c0c..1eb3e31b39f8 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestOperatorAssertion.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestOperatorAssertion.java @@ -17,8 +17,8 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import io.airlift.units.Duration; -import io.prestosql.spi.Page; -import io.prestosql.testing.assertions.Assert; +import io.trino.spi.Page; +import io.trino.testing.assertions.Assert; 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/TestOperatorMemoryRevocation.java b/core/trino-main/src/test/java/io/trino/operator/TestOperatorMemoryRevocation.java index 6dd7211bf2c0..72dabc4f7f6b 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestOperatorMemoryRevocation.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestOperatorMemoryRevocation.java @@ -13,7 +13,7 @@ */ package io.trino.operator; -import io.prestosql.memory.context.LocalMemoryContext; +import io.trino.memory.context.LocalMemoryContext; 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/TestOperatorStats.java b/core/trino-main/src/test/java/io/trino/operator/TestOperatorStats.java index f9ee72014659..8e9747c04687 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestOperatorStats.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestOperatorStats.java @@ -16,9 +16,9 @@ import io.airlift.json.JsonCodec; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.connector.CatalogName; -import io.prestosql.operator.PartitionedOutputOperator.PartitionedOutputInfo; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.connector.CatalogName; +import io.trino.operator.PartitionedOutputOperator.PartitionedOutputInfo; +import io.trino.sql.planner.plan.PlanNodeId; import org.testng.annotations.Test; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestOrderByOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestOrderByOperator.java index 52bb543400dd..64d9508a9bab 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestOrderByOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestOrderByOperator.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.ExceededMemoryLimitException; -import io.prestosql.operator.OrderByOperator.OrderByOperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.TestingTaskContext; +import io.trino.ExceededMemoryLimitException; +import io.trino.operator.OrderByOperator.OrderByOperatorFactory; +import io.trino.spi.Page; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.OrderingCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; +import io.trino.testing.TestingTaskContext; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -36,18 +36,18 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertGreaterThan; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEquals; -import static io.prestosql.operator.OperatorAssertion.toMaterializedResult; -import static io.prestosql.operator.OperatorAssertion.toPages; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_LAST; -import static io.prestosql.spi.connector.SortOrder.DESC_NULLS_LAST; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.OperatorAssertion.assertOperatorEquals; +import static io.trino.operator.OperatorAssertion.toMaterializedResult; +import static io.trino.operator.OperatorAssertion.toPages; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_LAST; +import static io.trino.spi.connector.SortOrder.DESC_NULLS_LAST; +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.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.lang.String.format; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestPageUtils.java b/core/trino-main/src/test/java/io/trino/operator/TestPageUtils.java index 6ef6cc7b243f..a401e95c1a70 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestPageUtils.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestPageUtils.java @@ -13,15 +13,15 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LazyBlock; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.LazyBlock; import org.testng.annotations.Test; import java.util.concurrent.atomic.AtomicLong; -import static io.prestosql.block.BlockAssertions.createIntsBlock; -import static io.prestosql.operator.PageUtils.recordMaterializedBytes; +import static io.trino.block.BlockAssertions.createIntsBlock; +import static io.trino.operator.PageUtils.recordMaterializedBytes; import static org.testng.Assert.assertEquals; public class TestPageUtils diff --git a/core/trino-main/src/test/java/io/trino/operator/TestPagesIndex.java b/core/trino-main/src/test/java/io/trino/operator/TestPagesIndex.java index 92bb22f665c1..eb880d113908 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestPagesIndex.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestPagesIndex.java @@ -14,17 +14,17 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.Arrays; import java.util.Iterator; import java.util.List; -import static io.prestosql.SequencePageBuilder.createSequencePage; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.SequencePageBuilder.createSequencePage; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestPartitionedOutputOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestPartitionedOutputOperator.java index 3da9095c1aa6..3d86d34e19b6 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestPartitionedOutputOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestPartitionedOutputOperator.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.execution.StateMachine; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.execution.buffer.PartitionedOutputBuffer; -import io.prestosql.memory.context.SimpleLocalMemoryContext; -import io.prestosql.operator.exchange.LocalPartitionGenerator; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.TestingTaskContext; -import io.prestosql.type.BlockTypeOperators; +import io.trino.execution.StateMachine; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.execution.buffer.PartitionedOutputBuffer; +import io.trino.memory.context.SimpleLocalMemoryContext; +import io.trino.operator.exchange.LocalPartitionGenerator; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.TestingTaskContext; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -43,16 +43,16 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.block.BlockAssertions.createLongDictionaryBlock; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.block.BlockAssertions.createRLEBlock; -import static io.prestosql.execution.buffer.BufferState.OPEN; -import static io.prestosql.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; -import static io.prestosql.execution.buffer.OutputBuffers.BufferType.PARTITIONED; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.block.BlockAssertions.createLongDictionaryBlock; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.block.BlockAssertions.createRLEBlock; +import static io.trino.execution.buffer.BufferState.OPEN; +import static io.trino.execution.buffer.BufferState.TERMINAL_BUFFER_STATES; +import static io.trino.execution.buffer.OutputBuffers.BufferType.PARTITIONED; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestPipelineStats.java b/core/trino-main/src/test/java/io/trino/operator/TestPipelineStats.java index cb8651ab1fd3..8998c3eaa634 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestPipelineStats.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestPipelineStats.java @@ -23,8 +23,8 @@ import org.joda.time.DateTime; import org.testng.annotations.Test; -import static io.prestosql.operator.TestDriverStats.assertExpectedDriverStats; -import static io.prestosql.operator.TestOperatorStats.assertExpectedOperatorStats; +import static io.trino.operator.TestDriverStats.assertExpectedDriverStats; +import static io.trino.operator.TestOperatorStats.assertExpectedOperatorStats; import static java.util.concurrent.TimeUnit.NANOSECONDS; import static org.joda.time.DateTimeZone.UTC; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestPositionLinks.java b/core/trino-main/src/test/java/io/trino/operator/TestPositionLinks.java index d4ff5bac1a6b..e81c73b89229 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestPositionLinks.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestPositionLinks.java @@ -14,10 +14,10 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.RowPagesBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.BlockTypeOperators; +import io.trino.RowPagesBuilder; +import io.trino.spi.Page; +import io.trino.spi.type.TypeOperators; +import io.trino.type.BlockTypeOperators; import it.unimi.dsi.fastutil.longs.LongArrayList; import org.testng.annotations.Test; @@ -25,8 +25,8 @@ import java.util.OptionalInt; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.operator.SyntheticAddress.encodeSyntheticAddress; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.operator.SyntheticAddress.encodeSyntheticAddress; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; public class TestPositionLinks diff --git a/core/trino-main/src/test/java/io/trino/operator/TestRealAverageAggregation.java b/core/trino-main/src/test/java/io/trino/operator/TestRealAverageAggregation.java index 6367d3b6832c..531e815a5c23 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestRealAverageAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestRealAverageAggregation.java @@ -14,22 +14,22 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.aggregation.AbstractTestAggregationFunction; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.operator.aggregation.AbstractTestAggregationFunction; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.List; -import static io.prestosql.block.BlockAssertions.createBlockOfReals; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.block.BlockAssertions.createBlockOfReals; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static java.lang.Float.floatToRawIntBits; @Test(singleThreaded = true) diff --git a/core/trino-main/src/test/java/io/trino/operator/TestRowNumberOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestRowNumberOperator.java index 4a117eef8a7a..8bde7b84c6e8 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestRowNumberOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestRowNumberOperator.java @@ -17,16 +17,16 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import com.google.common.primitives.Ints; -import io.prestosql.RowPagesBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.type.BlockTypeOperators; +import io.trino.RowPagesBuilder; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; @@ -41,17 +41,17 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertEqualsIgnoreOrder; import static io.airlift.testing.Assertions.assertGreaterThan; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.GroupByHashYieldAssertion.createPagesWithDistinctHashKeys; -import static io.prestosql.operator.GroupByHashYieldAssertion.finishOperatorWithYieldingGroupByHash; -import static io.prestosql.operator.OperatorAssertion.toMaterializedResult; -import static io.prestosql.operator.OperatorAssertion.toPages; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.GroupByHashYieldAssertion.createPagesWithDistinctHashKeys; +import static io.trino.operator.GroupByHashYieldAssertion.finishOperatorWithYieldingGroupByHash; +import static io.trino.operator.OperatorAssertion.toMaterializedResult; +import static io.trino.operator.OperatorAssertion.toPages; +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.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestRowReferencePageManager.java b/core/trino-main/src/test/java/io/trino/operator/TestRowReferencePageManager.java index dd1b65276b42..9e5fd623c52a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestRowReferencePageManager.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestRowReferencePageManager.java @@ -13,16 +13,16 @@ */ package io.trino.operator; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import it.unimi.dsi.fastutil.longs.LongComparator; import org.testng.annotations.Test; import java.util.ArrayList; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.Math.toIntExact; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestScanFilterAndProjectOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestScanFilterAndProjectOperator.java index 8845b4398bb2..ba802ccf1b30 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestScanFilterAndProjectOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestScanFilterAndProjectOperator.java @@ -15,33 +15,33 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.SequencePageBuilder; -import io.prestosql.block.BlockAssertions; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.Split; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.operator.index.PageRecordSet; -import io.prestosql.operator.project.CursorProcessor; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.operator.project.TestPageProcessor.LazyPagePageProjection; -import io.prestosql.operator.project.TestPageProcessor.SelectAllFilter; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.TestingSplit; +import io.trino.SequencePageBuilder; +import io.trino.block.BlockAssertions; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.metadata.Metadata; +import io.trino.metadata.Split; +import io.trino.metadata.SqlScalarFunction; +import io.trino.operator.index.PageRecordSet; +import io.trino.operator.project.CursorProcessor; +import io.trino.operator.project.PageProcessor; +import io.trino.operator.project.TestPageProcessor.LazyPagePageProjection; +import io.trino.operator.project.TestPageProcessor.SelectAllFilter; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.connector.RecordPageSource; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.tree.QualifiedName; +import io.trino.testing.MaterializedResult; +import io.trino.testing.TestingSplit; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -53,23 +53,23 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.DataSize.Unit.KILOBYTE; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.block.BlockAssertions.toValues; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.OperatorAssertion.toMaterializedResult; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.operator.project.PageProcessor.MAX_BATCH_SIZE; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.call; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingHandles.TEST_TABLE_HANDLE; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.block.BlockAssertions.toValues; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.OperatorAssertion.toMaterializedResult; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.operator.project.PageProcessor.MAX_BATCH_SIZE; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.call; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingHandles.TEST_TABLE_HANDLE; +import static io.trino.testing.TestingTaskContext.createTaskContext; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestStreamingAggregationOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestStreamingAggregationOperator.java index 6269db6a5b6c..9bc6962c3dc2 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestStreamingAggregationOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestStreamingAggregationOperator.java @@ -14,16 +14,16 @@ package io.trino.operator; import com.google.common.collect.ImmutableList; -import io.prestosql.RowPagesBuilder; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.testing.MaterializedResult; +import io.trino.RowPagesBuilder; +import io.trino.metadata.Metadata; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.Page; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.tree.QualifiedName; +import io.trino.testing.MaterializedResult; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -34,15 +34,15 @@ import java.util.concurrent.ScheduledExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEquals; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.OperatorAssertion.assertOperatorEquals; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.lang.String.format; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestTableFinishOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestTableFinishOperator.java index a6867de5975d..408ea0b259c2 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestTableFinishOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestTableFinishOperator.java @@ -17,21 +17,21 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.TableFinishOperator.TableFinishOperatorFactory; -import io.prestosql.operator.TableFinishOperator.TableFinisher; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LongArrayBlockBuilder; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.statistics.ColumnStatisticMetadata; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.StatisticAggregationsDescriptor; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.operator.TableFinishOperator.TableFinishOperatorFactory; +import io.trino.operator.TableFinishOperator.TableFinisher; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.block.Block; +import io.trino.spi.block.LongArrayBlockBuilder; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.statistics.ColumnStatisticMetadata; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.StatisticAggregationsDescriptor; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -44,16 +44,16 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Iterables.getOnlyElement; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.block.BlockAssertions.assertBlockEquals; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.spi.statistics.ColumnStatisticType.MAX_VALUE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.block.BlockAssertions.assertBlockEquals; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.spi.statistics.ColumnStatisticType.MAX_VALUE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestTableWriterOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestTableWriterOperator.java index b89268baf1e3..f15ce31acd31 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestTableWriterOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestTableWriterOperator.java @@ -15,31 +15,31 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.RowPagesBuilder; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.OutputTableHandle; -import io.prestosql.operator.AggregationOperator.AggregationOperatorFactory; -import io.prestosql.operator.DevNullOperator.DevNullOperatorFactory; -import io.prestosql.operator.TableWriterOperator.TableWriterInfo; -import io.prestosql.operator.TableWriterOperator.TableWriterOperatorFactory; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Type; -import io.prestosql.split.PageSinkManager; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.TableWriterNode.CreateTarget; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.RowPagesBuilder; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.metadata.Metadata; +import io.trino.metadata.OutputTableHandle; +import io.trino.operator.AggregationOperator.AggregationOperatorFactory; +import io.trino.operator.DevNullOperator.DevNullOperatorFactory; +import io.trino.operator.TableWriterOperator.TableWriterInfo; +import io.trino.operator.TableWriterOperator.TableWriterOperatorFactory; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Type; +import io.trino.split.PageSinkManager; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.TableWriterNode.CreateTarget; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -53,15 +53,15 @@ import java.util.concurrent.ScheduledExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.CompletableFuture.completedFuture; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestTaskStats.java b/core/trino-main/src/test/java/io/trino/operator/TestTaskStats.java index 66ea476e535f..0b681d35f170 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestTaskStats.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestTaskStats.java @@ -21,7 +21,7 @@ import org.joda.time.DateTime; import org.testng.annotations.Test; -import static io.prestosql.operator.TestPipelineStats.assertExpectedPipelineStats; +import static io.trino.operator.TestPipelineStats.assertExpectedPipelineStats; import static java.util.concurrent.TimeUnit.NANOSECONDS; import static org.joda.time.DateTimeZone.UTC; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestTopNOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestTopNOperator.java index ee3bf25a84fe..fb807aed1faf 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestTopNOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestTopNOperator.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.ExceededMemoryLimitException; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; +import io.trino.ExceededMemoryLimitException; +import io.trino.spi.Page; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -31,16 +31,16 @@ import java.util.concurrent.ScheduledExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEquals; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_LAST; -import static io.prestosql.spi.connector.SortOrder.DESC_NULLS_LAST; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.OperatorAssertion.assertOperatorEquals; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_LAST; +import static io.trino.spi.connector.SortOrder.DESC_NULLS_LAST; +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.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestTopNRowNumberOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestTopNRowNumberOperator.java index 626f46037568..894cb54ce681 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestTopNRowNumberOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestTopNRowNumberOperator.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.RowPagesBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.type.BlockTypeOperators; +import io.trino.RowPagesBuilder; +import io.trino.spi.Page; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -36,16 +36,16 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertGreaterThan; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.GroupByHashYieldAssertion.createPagesWithDistinctHashKeys; -import static io.prestosql.operator.GroupByHashYieldAssertion.finishOperatorWithYieldingGroupByHash; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEquals; -import static io.prestosql.operator.TopNRowNumberOperator.TopNRowNumberOperatorFactory; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.GroupByHashYieldAssertion.createPagesWithDistinctHashKeys; +import static io.trino.operator.GroupByHashYieldAssertion.finishOperatorWithYieldingGroupByHash; +import static io.trino.operator.OperatorAssertion.assertOperatorEquals; +import static io.trino.operator.TopNRowNumberOperator.TopNRowNumberOperatorFactory; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestTypeSignature.java b/core/trino-main/src/test/java/io/trino/operator/TestTypeSignature.java index 3491ecfd5c31..73f10b2b1376 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestTypeSignature.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestTypeSignature.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.RowFieldName; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.RowFieldName; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarcharType; import org.testng.annotations.Test; import java.util.List; @@ -28,18 +28,18 @@ import java.util.Set; import static com.google.common.collect.Lists.transform; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.TypeSignature.rowType; -import static io.prestosql.spi.type.TypeSignatureParameter.namedField; -import static io.prestosql.spi.type.TypeSignatureParameter.numericParameter; -import static io.prestosql.spi.type.TypeSignatureParameter.typeVariable; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.parseTypeSignature; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.TypeSignature.rowType; +import static io.trino.spi.type.TypeSignatureParameter.namedField; +import static io.trino.spi.type.TypeSignatureParameter.numericParameter; +import static io.trino.spi.type.TypeSignatureParameter.typeVariable; +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.TypeSignatureTranslator.parseTypeSignature; import static java.util.Arrays.asList; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestWindowOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestWindowOperator.java index 9188250fbbcb..9ffa48165e24 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestWindowOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestWindowOperator.java @@ -16,25 +16,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; import io.airlift.units.DataSize; -import io.prestosql.ExceededMemoryLimitException; -import io.prestosql.operator.WindowOperator.WindowOperatorFactory; -import io.prestosql.operator.window.FirstValueFunction; -import io.prestosql.operator.window.FrameInfo; -import io.prestosql.operator.window.LagFunction; -import io.prestosql.operator.window.LastValueFunction; -import io.prestosql.operator.window.LeadFunction; -import io.prestosql.operator.window.NthValueFunction; -import io.prestosql.operator.window.ReflectionWindowFunctionSupplier; -import io.prestosql.operator.window.RowNumberFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spiller.SpillerFactory; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.TestingTaskContext; +import io.trino.ExceededMemoryLimitException; +import io.trino.operator.WindowOperator.WindowOperatorFactory; +import io.trino.operator.window.FirstValueFunction; +import io.trino.operator.window.FrameInfo; +import io.trino.operator.window.LagFunction; +import io.trino.operator.window.LastValueFunction; +import io.trino.operator.window.LeadFunction; +import io.trino.operator.window.NthValueFunction; +import io.trino.operator.window.ReflectionWindowFunctionSupplier; +import io.trino.operator.window.RowNumberFunction; +import io.trino.spi.Page; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spiller.SpillerFactory; +import io.trino.sql.gen.OrderingCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; +import io.trino.testing.TestingTaskContext; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -48,22 +48,22 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertGreaterThan; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEquals; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEqualsIgnoreOrder; -import static io.prestosql.operator.OperatorAssertion.toMaterializedResult; -import static io.prestosql.operator.OperatorAssertion.toPages; -import static io.prestosql.operator.WindowFunctionDefinition.window; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_FOLLOWING; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; -import static io.prestosql.sql.tree.WindowFrame.Type.RANGE; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.OperatorAssertion.assertOperatorEquals; +import static io.trino.operator.OperatorAssertion.assertOperatorEqualsIgnoreOrder; +import static io.trino.operator.OperatorAssertion.toMaterializedResult; +import static io.trino.operator.OperatorAssertion.toPages; +import static io.trino.operator.WindowFunctionDefinition.window; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_FOLLOWING; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; +import static io.trino.sql.tree.WindowFrame.Type.RANGE; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.lang.String.format; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestWorkProcessor.java b/core/trino-main/src/test/java/io/trino/operator/TestWorkProcessor.java index 6cec59a77ec5..2454972e8ec6 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestWorkProcessor.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestWorkProcessor.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.operator.WorkProcessorAssertion.Transform; +import io.trino.operator.WorkProcessor.ProcessState; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.operator.WorkProcessorAssertion.Transform; import org.testng.annotations.Test; import java.util.Comparator; @@ -26,17 +26,17 @@ import java.util.Optional; import java.util.concurrent.atomic.AtomicBoolean; -import static io.prestosql.operator.WorkProcessor.ProcessState.Type.BLOCKED; -import static io.prestosql.operator.WorkProcessor.ProcessState.Type.FINISHED; -import static io.prestosql.operator.WorkProcessor.ProcessState.Type.RESULT; -import static io.prestosql.operator.WorkProcessor.ProcessState.Type.YIELD; -import static io.prestosql.operator.WorkProcessorAssertion.assertBlocks; -import static io.prestosql.operator.WorkProcessorAssertion.assertFinishes; -import static io.prestosql.operator.WorkProcessorAssertion.assertResult; -import static io.prestosql.operator.WorkProcessorAssertion.assertUnblocks; -import static io.prestosql.operator.WorkProcessorAssertion.assertYields; -import static io.prestosql.operator.WorkProcessorAssertion.processorFrom; -import static io.prestosql.operator.WorkProcessorAssertion.transformationFrom; +import static io.trino.operator.WorkProcessor.ProcessState.Type.BLOCKED; +import static io.trino.operator.WorkProcessor.ProcessState.Type.FINISHED; +import static io.trino.operator.WorkProcessor.ProcessState.Type.RESULT; +import static io.trino.operator.WorkProcessor.ProcessState.Type.YIELD; +import static io.trino.operator.WorkProcessorAssertion.assertBlocks; +import static io.trino.operator.WorkProcessorAssertion.assertFinishes; +import static io.trino.operator.WorkProcessorAssertion.assertResult; +import static io.trino.operator.WorkProcessorAssertion.assertUnblocks; +import static io.trino.operator.WorkProcessorAssertion.assertYields; +import static io.trino.operator.WorkProcessorAssertion.processorFrom; +import static io.trino.operator.WorkProcessorAssertion.transformationFrom; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestWorkProcessorPipelineSourceOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestWorkProcessorPipelineSourceOperator.java index 03ac1cf5826a..543b7daa52a3 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestWorkProcessorPipelineSourceOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestWorkProcessorPipelineSourceOperator.java @@ -17,16 +17,16 @@ import com.google.common.util.concurrent.SettableFuture; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.metadata.Split; -import io.prestosql.operator.WorkProcessor.Transformation; -import io.prestosql.operator.WorkProcessor.TransformationState; -import io.prestosql.operator.WorkProcessorAssertion.Transform; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.metadata.Split; +import io.trino.operator.WorkProcessor.Transformation; +import io.trino.operator.WorkProcessor.TransformationState; +import io.trino.operator.WorkProcessorAssertion.Transform; +import io.trino.spi.Page; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.sql.planner.plan.PlanNodeId; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -37,11 +37,11 @@ import java.util.function.Supplier; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.execution.Lifespan.taskWide; -import static io.prestosql.operator.WorkProcessorAssertion.transformationFrom; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.TestingSplit.createLocalSplit; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.execution.Lifespan.taskWide; +import static io.trino.operator.WorkProcessorAssertion.transformationFrom; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.TestingSplit.createLocalSplit; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; import static java.util.concurrent.TimeUnit.NANOSECONDS; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestingExchangeHttpClientHandler.java b/core/trino-main/src/test/java/io/trino/operator/TestingExchangeHttpClientHandler.java index 8fd411864404..420eca319f01 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestingExchangeHttpClientHandler.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestingExchangeHttpClientHandler.java @@ -23,19 +23,19 @@ import io.airlift.http.client.testing.TestingHttpClient; import io.airlift.http.client.testing.TestingResponse; import io.airlift.slice.DynamicSliceOutput; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.spi.Page; +import io.trino.execution.buffer.PagesSerde; +import io.trino.execution.buffer.SerializedPage; +import io.trino.spi.Page; -import static io.prestosql.PrestoMediaTypes.PRESTO_PAGES; -import static io.prestosql.client.PrestoHeaders.PRESTO_BUFFER_COMPLETE; -import static io.prestosql.client.PrestoHeaders.PRESTO_PAGE_NEXT_TOKEN; -import static io.prestosql.client.PrestoHeaders.PRESTO_PAGE_TOKEN; -import static io.prestosql.client.PrestoHeaders.PRESTO_TASK_INSTANCE_ID; -import static io.prestosql.execution.buffer.PagesSerdeUtil.calculateChecksum; -import static io.prestosql.execution.buffer.PagesSerdeUtil.writeSerializedPage; -import static io.prestosql.execution.buffer.TestingPagesSerdeFactory.testingPagesSerde; -import static io.prestosql.server.PagesResponseWriter.SERIALIZED_PAGES_MAGIC; +import static io.trino.PrestoMediaTypes.PRESTO_PAGES; +import static io.trino.client.PrestoHeaders.PRESTO_BUFFER_COMPLETE; +import static io.trino.client.PrestoHeaders.PRESTO_PAGE_NEXT_TOKEN; +import static io.trino.client.PrestoHeaders.PRESTO_PAGE_TOKEN; +import static io.trino.client.PrestoHeaders.PRESTO_TASK_INSTANCE_ID; +import static io.trino.execution.buffer.PagesSerdeUtil.calculateChecksum; +import static io.trino.execution.buffer.PagesSerdeUtil.writeSerializedPage; +import static io.trino.execution.buffer.TestingPagesSerdeFactory.testingPagesSerde; +import static io.trino.server.PagesResponseWriter.SERIALIZED_PAGES_MAGIC; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestingOperatorContext.java b/core/trino-main/src/test/java/io/trino/operator/TestingOperatorContext.java index 272b257d442e..9be63526dc20 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestingOperatorContext.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestingOperatorContext.java @@ -14,16 +14,16 @@ package io.trino.operator; import com.google.common.util.concurrent.MoreExecutors; -import io.prestosql.execution.Lifespan; -import io.prestosql.memory.context.MemoryTrackingContext; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.TestingSession; -import io.prestosql.testing.TestingTaskContext; +import io.trino.execution.Lifespan; +import io.trino.memory.context.MemoryTrackingContext; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.TestingSession; +import io.trino.testing.TestingTaskContext; import java.util.concurrent.Executor; import java.util.concurrent.ScheduledExecutorService; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; public final class TestingOperatorContext { diff --git a/core/trino-main/src/test/java/io/trino/operator/TestingTaskBuffer.java b/core/trino-main/src/test/java/io/trino/operator/TestingTaskBuffer.java index 1cefb8b954ea..5d023487a812 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestingTaskBuffer.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestingTaskBuffer.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import static io.prestosql.SequencePageBuilder.createSequencePage; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.SequencePageBuilder.createSequencePage; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestingTaskBuffer { diff --git a/core/trino-main/src/test/java/io/trino/operator/WorkProcessorAssertion.java b/core/trino-main/src/test/java/io/trino/operator/WorkProcessorAssertion.java index e85fd87dcc32..f30fa82e0eb7 100644 --- a/core/trino-main/src/test/java/io/trino/operator/WorkProcessorAssertion.java +++ b/core/trino-main/src/test/java/io/trino/operator/WorkProcessorAssertion.java @@ -14,8 +14,8 @@ package io.trino.operator; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.operator.WorkProcessor.ProcessState; -import io.prestosql.operator.WorkProcessor.TransformationState; +import io.trino.operator.WorkProcessor.ProcessState; +import io.trino.operator.WorkProcessor.TransformationState; import java.util.Iterator; import java.util.List; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestAggregationFunction.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestAggregationFunction.java index 6dbeed497d62..38d96653e1fd 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestAggregationFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestAggregationFunction.java @@ -14,18 +14,18 @@ package io.trino.operator.aggregation; import com.google.common.primitives.Ints; -import io.prestosql.block.BlockAssertions; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.window.PagesWindowIndex; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.function.WindowIndex; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.block.BlockAssertions; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.operator.PagesIndex; +import io.trino.operator.window.PagesWindowIndex; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.function.WindowIndex; +import io.trino.spi.type.Type; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -33,14 +33,14 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.operator.aggregation.AggregationTestUtils.createArgs; -import static io.prestosql.operator.aggregation.AggregationTestUtils.getFinalBlock; -import static io.prestosql.operator.aggregation.AggregationTestUtils.makeValidityAssertion; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.operator.aggregation.AggregationTestUtils.createArgs; +import static io.trino.operator.aggregation.AggregationTestUtils.getFinalBlock; +import static io.trino.operator.aggregation.AggregationTestUtils.makeValidityAssertion; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; public abstract class AbstractTestAggregationFunction { diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestApproximateCountDistinct.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestApproximateCountDistinct.java index 759b03970725..9d88dba9f57c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestApproximateCountDistinct.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestApproximateCountDistinct.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.tree.QualifiedName; import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -36,9 +36,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.testing.Assertions.assertLessThan; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static org.testng.Assert.assertEquals; public abstract class AbstractTestApproximateCountDistinct diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestDecimalAverageAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestDecimalAverageAggregation.java index 702f0026a3db..a16ad17f5169 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestDecimalAverageAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestDecimalAverageAggregation.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDecimal; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDecimal; import java.math.BigDecimal; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestDecimalSumAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestDecimalSumAggregation.java index 46fffc882a5b..07710f0ecd64 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestDecimalSumAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/AbstractTestDecimalSumAggregation.java @@ -13,10 +13,10 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDecimal; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDecimal; import java.math.BigDecimal; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/AggregationTestUtils.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/AggregationTestUtils.java index 85971f48c943..8daf0bd8103b 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/AggregationTestUtils.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/AggregationTestUtils.java @@ -14,12 +14,12 @@ package io.trino.operator.aggregation; import com.google.common.primitives.Ints; -import io.prestosql.block.BlockAssertions; -import io.prestosql.operator.GroupByIdBlock; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; +import io.trino.block.BlockAssertions; +import io.trino.operator.GroupByIdBlock; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; import org.apache.commons.math3.util.Precision; import java.util.Collections; @@ -28,8 +28,8 @@ import java.util.function.BiFunction; import java.util.stream.IntStream; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/BenchmarkArrayAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/BenchmarkArrayAggregation.java index b8a896e40985..484a69b0878e 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/BenchmarkArrayAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/BenchmarkArrayAggregation.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.sql.tree.QualifiedName; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -44,12 +44,12 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static org.openjdk.jmh.annotations.Level.Invocation; @SuppressWarnings("MethodMayBeStatic") diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/BenchmarkGroupedTypedHistogram.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/BenchmarkGroupedTypedHistogram.java index e247527f0f4a..57c61b7a14ed 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/BenchmarkGroupedTypedHistogram.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/BenchmarkGroupedTypedHistogram.java @@ -14,12 +14,12 @@ package io.trino.operator.aggregation; import com.google.common.primitives.Ints; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.GroupByIdBlock; -import io.prestosql.operator.aggregation.groupby.GroupByAggregationTestUtils; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.operator.GroupByIdBlock; +import io.trino.operator.aggregation.groupby.GroupByAggregationTestUtils; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.sql.tree.QualifiedName; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Measurement; @@ -44,11 +44,11 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.histogram.Histogram.NAME; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.histogram.Histogram.NAME; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; @OutputTimeUnit(TimeUnit.SECONDS) //@BenchmarkMode(Mode.AverageTime) diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestAccumulatorCompiler.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestAccumulatorCompiler.java index 03acccb2e945..7c08fd580ef6 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestAccumulatorCompiler.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestAccumulatorCompiler.java @@ -15,22 +15,22 @@ import com.google.common.collect.ImmutableList; import io.airlift.bytecode.DynamicClassLoader; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.TimestampType; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.RealType; +import io.trino.spi.type.TimestampType; import org.testng.annotations.Test; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; -import static io.prestosql.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.INPUT_CHANNEL; +import static io.trino.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType.STATE; +import static io.trino.util.Reflection.methodHandle; import static org.assertj.core.api.Assertions.assertThat; public class TestAccumulatorCompiler diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctAggregations.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctAggregations.java index c884572aa056..34e184be2317 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctAggregations.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctAggregations.java @@ -15,9 +15,9 @@ import org.testng.annotations.Test; -import static io.prestosql.operator.aggregation.ApproximateCountDistinctAggregation.standardErrorToBuckets; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.operator.aggregation.ApproximateCountDistinctAggregation.standardErrorToBuckets; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static org.testng.Assert.assertEquals; public class TestApproximateCountDistinctAggregations diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctBoolean.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctBoolean.java index b52d63d8b891..a766c9c019e5 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctBoolean.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctBoolean.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.primitives.Booleans; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import java.util.List; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BooleanType.BOOLEAN; public class TestApproximateCountDistinctBoolean extends AbstractTestApproximateCountDistinct diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctDouble.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctDouble.java index 8c563dc370c8..f13362259068 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctDouble.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctDouble.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestApproximateCountDistinctDouble extends AbstractTestApproximateCountDistinct diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctInteger.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctInteger.java index 47deb64a902e..1ee65c50bbb2 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctInteger.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctInteger.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.IntegerType.INTEGER; public class TestApproximateCountDistinctInteger extends AbstractTestApproximateCountDistinct diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctIpAddress.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctIpAddress.java index 736bec8cfd65..ab029308f3ca 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctIpAddress.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctIpAddress.java @@ -14,11 +14,11 @@ package io.trino.operator.aggregation; import io.airlift.slice.Slices; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.type.IpAddressType.IPADDRESS; +import static io.trino.type.IpAddressType.IPADDRESS; public class TestApproximateCountDistinctIpAddress extends AbstractTestApproximateCountDistinct diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctLong.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctLong.java index b276385f9c07..1259be8ea73f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctLong.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctLong.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestApproximateCountDistinctLong extends AbstractTestApproximateCountDistinct diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctLongDecimal.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctLongDecimal.java index a73af7a6c1f3..4821d5dd60de 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctLongDecimal.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctLongDecimal.java @@ -14,12 +14,12 @@ package io.trino.operator.aggregation; import io.airlift.slice.Slices; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.Decimals.MAX_PRECISION; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.Decimals.MAX_PRECISION; public class TestApproximateCountDistinctLongDecimal extends AbstractTestApproximateCountDistinct diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctSmallint.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctSmallint.java index 8985dd2da3b9..f9fd7c6bd29a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctSmallint.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctSmallint.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.SmallintType.SMALLINT; public class TestApproximateCountDistinctSmallint extends AbstractTestApproximateCountDistinct diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctTinyint.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctTinyint.java index 4a5ec189ce9a..54b81708af6c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctTinyint.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctTinyint.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TinyintType.TINYINT; public class TestApproximateCountDistinctTinyint extends AbstractTestApproximateCountDistinct diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctVarchar.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctVarchar.java index e4449673aa58..8e4a56b1fb3b 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctVarchar.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximateCountDistinctVarchar.java @@ -14,11 +14,11 @@ package io.trino.operator.aggregation; import io.airlift.slice.Slices; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestApproximateCountDistinctVarchar extends AbstractTestApproximateCountDistinct diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximatePercentileAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximatePercentileAggregation.java index cbf7a5669796..1551800b5cc8 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximatePercentileAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestApproximatePercentileAggregation.java @@ -14,26 +14,26 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.ArrayType; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; -import static io.prestosql.block.BlockAssertions.createBlockOfReals; -import static io.prestosql.block.BlockAssertions.createDoubleRepeatBlock; -import static io.prestosql.block.BlockAssertions.createDoubleSequenceBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createSequenceBlockOfReal; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.block.BlockAssertions.createBlockOfReals; +import static io.trino.block.BlockAssertions.createDoubleRepeatBlock; +import static io.trino.block.BlockAssertions.createDoubleSequenceBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createSequenceBlockOfReal; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; public class TestApproximatePercentileAggregation { diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArbitraryAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArbitraryAggregation.java index c699e7131f0e..91a51002a646 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArbitraryAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArbitraryAggregation.java @@ -14,28 +14,28 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.Arrays; -import static io.prestosql.block.BlockAssertions.createArrayBigintBlock; -import static io.prestosql.block.BlockAssertions.createBooleansBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.block.BlockAssertions.createIntsBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.block.BlockAssertions.createArrayBigintBlock; +import static io.trino.block.BlockAssertions.createBooleansBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.block.BlockAssertions.createIntsBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static org.testng.Assert.assertNotNull; public class TestArbitraryAggregation diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArrayAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArrayAggregation.java index 9eab1f0745aa..b5677ad7b443 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArrayAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArrayAggregation.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.aggregation.groupby.AggregationTestInput; -import io.prestosql.operator.aggregation.groupby.AggregationTestInputBuilder; -import io.prestosql.operator.aggregation.groupby.AggregationTestOutput; -import io.prestosql.operator.aggregation.groupby.GroupByAggregationTestUtils; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.operator.aggregation.groupby.AggregationTestInput; +import io.trino.operator.aggregation.groupby.AggregationTestInputBuilder; +import io.trino.operator.aggregation.groupby.AggregationTestOutput; +import io.trino.operator.aggregation.groupby.GroupByAggregationTestUtils; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.SqlDate; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.ArrayList; @@ -33,18 +33,18 @@ import java.util.Optional; import java.util.Random; -import static io.prestosql.block.BlockAssertions.createArrayBigintBlock; -import static io.prestosql.block.BlockAssertions.createBooleansBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.block.BlockAssertions.createTypedLongsBlock; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.block.BlockAssertions.createArrayBigintBlock; +import static io.trino.block.BlockAssertions.createBooleansBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.block.BlockAssertions.createTypedLongsBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static org.testng.Assert.assertTrue; public class TestArrayAggregation diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArrayMaxNAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArrayMaxNAggregation.java index 51bbc5fe94b3..ae2dd00173c5 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArrayMaxNAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArrayMaxNAggregation.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.Arrays; @@ -27,8 +27,8 @@ import java.util.PriorityQueue; import java.util.stream.LongStream; -import static io.prestosql.block.BlockAssertions.createLongRepeatBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.block.BlockAssertions.createLongRepeatBlock; +import static io.trino.spi.type.BigintType.BIGINT; public class TestArrayMaxNAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArrayMinAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArrayMinAggregation.java index 559dbbea64d5..ef0c5377d31a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArrayMinAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestArrayMinAggregation.java @@ -14,15 +14,15 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.util.StructuralTestUtil.arrayBlockOf; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.util.StructuralTestUtil.arrayBlockOf; public class TestArrayMinAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBitwiseAndAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBitwiseAndAggregation.java index 8aa377914a3f..8dc23e06be22 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBitwiseAndAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBitwiseAndAggregation.java @@ -14,16 +14,16 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.List; import java.util.stream.LongStream; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.spi.type.BigintType.BIGINT; public class TestBitwiseAndAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBitwiseOrAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBitwiseOrAggregation.java index c1d8f90cb7c2..96d37ad65a0a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBitwiseOrAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBitwiseOrAggregation.java @@ -14,16 +14,16 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.List; import java.util.stream.LongStream; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.spi.type.BigintType.BIGINT; public class TestBitwiseOrAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBooleanAndAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBooleanAndAggregation.java index 340fa240983f..7581633ceb85 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBooleanAndAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBooleanAndAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.lang.Boolean.FALSE; import static java.lang.Boolean.TRUE; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBooleanOrAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBooleanOrAggregation.java index 4f2f23f6e71c..796106b9d026 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBooleanOrAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestBooleanOrAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.lang.Boolean.FALSE; import static java.lang.Boolean.TRUE; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestChecksumAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestChecksumAggregation.java index 0dc861c46dd1..d5baf91a5b80 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestChecksumAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestChecksumAggregation.java @@ -13,34 +13,34 @@ */ package io.trino.operator.aggregation; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionXxHash64; +import io.trino.metadata.Metadata; +import io.trino.spi.block.Block; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.Type; +import io.trino.sql.tree.QualifiedName; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionXxHash64; import org.testng.annotations.Test; import static io.airlift.slice.Slices.wrappedLongArray; -import static io.prestosql.block.BlockAssertions.createArrayBigintBlock; -import static io.prestosql.block.BlockAssertions.createBooleansBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.block.BlockAssertions.createLongDecimalsBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createShortDecimalsBlock; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.operator.aggregation.ChecksumAggregationFunction.PRIME64; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.block.BlockAssertions.createArrayBigintBlock; +import static io.trino.block.BlockAssertions.createBooleansBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.block.BlockAssertions.createLongDecimalsBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createShortDecimalsBlock; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.operator.aggregation.ChecksumAggregationFunction.PRIME64; +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.analyzer.TypeSignatureProvider.fromTypes; import static java.util.Arrays.asList; public class TestChecksumAggregation diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountAggregation.java index 40868ecab7b7..27b7d3804207 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestCountAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountColumnAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountColumnAggregation.java index 2af3f4adbdfc..b2d5378dda62 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountColumnAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountColumnAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestCountColumnAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountIfAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountIfAggregation.java index ee96ff037ce3..34d195c9dad9 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountIfAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountIfAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BooleanType.BOOLEAN; public class TestCountIfAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountNullAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountNullAggregation.java index f32251b02f04..f0be665a21ff 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountNullAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestCountNullAggregation.java @@ -14,25 +14,25 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionListBuilder; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.metadata.FunctionListBuilder; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import org.testng.annotations.BeforeClass; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestCountNullAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDateMaxAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDateMaxAggregation.java index 7c5c7177deb4..2a2b7c5a98d8 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDateMaxAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDateMaxAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.DateType.DATE; +import static io.trino.spi.type.DateType.DATE; public class TestDateMaxAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDecimalAverageAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDecimalAverageAggregation.java index 3cc4453adf26..7b450cae1102 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDecimalAverageAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDecimalAverageAggregation.java @@ -13,20 +13,20 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.LongDecimalWithOverflowAndLongState; -import io.prestosql.operator.aggregation.state.LongDecimalWithOverflowAndLongStateFactory; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.UnscaledDecimal128Arithmetic; +import io.trino.operator.aggregation.state.LongDecimalWithOverflowAndLongState; +import io.trino.operator.aggregation.state.LongDecimalWithOverflowAndLongStateFactory; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.UnscaledDecimal128Arithmetic; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import java.math.BigDecimal; import java.math.BigInteger; -import static io.prestosql.operator.aggregation.DecimalAverageAggregation.average; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; +import static io.trino.operator.aggregation.DecimalAverageAggregation.average; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; import static org.testng.Assert.assertEquals; @Test(singleThreaded = true) diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDecimalSumAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDecimalSumAggregation.java index cfa9f622bf50..5593ed7aa081 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDecimalSumAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDecimalSumAggregation.java @@ -13,19 +13,19 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.state.LongDecimalWithOverflowState; -import io.prestosql.operator.aggregation.state.LongDecimalWithOverflowStateFactory; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.VariableWidthBlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.UnscaledDecimal128Arithmetic; +import io.trino.operator.aggregation.state.LongDecimalWithOverflowState; +import io.trino.operator.aggregation.state.LongDecimalWithOverflowStateFactory; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.VariableWidthBlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.UnscaledDecimal128Arithmetic; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import java.math.BigInteger; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; import static org.testng.Assert.assertEquals; @Test(singleThreaded = true) diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleAverageAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleAverageAggregation.java index 91ae28a13f60..f20961a9efb6 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleAverageAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleAverageAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleAverageAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleCorrelationAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleCorrelationAggregation.java index 0f79670889c4..2087ee9013eb 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleCorrelationAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleCorrelationAggregation.java @@ -14,8 +14,8 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.correlation.PearsonsCorrelation; import org.testng.annotations.Test; @@ -23,10 +23,10 @@ import java.util.stream.DoubleStream; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.block.BlockAssertions.createDoubleSequenceBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.operator.aggregation.AggregationTestUtils.constructDoublePrimitiveArray; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.block.BlockAssertions.createDoubleSequenceBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.operator.aggregation.AggregationTestUtils.constructDoublePrimitiveArray; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleCorrelationAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleCovariancePopAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleCovariancePopAggregation.java index afdb93299940..e66023b82280 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleCovariancePopAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleCovariancePopAggregation.java @@ -14,15 +14,15 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.correlation.Covariance; import java.util.List; -import static io.prestosql.block.BlockAssertions.createDoubleSequenceBlock; -import static io.prestosql.operator.aggregation.AggregationTestUtils.constructDoublePrimitiveArray; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.block.BlockAssertions.createDoubleSequenceBlock; +import static io.trino.operator.aggregation.AggregationTestUtils.constructDoublePrimitiveArray; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleCovariancePopAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleCovarianceSampAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleCovarianceSampAggregation.java index bf6293e3450b..4495d4b0c5eb 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleCovarianceSampAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleCovarianceSampAggregation.java @@ -14,15 +14,15 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.correlation.Covariance; import java.util.List; -import static io.prestosql.block.BlockAssertions.createDoubleSequenceBlock; -import static io.prestosql.operator.aggregation.AggregationTestUtils.constructDoublePrimitiveArray; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.block.BlockAssertions.createDoubleSequenceBlock; +import static io.trino.operator.aggregation.AggregationTestUtils.constructDoublePrimitiveArray; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleCovarianceSampAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleGeometricMeanAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleGeometricMeanAggregation.java index dbf02b6618c5..45a317033bc0 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleGeometricMeanAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleGeometricMeanAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleGeometricMeanAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleHistogramAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleHistogramAggregation.java index 99e750afb1de..06e0c648bd25 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleHistogramAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleHistogramAggregation.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.MapType; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.type.MapType; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.Map; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.getFinalBlock; -import static io.prestosql.operator.aggregation.AggregationTestUtils.getIntermediateBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.getFinalBlock; +import static io.trino.operator.aggregation.AggregationTestUtils.getIntermediateBlock; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.util.StructuralTestUtil.mapType; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleKurtosisAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleKurtosisAggregation.java index a7c4aff11256..8738bef4ba2a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleKurtosisAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleKurtosisAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.descriptive.moment.Kurtosis; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleKurtosisAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleMaxAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleMaxAggregation.java index 401a45edef9a..00b062117821 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleMaxAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleMaxAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleMaxAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleMinAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleMinAggregation.java index 295ca103d7ab..836103eae785 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleMinAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleMinAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleMinAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleMinNAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleMinNAggregation.java index a786b8fce903..d0ea9f6d4bb6 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleMinNAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleMinNAggregation.java @@ -14,8 +14,8 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.Arrays; @@ -23,11 +23,11 @@ import java.util.Objects; import java.util.PriorityQueue; -import static io.prestosql.block.BlockAssertions.createDoubleSequenceBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.block.BlockAssertions.createLongRepeatBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.block.BlockAssertions.createDoubleSequenceBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.block.BlockAssertions.createLongRepeatBlock; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleMinNAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleRegrInterceptAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleRegrInterceptAggregation.java index 93cabc306c95..d65412f7950a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleRegrInterceptAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleRegrInterceptAggregation.java @@ -14,17 +14,17 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.regression.SimpleRegression; import org.testng.annotations.Test; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.block.BlockAssertions.createDoubleSequenceBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.block.BlockAssertions.createDoubleSequenceBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleRegrInterceptAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleRegrSlopeAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleRegrSlopeAggregation.java index 7b6c1503f29a..d1f9eb5d49a5 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleRegrSlopeAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleRegrSlopeAggregation.java @@ -14,17 +14,17 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.regression.SimpleRegression; import org.testng.annotations.Test; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.block.BlockAssertions.createDoubleSequenceBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.block.BlockAssertions.createDoubleSequenceBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleRegrSlopeAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleSkewnessAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleSkewnessAggregation.java index 2789c8627cf5..ae135fe73fe4 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleSkewnessAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleSkewnessAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.descriptive.moment.Skewness; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleSkewnessAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleStdDevAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleStdDevAggregation.java index 4b06ef12f798..689c168bd0e4 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleStdDevAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleStdDevAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleStdDevAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleStdDevPopAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleStdDevPopAggregation.java index d4b6a1e9c58b..9bad9e30fb20 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleStdDevPopAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleStdDevPopAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleStdDevPopAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleSumAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleSumAggregation.java index 463c74a19016..8471b9f396ff 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleSumAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleSumAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleSumAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleVarianceAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleVarianceAggregation.java index 8db3bc02ffd9..e68b588d390c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleVarianceAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleVarianceAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.descriptive.moment.Variance; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleVarianceAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleVariancePopAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleVariancePopAggregation.java index 98ad6134eab9..ecbc6c530beb 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleVariancePopAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestDoubleVariancePopAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.descriptive.moment.Variance; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestDoubleVariancePopAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestHistogram.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestHistogram.java index 90ddc9f54ff0..05c4835e6f2d 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestHistogram.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestHistogram.java @@ -17,20 +17,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.primitives.Ints; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.operator.aggregation.groupby.AggregationTestInput; -import io.prestosql.operator.aggregation.groupby.AggregationTestInputBuilder; -import io.prestosql.operator.aggregation.groupby.AggregationTestOutput; -import io.prestosql.operator.aggregation.groupby.GroupByAggregationTestUtils; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.operator.aggregation.groupby.AggregationTestInput; +import io.trino.operator.aggregation.groupby.AggregationTestInputBuilder; +import io.trino.operator.aggregation.groupby.AggregationTestOutput; +import io.trino.operator.aggregation.groupby.GroupByAggregationTestUtils; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; +import io.trino.sql.tree.QualifiedName; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.testng.annotations.Test; @@ -44,28 +44,28 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; -import static io.prestosql.block.BlockAssertions.createBooleansBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createStringArraysBlock; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.OperatorAssertion.toRow; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.operator.aggregation.histogram.Histogram.NAME; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.util.DateTimeZoneIndex.getDateTimeZone; -import static io.prestosql.util.StructuralTestUtil.mapBlockOf; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.block.BlockAssertions.createBooleansBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createStringArraysBlock; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.OperatorAssertion.toRow; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.operator.aggregation.histogram.Histogram.NAME; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.util.DateTimeZoneIndex.getDateTimeZone; +import static io.trino.util.StructuralTestUtil.mapBlockOf; +import static io.trino.util.StructuralTestUtil.mapType; import static org.testng.Assert.assertTrue; public class TestHistogram diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalDayToSecondAverageAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalDayToSecondAverageAggregation.java index 5a9bfcf50dff..61e80287b009 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalDayToSecondAverageAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalDayToSecondAverageAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.SqlIntervalDayTime; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.type.SqlIntervalDayTime; import java.util.List; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; import static java.lang.Math.round; public class TestIntervalDayToSecondAverageAggregation diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalDayToSecondSumAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalDayToSecondSumAggregation.java index ec189e7a548f..91e7609d3f6f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalDayToSecondSumAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalDayToSecondSumAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.SqlIntervalDayTime; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.type.SqlIntervalDayTime; import java.util.List; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; public class TestIntervalDayToSecondSumAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalYearToMonthAverageAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalYearToMonthAverageAggregation.java index 0bdcb2d203ca..ad76c3246775 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalYearToMonthAverageAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalYearToMonthAverageAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.SqlIntervalYearMonth; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.type.SqlIntervalYearMonth; import java.util.List; -import static io.prestosql.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; +import static io.trino.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; import static java.lang.Math.round; import static java.lang.Math.toIntExact; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalYearToMonthSumAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalYearToMonthSumAggregation.java index e2e3932d6d12..256da457923d 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalYearToMonthSumAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestIntervalYearToMonthSumAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.type.SqlIntervalYearMonth; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.type.SqlIntervalYearMonth; import java.util.List; -import static io.prestosql.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; +import static io.trino.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; public class TestIntervalYearToMonthSumAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongAverageAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongAverageAggregation.java index 994188df4418..6ade70c9e299 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongAverageAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongAverageAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestLongAverageAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalAverageAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalAverageAggregation.java index a5505edaeeaf..f87554f61b4b 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalAverageAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalAverageAggregation.java @@ -14,15 +14,15 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; import java.math.BigDecimal; import java.util.List; -import static io.prestosql.spi.type.Decimals.MAX_SHORT_PRECISION; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.Decimals.MAX_SHORT_PRECISION; +import static io.trino.spi.type.Decimals.encodeScaledValue; public class TestLongDecimalAverageAggregation extends AbstractTestDecimalAverageAggregation diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalMaxAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalMaxAggregation.java index 43840b7b7e67..e14058df27ae 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalMaxAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalMaxAggregation.java @@ -14,16 +14,16 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.Type; import java.math.BigDecimal; import java.util.List; -import static io.prestosql.spi.type.Decimals.writeBigDecimal; +import static io.trino.spi.type.Decimals.writeBigDecimal; public class TestLongDecimalMaxAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalMinAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalMinAggregation.java index bae979c07003..fe77113a20b9 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalMinAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalMinAggregation.java @@ -14,16 +14,16 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.Type; import java.math.BigDecimal; import java.util.List; -import static io.prestosql.spi.type.Decimals.writeBigDecimal; +import static io.trino.spi.type.Decimals.writeBigDecimal; public class TestLongDecimalMinAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalSumAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalSumAggregation.java index c77b379e7f9e..31464f340163 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalSumAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongDecimalSumAggregation.java @@ -14,15 +14,15 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; import java.math.BigDecimal; import java.util.List; -import static io.prestosql.spi.type.Decimals.MAX_SHORT_PRECISION; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.Decimals.MAX_SHORT_PRECISION; +import static io.trino.spi.type.Decimals.encodeScaledValue; public class TestLongDecimalSumAggregation extends AbstractTestDecimalSumAggregation diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongGeometricMeanAggregationFunction.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongGeometricMeanAggregationFunction.java index 6f08847abf70..2b5bed261670 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongGeometricMeanAggregationFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongGeometricMeanAggregationFunction.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class TestLongGeometricMeanAggregationFunction extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongKurtosisAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongKurtosisAggregation.java index 54af85638b87..628997106548 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongKurtosisAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongKurtosisAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.descriptive.moment.Kurtosis; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestLongKurtosisAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongMaxAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongMaxAggregation.java index f19e8ea83d8c..1b96a593b84c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongMaxAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongMaxAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestLongMaxAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongMaxNAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongMaxNAggregation.java index fac5735dbf75..6cd03c23c279 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongMaxNAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongMaxNAggregation.java @@ -14,8 +14,8 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.Arrays; @@ -23,10 +23,10 @@ import java.util.Objects; import java.util.PriorityQueue; -import static io.prestosql.block.BlockAssertions.createLongRepeatBlock; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.block.BlockAssertions.createLongRepeatBlock; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.spi.type.BigintType.BIGINT; public class TestLongMaxNAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongMinAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongMinAggregation.java index e9dddb20cc5c..c6c57c24dea2 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongMinAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongMinAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestLongMinAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongSkewnessAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongSkewnessAggregation.java index 82eacca61cc5..97a7e1b99822 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongSkewnessAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongSkewnessAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.descriptive.moment.Skewness; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestLongSkewnessAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongStdDevAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongStdDevAggregation.java index beff7f713f1e..5783715210dc 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongStdDevAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongStdDevAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestLongStdDevAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongStdDevPopAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongStdDevPopAggregation.java index f6489ebef494..c86cb0592ff7 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongStdDevPopAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongStdDevPopAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestLongStdDevPopAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongSumAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongSumAggregation.java index c92958f26557..d024b4e34b1e 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongSumAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongSumAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestLongSumAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongVarianceAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongVarianceAggregation.java index a14e1521299e..e47eaf5a4b8a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongVarianceAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongVarianceAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.descriptive.moment.Variance; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestLongVarianceAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongVariancePopAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongVariancePopAggregation.java index 4b5d7e2641aa..44336165bc19 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongVariancePopAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestLongVariancePopAggregation.java @@ -14,14 +14,14 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.descriptive.moment.Variance; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestLongVariancePopAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMapAggAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMapAggAggregation.java index 9c894fb2c4ed..9aeaafe5211c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMapAggAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMapAggAggregation.java @@ -15,33 +15,33 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.LinkedHashMap; import java.util.Map; -import static io.prestosql.block.BlockAssertions.createBooleansBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.block.BlockAssertions.createStringArraysBlock; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.block.BlockAssertions.createTypedLongsBlock; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.OperatorAssertion.toRow; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.operator.aggregation.MapAggregationFunction.NAME; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.util.StructuralTestUtil.mapBlockOf; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.block.BlockAssertions.createBooleansBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.block.BlockAssertions.createStringArraysBlock; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.block.BlockAssertions.createTypedLongsBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.OperatorAssertion.toRow; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.operator.aggregation.MapAggregationFunction.NAME; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.util.StructuralTestUtil.mapBlockOf; +import static io.trino.util.StructuralTestUtil.mapType; public class TestMapAggAggregation { diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMapUnionAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMapUnionAggregation.java index c758d236f1b4..395568cba26a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMapUnionAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMapUnionAggregation.java @@ -15,27 +15,27 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.HashMap; import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.operator.aggregation.MapUnionAggregation.NAME; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.util.StructuralTestUtil.arrayBlockOf; -import static io.prestosql.util.StructuralTestUtil.mapBlockOf; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.operator.aggregation.MapUnionAggregation.NAME; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.util.StructuralTestUtil.arrayBlockOf; +import static io.trino.util.StructuralTestUtil.mapBlockOf; +import static io.trino.util.StructuralTestUtil.mapType; public class TestMapUnionAggregation { diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMergeHyperLogLogAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMergeHyperLogLogAggregation.java index 47b9940bd3d7..760d5d122efd 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMergeHyperLogLogAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMergeHyperLogLogAggregation.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import io.airlift.stats.cardinality.HyperLogLog; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; public class TestMergeHyperLogLogAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMergeQuantileDigestFunction.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMergeQuantileDigestFunction.java index 35aaf6ef6f60..3584b0c42c9b 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMergeQuantileDigestFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMergeQuantileDigestFunction.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import io.airlift.stats.QuantileDigest; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.QuantileDigestType; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.QuantileDigestType; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import org.testng.annotations.Test; import java.util.List; import java.util.function.BiFunction; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.QuantileDigestParametricType.QDIGEST; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.QuantileDigestParametricType.QDIGEST; import static java.util.Objects.requireNonNull; public class TestMergeQuantileDigestFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMergeTDigestAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMergeTDigestAggregation.java index abac85c13550..5b6e17af069e 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMergeTDigestAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMergeTDigestAggregation.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import io.airlift.stats.TDigest; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.type.TDigestType.TDIGEST; +import static io.trino.type.TDigestType.TDIGEST; public class TestMergeTDigestAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMultimapAggAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMultimapAggAggregation.java index 9daf1ae6054a..d421397fb270 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMultimapAggAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestMultimapAggAggregation.java @@ -17,19 +17,19 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMultimap; import com.google.common.primitives.Ints; -import io.prestosql.RowPageBuilder; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.aggregation.groupby.AggregationTestInput; -import io.prestosql.operator.aggregation.groupby.AggregationTestInputBuilder; -import io.prestosql.operator.aggregation.groupby.AggregationTestOutput; -import io.prestosql.operator.aggregation.groupby.GroupByAggregationTestUtils; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.RowPageBuilder; +import io.trino.metadata.Metadata; +import io.trino.operator.aggregation.groupby.AggregationTestInput; +import io.trino.operator.aggregation.groupby.AggregationTestInputBuilder; +import io.trino.operator.aggregation.groupby.AggregationTestOutput; +import io.trino.operator.aggregation.groupby.GroupByAggregationTestUtils; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.ArrayList; @@ -40,14 +40,14 @@ import java.util.Random; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.operator.aggregation.multimapagg.MultimapAggregationFunction.NAME; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.operator.aggregation.multimapagg.MultimapAggregationFunction.NAME; +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.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.util.StructuralTestUtil.mapType; import static org.testng.Assert.assertTrue; public class TestMultimapAggAggregation diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestQuantileDigestAggregationFunction.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestQuantileDigestAggregationFunction.java index 381400502568..5bca031aea1f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestQuantileDigestAggregationFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestQuantileDigestAggregationFunction.java @@ -16,14 +16,14 @@ import com.google.common.base.Joiner; import com.google.common.primitives.Floats; import io.airlift.stats.QuantileDigest; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.Arrays; @@ -33,24 +33,24 @@ import java.util.stream.LongStream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.block.BlockAssertions.createBlockOfReals; -import static io.prestosql.block.BlockAssertions.createDoubleSequenceBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createRLEBlock; -import static io.prestosql.block.BlockAssertions.createSequenceBlockOfReal; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.operator.aggregation.FloatingPointBitsConverterUtil.doubleToSortableLong; -import static io.prestosql.operator.aggregation.FloatingPointBitsConverterUtil.floatToSortableInt; -import static io.prestosql.operator.aggregation.TestMergeQuantileDigestFunction.QDIGEST_EQUALITY; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.block.BlockAssertions.createBlockOfReals; +import static io.trino.block.BlockAssertions.createDoubleSequenceBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createRLEBlock; +import static io.trino.block.BlockAssertions.createSequenceBlockOfReal; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.operator.aggregation.FloatingPointBitsConverterUtil.doubleToSortableLong; +import static io.trino.operator.aggregation.FloatingPointBitsConverterUtil.floatToSortableInt; +import static io.trino.operator.aggregation.TestMergeQuantileDigestFunction.QDIGEST_EQUALITY; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static java.lang.Double.NaN; import static java.lang.Integer.max; import static java.lang.Integer.min; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealCorrelationAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealCorrelationAggregation.java index fa0f22360205..f91296926d95 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealCorrelationAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealCorrelationAggregation.java @@ -14,15 +14,15 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.correlation.PearsonsCorrelation; import java.util.List; -import static io.prestosql.block.BlockAssertions.createSequenceBlockOfReal; -import static io.prestosql.operator.aggregation.AggregationTestUtils.constructDoublePrimitiveArray; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.block.BlockAssertions.createSequenceBlockOfReal; +import static io.trino.operator.aggregation.AggregationTestUtils.constructDoublePrimitiveArray; +import static io.trino.spi.type.RealType.REAL; public class TestRealCorrelationAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealCovariancePopAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealCovariancePopAggregation.java index f76ba76682b2..ccef5f83b0b8 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealCovariancePopAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealCovariancePopAggregation.java @@ -14,15 +14,15 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.correlation.Covariance; import java.util.List; -import static io.prestosql.block.BlockAssertions.createSequenceBlockOfReal; -import static io.prestosql.operator.aggregation.AggregationTestUtils.constructDoublePrimitiveArray; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.block.BlockAssertions.createSequenceBlockOfReal; +import static io.trino.operator.aggregation.AggregationTestUtils.constructDoublePrimitiveArray; +import static io.trino.spi.type.RealType.REAL; public class TestRealCovariancePopAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealCovarianceSampAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealCovarianceSampAggregation.java index 265cb810713b..789734d5ac52 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealCovarianceSampAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealCovarianceSampAggregation.java @@ -14,15 +14,15 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.correlation.Covariance; import java.util.List; -import static io.prestosql.block.BlockAssertions.createSequenceBlockOfReal; -import static io.prestosql.operator.aggregation.AggregationTestUtils.constructDoublePrimitiveArray; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.block.BlockAssertions.createSequenceBlockOfReal; +import static io.trino.operator.aggregation.AggregationTestUtils.constructDoublePrimitiveArray; +import static io.trino.spi.type.RealType.REAL; public class TestRealCovarianceSampAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealGeometricMeanAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealGeometricMeanAggregation.java index 05d49470c5cd..9e475b052eb7 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealGeometricMeanAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealGeometricMeanAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.floatToRawIntBits; public class TestRealGeometricMeanAggregation diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealHistogramAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealHistogramAggregation.java index cab2aa9c1912..036e87fdd4be 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealHistogramAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealHistogramAggregation.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.MapType; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.type.MapType; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.Map; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.getFinalBlock; -import static io.prestosql.operator.aggregation.AggregationTestUtils.getIntermediateBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.getFinalBlock; +import static io.trino.operator.aggregation.AggregationTestUtils.getIntermediateBlock; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.util.StructuralTestUtil.mapType; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealRegrInterceptAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealRegrInterceptAggregation.java index fab6a6d84869..1d64a00b6ece 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealRegrInterceptAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealRegrInterceptAggregation.java @@ -14,17 +14,17 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.regression.SimpleRegression; import org.testng.annotations.Test; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.block.BlockAssertions.createBlockOfReals; -import static io.prestosql.block.BlockAssertions.createSequenceBlockOfReal; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.block.BlockAssertions.createBlockOfReals; +import static io.trino.block.BlockAssertions.createSequenceBlockOfReal; +import static io.trino.spi.type.RealType.REAL; public class TestRealRegrInterceptAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealRegrSlopeAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealRegrSlopeAggregation.java index a87534ce8db8..aaa196fffe3d 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealRegrSlopeAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealRegrSlopeAggregation.java @@ -14,17 +14,17 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.commons.math3.stat.regression.SimpleRegression; import org.testng.annotations.Test; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.block.BlockAssertions.createBlockOfReals; -import static io.prestosql.block.BlockAssertions.createSequenceBlockOfReal; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.block.BlockAssertions.createBlockOfReals; +import static io.trino.block.BlockAssertions.createSequenceBlockOfReal; +import static io.trino.spi.type.RealType.REAL; public class TestRealRegrSlopeAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealSumAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealSumAggregation.java index a6457288e0bf..3b7ddff9fc27 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealSumAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestRealSumAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.floatToRawIntBits; public class TestRealSumAggregation diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalAverageAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalAverageAggregation.java index 05fbdb8c6444..8249ece7c32e 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalAverageAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalAverageAggregation.java @@ -14,15 +14,15 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; import java.math.BigDecimal; import java.util.List; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.Decimals.MAX_SHORT_PRECISION; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.Decimals.MAX_SHORT_PRECISION; public class TestShortDecimalAverageAggregation extends AbstractTestDecimalAverageAggregation diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalMaxAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalMaxAggregation.java index 430d654bb275..db4bd2345ff4 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalMaxAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalMaxAggregation.java @@ -14,11 +14,11 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalMinAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalMinAggregation.java index 34a449c30e0b..6ab93b2d3b86 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalMinAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalMinAggregation.java @@ -14,11 +14,11 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalSumAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalSumAggregation.java index 8b358dea481f..7c9b9a291c45 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalSumAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestShortDecimalSumAggregation.java @@ -14,15 +14,15 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; import java.math.BigDecimal; import java.util.List; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.Decimals.MAX_SHORT_PRECISION; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.Decimals.MAX_SHORT_PRECISION; public class TestShortDecimalSumAggregation extends AbstractTestDecimalSumAggregation diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestStateCompiler.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestStateCompiler.java index 7d072d05f845..6a44b3eff191 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestStateCompiler.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestStateCompiler.java @@ -17,28 +17,28 @@ import com.google.common.collect.ImmutableMap; import io.airlift.bytecode.DynamicClassLoader; import io.airlift.slice.Slice; -import io.prestosql.array.BlockBigArray; -import io.prestosql.array.BooleanBigArray; -import io.prestosql.array.ByteBigArray; -import io.prestosql.array.DoubleBigArray; -import io.prestosql.array.IntBigArray; -import io.prestosql.array.LongBigArray; -import io.prestosql.array.ReferenceCountMap; -import io.prestosql.array.SliceBigArray; -import io.prestosql.operator.aggregation.state.LongState; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.operator.aggregation.state.VarianceState; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.function.GroupedAccumulatorState; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.util.Reflection; +import io.trino.array.BlockBigArray; +import io.trino.array.BooleanBigArray; +import io.trino.array.ByteBigArray; +import io.trino.array.DoubleBigArray; +import io.trino.array.IntBigArray; +import io.trino.array.LongBigArray; +import io.trino.array.ReferenceCountMap; +import io.trino.array.SliceBigArray; +import io.trino.operator.aggregation.state.LongState; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.operator.aggregation.state.VarianceState; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.function.GroupedAccumulatorState; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.util.Reflection; import org.openjdk.jol.info.ClassLayout; import org.testng.annotations.Test; @@ -48,16 +48,16 @@ import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedDoubleArray; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.StructuralTestUtil.mapBlockOf; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.StructuralTestUtil.mapBlockOf; +import static io.trino.util.StructuralTestUtil.mapType; import static org.testng.Assert.assertEquals; public class TestStateCompiler diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTDigestAggregationFunction.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTDigestAggregationFunction.java index 55b52a1b6c64..4fecf0064ae8 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTDigestAggregationFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTDigestAggregationFunction.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import io.airlift.stats.TDigest; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.SqlVarbinary; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.List; @@ -29,14 +29,14 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.block.BlockAssertions.createDoubleSequenceBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.block.BlockAssertions.createRLEBlock; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.operator.scalar.TDigestFunctions.DEFAULT_WEIGHT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.block.BlockAssertions.createDoubleSequenceBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.block.BlockAssertions.createRLEBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.operator.scalar.TDigestFunctions.DEFAULT_WEIGHT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static java.lang.Math.abs; import static java.util.Collections.nCopies; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedHeap.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedHeap.java index a4e6b06d9775..cd7067af8974 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedHeap.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedHeap.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.TypeOperators; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; import org.testng.annotations.Test; import java.util.ArrayList; @@ -26,7 +26,7 @@ import java.util.PrimitiveIterator; import java.util.stream.IntStream; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; public class TestTypedHeap diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedHistogram.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedHistogram.java index 23fa5f22bbce..a81e9f992098 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedHistogram.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedHistogram.java @@ -13,20 +13,20 @@ */ package io.trino.operator.aggregation; -import io.prestosql.operator.aggregation.histogram.SingleTypedHistogram; -import io.prestosql.operator.aggregation.histogram.TypedHistogram; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.BlockTypeOperators; +import io.trino.operator.aggregation.histogram.SingleTypedHistogram; +import io.trino.operator.aggregation.histogram.TypedHistogram; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.MapType; +import io.trino.spi.type.TypeOperators; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.Test; import java.util.function.IntUnaryOperator; import java.util.stream.IntStream; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.util.StructuralTestUtil.mapType; import static org.testng.Assert.assertEquals; public class TestTypedHistogram diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedKeyValueHeap.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedKeyValueHeap.java index 734b4d36c3cf..6c83358c1a63 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedKeyValueHeap.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedKeyValueHeap.java @@ -13,11 +13,11 @@ */ package io.trino.operator.aggregation; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.TypeOperators; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; import org.testng.annotations.Test; import java.util.ArrayList; @@ -27,8 +27,8 @@ import java.util.stream.IntStream; import java.util.stream.Stream; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; public class TestTypedKeyValueHeap diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedSet.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedSet.java index bffe72ef1fbf..b6a9315e2fae 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedSet.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestTypedSet.java @@ -14,12 +14,12 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.BlockTypeOperators; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.Test; import java.util.HashSet; @@ -27,13 +27,13 @@ import java.util.Set; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.block.BlockAssertions.createEmptyLongsBlock; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_FUNCTION_MEMORY_LIMIT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.block.BlockAssertions.createEmptyLongsBlock; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.spi.StandardErrorCode.EXCEEDED_FUNCTION_MEMORY_LIMIT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static java.util.Collections.nCopies; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestUnknownMaxAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestUnknownMaxAggregation.java index 46352d60245d..a6894f6a9a94 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestUnknownMaxAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestUnknownMaxAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.type.UnknownType.UNKNOWN; public class TestUnknownMaxAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestUnknownMinAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestUnknownMinAggregation.java index 0028ca1cd41f..2237a4e342a1 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestUnknownMinAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestUnknownMinAggregation.java @@ -14,13 +14,13 @@ package io.trino.operator.aggregation; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.type.UnknownType.UNKNOWN; public class TestUnknownMinAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestVarBinaryMaxAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestVarBinaryMaxAggregation.java index 6a9baa17f02d..446d34cca99e 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestVarBinaryMaxAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestVarBinaryMaxAggregation.java @@ -18,14 +18,14 @@ import com.google.common.primitives.Ints; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestVarBinaryMaxAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestVarBinaryMinAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestVarBinaryMinAggregation.java index 366c17fc0ad6..38773c184bb5 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/TestVarBinaryMinAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/TestVarBinaryMinAggregation.java @@ -18,14 +18,14 @@ import com.google.common.primitives.Ints; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestVarBinaryMinAggregation extends AbstractTestAggregationFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/AggregationTestInput.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/AggregationTestInput.java index 3ef9d8c78f57..3697fffd1575 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/AggregationTestInput.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/AggregationTestInput.java @@ -16,11 +16,11 @@ import com.google.common.base.Suppliers; import com.google.common.primitives.Ints; -import io.prestosql.operator.GroupByIdBlock; -import io.prestosql.operator.aggregation.AggregationTestUtils; -import io.prestosql.operator.aggregation.GroupedAccumulator; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.Page; +import io.trino.operator.GroupByIdBlock; +import io.trino.operator.aggregation.AggregationTestUtils; +import io.trino.operator.aggregation.GroupedAccumulator; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.Page; import java.util.Optional; import java.util.function.Supplier; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/AggregationTestInputBuilder.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/AggregationTestInputBuilder.java index 2eab1d908993..8e0cc416212d 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/AggregationTestInputBuilder.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/AggregationTestInputBuilder.java @@ -14,9 +14,9 @@ package io.trino.operator.aggregation.groupby; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.Page; +import io.trino.spi.block.Block; public class AggregationTestInputBuilder { diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/AggregationTestOutput.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/AggregationTestOutput.java index ef34244a7186..bef3993f0382 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/AggregationTestOutput.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/AggregationTestOutput.java @@ -14,9 +14,9 @@ package io.trino.operator.aggregation.groupby; -import io.prestosql.block.BlockAssertions; -import io.prestosql.operator.aggregation.GroupedAccumulator; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.block.BlockAssertions; +import io.trino.operator.aggregation.GroupedAccumulator; +import io.trino.spi.block.BlockBuilder; import java.util.function.BiConsumer; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/GroupByAggregationTestUtils.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/GroupByAggregationTestUtils.java index 57a38486d791..e391249c93d6 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/GroupByAggregationTestUtils.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/groupby/GroupByAggregationTestUtils.java @@ -14,9 +14,9 @@ package io.trino.operator.aggregation.groupby; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.Page; +import io.trino.spi.block.Block; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/histogram/TestValueStore.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/histogram/TestValueStore.java index ee6a33146a84..ffa63791ef99 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/histogram/TestValueStore.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/histogram/TestValueStore.java @@ -13,14 +13,14 @@ */ package io.trino.operator.aggregation.histogram; -import io.prestosql.block.BlockAssertions; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.block.BlockAssertions; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.VarcharType; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/minmaxby/TestMinMaxByAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/minmaxby/TestMinMaxByAggregation.java index 15e05c590790..3d3e494e7332 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/minmaxby/TestMinMaxByAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/minmaxby/TestMinMaxByAggregation.java @@ -14,39 +14,39 @@ package io.trino.operator.aggregation.minmaxby; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.Type; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.List; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.block.BlockAssertions.createArrayBigintBlock; -import static io.prestosql.block.BlockAssertions.createBlockOfReals; -import static io.prestosql.block.BlockAssertions.createBooleansBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.block.BlockAssertions.createIntsBlock; -import static io.prestosql.block.BlockAssertions.createLongDecimalsBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createShortDecimalsBlock; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.block.BlockAssertions.createArrayBigintBlock; +import static io.trino.block.BlockAssertions.createBlockOfReals; +import static io.trino.block.BlockAssertions.createBooleansBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.block.BlockAssertions.createIntsBlock; +import static io.trino.block.BlockAssertions.createLongDecimalsBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createShortDecimalsBlock; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +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.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.type.UnknownType.UNKNOWN; import static java.util.Arrays.asList; import static org.testng.Assert.assertNotNull; diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/minmaxby/TestMinMaxByNAggregation.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/minmaxby/TestMinMaxByNAggregation.java index b58bd84a7bd2..d06c70a615a5 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/minmaxby/TestMinMaxByNAggregation.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/minmaxby/TestMinMaxByNAggregation.java @@ -14,30 +14,30 @@ package io.trino.operator.aggregation.minmaxby; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.type.ArrayType; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.Arrays; -import static io.prestosql.block.BlockAssertions.createArrayBigintBlock; -import static io.prestosql.block.BlockAssertions.createBlockOfReals; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createRLEBlock; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.operator.aggregation.AggregationTestUtils.groupedAggregation; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.block.BlockAssertions.createArrayBigintBlock; +import static io.trino.block.BlockAssertions.createBlockOfReals; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createRLEBlock; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.operator.aggregation.AggregationTestUtils.groupedAggregation; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static org.testng.Assert.assertEquals; public class TestMinMaxByNAggregation diff --git a/core/trino-main/src/test/java/io/trino/operator/exchange/TestLocalExchange.java b/core/trino-main/src/test/java/io/trino/operator/exchange/TestLocalExchange.java index 21b922ee2992..a8e742356058 100644 --- a/core/trino-main/src/test/java/io/trino/operator/exchange/TestLocalExchange.java +++ b/core/trino-main/src/test/java/io/trino/operator/exchange/TestLocalExchange.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.SequencePageBuilder; -import io.prestosql.execution.Lifespan; -import io.prestosql.operator.InterpretedHashGenerator; -import io.prestosql.operator.PageAssertions; -import io.prestosql.operator.PipelineExecutionStrategy; -import io.prestosql.operator.exchange.LocalExchange.LocalExchangeFactory; -import io.prestosql.operator.exchange.LocalExchange.LocalExchangeSinkFactory; -import io.prestosql.operator.exchange.LocalExchange.LocalExchangeSinkFactoryId; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.BlockTypeOperators; +import io.trino.SequencePageBuilder; +import io.trino.execution.Lifespan; +import io.trino.operator.InterpretedHashGenerator; +import io.trino.operator.PageAssertions; +import io.trino.operator.PipelineExecutionStrategy; +import io.trino.operator.exchange.LocalExchange.LocalExchangeFactory; +import io.trino.operator.exchange.LocalExchange.LocalExchangeSinkFactory; +import io.trino.operator.exchange.LocalExchange.LocalExchangeSinkFactoryId; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -36,14 +36,14 @@ import java.util.function.Consumer; import static io.airlift.testing.Assertions.assertContains; -import static io.prestosql.operator.PipelineExecutionStrategy.GROUPED_EXECUTION; -import static io.prestosql.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_BROADCAST_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_PASSTHROUGH_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.operator.PipelineExecutionStrategy.GROUPED_EXECUTION; +import static io.trino.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_ARBITRARY_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_BROADCAST_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_PASSTHROUGH_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; diff --git a/core/trino-main/src/test/java/io/trino/operator/index/TestFieldSetFilteringRecordSet.java b/core/trino-main/src/test/java/io/trino/operator/index/TestFieldSetFilteringRecordSet.java index b048020d4938..d743f8abe959 100644 --- a/core/trino-main/src/test/java/io/trino/operator/index/TestFieldSetFilteringRecordSet.java +++ b/core/trino-main/src/test/java/io/trino/operator/index/TestFieldSetFilteringRecordSet.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.TypeOperators; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.util.StructuralTestUtil.arrayBlockOf; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.util.StructuralTestUtil.arrayBlockOf; import static org.testng.Assert.assertTrue; public class TestFieldSetFilteringRecordSet diff --git a/core/trino-main/src/test/java/io/trino/operator/index/TestTupleFilterProcessor.java b/core/trino-main/src/test/java/io/trino/operator/index/TestTupleFilterProcessor.java index 08380d8a0ac9..cd57a5d9cd8d 100644 --- a/core/trino-main/src/test/java/io/trino/operator/index/TestTupleFilterProcessor.java +++ b/core/trino-main/src/test/java/io/trino/operator/index/TestTupleFilterProcessor.java @@ -15,30 +15,30 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.type.BlockTypeOperators; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.type.BlockTypeOperators; import org.testng.annotations.Test; import java.util.List; import java.util.OptionalInt; import static com.google.common.collect.Iterators.getOnlyElement; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.operator.project.PageProcessor.MAX_BATCH_SIZE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.operator.project.PageProcessor.MAX_BATCH_SIZE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.TestingConnectorSession.SESSION; public class TestTupleFilterProcessor { diff --git a/core/trino-main/src/test/java/io/trino/operator/project/BenchmarkDictionaryBlockGetSizeInBytes.java b/core/trino-main/src/test/java/io/trino/operator/project/BenchmarkDictionaryBlockGetSizeInBytes.java index aa7500b01d87..084e19a71413 100644 --- a/core/trino-main/src/test/java/io/trino/operator/project/BenchmarkDictionaryBlockGetSizeInBytes.java +++ b/core/trino-main/src/test/java/io/trino/operator/project/BenchmarkDictionaryBlockGetSizeInBytes.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.type.MapType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -43,9 +43,9 @@ import java.util.Random; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.block.BlockAssertions.createSlicesBlock; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.block.BlockAssertions.createSlicesBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.concurrent.TimeUnit.MICROSECONDS; @SuppressWarnings("MethodMayBeStatic") diff --git a/core/trino-main/src/test/java/io/trino/operator/project/TestDictionaryAwarePageFilter.java b/core/trino-main/src/test/java/io/trino/operator/project/TestDictionaryAwarePageFilter.java index 3533ee8557ba..2c533559ad81 100644 --- a/core/trino-main/src/test/java/io/trino/operator/project/TestDictionaryAwarePageFilter.java +++ b/core/trino-main/src/test/java/io/trino/operator/project/TestDictionaryAwarePageFilter.java @@ -14,13 +14,13 @@ package io.trino.operator.project; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.ConnectorSession; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntArraySet; import it.unimi.dsi.fastutil.ints.IntSet; @@ -29,8 +29,8 @@ import java.util.Arrays; import java.util.stream.IntStream; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/project/TestDictionaryAwarePageProjection.java b/core/trino-main/src/test/java/io/trino/operator/project/TestDictionaryAwarePageProjection.java index ca48c7d70d28..96404b5e3958 100644 --- a/core/trino-main/src/test/java/io/trino/operator/project/TestDictionaryAwarePageProjection.java +++ b/core/trino-main/src/test/java/io/trino/operator/project/TestDictionaryAwarePageProjection.java @@ -14,17 +14,17 @@ package io.trino.operator.project; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.Work; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.Work; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import org.testng.annotations.AfterClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -35,10 +35,10 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertGreaterThan; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.block.BlockAssertions.assertBlockEquals; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.spi.block.DictionaryId.randomDictionaryId; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.block.BlockAssertions.assertBlockEquals; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.spi.block.DictionaryId.randomDictionaryId; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/project/TestInputPageProjection.java b/core/trino-main/src/test/java/io/trino/operator/project/TestInputPageProjection.java index fff66fd7a1f3..30764b5dd402 100644 --- a/core/trino-main/src/test/java/io/trino/operator/project/TestInputPageProjection.java +++ b/core/trino-main/src/test/java/io/trino/operator/project/TestInputPageProjection.java @@ -13,15 +13,15 @@ */ package io.trino.operator.project; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LazyBlock; +import io.trino.operator.DriverYieldSignal; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.LazyBlock; import org.testng.annotations.Test; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/project/TestMergePages.java b/core/trino-main/src/test/java/io/trino/operator/project/TestMergePages.java index 7a7bfe8b0cd5..ffdd97c293db 100644 --- a/core/trino-main/src/test/java/io/trino/operator/project/TestMergePages.java +++ b/core/trino-main/src/test/java/io/trino/operator/project/TestMergePages.java @@ -14,25 +14,25 @@ package io.trino.operator.project; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.WorkProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.type.Type; +import io.trino.operator.WorkProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.List; -import static io.prestosql.SequencePageBuilder.createSequencePage; -import static io.prestosql.execution.buffer.PageSplitterUtil.splitPage; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.operator.WorkProcessorAssertion.assertFinishes; -import static io.prestosql.operator.WorkProcessorAssertion.validateResult; -import static io.prestosql.operator.project.MergePages.mergePages; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.SequencePageBuilder.createSequencePage; +import static io.trino.execution.buffer.PageSplitterUtil.splitPage; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.operator.WorkProcessorAssertion.assertFinishes; +import static io.trino.operator.WorkProcessorAssertion.validateResult; +import static io.trino.operator.project.MergePages.mergePages; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Math.toIntExact; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/project/TestPageProcessor.java b/core/trino-main/src/test/java/io/trino/operator/project/TestPageProcessor.java index 362995a831da..c967da8763a9 100644 --- a/core/trino-main/src/test/java/io/trino/operator/project/TestPageProcessor.java +++ b/core/trino-main/src/test/java/io/trino/operator/project/TestPageProcessor.java @@ -18,21 +18,21 @@ import io.airlift.slice.Slices; import io.airlift.testing.TestingTicker; import io.airlift.units.Duration; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.CompletedWork; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.Work; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.block.VariableWidthBlock; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionProfiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.metadata.Metadata; +import io.trino.operator.CompletedWork; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.Work; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.block.VariableWidthBlock; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionProfiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; import org.openjdk.jol.info.ClassLayout; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -47,24 +47,24 @@ import java.util.function.Supplier; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.block.BlockAssertions.createLongSequenceBlock; -import static io.prestosql.block.BlockAssertions.createSlicesBlock; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.execution.executor.PrioritizedSplitRunner.SPLIT_RUN_QUANTA; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.operator.project.PageProcessor.MAX_BATCH_SIZE; -import static io.prestosql.operator.project.PageProcessor.MAX_PAGE_SIZE_IN_BYTES; -import static io.prestosql.operator.project.PageProcessor.MIN_PAGE_SIZE_IN_BYTES; -import static io.prestosql.operator.project.SelectedPositions.positionsRange; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.relational.Expressions.call; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.block.BlockAssertions.createLongSequenceBlock; +import static io.trino.block.BlockAssertions.createSlicesBlock; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.execution.executor.PrioritizedSplitRunner.SPLIT_RUN_QUANTA; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.operator.project.PageProcessor.MAX_BATCH_SIZE; +import static io.trino.operator.project.PageProcessor.MAX_PAGE_SIZE_IN_BYTES; +import static io.trino.operator.project.PageProcessor.MIN_PAGE_SIZE_IN_BYTES; +import static io.trino.operator.project.SelectedPositions.positionsRange; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.relational.Expressions.call; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.lang.String.join; import static java.util.Collections.nCopies; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestExtract.java b/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestExtract.java index 376c0a0071da..06590c8329d7 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestExtract.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestExtract.java @@ -14,9 +14,9 @@ package io.trino.operator.scalar; import com.google.common.base.CaseFormat; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.sql.tree.Extract; +import io.trino.spi.PrestoException; +import io.trino.sql.query.QueryAssertions; +import io.trino.sql.tree.Extract; 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/scalar/AbstractTestFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestFunctions.java index 56aaadb9a116..d30fb836c395 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,19 +15,19 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.Session; -import io.prestosql.metadata.FunctionListBuilder; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.type.DecimalParseResult; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.FeaturesConfig; +import io.trino.Session; +import io.trino.metadata.FunctionListBuilder; +import io.trino.metadata.SqlScalarFunction; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.Plugin; +import io.trino.spi.function.OperatorType; +import io.trino.spi.type.DecimalParseResult; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.LongTimestamp; +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.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -37,13 +37,13 @@ import java.util.Map; import static io.airlift.testing.Closeables.closeAllRuntimeException; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.Signature.mangleOperatorName; -import static io.prestosql.operator.scalar.timestamp.VarcharToTimestampCast.castToLongTimestamp; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.Signature.mangleOperatorName; +import static io.trino.operator.scalar.timestamp.VarcharToTimestampCast.castToLongTimestamp; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.testng.Assert.fail; 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 39a10874e620..a27bfce72f02 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,24 +16,24 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.analyzer.RegexLibrary; +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; import java.util.ArrayList; import java.util.List; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.String.format; public abstract class AbstractTestRegexpFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayDistinct.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayDistinct.java index 9d5f4745188d..24c7a0598f86 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayDistinct.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayDistinct.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.aggregation.TypedSet; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.aggregation.TypedSet; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.tree.QualifiedName; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -58,14 +58,14 @@ import java.util.concurrent.TimeUnit; import static com.google.common.base.Verify.verify; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.FunctionExtractor.extractFunctions; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.TypedSet.createEqualityTypedSet; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.FunctionExtractor.extractFunctions; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.TypedSet.createEqualityTypedSet; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayEqualOperator.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayEqualOperator.java index 82221969ab5b..9968a3621839 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayEqualOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayEqualOperator.java @@ -13,9 +13,9 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -38,9 +38,9 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.addElement; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.getEqualBlockMethod; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.toType; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.addElement; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.getEqualBlockMethod; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.toType; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayFilter.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayFilter.java index 957fd75bce0f..657107241cc9 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayFilter.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayFilter.java @@ -14,30 +14,30 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionListBuilder; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.VariableReferenceExpression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.type.FunctionType; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionListBuilder; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.VariableReferenceExpression; +import io.trino.sql.tree.QualifiedName; +import io.trino.type.FunctionType; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -63,24 +63,24 @@ import static com.google.common.base.Throwables.throwIfUnchecked; import static com.google.common.base.Verify.verify; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.operator.scalar.BenchmarkArrayFilter.ExactArrayFilterFunction.EXACT_ARRAY_FILTER_FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.TypeSignature.functionType; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.operator.scalar.BenchmarkArrayFilter.ExactArrayFilterFunction.EXACT_ARRAY_FILTER_FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.TypeSignature.functionType; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.util.Reflection.methodHandle; import static java.lang.Boolean.TRUE; @SuppressWarnings("MethodMayBeStatic") diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayHashCodeOperator.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayHashCodeOperator.java index 73fe3e1dc290..a4281f785edd 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayHashCodeOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayHashCodeOperator.java @@ -13,9 +13,9 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -38,9 +38,9 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.addElement; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.getHashCodeBlockMethod; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.toType; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.addElement; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.getHashCodeBlockMethod; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.toType; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayIntersect.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayIntersect.java index c3ef9f0db8cf..9290ccc08679 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayIntersect.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayIntersect.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.tree.QualifiedName; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -51,15 +51,15 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayJoin.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayJoin.java index 24663d84a00b..0378ce47c150 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayJoin.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayJoin.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.tree.QualifiedName; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -47,14 +47,14 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.nio.charset.StandardCharsets.UTF_8; @SuppressWarnings("MethodMayBeStatic") diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArraySort.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArraySort.java index 774d511ee3e0..be5f74e6623f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArraySort.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArraySort.java @@ -16,24 +16,24 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionComparison; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.tree.QualifiedName; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionComparison; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -57,13 +57,13 @@ import java.util.concurrent.TimeUnit; import static com.google.common.base.Verify.verify; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.FunctionExtractor.extractFunctions; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.FunctionExtractor.extractFunctions; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArraySubscript.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArraySubscript.java index 6861a7332f5b..871520bdae4f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArraySubscript.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArraySubscript.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.ArrayBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.ArrayBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -55,16 +55,16 @@ import java.util.concurrent.TimeUnit; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.block.BlockAssertions.createSlicesBlock; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.function.OperatorType.SUBSCRIPT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.block.BlockAssertions.createSlicesBlock; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.function.OperatorType.SUBSCRIPT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayTransform.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayTransform.java index 922a11492219..e80e9987ce90 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayTransform.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkArrayTransform.java @@ -14,25 +14,25 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.InputReferenceExpression; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.VariableReferenceExpression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.type.FunctionType; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.InputReferenceExpression; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.VariableReferenceExpression; +import io.trino.sql.tree.QualifiedName; +import io.trino.type.FunctionType; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -56,13 +56,13 @@ import java.util.stream.Collectors; import static com.google.common.base.Verify.verify; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.testing.TestingConnectorSession.SESSION; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkEqualOperator.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkEqualOperator.java index 1201eeb24760..8ad93c6040a6 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkEqualOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkEqualOperator.java @@ -13,9 +13,9 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -39,9 +39,9 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.addElement; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.getEqualBlockMethod; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.toType; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.addElement; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.getEqualBlockMethod; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.toType; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkEqualsConjunctsOperator.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkEqualsConjunctsOperator.java index 979b245dc7e9..4d2cac1c27f0 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkEqualsConjunctsOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkEqualsConjunctsOperator.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.sql.relational.SpecialForm.Form; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; +import io.trino.sql.relational.SpecialForm.Form; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -53,14 +53,14 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.Iterables.cycle; import static com.google.common.collect.Iterables.limit; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.relational.Expressions.call; -import static io.prestosql.sql.relational.Expressions.field; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.relational.Expressions.call; +import static io.trino.sql.relational.Expressions.field; @State(Scope.Thread) @Fork(3) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkHashCodeOperator.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkHashCodeOperator.java index b6e949839302..3a94687954e9 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkHashCodeOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkHashCodeOperator.java @@ -13,9 +13,9 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -39,9 +39,9 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.addElement; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.getHashCodeBlockMethod; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.toType; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.addElement; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.getHashCodeBlockMethod; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.toType; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkJsonToArrayCast.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkJsonToArrayCast.java index d90495be4747..1da6afe79eb2 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkJsonToArrayCast.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkJsonToArrayCast.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.SliceOutput; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -50,14 +50,14 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.type.JsonType.JSON; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +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.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.type.JsonType.JSON; import static java.nio.charset.StandardCharsets.UTF_8; @SuppressWarnings("MethodMayBeStatic") diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkJsonToMapCast.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkJsonToMapCast.java index 1d494a5f4e2b..c87239a51163 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkJsonToMapCast.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkJsonToMapCast.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.SliceOutput; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -50,15 +50,15 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +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.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.StructuralTestUtil.mapType; import static java.nio.charset.StandardCharsets.UTF_8; @SuppressWarnings("MethodMayBeStatic") diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkMapConcat.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkMapConcat.java index 99e7e9f9a9ea..caa0bced12a3 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkMapConcat.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkMapConcat.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.type.MapType; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.type.MapType; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.tree.QualifiedName; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -52,15 +52,15 @@ import java.util.concurrent.TimeUnit; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.block.BlockAssertions.createSlicesBlock; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.block.BlockAssertions.createSlicesBlock; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.util.StructuralTestUtil.mapType; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkMapSubscript.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkMapSubscript.java index cc94bb99ac4c..27c181cd4008 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkMapSubscript.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkMapSubscript.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -55,16 +55,16 @@ import static com.google.common.base.Verify.verify; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.block.BlockAssertions.createSlicesBlock; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.function.OperatorType.SUBSCRIPT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.block.BlockAssertions.createSlicesBlock; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.function.OperatorType.SUBSCRIPT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.util.StructuralTestUtil.mapType; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkMapToMapCast.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkMapToMapCast.java index 6f6807be9e93..b456131006c6 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkMapToMapCast.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkMapToMapCast.java @@ -14,17 +14,17 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.MapType; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.MapType; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -47,13 +47,13 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.util.StructuralTestUtil.mapType; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRegexpFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRegexpFunctions.java index fa453a5ddb30..7684569bc962 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRegexpFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRegexpFunctions.java @@ -17,8 +17,8 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.type.JoniRegexp; -import io.prestosql.type.Re2JRegexp; +import io.trino.type.JoniRegexp; +import io.trino.type.Re2JRegexp; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -38,7 +38,7 @@ import java.util.stream.IntStream; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.scalar.JoniRegexpCasts.joniRegexp; +import static io.trino.operator.scalar.JoniRegexpCasts.joniRegexp; import static java.util.concurrent.TimeUnit.NANOSECONDS; import static org.openjdk.jmh.annotations.Mode.AverageTime; import static org.openjdk.jmh.annotations.Scope.Thread; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRoundFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRoundFunction.java index 88b53c58ad9a..ab01f6b10ef4 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRoundFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRoundFunction.java @@ -13,10 +13,10 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Measurement; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRowEqualOperator.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRowEqualOperator.java index 7c3bb5ecf5d7..e7630c8d0e7b 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRowEqualOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRowEqualOperator.java @@ -14,10 +14,10 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.RowType.Field; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.RowType; +import io.trino.spi.type.RowType.Field; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -42,9 +42,9 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.addElement; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.getEqualBlockMethod; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.toType; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.addElement; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.getEqualBlockMethod; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.toType; import static java.util.Collections.nCopies; @SuppressWarnings("MethodMayBeStatic") diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRowHashCodeOperator.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRowHashCodeOperator.java index 27e27fa0183e..3530250858a1 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRowHashCodeOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRowHashCodeOperator.java @@ -14,10 +14,10 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.RowType.Field; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.RowType; +import io.trino.spi.type.RowType.Field; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -42,9 +42,9 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.addElement; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.getHashCodeBlockMethod; -import static io.prestosql.operator.scalar.TypeOperatorBenchmarkUtil.toType; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.addElement; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.getHashCodeBlockMethod; +import static io.trino.operator.scalar.TypeOperatorBenchmarkUtil.toType; import static java.util.Collections.nCopies; @SuppressWarnings("MethodMayBeStatic") diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRowToRowCast.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRowToRowCast.java index 215f8e0ed10b..7e793d8c75e5 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRowToRowCast.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkRowToRowCast.java @@ -14,19 +14,19 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -47,13 +47,13 @@ import java.util.concurrent.ThreadLocalRandom; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.block.RowBlock.fromFieldBlocks; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.block.RowBlock.fromFieldBlocks; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.util.concurrent.TimeUnit.NANOSECONDS; import static org.openjdk.jmh.annotations.Mode.AverageTime; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkStringFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkStringFunctions.java index c37d9d955de0..7f9aa17fb658 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkStringFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkStringFunctions.java @@ -36,14 +36,14 @@ import java.util.stream.IntStream; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.operator.scalar.StringFunctions.leftTrim; -import static io.prestosql.operator.scalar.StringFunctions.length; -import static io.prestosql.operator.scalar.StringFunctions.lower; -import static io.prestosql.operator.scalar.StringFunctions.reverse; -import static io.prestosql.operator.scalar.StringFunctions.rightTrim; -import static io.prestosql.operator.scalar.StringFunctions.substring; -import static io.prestosql.operator.scalar.StringFunctions.trim; -import static io.prestosql.operator.scalar.StringFunctions.upper; +import static io.trino.operator.scalar.StringFunctions.leftTrim; +import static io.trino.operator.scalar.StringFunctions.length; +import static io.trino.operator.scalar.StringFunctions.lower; +import static io.trino.operator.scalar.StringFunctions.reverse; +import static io.trino.operator.scalar.StringFunctions.rightTrim; +import static io.trino.operator.scalar.StringFunctions.substring; +import static io.trino.operator.scalar.StringFunctions.trim; +import static io.trino.operator.scalar.StringFunctions.upper; import static java.lang.Character.MAX_CODE_POINT; import static java.lang.Character.SURROGATE; import static java.lang.Character.getType; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkTransformKey.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkTransformKey.java index d1d252dedc6f..60b98698c85d 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkTransformKey.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkTransformKey.java @@ -15,22 +15,22 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.VariableReferenceExpression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.type.FunctionType; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.VariableReferenceExpression; +import io.trino.sql.tree.QualifiedName; +import io.trino.type.FunctionType; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -54,18 +54,18 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.call; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TypeUtils.writeNativeValue; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.call; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.util.StructuralTestUtil.mapType; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkTransformValue.java b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkTransformValue.java index cd69f3df7211..48a1645e976f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkTransformValue.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/BenchmarkTransformValue.java @@ -16,22 +16,22 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.LambdaDefinitionExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.VariableReferenceExpression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.type.FunctionType; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.LambdaDefinitionExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.VariableReferenceExpression; +import io.trino.sql.tree.QualifiedName; +import io.trino.type.FunctionType; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -55,19 +55,19 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.call; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TypeUtils.writeNativeValue; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.call; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.util.StructuralTestUtil.mapType; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/ConstructorWithInvalidTypeParameters.java b/core/trino-main/src/test/java/io/trino/operator/scalar/ConstructorWithInvalidTypeParameters.java index b381f34edc7b..9556aee8421b 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/ConstructorWithInvalidTypeParameters.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/ConstructorWithInvalidTypeParameters.java @@ -13,11 +13,11 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; @ScalarFunction("good1") public final class ConstructorWithInvalidTypeParameters diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/ConstructorWithValidTypeParameters.java b/core/trino-main/src/test/java/io/trino/operator/scalar/ConstructorWithValidTypeParameters.java index 8133678f86bb..56d7dd6c2292 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/ConstructorWithValidTypeParameters.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/ConstructorWithValidTypeParameters.java @@ -13,11 +13,11 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; @ScalarFunction("good1") public final class ConstructorWithValidTypeParameters diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/CustomFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/CustomFunctions.java index 018273459223..d4dc25bfd95f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/CustomFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/CustomFunctions.java @@ -14,11 +14,11 @@ package io.trino.operator.scalar; import io.airlift.slice.Slice; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; public final class CustomFunctions { 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 8cb44df5f732..c18c826b8352 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,58 +21,58 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.Split; -import io.prestosql.metadata.TableHandle; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.FilterAndProjectOperator; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.ScanFilterAndProjectOperator; -import io.prestosql.operator.SourceOperator; -import io.prestosql.operator.SourceOperatorFactory; -import io.prestosql.operator.project.CursorProcessor; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.operator.project.PageProjection; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.predicate.Utils; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.split.PageSourceProvider; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.planner.ExpressionInterpreter; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.tree.DefaultTraversalVisitor; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.metadata.Metadata; +import io.trino.metadata.Split; +import io.trino.metadata.TableHandle; +import io.trino.operator.DriverContext; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.FilterAndProjectOperator; +import io.trino.operator.Operator; +import io.trino.operator.OperatorFactory; +import io.trino.operator.ScanFilterAndProjectOperator; +import io.trino.operator.SourceOperator; +import io.trino.operator.SourceOperatorFactory; +import io.trino.operator.project.CursorProcessor; +import io.trino.operator.project.PageProcessor; +import io.trino.operator.project.PageProjection; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.HostAddress; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.Plugin; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.predicate.Utils; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TimeZoneKey; +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; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.tree.DefaultTraversalVisitor; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.SymbolReference; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.type.BlockTypeOperators; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.openjdk.jol.info.ClassLayout; @@ -97,39 +97,39 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.slice.SizeOf.sizeOf; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.block.BlockAssertions.createBooleansBlock; -import static io.prestosql.block.BlockAssertions.createDoublesBlock; -import static io.prestosql.block.BlockAssertions.createIntsBlock; -import static io.prestosql.block.BlockAssertions.createLongDecimalsBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createRowBlock; -import static io.prestosql.block.BlockAssertions.createShortDecimalsBlock; -import static io.prestosql.block.BlockAssertions.createSlicesBlock; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.block.BlockAssertions.createTimestampsWithTimeZoneBlock; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.ExpressionTestUtils.createExpression; -import static io.prestosql.sql.ExpressionTestUtils.getTypes; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.SqlToRowExpressionTranslator.translate; -import static io.prestosql.testing.TestingHandles.TEST_TABLE_HANDLE; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.block.BlockAssertions.createBooleansBlock; +import static io.trino.block.BlockAssertions.createDoublesBlock; +import static io.trino.block.BlockAssertions.createIntsBlock; +import static io.trino.block.BlockAssertions.createLongDecimalsBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createRowBlock; +import static io.trino.block.BlockAssertions.createShortDecimalsBlock; +import static io.trino.block.BlockAssertions.createSlicesBlock; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.block.BlockAssertions.createTimestampsWithTimeZoneBlock; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.ExpressionTestUtils.createExpression; +import static io.trino.sql.ExpressionTestUtils.getTypes; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.SqlToRowExpressionTranslator.translate; +import static io.trino.testing.TestingHandles.TEST_TABLE_HANDLE; +import static io.trino.testing.TestingTaskContext.createTaskContext; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayCombinationsFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayCombinationsFunction.java index 1fa4d55dedfd..cd9ec227fa66 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayCombinationsFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayCombinationsFunction.java @@ -15,18 +15,18 @@ import com.google.common.collect.ContiguousSet; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.type.ArrayType; import org.testng.annotations.Test; import static com.google.common.math.LongMath.factorial; -import static io.prestosql.operator.scalar.ArrayCombinationsFunction.combinationCount; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.operator.scalar.ArrayCombinationsFunction.combinationCount; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.String.format; import static java.util.Arrays.asList; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayContainsSequence.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayContainsSequence.java index 526d463548b5..3e7b0404f83b 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayContainsSequence.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayContainsSequence.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BooleanType.BOOLEAN; public class TestArrayContainsSequence extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayExceptFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayExceptFunction.java index 6b891ada6290..28ae4ba57208 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayExceptFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayExceptFunction.java @@ -14,15 +14,15 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.type.ArrayType; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.type.UnknownType.UNKNOWN; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayFilterFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayFilterFunction.java index d03b7c2eb371..3642546486e7 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayFilterFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayFilterFunction.java @@ -14,15 +14,15 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.type.ArrayType; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.type.UnknownType.UNKNOWN; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayFunctions.java index ab6dd43b88f0..a9020ade44d2 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayFunctions.java @@ -14,12 +14,12 @@ package io.trino.operator.scalar; import com.google.common.base.Joiner; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.type.ArrayType; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.TOO_MANY_ARGUMENTS; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.spi.StandardErrorCode.TOO_MANY_ARGUMENTS; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.util.Collections.nCopies; public class TestArrayFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayMatchFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayMatchFunctions.java index 53109fd07915..e01f4c37b86e 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayMatchFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayMatchFunctions.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.type.BooleanType; +import io.trino.spi.type.BooleanType; import org.testng.annotations.Test; public class TestArrayMatchFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayNgramsFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayNgramsFunction.java index 95c5c7b97e96..2d91a4f3c6c9 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayNgramsFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayNgramsFunction.java @@ -14,14 +14,14 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.type.ArrayType; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.type.UnknownType.UNKNOWN; import static java.util.Arrays.asList; public class TestArrayNgramsFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayReduceFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayReduceFunction.java index 43cfc33866ed..6f10903077ad 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayReduceFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayReduceFunction.java @@ -13,15 +13,15 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.type.ArrayType; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_NOT_FOUND; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.StandardErrorCode.FUNCTION_NOT_FOUND; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Arrays.asList; public class TestArrayReduceFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayTransformFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayTransformFunction.java index dad2ae3a7500..5840ac23d08a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayTransformFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestArrayTransformFunction.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +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.testing.TestingSession.testSessionBuilder; +import static io.trino.util.StructuralTestUtil.mapType; import static java.util.Arrays.asList; public class TestArrayTransformFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestBitwiseFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestBitwiseFunctions.java index 262da5744d8c..aaeae9f2411a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestBitwiseFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestBitwiseFunctions.java @@ -15,10 +15,10 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; public class TestBitwiseFunctions extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestBlockAndPositionNullConvention.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestBlockAndPositionNullConvention.java index 3b9dcc3475b4..8a643d22c8e8 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestBlockAndPositionNullConvention.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestBlockAndPositionNullConvention.java @@ -14,26 +14,26 @@ package io.trino.operator.scalar; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.concurrent.atomic.AtomicBoolean; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.type.UnknownType.UNKNOWN; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestColorFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestColorFunctions.java index a22d0acfb36e..9b880e495dc9 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestColorFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestColorFunctions.java @@ -17,16 +17,16 @@ import org.testng.annotations.Test; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.operator.scalar.ColorFunctions.bar; -import static io.prestosql.operator.scalar.ColorFunctions.color; -import static io.prestosql.operator.scalar.ColorFunctions.getBlue; -import static io.prestosql.operator.scalar.ColorFunctions.getGreen; -import static io.prestosql.operator.scalar.ColorFunctions.getRed; -import static io.prestosql.operator.scalar.ColorFunctions.parseRgb; -import static io.prestosql.operator.scalar.ColorFunctions.render; -import static io.prestosql.operator.scalar.ColorFunctions.rgb; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.operator.scalar.ColorFunctions.bar; +import static io.trino.operator.scalar.ColorFunctions.color; +import static io.trino.operator.scalar.ColorFunctions.getBlue; +import static io.trino.operator.scalar.ColorFunctions.getGreen; +import static io.trino.operator.scalar.ColorFunctions.getRed; +import static io.trino.operator.scalar.ColorFunctions.parseRgb; +import static io.trino.operator.scalar.ColorFunctions.render; +import static io.trino.operator.scalar.ColorFunctions.rgb; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestConcatWsFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestConcatWsFunction.java index f4b8ea150b10..79845b27df49 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestConcatWsFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestConcatWsFunction.java @@ -13,8 +13,8 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.type.VarcharType; import org.testng.annotations.Test; public class TestConcatWsFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestConditions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestConditions.java index 61abf978ff3c..f88a909e1c0b 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestConditions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestConditions.java @@ -15,13 +15,13 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; public class TestConditions extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestCustomFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestCustomFunctions.java index 5cb8d33cf02e..07a28678fe7d 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestCustomFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestCustomFunctions.java @@ -16,8 +16,8 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; public class TestCustomFunctions extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestDataSizeFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestDataSizeFunctions.java index 3d28955f54f2..2e7d09a8298c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestDataSizeFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestDataSizeFunctions.java @@ -13,12 +13,12 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.type.DecimalType.createDecimalType; public class TestDataSizeFunctions extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestDateTimeFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestDateTimeFunctions.java index 7add023cd6bb..72498cb6f096 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestDateTimeFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestDateTimeFunctions.java @@ -14,18 +14,18 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.TestingConnectorSession; -import io.prestosql.testing.TestingSession; -import io.prestosql.type.SqlIntervalDayTime; +import io.trino.Session; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; +import io.trino.testing.TestingConnectorSession; +import io.trino.testing.TestingSession; +import io.trino.type.SqlIntervalDayTime; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.Hours; @@ -46,28 +46,28 @@ import java.util.Locale; import java.util.concurrent.TimeUnit; -import static io.prestosql.operator.scalar.DateTimeFunctions.currentDate; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TimeType.createTimeType; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_NANOS; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimeOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; -import static io.prestosql.util.DateTimeZoneIndex.getDateTimeZone; +import static io.trino.operator.scalar.DateTimeFunctions.currentDate; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TimeType.createTimeType; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_NANOS; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.DateTimeTestingUtils.sqlTimeOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.util.DateTimeZoneIndex.getDateTimeZone; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.time.temporal.ChronoField.MILLI_OF_SECOND; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestFailureFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestFailureFunction.java index 0d0e5bb93b33..d40948d7f291 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestFailureFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestFailureFunction.java @@ -14,14 +14,14 @@ package io.trino.operator.scalar; import io.airlift.json.JsonCodec; -import io.prestosql.client.FailureInfo; -import io.prestosql.spi.PrestoException; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.util.Failures; +import io.trino.client.FailureInfo; +import io.trino.spi.PrestoException; +import io.trino.testing.LocalQueryRunner; +import io.trino.util.Failures; import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.type.UnknownType.UNKNOWN; public class TestFailureFunction extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestFormatFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestFormatFunction.java index 6cab64948532..f32327fd391b 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestFormatFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestFormatFunction.java @@ -15,9 +15,9 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestFormatFunction extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestIsNullAnnotation.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestIsNullAnnotation.java index d578c622574e..80adf80bb379 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestIsNullAnnotation.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestIsNullAnnotation.java @@ -14,20 +14,20 @@ package io.trino.operator.scalar; import io.airlift.slice.Slice; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.IsNull; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.IsNull; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestIsNullAnnotation extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestJoniRegexpFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestJoniRegexpFunctions.java index 83cf4a7a313e..876aaedc1e84 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestJoniRegexpFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestJoniRegexpFunctions.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar; -import static io.prestosql.sql.analyzer.RegexLibrary.JONI; +import static io.trino.sql.analyzer.RegexLibrary.JONI; public class TestJoniRegexpFunctions extends AbstractTestRegexpFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestJsonExtract.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestJsonExtract.java index 8a41f6fdab19..19e91fe8effc 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestJsonExtract.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestJsonExtract.java @@ -24,14 +24,14 @@ import java.io.IOException; import java.util.List; -import static io.prestosql.operator.scalar.JsonExtract.JsonExtractor; -import static io.prestosql.operator.scalar.JsonExtract.JsonValueJsonExtractor; -import static io.prestosql.operator.scalar.JsonExtract.ObjectFieldJsonExtractor; -import static io.prestosql.operator.scalar.JsonExtract.ScalarValueJsonExtractor; -import static io.prestosql.operator.scalar.JsonExtract.generateExtractor; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.operator.scalar.JsonExtract.JsonExtractor; +import static io.trino.operator.scalar.JsonExtract.JsonValueJsonExtractor; +import static io.trino.operator.scalar.JsonExtract.ObjectFieldJsonExtractor; +import static io.trino.operator.scalar.JsonExtract.ScalarValueJsonExtractor; +import static io.trino.operator.scalar.JsonExtract.generateExtractor; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestJsonFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestJsonFunctions.java index c73f58cd2462..69d2e90fb885 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestJsonFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestJsonFunctions.java @@ -16,11 +16,11 @@ import org.testng.annotations.Test; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.type.JsonType.JSON; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.type.JsonType.JSON; import static java.lang.String.format; public class TestJsonFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestLambdaExpression.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestLambdaExpression.java index 39f096415ac5..72af4d0edd85 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestLambdaExpression.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestLambdaExpression.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.operator.scalar.ApplyFunction.APPLY_FUNCTION; -import static io.prestosql.operator.scalar.InvokeFunction.INVOKE_FUNCTION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.operator.scalar.ApplyFunction.APPLY_FUNCTION; +import static io.trino.operator.scalar.InvokeFunction.INVOKE_FUNCTION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +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.testing.TestingSession.testSessionBuilder; +import static io.trino.util.StructuralTestUtil.mapType; public class TestLambdaExpression extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestLuhnCheckFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestLuhnCheckFunction.java index 6ec830e44ecd..7bc02f16eab4 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestLuhnCheckFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestLuhnCheckFunction.java @@ -15,8 +15,8 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BooleanType.BOOLEAN; public class TestLuhnCheckFunction extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapFilterFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapFilterFunction.java index 64067946ab3e..caad3b22f346 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapFilterFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapFilterFunction.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.type.ArrayType; import org.testng.annotations.Test; import java.util.HashMap; import java.util.Map; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.StructuralTestUtil.mapType; public class TestMapFilterFunction extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapTransformKeysFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapTransformKeysFunction.java index 08b38e5e6703..4790daff63fe 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapTransformKeysFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapTransformKeysFunction.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.type.ArrayType; import org.testng.annotations.Test; import java.util.HashMap; import java.util.Map; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.StructuralTestUtil.mapType; public class TestMapTransformKeysFunction extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapTransformValuesFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapTransformValuesFunction.java index 0b5076c55f30..19d13f43d5ac 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapTransformValuesFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapTransformValuesFunction.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.type.ArrayType; import org.testng.annotations.Test; import java.util.HashMap; import java.util.Map; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.StructuralTestUtil.mapType; public class TestMapTransformValuesFunction extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapZipWithFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapZipWithFunction.java index a7cc7327f8a1..8d393c2b3282 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapZipWithFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestMapZipWithFunction.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.util.StructuralTestUtil.mapType; import static java.util.Arrays.asList; public class TestMapZipWithFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestMathFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestMathFunctions.java index 88f4d0cc911a..96a63ceb89e1 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestMathFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestMathFunctions.java @@ -14,24 +14,24 @@ package io.trino.operator.scalar; import com.google.common.base.Joiner; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.VarcharType; import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.StandardErrorCode.TOO_MANY_ARGUMENTS; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.StandardErrorCode.TOO_MANY_ARGUMENTS; +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.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.String.format; import static java.util.Collections.nCopies; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestOperatorValidation.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestOperatorValidation.java index 5c38b8cd07d7..7bdeef86d97e 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestOperatorValidation.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestOperatorValidation.java @@ -13,13 +13,13 @@ */ package io.trino.operator.scalar; -import io.prestosql.metadata.FunctionListBuilder; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.metadata.FunctionListBuilder; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import org.testng.annotations.Test; -import static io.prestosql.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.ADD; @SuppressWarnings("UtilityClassWithoutPrivateConstructor") public class TestOperatorValidation diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestPageProcessorCompiler.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestPageProcessorCompiler.java index 338f9c3ae12b..8e274e57b975 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestPageProcessorCompiler.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestPageProcessorCompiler.java @@ -17,21 +17,21 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.DeterminismEvaluator; -import io.prestosql.sql.relational.InputReferenceExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.ArrayType; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.DeterminismEvaluator; +import io.trino.sql.relational.InputReferenceExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -39,18 +39,18 @@ import java.util.Optional; import static com.google.common.collect.Iterators.getOnlyElement; -import static io.prestosql.block.BlockAssertions.createLongDictionaryBlock; -import static io.prestosql.block.BlockAssertions.createRLEBlock; -import static io.prestosql.block.BlockAssertions.createSlicesBlock; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.project.PageProcessor.MAX_BATCH_SIZE; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; +import static io.trino.block.BlockAssertions.createLongDictionaryBlock; +import static io.trino.block.BlockAssertions.createRLEBlock; +import static io.trino.block.BlockAssertions.createSlicesBlock; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.project.PageProcessor.MAX_BATCH_SIZE; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; import static java.util.Collections.singletonList; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestParametricScalarImplementationValidation.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestParametricScalarImplementationValidation.java index 4cda43f3ec2b..7a97b39f0f2f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestParametricScalarImplementationValidation.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestParametricScalarImplementationValidation.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionId; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionId; +import io.trino.spi.connector.ConnectorSession; import org.testng.annotations.Test; import java.lang.invoke.MethodHandle; import java.util.Optional; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.util.Reflection.methodHandle; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestRe2jRegexpFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestRe2jRegexpFunctions.java index e31b9087bc5c..b7ac44cc27be 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestRe2jRegexpFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestRe2jRegexpFunctions.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar; -import static io.prestosql.sql.analyzer.RegexLibrary.RE2J; +import static io.trino.sql.analyzer.RegexLibrary.RE2J; public class TestRe2jRegexpFunctions extends AbstractTestRegexpFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestScalarParser.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestScalarParser.java index 8a82bdb2b1a0..01bc5b7ebed0 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestScalarParser.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestScalarParser.java @@ -14,20 +14,20 @@ package io.trino.operator.scalar; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.createVarcharType; public class TestScalarParser extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestScalarValidation.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestScalarValidation.java index add2bdd0bd0b..e5e370dc08bd 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestScalarValidation.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestScalarValidation.java @@ -13,16 +13,16 @@ */ package io.trino.operator.scalar; -import io.prestosql.metadata.FunctionListBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.IsNull; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.metadata.FunctionListBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.IsNull; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import javax.annotation.Nullable; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestStringFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestStringFunctions.java index 034c6b8bd60b..f2f0c75c7be8 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestStringFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestStringFunctions.java @@ -17,32 +17,32 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.StandardTypes; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.TOO_MANY_ARGUMENTS; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.SqlVarbinaryTestingUtil.sqlVarbinary; -import static io.prestosql.testing.SqlVarbinaryTestingUtil.sqlVarbinaryFromIso; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.StandardErrorCode.FUNCTION_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.TOO_MANY_ARGUMENTS; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +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.testing.SqlVarbinaryTestingUtil.sqlVarbinary; +import static io.trino.testing.SqlVarbinaryTestingUtil.sqlVarbinaryFromIso; +import static io.trino.util.StructuralTestUtil.mapType; import static java.lang.String.format; import static java.util.Collections.nCopies; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestTryFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestTryFunction.java index accd7ba2e4dc..7650cd6b88bd 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestTryFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestTryFunction.java @@ -13,24 +13,24 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.SqlDecimal; +import io.trino.spi.PrestoException; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.SqlDecimal; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +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.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.type.JsonType.JSON; +import static io.trino.type.UnknownType.UNKNOWN; import static java.util.Arrays.asList; public class TestTryFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestTypeOfFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestTypeOfFunction.java index 4acc7a97d906..ec0c147ec891 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestTypeOfFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestTypeOfFunction.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.VarcharType; import org.testng.annotations.Test; public class TestTypeOfFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestUrlFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestUrlFunctions.java index e45021abde6c..d3995e5753aa 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestUrlFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestUrlFunctions.java @@ -15,8 +15,8 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createVarcharType; public class TestUrlFunctions extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestVarbinaryFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestVarbinaryFunctions.java index d1c9817b3643..2abe7a5efb38 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestVarbinaryFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestVarbinaryFunctions.java @@ -18,17 +18,17 @@ import java.util.Base64; import static com.google.common.io.BaseEncoding.base16; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.SqlVarbinaryTestingUtil.sqlVarbinary; -import static io.prestosql.testing.SqlVarbinaryTestingUtil.sqlVarbinaryFromHex; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.SqlVarbinaryTestingUtil.sqlVarbinary; +import static io.trino.testing.SqlVarbinaryTestingUtil.sqlVarbinaryFromHex; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestWordStemFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestWordStemFunction.java index 5bf04f32b739..929217dc3f23 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestWordStemFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestWordStemFunction.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; public class TestWordStemFunction extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestZipFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestZipFunction.java index ba3bebcda270..dfafb486ccf1 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestZipFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestZipFunction.java @@ -13,20 +13,20 @@ */ package io.trino.operator.scalar; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.List; import java.util.stream.IntStream; -import static io.prestosql.operator.scalar.ZipFunction.MAX_ARITY; -import static io.prestosql.operator.scalar.ZipFunction.MIN_ARITY; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.operator.scalar.ZipFunction.MAX_ARITY; +import static io.trino.operator.scalar.ZipFunction.MIN_ARITY; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.String.format; import static java.lang.String.join; import static java.util.Arrays.asList; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TestZipWithFunction.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TestZipWithFunction.java index b066cabfaced..d66f4fb116dd 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TestZipWithFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TestZipWithFunction.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.StructuralTestUtil.mapType; import static java.util.Arrays.asList; public class TestZipWithFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/TypeOperatorBenchmarkUtil.java b/core/trino-main/src/test/java/io/trino/operator/scalar/TypeOperatorBenchmarkUtil.java index c32cab7dce48..7412a68b5807 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/TypeOperatorBenchmarkUtil.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/TypeOperatorBenchmarkUtil.java @@ -15,23 +15,23 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import java.lang.invoke.MethodHandle; import java.util.Base64; import java.util.Random; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.invoke.MethodHandles.lookup; import static java.lang.invoke.MethodType.methodType; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/date/TestExtract.java b/core/trino-main/src/test/java/io/trino/operator/scalar/date/TestExtract.java index 91ec17e45de4..6e2e5386f4e5 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/date/TestExtract.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/date/TestExtract.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar.date; -import io.prestosql.operator.scalar.AbstractTestExtract; +import io.trino.operator.scalar.AbstractTestExtract; import java.util.List; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/time/TestExtract.java b/core/trino-main/src/test/java/io/trino/operator/scalar/time/TestExtract.java index 71967bf8b8fd..ea20765cabf9 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/time/TestExtract.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/time/TestExtract.java @@ -13,8 +13,8 @@ */ package io.trino.operator.scalar.time; -import io.prestosql.operator.scalar.AbstractTestExtract; -import io.prestosql.sql.parser.ParsingException; +import io.trino.operator.scalar.AbstractTestExtract; +import io.trino.sql.parser.ParsingException; import org.testng.annotations.Test; import java.util.List; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/time/TestOperators.java b/core/trino-main/src/test/java/io/trino/operator/scalar/time/TestOperators.java index 0c88ff2fea7e..13ec901fbfb0 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/time/TestOperators.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/time/TestOperators.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar.time; -import io.prestosql.sql.query.QueryAssertions; +import io.trino.sql.query.QueryAssertions; 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/scalar/time/TestTime.java b/core/trino-main/src/test/java/io/trino/operator/scalar/time/TestTime.java index ce545a6575b5..1b2015b5137a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/time/TestTime.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/time/TestTime.java @@ -13,11 +13,11 @@ */ package io.trino.operator.scalar.time; -import io.prestosql.Session; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.TimeZoneKey; +import io.trino.sql.query.QueryAssertions; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -27,8 +27,8 @@ import java.time.ZonedDateTime; import java.util.function.BiFunction; -import static io.prestosql.spi.type.TimeType.createTimeType; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.spi.type.TimeType.createTimeType; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestDateTrunc.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestDateTrunc.java index ca775d50e591..3569adb33ca1 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestDateTrunc.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestDateTrunc.java @@ -13,14 +13,14 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.Session; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.testing.TestingSession; +import io.trino.Session; +import io.trino.sql.query.QueryAssertions; +import io.trino.testing.TestingSession; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; public class TestDateTrunc diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestExtract.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestExtract.java index 867cd1a9806e..c34b821731c0 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestExtract.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestExtract.java @@ -13,8 +13,8 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.operator.scalar.AbstractTestExtract; -import io.prestosql.sql.parser.ParsingException; +import io.trino.operator.scalar.AbstractTestExtract; +import io.trino.sql.parser.ParsingException; import org.testng.annotations.Test; import java.util.List; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestHumanReadableSeconds.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestHumanReadableSeconds.java index 4b8f847b1c03..187902ed9e61 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestHumanReadableSeconds.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestHumanReadableSeconds.java @@ -13,10 +13,10 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestHumanReadableSeconds extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestOperators.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestOperators.java index 851b661de9d0..e0473e07e157 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestOperators.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestOperators.java @@ -13,14 +13,14 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.Session; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.testing.TestingSession; +import io.trino.Session; +import io.trino.sql.query.QueryAssertions; +import io.trino.testing.TestingSession; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; public class TestOperators diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestTimestamp.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestTimestamp.java index 693868c687c1..17117340c963 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestTimestamp.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamp/TestTimestamp.java @@ -13,11 +13,11 @@ */ package io.trino.operator.scalar.timestamp; -import io.prestosql.Session; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.TimeZoneKey; +import io.trino.sql.query.QueryAssertions; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -28,13 +28,13 @@ import java.time.ZonedDateTime; import java.util.function.BiFunction; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.TestingSession.DEFAULT_TIME_ZONE_KEY; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.TestingSession.DEFAULT_TIME_ZONE_KEY; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.type.DateTimes.MICROSECONDS_PER_SECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MICROSECOND; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestAtTimeZone.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestAtTimeZone.java index 97b36612df4c..d600476f3da8 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestAtTimeZone.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestAtTimeZone.java @@ -13,14 +13,14 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.Session; -import io.prestosql.sql.query.QueryAssertions; +import io.trino.Session; +import io.trino.sql.query.QueryAssertions; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; public class TestAtTimeZone diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestDateTrunc.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestDateTrunc.java index ada4f2e02443..2a8da253f4ca 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestDateTrunc.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestDateTrunc.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.sql.query.QueryAssertions; +import io.trino.sql.query.QueryAssertions; 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/scalar/timestamptz/TestExtract.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestExtract.java index 472d814f195f..a6c921eb7a6c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestExtract.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestExtract.java @@ -13,8 +13,8 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.operator.scalar.AbstractTestExtract; -import io.prestosql.sql.parser.ParsingException; +import io.trino.operator.scalar.AbstractTestExtract; +import io.trino.sql.parser.ParsingException; import org.testng.annotations.Test; import java.util.List; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestOperators.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestOperators.java index b7695cbed75a..c486a8470ad3 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestOperators.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestOperators.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.sql.query.QueryAssertions; +import io.trino.sql.query.QueryAssertions; 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/scalar/timestamptz/TestTimestampWithTimeZone.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestTimestampWithTimeZone.java index e0b003258960..efdd25caa033 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestTimestampWithTimeZone.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timestamptz/TestTimestampWithTimeZone.java @@ -13,11 +13,11 @@ */ package io.trino.operator.scalar.timestamptz; -import io.prestosql.Session; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; +import io.trino.sql.query.QueryAssertions; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -26,11 +26,11 @@ import java.time.ZonedDateTime; import java.util.function.BiFunction; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.DateTimes.MILLISECONDS_PER_SECOND; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.type.DateTimes.MILLISECONDS_PER_SECOND; +import static io.trino.type.DateTimes.PICOSECONDS_PER_MILLISECOND; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/timetz/TestExtract.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timetz/TestExtract.java index 8f6b51b801ad..ced4bebe8661 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timetz/TestExtract.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timetz/TestExtract.java @@ -13,8 +13,8 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.operator.scalar.AbstractTestExtract; -import io.prestosql.sql.parser.ParsingException; +import io.trino.operator.scalar.AbstractTestExtract; +import io.trino.sql.parser.ParsingException; import org.testng.annotations.Test; import java.util.List; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/timetz/TestOperators.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timetz/TestOperators.java index f1708154a628..ce8e4494a199 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timetz/TestOperators.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timetz/TestOperators.java @@ -13,7 +13,7 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.sql.query.QueryAssertions; +import io.trino.sql.query.QueryAssertions; 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/scalar/timetz/TestTimeWithTimeZone.java b/core/trino-main/src/test/java/io/trino/operator/scalar/timetz/TestTimeWithTimeZone.java index e41d6045182b..ca98cb410b29 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/timetz/TestTimeWithTimeZone.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/timetz/TestTimeWithTimeZone.java @@ -13,11 +13,11 @@ */ package io.trino.operator.scalar.timetz; -import io.prestosql.Session; -import io.prestosql.spi.type.SqlTimeWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.spi.type.SqlTimeWithTimeZone; +import io.trino.spi.type.TimeZoneKey; +import io.trino.sql.query.QueryAssertions; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -26,8 +26,8 @@ import java.time.ZonedDateTime; import java.util.function.BiFunction; -import static io.prestosql.spi.type.TimeWithTimeZoneType.createTimeWithTimeZoneType; -import static io.prestosql.type.DateTimes.PICOSECONDS_PER_SECOND; +import static io.trino.spi.type.TimeWithTimeZoneType.createTimeWithTimeZoneType; +import static io.trino.type.DateTimes.PICOSECONDS_PER_SECOND; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-main/src/test/java/io/trino/operator/spiller/BenchmarkBinaryFileSpiller.java b/core/trino-main/src/test/java/io/trino/operator/spiller/BenchmarkBinaryFileSpiller.java index 4ec20dfe8c3c..fdc1f534a103 100644 --- a/core/trino-main/src/test/java/io/trino/operator/spiller/BenchmarkBinaryFileSpiller.java +++ b/core/trino-main/src/test/java/io/trino/operator/spiller/BenchmarkBinaryFileSpiller.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.MoreExecutors; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.FileSingleStreamSpillerFactory; -import io.prestosql.spiller.GenericSpillerFactory; -import io.prestosql.spiller.Spiller; -import io.prestosql.spiller.SpillerFactory; -import io.prestosql.spiller.SpillerStats; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.type.Type; +import io.trino.spiller.FileSingleStreamSpillerFactory; +import io.trino.spiller.GenericSpillerFactory; +import io.trino.spiller.Spiller; +import io.trino.spiller.SpillerFactory; +import io.trino.spiller.SpillerStats; import io.trino.tpch.LineItem; import io.trino.tpch.LineItemGenerator; import org.openjdk.jmh.annotations.Benchmark; @@ -44,12 +44,12 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +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.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.concurrent.TimeUnit.SECONDS; @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/operator/unnest/TestArrayOfRowsUnnester.java b/core/trino-main/src/test/java/io/trino/operator/unnest/TestArrayOfRowsUnnester.java index c4b63de15f46..2156aa063a8c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/unnest/TestArrayOfRowsUnnester.java +++ b/core/trino-main/src/test/java/io/trino/operator/unnest/TestArrayOfRowsUnnester.java @@ -14,25 +14,25 @@ package io.trino.operator.unnest; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.type.RowType; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.type.RowType; import org.testng.annotations.Test; import java.util.Arrays; import java.util.Collections; -import static io.prestosql.block.ColumnarTestUtils.assertBlock; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.array; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.column; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.computeExpectedUnnestedOutput; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.createArrayBlockOfRowBlocks; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.getFieldElements; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.nullExists; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.toSlices; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.validateTestInput; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.block.ColumnarTestUtils.assertBlock; +import static io.trino.operator.unnest.TestingUnnesterUtil.array; +import static io.trino.operator.unnest.TestingUnnesterUtil.column; +import static io.trino.operator.unnest.TestingUnnesterUtil.computeExpectedUnnestedOutput; +import static io.trino.operator.unnest.TestingUnnesterUtil.createArrayBlockOfRowBlocks; +import static io.trino.operator.unnest.TestingUnnesterUtil.getFieldElements; +import static io.trino.operator.unnest.TestingUnnesterUtil.nullExists; +import static io.trino.operator.unnest.TestingUnnesterUtil.toSlices; +import static io.trino.operator.unnest.TestingUnnesterUtil.validateTestInput; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/unnest/TestArrayUnnester.java b/core/trino-main/src/test/java/io/trino/operator/unnest/TestArrayUnnester.java index 399347eed2b7..15280f6f026b 100644 --- a/core/trino-main/src/test/java/io/trino/operator/unnest/TestArrayUnnester.java +++ b/core/trino-main/src/test/java/io/trino/operator/unnest/TestArrayUnnester.java @@ -14,23 +14,23 @@ package io.trino.operator.unnest; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.PageBuilderStatus; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.PageBuilderStatus; import org.testng.annotations.Test; import java.util.Arrays; -import static io.prestosql.block.ColumnarTestUtils.assertBlock; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.array; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.column; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.computeExpectedUnnestedOutput; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.createArrayBlock; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.getFieldElements; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.nullExists; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.toSlices; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.validateTestInput; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.block.ColumnarTestUtils.assertBlock; +import static io.trino.operator.unnest.TestingUnnesterUtil.array; +import static io.trino.operator.unnest.TestingUnnesterUtil.column; +import static io.trino.operator.unnest.TestingUnnesterUtil.computeExpectedUnnestedOutput; +import static io.trino.operator.unnest.TestingUnnesterUtil.createArrayBlock; +import static io.trino.operator.unnest.TestingUnnesterUtil.getFieldElements; +import static io.trino.operator.unnest.TestingUnnesterUtil.nullExists; +import static io.trino.operator.unnest.TestingUnnesterUtil.toSlices; +import static io.trino.operator.unnest.TestingUnnesterUtil.validateTestInput; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/unnest/TestMapUnnester.java b/core/trino-main/src/test/java/io/trino/operator/unnest/TestMapUnnester.java index 38e966b63317..978870e4640f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/unnest/TestMapUnnester.java +++ b/core/trino-main/src/test/java/io/trino/operator/unnest/TestMapUnnester.java @@ -14,23 +14,23 @@ package io.trino.operator.unnest; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.PageBuilderStatus; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.PageBuilderStatus; import org.testng.annotations.Test; import java.util.Arrays; -import static io.prestosql.block.ColumnarTestUtils.assertBlock; -import static io.prestosql.block.TestColumnarMap.createBlockBuilderWithValues; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.array; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.column; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.computeExpectedUnnestedOutput; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.getFieldElements; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.nullExists; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.toSlices; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.validateTestInput; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.block.ColumnarTestUtils.assertBlock; +import static io.trino.block.TestColumnarMap.createBlockBuilderWithValues; +import static io.trino.operator.unnest.TestingUnnesterUtil.array; +import static io.trino.operator.unnest.TestingUnnesterUtil.column; +import static io.trino.operator.unnest.TestingUnnesterUtil.computeExpectedUnnestedOutput; +import static io.trino.operator.unnest.TestingUnnesterUtil.getFieldElements; +import static io.trino.operator.unnest.TestingUnnesterUtil.nullExists; +import static io.trino.operator.unnest.TestingUnnesterUtil.toSlices; +import static io.trino.operator.unnest.TestingUnnesterUtil.validateTestInput; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/unnest/TestReplicatedBlockBuilder.java b/core/trino-main/src/test/java/io/trino/operator/unnest/TestReplicatedBlockBuilder.java index 0fd80a46a1ad..f53a8aa6e1fa 100644 --- a/core/trino-main/src/test/java/io/trino/operator/unnest/TestReplicatedBlockBuilder.java +++ b/core/trino-main/src/test/java/io/trino/operator/unnest/TestReplicatedBlockBuilder.java @@ -14,18 +14,18 @@ package io.trino.operator.unnest; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; import org.testng.annotations.Test; import java.util.Collections; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.block.ColumnarTestUtils.assertBlock; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.createReplicatedOutputSlice; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.createSimpleBlock; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.toSlices; -import static io.prestosql.operator.unnest.UnnestOperatorBlockUtil.calculateNewArraySize; +import static io.trino.block.ColumnarTestUtils.assertBlock; +import static io.trino.operator.unnest.TestingUnnesterUtil.createReplicatedOutputSlice; +import static io.trino.operator.unnest.TestingUnnesterUtil.createSimpleBlock; +import static io.trino.operator.unnest.TestingUnnesterUtil.toSlices; +import static io.trino.operator.unnest.UnnestOperatorBlockUtil.calculateNewArraySize; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/unnest/TestUnnestBlockBuilder.java b/core/trino-main/src/test/java/io/trino/operator/unnest/TestUnnestBlockBuilder.java index a7a8c7570c56..4ba77c279ca6 100644 --- a/core/trino-main/src/test/java/io/trino/operator/unnest/TestUnnestBlockBuilder.java +++ b/core/trino-main/src/test/java/io/trino/operator/unnest/TestUnnestBlockBuilder.java @@ -14,18 +14,18 @@ package io.trino.operator.unnest; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.PageBuilderStatus; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.PageBuilderStatus; import org.testng.annotations.Test; import java.util.Arrays; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.block.ColumnarTestUtils.assertBlock; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.createSimpleBlock; -import static io.prestosql.operator.unnest.TestingUnnesterUtil.toSlices; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.block.ColumnarTestUtils.assertBlock; +import static io.trino.operator.unnest.TestingUnnesterUtil.createSimpleBlock; +import static io.trino.operator.unnest.TestingUnnesterUtil.toSlices; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/unnest/TestUnnestOperator.java b/core/trino-main/src/test/java/io/trino/operator/unnest/TestUnnestOperator.java index a71d5b3db660..723fc9909b65 100644 --- a/core/trino-main/src/test/java/io/trino/operator/unnest/TestUnnestOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/unnest/TestUnnestOperator.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.MaterializedResult; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverContext; +import io.trino.operator.OperatorFactory; +import io.trino.spi.Page; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.MaterializedResult; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -33,18 +33,18 @@ import java.util.concurrent.ScheduledExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEquals; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; -import static io.prestosql.util.StructuralTestUtil.arrayBlockOf; -import static io.prestosql.util.StructuralTestUtil.mapBlockOf; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.OperatorAssertion.assertOperatorEquals; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; +import static io.trino.util.StructuralTestUtil.arrayBlockOf; +import static io.trino.util.StructuralTestUtil.mapBlockOf; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.NaN; import static java.lang.Double.POSITIVE_INFINITY; diff --git a/core/trino-main/src/test/java/io/trino/operator/unnest/TestingUnnesterUtil.java b/core/trino-main/src/test/java/io/trino/operator/unnest/TestingUnnesterUtil.java index ca3631acdaac..f3c0c1c46a1a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/unnest/TestingUnnesterUtil.java +++ b/core/trino-main/src/test/java/io/trino/operator/unnest/TestingUnnesterUtil.java @@ -15,13 +15,13 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.ArrayBlockBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.RowType; +import io.trino.spi.block.ArrayBlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.RowType; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/operator/window/AbstractTestWindowFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/AbstractTestWindowFunction.java index a587412921b6..f6250f73b4e8 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/AbstractTestWindowFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/AbstractTestWindowFunction.java @@ -13,8 +13,8 @@ */ package io.trino.operator.window; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.MaterializedResult; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.MaterializedResult; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -22,7 +22,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.testing.Closeables.closeAllRuntimeException; -import static io.prestosql.SessionTestUtils.TEST_SESSION; +import static io.trino.SessionTestUtils.TEST_SESSION; @Test public abstract class AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestAggregateWindowFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestAggregateWindowFunction.java index 237c8ec8eb04..28a37affc10f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestAggregateWindowFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestAggregateWindowFunction.java @@ -13,16 +13,16 @@ */ package io.trino.operator.window; -import io.prestosql.testing.MaterializedResult; +import io.trino.testing.MaterializedResult; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestAggregateWindowFunction extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestApproxPercentileWindow.java b/core/trino-main/src/test/java/io/trino/operator/window/TestApproxPercentileWindow.java index d177daa4ad2f..550e43e46c31 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestApproxPercentileWindow.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestApproxPercentileWindow.java @@ -14,15 +14,15 @@ package io.trino.operator.window; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.type.ArrayType; import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestApproxPercentileWindow extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestCumulativeDistributionFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestCumulativeDistributionFunction.java index 69cbb5d12f6a..5cb5220ff255 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestCumulativeDistributionFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestCumulativeDistributionFunction.java @@ -15,12 +15,12 @@ import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestCumulativeDistributionFunction extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestDenseRankFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestDenseRankFunction.java index fc3038d0da01..88e1454d40d2 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestDenseRankFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestDenseRankFunction.java @@ -15,11 +15,11 @@ import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestDenseRankFunction extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestFirstValueFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestFirstValueFunction.java index baef7cbd67dd..0af9cd28232d 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestFirstValueFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestFirstValueFunction.java @@ -15,11 +15,11 @@ import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestFirstValueFunction extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestLagFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestLagFunction.java index c16fdb38edf9..4527efef765e 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestLagFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestLagFunction.java @@ -15,11 +15,11 @@ import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestLagFunction extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestLastValueFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestLastValueFunction.java index b6b94d1ed914..7c4c102c849f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestLastValueFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestLastValueFunction.java @@ -15,11 +15,11 @@ import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestLastValueFunction extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestLeadFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestLeadFunction.java index 8bbd59ad22a5..7c70f971fbce 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestLeadFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestLeadFunction.java @@ -15,11 +15,11 @@ import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestLeadFunction extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestMapAggFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestMapAggFunction.java index 0c567a699294..3fe894a9643a 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestMapAggFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestMapAggFunction.java @@ -14,13 +14,13 @@ package io.trino.operator.window; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.VarcharType; import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.util.StructuralTestUtil.mapType; public class TestMapAggFunction extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestMultipleWindowSpecifications.java b/core/trino-main/src/test/java/io/trino/operator/window/TestMultipleWindowSpecifications.java index 538f3997e61a..12725acb61b7 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestMultipleWindowSpecifications.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestMultipleWindowSpecifications.java @@ -15,10 +15,10 @@ import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestMultipleWindowSpecifications extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestNTileFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestNTileFunction.java index 7eb6abb5b1be..b1227d95ce14 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestNTileFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestNTileFunction.java @@ -15,10 +15,10 @@ import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestNTileFunction extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestNthValueFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestNthValueFunction.java index 0ac5a304ccf3..a1ff54419316 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestNthValueFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestNthValueFunction.java @@ -15,11 +15,11 @@ import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestNthValueFunction extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestPercentRankFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestPercentRankFunction.java index a93788d6ffae..89ccd9affb7c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestPercentRankFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestPercentRankFunction.java @@ -15,12 +15,12 @@ import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestPercentRankFunction extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestRankFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestRankFunction.java index 62e33d6d63e2..cbf3357abde9 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestRankFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestRankFunction.java @@ -15,11 +15,11 @@ import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; public class TestRankFunction extends AbstractTestWindowFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/TestRowNumberFunction.java b/core/trino-main/src/test/java/io/trino/operator/window/TestRowNumberFunction.java index 3a3763b54900..00128558291f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/TestRowNumberFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/TestRowNumberFunction.java @@ -14,16 +14,16 @@ package io.trino.operator.window; import com.google.common.collect.ImmutableList; -import io.prestosql.testing.MaterializedResult; +import io.trino.testing.MaterializedResult; import org.testng.annotations.Test; import java.util.stream.Collectors; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; import static org.testng.Assert.assertEquals; public class TestRowNumberFunction diff --git a/core/trino-main/src/test/java/io/trino/operator/window/WindowAssertions.java b/core/trino-main/src/test/java/io/trino/operator/window/WindowAssertions.java index c48dbc2bbf47..69890bc47976 100644 --- a/core/trino-main/src/test/java/io/trino/operator/window/WindowAssertions.java +++ b/core/trino-main/src/test/java/io/trino/operator/window/WindowAssertions.java @@ -13,8 +13,8 @@ */ package io.trino.operator.window; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.MaterializedResult; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.MaterializedResult; import org.intellij.lang.annotations.Language; import static io.airlift.testing.Assertions.assertEqualsIgnoreOrder; diff --git a/core/trino-main/src/test/java/io/trino/security/TestAccessControlManager.java b/core/trino-main/src/test/java/io/trino/security/TestAccessControlManager.java index 12dfaaeb2068..8c2cc8b8f231 100644 --- a/core/trino-main/src/test/java/io/trino/security/TestAccessControlManager.java +++ b/core/trino-main/src/test/java/io/trino/security/TestAccessControlManager.java @@ -16,40 +16,40 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.informationschema.InformationSchemaConnector; -import io.prestosql.connector.system.SystemConnector; -import io.prestosql.eventlistener.EventListenerManager; -import io.prestosql.metadata.Catalog; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.InMemoryNodeManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.plugin.base.security.AllowAllAccessControl; -import io.prestosql.plugin.base.security.AllowAllSystemAccessControl; -import io.prestosql.plugin.base.security.ReadOnlySystemAccessControl; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.BasicPrincipal; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.SystemAccessControl; -import io.prestosql.spi.security.SystemAccessControlFactory; -import io.prestosql.spi.security.SystemSecurityContext; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.TestingConnectorContext; -import io.prestosql.testing.TestingEventListenerManager; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionManager; +import io.trino.connector.CatalogName; +import io.trino.connector.informationschema.InformationSchemaConnector; +import io.trino.connector.system.SystemConnector; +import io.trino.eventlistener.EventListenerManager; +import io.trino.metadata.Catalog; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.InMemoryNodeManager; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.plugin.base.security.AllowAllAccessControl; +import io.trino.plugin.base.security.AllowAllSystemAccessControl; +import io.trino.plugin.base.security.ReadOnlySystemAccessControl; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.BasicPrincipal; +import io.trino.spi.security.Identity; +import io.trino.spi.security.SystemAccessControl; +import io.trino.spi.security.SystemAccessControlFactory; +import io.trino.spi.security.SystemSecurityContext; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; +import io.trino.testing.TestingConnectorContext; +import io.trino.testing.TestingEventListenerManager; +import io.trino.transaction.TransactionId; +import io.trino.transaction.TransactionManager; import org.testng.annotations.Test; import java.io.IOException; @@ -61,14 +61,14 @@ import java.util.Optional; import java.util.Set; -import static io.prestosql.connector.CatalogName.createInformationSchemaCatalogName; -import static io.prestosql.connector.CatalogName.createSystemTablesCatalogName; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.security.AccessDeniedException.denySelectTable; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.TestingEventListenerManager.emptyEventListenerManager; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.connector.CatalogName.createInformationSchemaCatalogName; +import static io.trino.connector.CatalogName.createSystemTablesCatalogName; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.security.AccessDeniedException.denySelectTable; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.TestingEventListenerManager.emptyEventListenerManager; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.nio.file.Files.createTempFile; import static java.nio.file.StandardOpenOption.CREATE; import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING; diff --git a/core/trino-main/src/test/java/io/trino/security/TestFileBasedSystemAccessControl.java b/core/trino-main/src/test/java/io/trino/security/TestFileBasedSystemAccessControl.java index 4649a0cd6da5..afd5ad0db799 100644 --- a/core/trino-main/src/test/java/io/trino/security/TestFileBasedSystemAccessControl.java +++ b/core/trino-main/src/test/java/io/trino/security/TestFileBasedSystemAccessControl.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.plugin.base.security.FileBasedSystemAccessControl; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.transaction.TransactionManager; +import io.trino.metadata.QualifiedObjectName; +import io.trino.plugin.base.security.FileBasedSystemAccessControl; +import io.trino.spi.QueryId; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.transaction.TransactionManager; import org.testng.annotations.Test; import javax.security.auth.kerberos.KerberosPrincipal; @@ -33,13 +33,13 @@ import java.util.Set; import static com.google.common.io.Files.copy; -import static io.prestosql.plugin.base.security.FileBasedAccessControlConfig.SECURITY_CONFIG_FILE; -import static io.prestosql.plugin.base.security.FileBasedAccessControlConfig.SECURITY_REFRESH_PERIOD; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.spi.security.Privilege.SELECT; -import static io.prestosql.testing.TestingEventListenerManager.emptyEventListenerManager; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.plugin.base.security.FileBasedAccessControlConfig.SECURITY_CONFIG_FILE; +import static io.trino.plugin.base.security.FileBasedAccessControlConfig.SECURITY_REFRESH_PERIOD; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.spi.security.Privilege.SELECT; +import static io.trino.testing.TestingEventListenerManager.emptyEventListenerManager; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.lang.Thread.sleep; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.assertj.core.util.Files.newTemporaryFile; diff --git a/core/trino-main/src/test/java/io/trino/security/TestForwardingAccessControl.java b/core/trino-main/src/test/java/io/trino/security/TestForwardingAccessControl.java index 2dd7feebb128..272d03fce10a 100644 --- a/core/trino-main/src/test/java/io/trino/security/TestForwardingAccessControl.java +++ b/core/trino-main/src/test/java/io/trino/security/TestForwardingAccessControl.java @@ -15,8 +15,8 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertProperForwardingMethodsAreCalled; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertProperForwardingMethodsAreCalled; public class TestForwardingAccessControl { diff --git a/core/trino-main/src/test/java/io/trino/security/TestGroupProviderManager.java b/core/trino-main/src/test/java/io/trino/security/TestGroupProviderManager.java index 984431e8fc6d..06bedd236f5d 100644 --- a/core/trino-main/src/test/java/io/trino/security/TestGroupProviderManager.java +++ b/core/trino-main/src/test/java/io/trino/security/TestGroupProviderManager.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableSet; import io.airlift.testing.TempFile; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.security.GroupProviderFactory; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.security.GroupProviderFactory; import org.testng.annotations.Test; import java.io.IOException; diff --git a/core/trino-main/src/test/java/io/trino/security/TestInjectedConnectorAccessControl.java b/core/trino-main/src/test/java/io/trino/security/TestInjectedConnectorAccessControl.java index ec6f681b816c..151424cf0f73 100644 --- a/core/trino-main/src/test/java/io/trino/security/TestInjectedConnectorAccessControl.java +++ b/core/trino-main/src/test/java/io/trino/security/TestInjectedConnectorAccessControl.java @@ -13,10 +13,10 @@ */ package io.trino.security; -import io.prestosql.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorAccessControl; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; public class TestInjectedConnectorAccessControl { diff --git a/core/trino-main/src/test/java/io/trino/server/TestBasicQueryInfo.java b/core/trino-main/src/test/java/io/trino/server/TestBasicQueryInfo.java index 27634b8a84de..a4145a4eb655 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestBasicQueryInfo.java +++ b/core/trino-main/src/test/java/io/trino/server/TestBasicQueryInfo.java @@ -18,14 +18,14 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryStats; -import io.prestosql.operator.BlockedReason; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.eventlistener.StageGcStatistics; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.resourcegroups.QueryType; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryStats; +import io.trino.operator.BlockedReason; +import io.trino.spi.QueryId; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.eventlistener.StageGcStatistics; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.resourcegroups.QueryType; import org.joda.time.DateTime; import org.testng.annotations.Test; @@ -33,9 +33,9 @@ import java.util.Optional; import java.util.OptionalDouble; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.server.DynamicFilterService.DynamicFiltersStats; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.server.DynamicFilterService.DynamicFiltersStats; import static org.testng.Assert.assertEquals; public class TestBasicQueryInfo diff --git a/core/trino-main/src/test/java/io/trino/server/TestDynamicFilterService.java b/core/trino-main/src/test/java/io/trino/server/TestDynamicFilterService.java index 422bf72e391a..c24983345ae0 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestDynamicFilterService.java +++ b/core/trino-main/src/test/java/io/trino/server/TestDynamicFilterService.java @@ -16,65 +16,65 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.execution.StageId; -import io.prestosql.execution.TaskId; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.TestingColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningHandle; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanFragment; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanFragmentId; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.RemoteSourceNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.Expression; -import io.prestosql.testing.TestingMetadata; -import io.prestosql.testing.TestingSession; +import io.trino.Session; +import io.trino.cost.StatsAndCosts; +import io.trino.execution.StageId; +import io.trino.execution.TaskId; +import io.trino.metadata.Metadata; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.TestingColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.DynamicFilters; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningHandle; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanFragment; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanFragmentId; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.RemoteSourceNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.Expression; +import io.trino.testing.TestingMetadata; +import io.trino.testing.TestingSession; import org.testng.annotations.Test; import java.util.Optional; import java.util.concurrent.CompletableFuture; import static com.google.common.util.concurrent.MoreExecutors.newDirectExecutorService; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.StageExecutionDescriptor.ungroupedExecution; -import static io.prestosql.server.DynamicFilterService.DynamicFilterDomainStats; -import static io.prestosql.server.DynamicFilterService.DynamicFiltersStats; -import static io.prestosql.server.DynamicFilterService.getSourceStageInnerLazyDynamicFilters; -import static io.prestosql.spi.predicate.Domain.multipleValues; -import static io.prestosql.spi.predicate.Domain.none; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.DynamicFilters.createDynamicFilterExpression; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPLICATE; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.testing.TestingHandles.TEST_TABLE_HANDLE; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.StageExecutionDescriptor.ungroupedExecution; +import static io.trino.server.DynamicFilterService.DynamicFilterDomainStats; +import static io.trino.server.DynamicFilterService.DynamicFiltersStats; +import static io.trino.server.DynamicFilterService.getSourceStageInnerLazyDynamicFilters; +import static io.trino.spi.predicate.Domain.multipleValues; +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.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.DynamicFilters.createDynamicFilterExpression; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPLICATE; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.testing.TestingHandles.TEST_TABLE_HANDLE; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/server/TestFailureDetectorConfig.java b/core/trino-main/src/test/java/io/trino/server/TestFailureDetectorConfig.java index 57a97b957c92..9c12154f4a8f 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestFailureDetectorConfig.java +++ b/core/trino-main/src/test/java/io/trino/server/TestFailureDetectorConfig.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableMap; import io.airlift.units.Duration; -import io.prestosql.failuredetector.FailureDetectorConfig; +import io.trino.failuredetector.FailureDetectorConfig; import org.testng.annotations.Test; import java.util.Map; diff --git a/core/trino-main/src/test/java/io/trino/server/TestGenerateTokenFilter.java b/core/trino-main/src/test/java/io/trino/server/TestGenerateTokenFilter.java index 240cda3d8c59..0819266ace07 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestGenerateTokenFilter.java +++ b/core/trino-main/src/test/java/io/trino/server/TestGenerateTokenFilter.java @@ -21,8 +21,8 @@ import io.airlift.http.client.Request; import io.airlift.http.client.StringResponseHandler.StringResponse; import io.airlift.http.client.jetty.JettyHttpClient; -import io.prestosql.server.security.ResourceSecurity; -import io.prestosql.server.testing.TestingPrestoServer; +import io.trino.server.security.ResourceSecurity; +import io.trino.server.testing.TestingPrestoServer; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -44,7 +44,7 @@ import static io.airlift.jaxrs.JaxrsBinder.jaxrsBinder; import static io.airlift.testing.Assertions.assertInstanceOf; import static io.airlift.testing.Closeables.closeAll; -import static io.prestosql.server.security.ResourceSecurity.AccessType.PUBLIC; +import static io.trino.server.security.ResourceSecurity.AccessType.PUBLIC; import static java.lang.annotation.RetentionPolicy.RUNTIME; import static javax.servlet.http.HttpServletResponse.SC_OK; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/server/TestHttpRequestSessionContext.java b/core/trino-main/src/test/java/io/trino/server/TestHttpRequestSessionContext.java index 1eda5546bd6c..ac79589304b5 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestHttpRequestSessionContext.java +++ b/core/trino-main/src/test/java/io/trino/server/TestHttpRequestSessionContext.java @@ -17,8 +17,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.jaxrs.testing.GuavaMultivaluedMap; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.SelectedRole; +import io.trino.spi.security.Identity; +import io.trino.spi.security.SelectedRole; import org.testng.annotations.Test; import javax.ws.rs.WebApplicationException; @@ -27,21 +27,21 @@ import java.util.Optional; -import static io.prestosql.SystemSessionProperties.HASH_PARTITION_COUNT; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.QUERY_MAX_MEMORY; -import static io.prestosql.client.PrestoHeaders.PRESTO_CATALOG; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLIENT_INFO; -import static io.prestosql.client.PrestoHeaders.PRESTO_EXTRA_CREDENTIAL; -import static io.prestosql.client.PrestoHeaders.PRESTO_LANGUAGE; -import static io.prestosql.client.PrestoHeaders.PRESTO_PATH; -import static io.prestosql.client.PrestoHeaders.PRESTO_PREPARED_STATEMENT; -import static io.prestosql.client.PrestoHeaders.PRESTO_ROLE; -import static io.prestosql.client.PrestoHeaders.PRESTO_SCHEMA; -import static io.prestosql.client.PrestoHeaders.PRESTO_SESSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_SOURCE; -import static io.prestosql.client.PrestoHeaders.PRESTO_TIME_ZONE; -import static io.prestosql.client.PrestoHeaders.PRESTO_USER; +import static io.trino.SystemSessionProperties.HASH_PARTITION_COUNT; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.QUERY_MAX_MEMORY; +import static io.trino.client.PrestoHeaders.PRESTO_CATALOG; +import static io.trino.client.PrestoHeaders.PRESTO_CLIENT_INFO; +import static io.trino.client.PrestoHeaders.PRESTO_EXTRA_CREDENTIAL; +import static io.trino.client.PrestoHeaders.PRESTO_LANGUAGE; +import static io.trino.client.PrestoHeaders.PRESTO_PATH; +import static io.trino.client.PrestoHeaders.PRESTO_PREPARED_STATEMENT; +import static io.trino.client.PrestoHeaders.PRESTO_ROLE; +import static io.trino.client.PrestoHeaders.PRESTO_SCHEMA; +import static io.trino.client.PrestoHeaders.PRESTO_SESSION; +import static io.trino.client.PrestoHeaders.PRESTO_SOURCE; +import static io.trino.client.PrestoHeaders.PRESTO_TIME_ZONE; +import static io.trino.client.PrestoHeaders.PRESTO_USER; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/server/TestNodeResource.java b/core/trino-main/src/test/java/io/trino/server/TestNodeResource.java index 3cedeee375fc..4e8f448ac0cc 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestNodeResource.java +++ b/core/trino-main/src/test/java/io/trino/server/TestNodeResource.java @@ -15,7 +15,7 @@ import io.airlift.http.client.HttpClient; import io.airlift.http.client.jetty.JettyHttpClient; -import io.prestosql.server.testing.TestingPrestoServer; +import io.trino.server.testing.TestingPrestoServer; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -26,8 +26,8 @@ import static io.airlift.http.client.Request.Builder.prepareGet; import static io.airlift.json.JsonCodec.listJsonCodec; import static io.airlift.testing.Closeables.closeAll; -import static io.prestosql.client.PrestoHeaders.PRESTO_USER; -import static io.prestosql.failuredetector.HeartbeatFailureDetector.Stats; +import static io.trino.client.PrestoHeaders.PRESTO_USER; +import static io.trino.failuredetector.HeartbeatFailureDetector.Stats; import static org.testng.Assert.assertTrue; public class TestNodeResource diff --git a/core/trino-main/src/test/java/io/trino/server/TestPrestoSystemRequirements.java b/core/trino-main/src/test/java/io/trino/server/TestPrestoSystemRequirements.java index 174451800519..6cf5e79ac837 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestPrestoSystemRequirements.java +++ b/core/trino-main/src/test/java/io/trino/server/TestPrestoSystemRequirements.java @@ -15,8 +15,8 @@ import org.testng.annotations.Test; -import static io.prestosql.server.PrestoSystemRequirements.verifyJvmRequirements; -import static io.prestosql.server.PrestoSystemRequirements.verifySystemTimeIsReasonable; +import static io.trino.server.PrestoSystemRequirements.verifyJvmRequirements; +import static io.trino.server.PrestoSystemRequirements.verifySystemTimeIsReasonable; public class TestPrestoSystemRequirements { diff --git a/core/trino-main/src/test/java/io/trino/server/TestQueryResource.java b/core/trino-main/src/test/java/io/trino/server/TestQueryResource.java index 48f818738e54..94d00f10f64a 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestQueryResource.java +++ b/core/trino-main/src/test/java/io/trino/server/TestQueryResource.java @@ -20,11 +20,11 @@ import io.airlift.http.client.UnexpectedResponseException; import io.airlift.http.client.jetty.JettyHttpClient; import io.airlift.json.JsonCodec; -import io.prestosql.client.QueryResults; -import io.prestosql.execution.QueryInfo; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.QueryId; +import io.trino.client.QueryResults; +import io.trino.execution.QueryInfo; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.QueryId; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -43,18 +43,18 @@ import static io.airlift.json.JsonCodec.jsonCodec; import static io.airlift.json.JsonCodec.listJsonCodec; import static io.airlift.testing.Closeables.closeAll; -import static io.prestosql.client.PrestoHeaders.PRESTO_USER; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.spi.StandardErrorCode.ADMINISTRATIVELY_KILLED; -import static io.prestosql.spi.StandardErrorCode.ADMINISTRATIVELY_PREEMPTED; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.StandardErrorCode.SYNTAX_ERROR; -import static io.prestosql.spi.StandardErrorCode.USER_CANCELED; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.KILL_QUERY; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.VIEW_QUERY; -import static io.prestosql.testing.TestingAccessControlManager.privilege; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.client.PrestoHeaders.PRESTO_USER; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.spi.StandardErrorCode.ADMINISTRATIVELY_KILLED; +import static io.trino.spi.StandardErrorCode.ADMINISTRATIVELY_PREEMPTED; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.StandardErrorCode.SYNTAX_ERROR; +import static io.trino.spi.StandardErrorCode.USER_CANCELED; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.KILL_QUERY; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.VIEW_QUERY; +import static io.trino.testing.TestingAccessControlManager.privilege; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertFalse; 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 3846290d3b8a..7e35cb998520 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,15 +20,15 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.ListMultimap; import io.airlift.jaxrs.testing.GuavaMultivaluedMap; -import io.prestosql.Session; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.sql.SqlEnvironmentConfig; -import io.prestosql.sql.SqlPath; -import io.prestosql.sql.SqlPathElement; -import io.prestosql.sql.tree.Identifier; +import io.trino.Session; +import io.trino.metadata.SessionPropertyManager; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.sql.SqlEnvironmentConfig; +import io.trino.sql.SqlPath; +import io.trino.sql.SqlPathElement; +import io.trino.sql.tree.Identifier; import org.testng.annotations.Test; import javax.ws.rs.core.MultivaluedMap; @@ -37,23 +37,23 @@ import java.util.Locale; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.HASH_PARTITION_COUNT; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.QUERY_MAX_MEMORY; -import static io.prestosql.client.PrestoHeaders.PRESTO_CATALOG; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLIENT_CAPABILITIES; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLIENT_INFO; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLIENT_TAGS; -import static io.prestosql.client.PrestoHeaders.PRESTO_LANGUAGE; -import static io.prestosql.client.PrestoHeaders.PRESTO_PATH; -import static io.prestosql.client.PrestoHeaders.PRESTO_PREPARED_STATEMENT; -import static io.prestosql.client.PrestoHeaders.PRESTO_SCHEMA; -import static io.prestosql.client.PrestoHeaders.PRESTO_SESSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_SOURCE; -import static io.prestosql.client.PrestoHeaders.PRESTO_TIME_ZONE; -import static io.prestosql.client.PrestoHeaders.PRESTO_USER; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.SystemSessionProperties.HASH_PARTITION_COUNT; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.QUERY_MAX_MEMORY; +import static io.trino.client.PrestoHeaders.PRESTO_CATALOG; +import static io.trino.client.PrestoHeaders.PRESTO_CLIENT_CAPABILITIES; +import static io.trino.client.PrestoHeaders.PRESTO_CLIENT_INFO; +import static io.trino.client.PrestoHeaders.PRESTO_CLIENT_TAGS; +import static io.trino.client.PrestoHeaders.PRESTO_LANGUAGE; +import static io.trino.client.PrestoHeaders.PRESTO_PATH; +import static io.trino.client.PrestoHeaders.PRESTO_PREPARED_STATEMENT; +import static io.trino.client.PrestoHeaders.PRESTO_SCHEMA; +import static io.trino.client.PrestoHeaders.PRESTO_SESSION; +import static io.trino.client.PrestoHeaders.PRESTO_SOURCE; +import static io.trino.client.PrestoHeaders.PRESTO_TIME_ZONE; +import static io.trino.client.PrestoHeaders.PRESTO_USER; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/server/TestQueryStateInfo.java b/core/trino-main/src/test/java/io/trino/server/TestQueryStateInfo.java index 269ddddb17e0..e147f25bb450 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestQueryStateInfo.java +++ b/core/trino-main/src/test/java/io/trino/server/TestQueryStateInfo.java @@ -18,13 +18,13 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryState; -import io.prestosql.execution.QueryStats; -import io.prestosql.execution.resourcegroups.InternalResourceGroup; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.resourcegroups.QueryType; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryState; +import io.trino.execution.QueryStats; +import io.trino.execution.resourcegroups.InternalResourceGroup; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.resourcegroups.QueryType; import org.joda.time.DateTime; import org.testng.annotations.Test; @@ -34,12 +34,12 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.operator.BlockedReason.WAITING_FOR_MEMORY; -import static io.prestosql.server.DynamicFilterService.DynamicFiltersStats; -import static io.prestosql.server.QueryStateInfo.createQueuedQueryStateInfo; -import static io.prestosql.spi.resourcegroups.SchedulingPolicy.WEIGHTED; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.operator.BlockedReason.WAITING_FOR_MEMORY; +import static io.trino.server.DynamicFilterService.DynamicFiltersStats; +import static io.trino.server.QueryStateInfo.createQueuedQueryStateInfo; +import static io.trino.spi.resourcegroups.SchedulingPolicy.WEIGHTED; import static org.testng.Assert.assertEquals; public class TestQueryStateInfo diff --git a/core/trino-main/src/test/java/io/trino/server/TestQueryStateInfoResource.java b/core/trino-main/src/test/java/io/trino/server/TestQueryStateInfoResource.java index c92a29e24335..cf8d6abee190 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestQueryStateInfoResource.java +++ b/core/trino-main/src/test/java/io/trino/server/TestQueryStateInfoResource.java @@ -20,10 +20,10 @@ import io.airlift.http.client.jetty.JettyHttpClient; import io.airlift.json.JsonCodec; import io.airlift.units.Duration; -import io.prestosql.client.QueryResults; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.ErrorCode; +import io.trino.client.QueryResults; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.ErrorCode; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -39,12 +39,12 @@ import static io.airlift.http.client.StaticBodyGenerator.createStaticBodyGenerator; import static io.airlift.json.JsonCodec.jsonCodec; import static io.airlift.json.JsonCodec.listJsonCodec; -import static io.prestosql.client.PrestoHeaders.PRESTO_USER; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.VIEW_QUERY; -import static io.prestosql.testing.TestingAccessControlManager.privilege; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.client.PrestoHeaders.PRESTO_USER; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.VIEW_QUERY; +import static io.trino.testing.TestingAccessControlManager.privilege; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.concurrent.TimeUnit.MINUTES; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-main/src/test/java/io/trino/server/TestRangeJsonSerde.java b/core/trino-main/src/test/java/io/trino/server/TestRangeJsonSerde.java index bfb9aae0add0..794ce209e4d4 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestRangeJsonSerde.java +++ b/core/trino-main/src/test/java/io/trino/server/TestRangeJsonSerde.java @@ -19,18 +19,18 @@ import com.fasterxml.jackson.databind.module.SimpleModule; import com.google.common.collect.ImmutableList; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.TestingBlockEncodingSerde; -import io.prestosql.spi.block.TestingBlockJsonSerde; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.type.TestingTypeDeserializer; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.TestingBlockEncodingSerde; +import io.trino.spi.block.TestingBlockJsonSerde; +import io.trino.spi.predicate.Range; +import io.trino.spi.type.TestingTypeDeserializer; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; public class TestRangeJsonSerde diff --git a/core/trino-main/src/test/java/io/trino/server/TestServer.java b/core/trino-main/src/test/java/io/trino/server/TestServer.java index d73f85c36369..932c0f4d4416 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestServer.java +++ b/core/trino-main/src/test/java/io/trino/server/TestServer.java @@ -25,11 +25,11 @@ import io.airlift.http.client.StatusResponseHandler.StatusResponse; import io.airlift.http.client.jetty.JettyHttpClient; import io.airlift.json.JsonCodec; -import io.prestosql.client.QueryError; -import io.prestosql.client.QueryResults; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.type.TimeZoneNotSupportedException; +import io.trino.client.QueryError; +import io.trino.client.QueryResults; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.QueryId; +import io.trino.spi.type.TimeZoneNotSupportedException; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; @@ -58,21 +58,21 @@ import static io.airlift.http.client.StatusResponseHandler.createStatusResponseHandler; import static io.airlift.json.JsonCodec.jsonCodec; import static io.airlift.testing.Closeables.closeAll; -import static io.prestosql.SystemSessionProperties.HASH_PARTITION_COUNT; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.QUERY_MAX_MEMORY; -import static io.prestosql.client.PrestoHeaders.PRESTO_CATALOG; -import static io.prestosql.client.PrestoHeaders.PRESTO_CLIENT_INFO; -import static io.prestosql.client.PrestoHeaders.PRESTO_PATH; -import static io.prestosql.client.PrestoHeaders.PRESTO_PREPARED_STATEMENT; -import static io.prestosql.client.PrestoHeaders.PRESTO_SCHEMA; -import static io.prestosql.client.PrestoHeaders.PRESTO_SESSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_SOURCE; -import static io.prestosql.client.PrestoHeaders.PRESTO_STARTED_TRANSACTION_ID; -import static io.prestosql.client.PrestoHeaders.PRESTO_TIME_ZONE; -import static io.prestosql.client.PrestoHeaders.PRESTO_TRANSACTION_ID; -import static io.prestosql.client.PrestoHeaders.PRESTO_USER; -import static io.prestosql.spi.StandardErrorCode.INCOMPATIBLE_CLIENT; +import static io.trino.SystemSessionProperties.HASH_PARTITION_COUNT; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.QUERY_MAX_MEMORY; +import static io.trino.client.PrestoHeaders.PRESTO_CATALOG; +import static io.trino.client.PrestoHeaders.PRESTO_CLIENT_INFO; +import static io.trino.client.PrestoHeaders.PRESTO_PATH; +import static io.trino.client.PrestoHeaders.PRESTO_PREPARED_STATEMENT; +import static io.trino.client.PrestoHeaders.PRESTO_SCHEMA; +import static io.trino.client.PrestoHeaders.PRESTO_SESSION; +import static io.trino.client.PrestoHeaders.PRESTO_SOURCE; +import static io.trino.client.PrestoHeaders.PRESTO_STARTED_TRANSACTION_ID; +import static io.trino.client.PrestoHeaders.PRESTO_TIME_ZONE; +import static io.trino.client.PrestoHeaders.PRESTO_TRANSACTION_ID; +import static io.trino.client.PrestoHeaders.PRESTO_USER; +import static io.trino.spi.StandardErrorCode.INCOMPATIBLE_CLIENT; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.MediaType.APPLICATION_JSON; diff --git a/core/trino-main/src/test/java/io/trino/server/TestSessionPropertyDefaults.java b/core/trino-main/src/test/java/io/trino/server/TestSessionPropertyDefaults.java index 45f286496aca..b64ba94daed3 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestSessionPropertyDefaults.java +++ b/core/trino-main/src/test/java/io/trino/server/TestSessionPropertyDefaults.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableMap; import io.airlift.node.NodeInfo; -import io.prestosql.Session; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.session.SessionPropertyConfigurationManagerFactory; -import io.prestosql.spi.session.TestingSessionPropertyConfigurationManagerFactory; +import io.trino.Session; +import io.trino.metadata.SessionPropertyManager; +import io.trino.spi.QueryId; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.security.Identity; +import io.trino.spi.session.SessionPropertyConfigurationManagerFactory; +import io.trino.spi.session.TestingSessionPropertyConfigurationManagerFactory; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.HASH_PARTITION_COUNT; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.QUERY_MAX_MEMORY; +import static io.trino.SystemSessionProperties.HASH_PARTITION_COUNT; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.QUERY_MAX_MEMORY; import static org.testng.Assert.assertEquals; public class TestSessionPropertyDefaults diff --git a/core/trino-main/src/test/java/io/trino/server/protocol/TestQueryResultRows.java b/core/trino-main/src/test/java/io/trino/server/protocol/TestQueryResultRows.java index 986c4d64e927..a937933b98c0 100644 --- a/core/trino-main/src/test/java/io/trino/server/protocol/TestQueryResultRows.java +++ b/core/trino-main/src/test/java/io/trino/server/protocol/TestQueryResultRows.java @@ -15,23 +15,23 @@ import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.client.ClientTypeSignature; -import io.prestosql.client.Column; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.TestingSession; -import io.prestosql.tests.BogusType; +import io.trino.Session; +import io.trino.client.ClientTypeSignature; +import io.trino.client.Column; +import io.trino.metadata.Metadata; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.testing.TestingSession; +import io.trino.tests.BogusType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -40,18 +40,18 @@ import java.util.function.Consumer; import java.util.function.Function; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.client.ClientStandardTypes.ARRAY; -import static io.prestosql.client.ClientStandardTypes.BIGINT; -import static io.prestosql.client.ClientStandardTypes.BOOLEAN; -import static io.prestosql.client.ClientStandardTypes.INTEGER; -import static io.prestosql.client.ClientStandardTypes.MAP; -import static io.prestosql.client.ClientStandardTypes.ROW; -import static io.prestosql.client.ClientStandardTypes.TIMESTAMP; -import static io.prestosql.client.ClientStandardTypes.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.server.protocol.QueryResultRows.queryResultRowsBuilder; -import static io.prestosql.spi.type.TypeSignature.mapType; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.client.ClientStandardTypes.ARRAY; +import static io.trino.client.ClientStandardTypes.BIGINT; +import static io.trino.client.ClientStandardTypes.BOOLEAN; +import static io.trino.client.ClientStandardTypes.INTEGER; +import static io.trino.client.ClientStandardTypes.MAP; +import static io.trino.client.ClientStandardTypes.ROW; +import static io.trino.client.ClientStandardTypes.TIMESTAMP; +import static io.trino.client.ClientStandardTypes.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.server.protocol.QueryResultRows.queryResultRowsBuilder; +import static io.trino.spi.type.TypeSignature.mapType; import static java.util.Collections.singletonList; import static java.util.Collections.singletonMap; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/trino-main/src/test/java/io/trino/server/remotetask/TestHttpRemoteTask.java b/core/trino-main/src/test/java/io/trino/server/remotetask/TestHttpRemoteTask.java index d1407a877b98..c2a7571800c5 100644 --- a/core/trino-main/src/test/java/io/trino/server/remotetask/TestHttpRemoteTask.java +++ b/core/trino-main/src/test/java/io/trino/server/remotetask/TestHttpRemoteTask.java @@ -28,53 +28,53 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonModule; import io.airlift.units.Duration; -import io.prestosql.block.BlockJsonSerde; -import io.prestosql.client.NodeVersion; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.DynamicFilterConfig; -import io.prestosql.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.NodeTaskMap; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.execution.RemoteTask; -import io.prestosql.execution.StageId; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskInfo; -import io.prestosql.execution.TaskManagerConfig; -import io.prestosql.execution.TaskSource; -import io.prestosql.execution.TaskState; -import io.prestosql.execution.TaskStatus; -import io.prestosql.execution.TaskTestUtils; -import io.prestosql.execution.TestSqlTaskManager; -import io.prestosql.execution.buffer.OutputBuffers; -import io.prestosql.metadata.HandleJsonModule; -import io.prestosql.metadata.HandleResolver; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.Split; -import io.prestosql.server.DynamicFilterService; -import io.prestosql.server.HttpRemoteTaskFactory; -import io.prestosql.server.TaskUpdateRequest; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.TestingColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.testing.TestingHandleResolver; -import io.prestosql.testing.TestingSplit; -import io.prestosql.type.TypeDeserializer; +import io.trino.block.BlockJsonSerde; +import io.trino.client.NodeVersion; +import io.trino.connector.CatalogName; +import io.trino.execution.DynamicFilterConfig; +import io.trino.execution.DynamicFiltersCollector.VersionedDynamicFilterDomains; +import io.trino.execution.Lifespan; +import io.trino.execution.NodeTaskMap; +import io.trino.execution.QueryManagerConfig; +import io.trino.execution.RemoteTask; +import io.trino.execution.StageId; +import io.trino.execution.TaskId; +import io.trino.execution.TaskInfo; +import io.trino.execution.TaskManagerConfig; +import io.trino.execution.TaskSource; +import io.trino.execution.TaskState; +import io.trino.execution.TaskStatus; +import io.trino.execution.TaskTestUtils; +import io.trino.execution.TestSqlTaskManager; +import io.trino.execution.buffer.OutputBuffers; +import io.trino.metadata.HandleJsonModule; +import io.trino.metadata.HandleResolver; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Metadata; +import io.trino.metadata.Split; +import io.trino.server.DynamicFilterService; +import io.trino.server.HttpRemoteTaskFactory; +import io.trino.server.TaskUpdateRequest; +import io.trino.spi.ErrorCode; +import io.trino.spi.QueryId; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.TestingColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.DynamicFilters; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.tree.SymbolReference; +import io.trino.testing.TestingHandleResolver; +import io.trino.testing.TestingSplit; +import io.trino.type.TypeDeserializer; import org.testng.annotations.Test; import javax.inject.Singleton; @@ -108,18 +108,18 @@ import static io.airlift.json.JsonBinder.jsonBinder; import static io.airlift.json.JsonCodecBinder.jsonCodecBinder; import static io.airlift.testing.Assertions.assertGreaterThanOrEqual; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_CURRENT_VERSION; -import static io.prestosql.client.PrestoHeaders.PRESTO_MAX_WAIT; -import static io.prestosql.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; -import static io.prestosql.execution.TaskTestUtils.TABLE_SCAN_NODE_ID; -import static io.prestosql.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.StandardErrorCode.REMOTE_TASK_ERROR; -import static io.prestosql.spi.StandardErrorCode.REMOTE_TASK_MISMATCH; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.assertions.Assert.assertEquals; -import static io.prestosql.testing.assertions.Assert.assertEventually; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.client.PrestoHeaders.PRESTO_CURRENT_VERSION; +import static io.trino.client.PrestoHeaders.PRESTO_MAX_WAIT; +import static io.trino.execution.DynamicFiltersCollector.INITIAL_DYNAMIC_FILTERS_VERSION; +import static io.trino.execution.TaskTestUtils.TABLE_SCAN_NODE_ID; +import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.StandardErrorCode.REMOTE_TASK_ERROR; +import static io.trino.spi.StandardErrorCode.REMOTE_TASK_MISMATCH; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.assertions.Assert.assertEquals; +import static io.trino.testing.assertions.Assert.assertEventually; import static java.lang.Math.min; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/server/security/TestKerberosConfig.java b/core/trino-main/src/test/java/io/trino/server/security/TestKerberosConfig.java index e725999f531d..768df661f827 100644 --- a/core/trino-main/src/test/java/io/trino/server/security/TestKerberosConfig.java +++ b/core/trino-main/src/test/java/io/trino/server/security/TestKerberosConfig.java @@ -24,8 +24,8 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertFullMapping; import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; -import static io.prestosql.server.security.KerberosNameType.HOSTBASED_SERVICE; -import static io.prestosql.server.security.KerberosNameType.USER_NAME; +import static io.trino.server.security.KerberosNameType.HOSTBASED_SERVICE; +import static io.trino.server.security.KerberosNameType.USER_NAME; public class TestKerberosConfig { diff --git a/core/trino-main/src/test/java/io/trino/server/security/TestResourceSecurity.java b/core/trino-main/src/test/java/io/trino/server/security/TestResourceSecurity.java index 40ec6c545614..f2c2b126de76 100644 --- a/core/trino-main/src/test/java/io/trino/server/security/TestResourceSecurity.java +++ b/core/trino-main/src/test/java/io/trino/server/security/TestResourceSecurity.java @@ -24,12 +24,12 @@ import io.jsonwebtoken.JwsHeader; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; -import io.prestosql.plugin.base.security.AllowAllSystemAccessControl; -import io.prestosql.security.AccessControlManager; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.BasicPrincipal; -import io.prestosql.spi.security.SystemSecurityContext; +import io.trino.plugin.base.security.AllowAllSystemAccessControl; +import io.trino.security.AccessControlManager; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.BasicPrincipal; +import io.trino.spi.security.SystemSecurityContext; import okhttp3.Credentials; import okhttp3.Headers; import okhttp3.OkHttpClient; @@ -56,10 +56,10 @@ import static com.google.common.base.MoreObjects.firstNonNull; import static com.google.common.net.HttpHeaders.AUTHORIZATION; import static io.airlift.http.client.HttpUriBuilder.uriBuilderFrom; -import static io.prestosql.client.OkHttpUtil.setupSsl; -import static io.prestosql.client.PrestoHeaders.PRESTO_USER; -import static io.prestosql.spi.security.AccessDeniedException.denyReadSystemInformationAccess; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.client.OkHttpUtil.setupSsl; +import static io.trino.client.PrestoHeaders.PRESTO_USER; +import static io.trino.spi.security.AccessDeniedException.denyReadSystemInformationAccess; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.nio.charset.StandardCharsets.UTF_8; import static javax.servlet.http.HttpServletResponse.SC_FORBIDDEN; import static javax.servlet.http.HttpServletResponse.SC_OK; diff --git a/core/trino-main/src/test/java/io/trino/server/security/TestUserMapping.java b/core/trino-main/src/test/java/io/trino/server/security/TestUserMapping.java index 94157d307c0a..46496736e7df 100644 --- a/core/trino-main/src/test/java/io/trino/server/security/TestUserMapping.java +++ b/core/trino-main/src/test/java/io/trino/server/security/TestUserMapping.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.Resources; -import io.prestosql.server.security.UserMapping.Rule; +import io.trino.server.security.UserMapping.Rule; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -23,8 +23,8 @@ import java.net.URISyntaxException; import java.util.Optional; -import static io.prestosql.server.security.UserMapping.Case.KEEP; -import static io.prestosql.server.security.UserMapping.createUserMapping; +import static io.trino.server.security.UserMapping.Case.KEEP; +import static io.trino.server.security.UserMapping.createUserMapping; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/server/security/jwt/TestJwkDecoder.java b/core/trino-main/src/test/java/io/trino/server/security/jwt/TestJwkDecoder.java index 24bbd862d256..8a53fa13c50f 100644 --- a/core/trino-main/src/test/java/io/trino/server/security/jwt/TestJwkDecoder.java +++ b/core/trino-main/src/test/java/io/trino/server/security/jwt/TestJwkDecoder.java @@ -21,8 +21,8 @@ import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import io.jsonwebtoken.SigningKeyResolver; -import io.prestosql.server.security.jwt.JwkDecoder.JwkEcPublicKey; -import io.prestosql.server.security.jwt.JwkDecoder.JwkRsaPublicKey; +import io.trino.server.security.jwt.JwkDecoder.JwkEcPublicKey; +import io.trino.server.security.jwt.JwkDecoder.JwkRsaPublicKey; import org.testng.annotations.Test; import java.io.File; @@ -37,7 +37,7 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.server.security.jwt.JwkDecoder.decodeKeys; +import static io.trino.server.security.jwt.JwkDecoder.decodeKeys; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/core/trino-main/src/test/java/io/trino/server/security/oauth2/TestOAuth2WebUiAuthenticationFilter.java b/core/trino-main/src/test/java/io/trino/server/security/oauth2/TestOAuth2WebUiAuthenticationFilter.java index 99e7bf33bcc0..5082729bfe7e 100644 --- a/core/trino-main/src/test/java/io/trino/server/security/oauth2/TestOAuth2WebUiAuthenticationFilter.java +++ b/core/trino-main/src/test/java/io/trino/server/security/oauth2/TestOAuth2WebUiAuthenticationFilter.java @@ -24,12 +24,12 @@ import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import io.jsonwebtoken.impl.DefaultClaims; -import io.prestosql.server.security.jwt.JwkService; -import io.prestosql.server.security.jwt.JwkSigningKeyResolver; -import io.prestosql.server.security.jwt.JwtAuthenticatorConfig; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.server.ui.WebUiModule; -import io.prestosql.testng.services.Flaky; +import io.trino.server.security.jwt.JwkService; +import io.trino.server.security.jwt.JwkSigningKeyResolver; +import io.trino.server.security.jwt.JwtAuthenticatorConfig; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.server.ui.WebUiModule; +import io.trino.testng.services.Flaky; import okhttp3.CookieJar; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -61,8 +61,8 @@ import java.util.UUID; import static io.airlift.testing.Assertions.assertLessThan; -import static io.prestosql.client.OkHttpUtil.setupInsecureSsl; -import static io.prestosql.server.security.oauth2.TestingHydraService.TTL_ACCESS_TOKEN_IN_SECONDS; +import static io.trino.client.OkHttpUtil.setupInsecureSsl; +import static io.trino.server.security.oauth2.TestingHydraService.TTL_ACCESS_TOKEN_IN_SECONDS; import static java.lang.String.format; import static javax.ws.rs.core.HttpHeaders.AUTHORIZATION; import static javax.ws.rs.core.HttpHeaders.LOCATION; diff --git a/core/trino-main/src/test/java/io/trino/server/security/oauth2/TestingHydraService.java b/core/trino-main/src/test/java/io/trino/server/security/oauth2/TestingHydraService.java index 4e8f3cf56a42..cc16232620be 100644 --- a/core/trino-main/src/test/java/io/trino/server/security/oauth2/TestingHydraService.java +++ b/core/trino-main/src/test/java/io/trino/server/security/oauth2/TestingHydraService.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.Resources; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.server.ui.WebUiModule; -import io.prestosql.util.AutoCloseableCloser; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.server.ui.WebUiModule; +import io.trino.util.AutoCloseableCloser; import org.testcontainers.containers.FixedHostPortGenericContainer; import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.Network; diff --git a/core/trino-main/src/test/java/io/trino/server/ui/TestWebUi.java b/core/trino-main/src/test/java/io/trino/server/ui/TestWebUi.java index b8899d2ee27e..53e204ccab98 100644 --- a/core/trino-main/src/test/java/io/trino/server/ui/TestWebUi.java +++ b/core/trino-main/src/test/java/io/trino/server/ui/TestWebUi.java @@ -25,11 +25,11 @@ import io.jsonwebtoken.JwsHeader; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; -import io.prestosql.server.security.PasswordAuthenticatorManager; -import io.prestosql.server.security.oauth2.OAuth2Client; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.BasicPrincipal; +import io.trino.server.security.PasswordAuthenticatorManager; +import io.trino.server.security.oauth2.OAuth2Client; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.BasicPrincipal; import okhttp3.FormBody; import okhttp3.JavaNetCookieJar; import okhttp3.OkHttpClient; @@ -65,13 +65,13 @@ import static com.google.common.net.HttpHeaders.X_FORWARDED_PROTO; import static com.google.inject.multibindings.OptionalBinder.newOptionalBinder; import static io.airlift.http.client.HttpUriBuilder.uriBuilderFrom; -import static io.prestosql.client.OkHttpUtil.setupSsl; -import static io.prestosql.server.security.oauth2.OAuth2CallbackResource.CALLBACK_ENDPOINT; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.DISABLED_LOCATION; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.LOGIN_FORM; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.UI_LOGIN; -import static io.prestosql.server.ui.FormWebUiAuthenticationFilter.UI_LOGOUT; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.client.OkHttpUtil.setupSsl; +import static io.trino.server.security.oauth2.OAuth2CallbackResource.CALLBACK_ENDPOINT; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.DISABLED_LOCATION; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.LOGIN_FORM; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.UI_LOGIN; +import static io.trino.server.ui.FormWebUiAuthenticationFilter.UI_LOGOUT; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.concurrent.TimeUnit.MINUTES; import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND; diff --git a/core/trino-main/src/test/java/io/trino/spiller/TestAesSpillCipher.java b/core/trino-main/src/test/java/io/trino/spiller/TestAesSpillCipher.java index cce0efe5adb9..e308fbc4c729 100644 --- a/core/trino-main/src/test/java/io/trino/spiller/TestAesSpillCipher.java +++ b/core/trino-main/src/test/java/io/trino/spiller/TestAesSpillCipher.java @@ -13,14 +13,14 @@ */ package io.trino.spiller; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import org.testng.Assert.ThrowingRunnable; import org.testng.annotations.Test; import java.util.Arrays; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotEquals; import static org.testng.Assert.expectThrows; 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 f22e5db1d841..5034b51a9f28 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 @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.Files; -import io.prestosql.RowPagesBuilder; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.PagesSerdeFactory; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.FeaturesConfig; +import io.trino.RowPagesBuilder; +import io.trino.execution.buffer.PagesSerde; +import io.trino.execution.buffer.PagesSerdeFactory; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.metadata.Metadata; +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.BeforeMethod; import org.testng.annotations.Test; @@ -35,13 +35,13 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Double.doubleToLongBits; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/spiller/TestFileSingleStreamSpiller.java b/core/trino-main/src/test/java/io/trino/spiller/TestFileSingleStreamSpiller.java index 2ae856ad69ee..39198071b896 100644 --- a/core/trino-main/src/test/java/io/trino/spiller/TestFileSingleStreamSpiller.java +++ b/core/trino-main/src/test/java/io/trino/spiller/TestFileSingleStreamSpiller.java @@ -18,14 +18,14 @@ import com.google.common.io.Files; import com.google.common.util.concurrent.ListeningExecutorService; import io.airlift.slice.InputStreamSliceInput; -import io.prestosql.execution.buffer.PageCodecMarker; -import io.prestosql.execution.buffer.PagesSerdeUtil; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.operator.PageAssertions; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.execution.buffer.PageCodecMarker; +import io.trino.execution.buffer.PagesSerdeUtil; +import io.trino.execution.buffer.SerializedPage; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.operator.PageAssertions; +import io.trino.spi.Page; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -38,11 +38,11 @@ import static com.google.common.io.MoreFiles.listFiles; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; import static com.google.common.util.concurrent.MoreExecutors.listeningDecorator; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.lang.Double.doubleToLongBits; import static java.nio.file.Files.newInputStream; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/core/trino-main/src/test/java/io/trino/spiller/TestFileSingleStreamSpillerFactory.java b/core/trino-main/src/test/java/io/trino/spiller/TestFileSingleStreamSpillerFactory.java index 740f93a0bcda..bc8b6a627146 100644 --- a/core/trino-main/src/test/java/io/trino/spiller/TestFileSingleStreamSpillerFactory.java +++ b/core/trino-main/src/test/java/io/trino/spiller/TestFileSingleStreamSpillerFactory.java @@ -19,10 +19,10 @@ import com.google.common.io.Files; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.type.Type; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -38,11 +38,11 @@ import static com.google.common.io.MoreFiles.listFiles; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; import static com.google.common.util.concurrent.Futures.getUnchecked; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spiller.FileSingleStreamSpillerFactory.SPILL_FILE_PREFIX; -import static io.prestosql.spiller.FileSingleStreamSpillerFactory.SPILL_FILE_SUFFIX; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spiller.FileSingleStreamSpillerFactory.SPILL_FILE_PREFIX; +import static io.trino.spiller.FileSingleStreamSpillerFactory.SPILL_FILE_SUFFIX; import static java.nio.file.Files.setPosixFilePermissions; import static java.util.Collections.emptyList; import static org.assertj.core.api.Assertions.assertThatThrownBy; 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 c8f1b4c43f84..a93923f7b4c3 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,16 +16,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.io.Closer; -import io.prestosql.RowPagesBuilder; -import io.prestosql.SequencePageBuilder; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.operator.PartitionFunction; -import io.prestosql.operator.SpillContext; -import io.prestosql.operator.TestingOperatorContext; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.PartitioningSpiller.PartitioningSpillResult; -import io.prestosql.sql.analyzer.FeaturesConfig; +import io.trino.RowPagesBuilder; +import io.trino.SequencePageBuilder; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.operator.PartitionFunction; +import io.trino.operator.SpillContext; +import io.trino.operator.TestingOperatorContext; +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; @@ -41,11 +41,11 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.PageAssertions.assertPageEquals; +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 java.lang.Math.toIntExact; import static java.nio.file.Files.createTempDirectory; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; diff --git a/core/trino-main/src/test/java/io/trino/spiller/TestSpillCipherPagesSerde.java b/core/trino-main/src/test/java/io/trino/spiller/TestSpillCipherPagesSerde.java index 576ef7073fd1..0cacb112d6d0 100644 --- a/core/trino-main/src/test/java/io/trino/spiller/TestSpillCipherPagesSerde.java +++ b/core/trino-main/src/test/java/io/trino/spiller/TestSpillCipherPagesSerde.java @@ -14,22 +14,22 @@ package io.trino.spiller; import com.google.common.collect.ImmutableList; -import io.prestosql.execution.buffer.PagesSerde; -import io.prestosql.execution.buffer.SerializedPage; -import io.prestosql.execution.buffer.TestingPagesSerdeFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.execution.buffer.PagesSerde; +import io.trino.execution.buffer.SerializedPage; +import io.trino.execution.buffer.TestingPagesSerdeFactory; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.testng.Assert.ThrowingRunnable; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import static org.testng.Assert.expectThrows; diff --git a/core/trino-main/src/test/java/io/trino/spiller/TestSpillSpaceTracker.java b/core/trino-main/src/test/java/io/trino/spiller/TestSpillSpaceTracker.java index b2d0dbe3a5ed..a862e3dadb21 100644 --- a/core/trino-main/src/test/java/io/trino/spiller/TestSpillSpaceTracker.java +++ b/core/trino-main/src/test/java/io/trino/spiller/TestSpillSpaceTracker.java @@ -14,7 +14,7 @@ package io.trino.spiller; import io.airlift.units.DataSize; -import io.prestosql.ExceededSpillLimitException; +import io.trino.ExceededSpillLimitException; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/split/MockSplitSource.java b/core/trino-main/src/test/java/io/trino/split/MockSplitSource.java index 1fe46005ead9..54297ed2d75b 100644 --- a/core/trino-main/src/test/java/io/trino/split/MockSplitSource.java +++ b/core/trino-main/src/test/java/io/trino/split/MockSplitSource.java @@ -17,12 +17,12 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.metadata.Split; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.metadata.Split; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorSplit; import javax.annotation.concurrent.NotThreadSafe; @@ -33,9 +33,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.split.MockSplitSource.Action.DO_NOTHING; -import static io.prestosql.split.MockSplitSource.Action.FINISH; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.split.MockSplitSource.Action.DO_NOTHING; +import static io.trino.split.MockSplitSource.Action.FINISH; @NotThreadSafe public class MockSplitSource diff --git a/core/trino-main/src/test/java/io/trino/split/TestBufferingSplitSource.java b/core/trino-main/src/test/java/io/trino/split/TestBufferingSplitSource.java index ba715e97c545..4a398ed26592 100644 --- a/core/trino-main/src/test/java/io/trino/split/TestBufferingSplitSource.java +++ b/core/trino-main/src/test/java/io/trino/split/TestBufferingSplitSource.java @@ -15,8 +15,8 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.execution.Lifespan; -import io.prestosql.split.SplitSource.SplitBatch; +import io.trino.execution.Lifespan; +import io.trino.split.SplitSource.SplitBatch; import org.testng.annotations.Test; import java.util.concurrent.Future; @@ -24,9 +24,9 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.concurrent.MoreFutures.tryGetFutureValue; import static io.airlift.testing.Assertions.assertContains; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.split.MockSplitSource.Action.FAIL; -import static io.prestosql.split.MockSplitSource.Action.FINISH; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.split.MockSplitSource.Action.FAIL; +import static io.trino.split.MockSplitSource.Action.FINISH; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/sql/ExpressionTestUtils.java b/core/trino-main/src/test/java/io/trino/sql/ExpressionTestUtils.java index dc5b78c3ab18..08b5b19168e6 100644 --- a/core/trino-main/src/test/java/io/trino/sql/ExpressionTestUtils.java +++ b/core/trino-main/src/test/java/io/trino/sql/ExpressionTestUtils.java @@ -14,40 +14,40 @@ package io.trino.sql; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.ExpressionAnalyzer; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.DesugarArrayConstructorRewriter; -import io.prestosql.sql.planner.DesugarLikeRewriter; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.assertions.ExpressionVerifier; -import io.prestosql.sql.planner.assertions.SymbolAliases; -import io.prestosql.sql.planner.iterative.rule.CanonicalizeExpressionRewriter; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.transaction.TestingTransactionManager; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.type.Type; +import io.trino.sql.analyzer.ExpressionAnalyzer; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.DesugarArrayConstructorRewriter; +import io.trino.sql.planner.DesugarLikeRewriter; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.assertions.ExpressionVerifier; +import io.trino.sql.planner.assertions.SymbolAliases; +import io.trino.sql.planner.iterative.rule.CanonicalizeExpressionRewriter; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.NodeRef; +import io.trino.transaction.TestingTransactionManager; import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.StandardErrorCode.EXPRESSION_NOT_CONSTANT; -import static io.prestosql.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; -import static io.prestosql.sql.ParsingUtil.createParsingOptions; -import static io.prestosql.sql.analyzer.SemanticExceptions.semanticException; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.StandardErrorCode.EXPRESSION_NOT_CONSTANT; +import static io.trino.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; +import static io.trino.sql.ParsingUtil.createParsingOptions; +import static io.trino.sql.analyzer.SemanticExceptions.semanticException; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.transaction.TransactionBuilder.transaction; import static org.testng.internal.EclipseInterface.ASSERT_LEFT; import static org.testng.internal.EclipseInterface.ASSERT_MIDDLE; import static org.testng.internal.EclipseInterface.ASSERT_RIGHT; diff --git a/core/trino-main/src/test/java/io/trino/sql/TestExpressionInterpreter.java b/core/trino-main/src/test/java/io/trino/sql/TestExpressionInterpreter.java index ebd426d6e49c..66dd2ea966dc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/TestExpressionInterpreter.java +++ b/core/trino-main/src/test/java/io/trino/sql/TestExpressionInterpreter.java @@ -17,33 +17,33 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.ExpressionInterpreter; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.assertions.SymbolAliases; -import io.prestosql.sql.planner.iterative.rule.CanonicalizeExpressionRewriter; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.transaction.TestingTransactionManager; -import io.prestosql.transaction.TransactionBuilder; +import io.trino.metadata.Metadata; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.ExpressionInterpreter; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.assertions.SymbolAliases; +import io.trino.sql.planner.iterative.rule.CanonicalizeExpressionRewriter; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SymbolReference; +import io.trino.transaction.TestingTransactionManager; +import io.trino.transaction.TransactionBuilder; import org.intellij.lang.annotations.Language; import org.joda.time.DateTime; import org.joda.time.LocalDate; @@ -57,30 +57,30 @@ import java.util.stream.IntStream; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.metadata.ResolvedFunction.extractFunctionName; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.ExpressionFormatter.formatExpression; -import static io.prestosql.sql.ExpressionTestUtils.assertExpressionEquals; -import static io.prestosql.sql.ExpressionTestUtils.getTypes; -import static io.prestosql.sql.ExpressionTestUtils.resolveFunctionCalls; -import static io.prestosql.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; -import static io.prestosql.sql.ParsingUtil.createParsingOptions; -import static io.prestosql.sql.planner.ExpressionInterpreter.expressionInterpreter; -import static io.prestosql.sql.planner.ExpressionInterpreter.expressionOptimizer; -import static io.prestosql.type.DateTimes.scaleEpochMillisToMicros; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.ResolvedFunction.extractFunctionName; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.ExpressionFormatter.formatExpression; +import static io.trino.sql.ExpressionTestUtils.assertExpressionEquals; +import static io.trino.sql.ExpressionTestUtils.getTypes; +import static io.trino.sql.ExpressionTestUtils.resolveFunctionCalls; +import static io.trino.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; +import static io.trino.sql.ParsingUtil.createParsingOptions; +import static io.trino.sql.planner.ExpressionInterpreter.expressionInterpreter; +import static io.trino.sql.planner.ExpressionInterpreter.expressionOptimizer; +import static io.trino.type.DateTimes.scaleEpochMillisToMicros; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-main/src/test/java/io/trino/sql/TestExpressionOptimizer.java b/core/trino-main/src/test/java/io/trino/sql/TestExpressionOptimizer.java index bb57a2aa7968..24d642616dcd 100644 --- a/core/trino-main/src/test/java/io/trino/sql/TestExpressionOptimizer.java +++ b/core/trino-main/src/test/java/io/trino/sql/TestExpressionOptimizer.java @@ -14,43 +14,43 @@ package io.trino.sql; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.block.IntArrayBlock; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.ConstantExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.sql.relational.optimizer.ExpressionOptimizer; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.block.IntArrayBlock; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.ConstantExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; +import io.trino.sql.relational.optimizer.ExpressionOptimizer; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.block.BlockAssertions.toValues; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.scalar.JsonStringToArrayCast.JSON_STRING_TO_ARRAY_NAME; -import static io.prestosql.operator.scalar.JsonStringToMapCast.JSON_STRING_TO_MAP_NAME; -import static io.prestosql.operator.scalar.JsonStringToRowCast.JSON_STRING_TO_ROW_NAME; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.call; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.sql.relational.SpecialForm.Form.IF; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.block.BlockAssertions.toValues; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.scalar.JsonStringToArrayCast.JSON_STRING_TO_ARRAY_NAME; +import static io.trino.operator.scalar.JsonStringToMapCast.JSON_STRING_TO_MAP_NAME; +import static io.trino.operator.scalar.JsonStringToRowCast.JSON_STRING_TO_ROW_NAME; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.call; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.sql.relational.SpecialForm.Form.IF; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.StructuralTestUtil.mapType; import static org.testng.Assert.assertEquals; public class TestExpressionOptimizer diff --git a/core/trino-main/src/test/java/io/trino/sql/TestExpressionUtils.java b/core/trino-main/src/test/java/io/trino/sql/TestExpressionUtils.java index 2b2b7853bacb..355344708ede 100644 --- a/core/trino-main/src/test/java/io/trino/sql/TestExpressionUtils.java +++ b/core/trino-main/src/test/java/io/trino/sql/TestExpressionUtils.java @@ -13,13 +13,13 @@ */ package io.trino.sql; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.LogicalBinaryExpression; +import io.trino.metadata.Metadata; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.LogicalBinaryExpression; import org.testng.annotations.Test; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; import static org.testng.Assert.assertEquals; public class TestExpressionUtils diff --git a/core/trino-main/src/test/java/io/trino/sql/TestLikeFunctions.java b/core/trino-main/src/test/java/io/trino/sql/TestLikeFunctions.java index 143461ca24ff..94a3aada9a10 100644 --- a/core/trino-main/src/test/java/io/trino/sql/TestLikeFunctions.java +++ b/core/trino-main/src/test/java/io/trino/sql/TestLikeFunctions.java @@ -15,22 +15,22 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.PrestoException; -import io.prestosql.type.JoniRegexp; -import io.prestosql.type.LikeFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.PrestoException; +import io.trino.type.JoniRegexp; +import io.trino.type.LikeFunctions; import org.testng.annotations.Test; import java.util.Optional; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.type.LikeFunctions.isLikePattern; -import static io.prestosql.type.LikeFunctions.likeChar; -import static io.prestosql.type.LikeFunctions.likePattern; -import static io.prestosql.type.LikeFunctions.likeVarchar; -import static io.prestosql.type.LikeFunctions.patternConstantPrefixBytes; -import static io.prestosql.type.LikeFunctions.unescapeLiteralLikePattern; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.type.LikeFunctions.isLikePattern; +import static io.trino.type.LikeFunctions.likeChar; +import static io.trino.type.LikeFunctions.likePattern; +import static io.trino.type.LikeFunctions.likeVarchar; +import static io.trino.type.LikeFunctions.patternConstantPrefixBytes; +import static io.trino.type.LikeFunctions.unescapeLiteralLikePattern; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/sql/TestSqlEnvironmentConfig.java b/core/trino-main/src/test/java/io/trino/sql/TestSqlEnvironmentConfig.java index 59fa882b4774..21f3a3c81c5e 100644 --- a/core/trino-main/src/test/java/io/trino/sql/TestSqlEnvironmentConfig.java +++ b/core/trino-main/src/test/java/io/trino/sql/TestSqlEnvironmentConfig.java @@ -14,7 +14,7 @@ package io.trino.sql; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.parser.ParsingException; +import io.trino.sql.parser.ParsingException; import org.testng.annotations.Test; import java.util.Map; diff --git a/core/trino-main/src/test/java/io/trino/sql/TestSqlToRowExpressionTranslator.java b/core/trino-main/src/test/java/io/trino/sql/TestSqlToRowExpressionTranslator.java index fe614d3fa888..5dd1f4c28f96 100644 --- a/core/trino-main/src/test/java/io/trino/sql/TestSqlToRowExpressionTranslator.java +++ b/core/trino-main/src/test/java/io/trino/sql/TestSqlToRowExpressionTranslator.java @@ -14,35 +14,35 @@ package io.trino.sql; import com.google.common.collect.ImmutableMap; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.ExpressionAnalyzer; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.planner.ExpressionInterpreter; -import io.prestosql.sql.planner.LiteralEncoder; -import io.prestosql.sql.planner.NoOpSymbolResolver; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SqlToRowExpressionTranslator; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NodeRef; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.type.Type; +import io.trino.sql.analyzer.ExpressionAnalyzer; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.planner.ExpressionInterpreter; +import io.trino.sql.planner.LiteralEncoder; +import io.trino.sql.planner.NoOpSymbolResolver; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SqlToRowExpressionTranslator; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NodeRef; import org.testng.annotations.Test; import java.math.BigDecimal; import java.util.Map; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.util.Collections.emptyMap; public class TestSqlToRowExpressionTranslator 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 e2278a88db48..676058291a72 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 @@ -16,47 +16,47 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.informationschema.InformationSchemaConnector; -import io.prestosql.connector.system.SystemConnector; -import io.prestosql.execution.DynamicFilterConfig; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.execution.TaskManagerConfig; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.memory.MemoryManagerConfig; -import io.prestosql.memory.NodeMemoryConfig; -import io.prestosql.metadata.Catalog; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.InMemoryNodeManager; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.plugin.base.security.AllowAllSystemAccessControl; -import io.prestosql.security.AccessControl; -import io.prestosql.security.AccessControlConfig; -import io.prestosql.security.AccessControlManager; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.tree.Statement; -import io.prestosql.testing.TestingMetadata; -import io.prestosql.testing.assertions.PrestoExceptionAssert; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.connector.CatalogName; +import io.trino.connector.informationschema.InformationSchemaConnector; +import io.trino.connector.system.SystemConnector; +import io.trino.execution.DynamicFilterConfig; +import io.trino.execution.QueryManagerConfig; +import io.trino.execution.TaskManagerConfig; +import io.trino.execution.warnings.WarningCollector; +import io.trino.memory.MemoryManagerConfig; +import io.trino.memory.NodeMemoryConfig; +import io.trino.metadata.Catalog; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.InMemoryNodeManager; +import io.trino.metadata.InternalNodeManager; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.SessionPropertyManager; +import io.trino.plugin.base.security.AllowAllSystemAccessControl; +import io.trino.security.AccessControl; +import io.trino.security.AccessControlConfig; +import io.trino.security.AccessControlManager; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.tree.Statement; +import io.trino.testing.TestingMetadata; +import io.trino.testing.assertions.PrestoExceptionAssert; +import io.trino.transaction.TransactionManager; import org.intellij.lang.annotations.Language; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -65,77 +65,77 @@ import java.util.Optional; import java.util.function.Consumer; -import static io.prestosql.connector.CatalogName.createInformationSchemaCatalogName; -import static io.prestosql.connector.CatalogName.createSystemTablesCatalogName; -import static io.prestosql.cost.StatsCalculatorModule.createNewStatsCalculator; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.scalar.ApplyFunction.APPLY_FUNCTION; -import static io.prestosql.spi.StandardErrorCode.AMBIGUOUS_NAME; -import static io.prestosql.spi.StandardErrorCode.CATALOG_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.COLUMN_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.COLUMN_TYPE_UNKNOWN; -import static io.prestosql.spi.StandardErrorCode.DUPLICATE_COLUMN_NAME; -import static io.prestosql.spi.StandardErrorCode.DUPLICATE_NAMED_QUERY; -import static io.prestosql.spi.StandardErrorCode.DUPLICATE_PROPERTY; -import static io.prestosql.spi.StandardErrorCode.EXPRESSION_NOT_AGGREGATE; -import static io.prestosql.spi.StandardErrorCode.EXPRESSION_NOT_CONSTANT; -import static io.prestosql.spi.StandardErrorCode.EXPRESSION_NOT_IN_DISTINCT; -import static io.prestosql.spi.StandardErrorCode.EXPRESSION_NOT_SCALAR; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_NOT_AGGREGATE; -import static io.prestosql.spi.StandardErrorCode.INVALID_ARGUMENTS; -import static io.prestosql.spi.StandardErrorCode.INVALID_COLUMN_REFERENCE; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.INVALID_LIMIT_CLAUSE; -import static io.prestosql.spi.StandardErrorCode.INVALID_LITERAL; -import static io.prestosql.spi.StandardErrorCode.INVALID_ORDER_BY; -import static io.prestosql.spi.StandardErrorCode.INVALID_PARAMETER_USAGE; -import static io.prestosql.spi.StandardErrorCode.INVALID_RECURSIVE_REFERENCE; -import static io.prestosql.spi.StandardErrorCode.INVALID_VIEW; -import static io.prestosql.spi.StandardErrorCode.INVALID_WINDOW_FRAME; -import static io.prestosql.spi.StandardErrorCode.MISMATCHED_COLUMN_ALIASES; -import static io.prestosql.spi.StandardErrorCode.MISSING_CATALOG_NAME; -import static io.prestosql.spi.StandardErrorCode.MISSING_COLUMN_ALIASES; -import static io.prestosql.spi.StandardErrorCode.MISSING_COLUMN_NAME; -import static io.prestosql.spi.StandardErrorCode.MISSING_GROUP_BY; -import static io.prestosql.spi.StandardErrorCode.MISSING_ORDER_BY; -import static io.prestosql.spi.StandardErrorCode.MISSING_OVER; -import static io.prestosql.spi.StandardErrorCode.MISSING_SCHEMA_NAME; -import static io.prestosql.spi.StandardErrorCode.NESTED_AGGREGATION; -import static io.prestosql.spi.StandardErrorCode.NESTED_RECURSIVE; -import static io.prestosql.spi.StandardErrorCode.NESTED_WINDOW; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.NULL_TREATMENT_NOT_ALLOWED; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.SYNTAX_ERROR; -import static io.prestosql.spi.StandardErrorCode.TABLE_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.TOO_MANY_ARGUMENTS; -import static io.prestosql.spi.StandardErrorCode.TOO_MANY_GROUPING_SETS; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.StandardErrorCode.VIEW_IS_RECURSIVE; -import static io.prestosql.spi.StandardErrorCode.VIEW_IS_STALE; -import static io.prestosql.spi.connector.ConnectorViewDefinition.ViewColumn; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.RowType.anonymousRow; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DECIMAL; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; -import static io.prestosql.testing.TestingEventListenerManager.emptyEventListenerManager; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; -import static io.prestosql.transaction.InMemoryTransactionManager.createTestTransactionManager; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.connector.CatalogName.createInformationSchemaCatalogName; +import static io.trino.connector.CatalogName.createSystemTablesCatalogName; +import static io.trino.cost.StatsCalculatorModule.createNewStatsCalculator; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.scalar.ApplyFunction.APPLY_FUNCTION; +import static io.trino.spi.StandardErrorCode.AMBIGUOUS_NAME; +import static io.trino.spi.StandardErrorCode.CATALOG_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.COLUMN_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.COLUMN_TYPE_UNKNOWN; +import static io.trino.spi.StandardErrorCode.DUPLICATE_COLUMN_NAME; +import static io.trino.spi.StandardErrorCode.DUPLICATE_NAMED_QUERY; +import static io.trino.spi.StandardErrorCode.DUPLICATE_PROPERTY; +import static io.trino.spi.StandardErrorCode.EXPRESSION_NOT_AGGREGATE; +import static io.trino.spi.StandardErrorCode.EXPRESSION_NOT_CONSTANT; +import static io.trino.spi.StandardErrorCode.EXPRESSION_NOT_IN_DISTINCT; +import static io.trino.spi.StandardErrorCode.EXPRESSION_NOT_SCALAR; +import static io.trino.spi.StandardErrorCode.FUNCTION_NOT_AGGREGATE; +import static io.trino.spi.StandardErrorCode.INVALID_ARGUMENTS; +import static io.trino.spi.StandardErrorCode.INVALID_COLUMN_REFERENCE; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_LIMIT_CLAUSE; +import static io.trino.spi.StandardErrorCode.INVALID_LITERAL; +import static io.trino.spi.StandardErrorCode.INVALID_ORDER_BY; +import static io.trino.spi.StandardErrorCode.INVALID_PARAMETER_USAGE; +import static io.trino.spi.StandardErrorCode.INVALID_RECURSIVE_REFERENCE; +import static io.trino.spi.StandardErrorCode.INVALID_VIEW; +import static io.trino.spi.StandardErrorCode.INVALID_WINDOW_FRAME; +import static io.trino.spi.StandardErrorCode.MISMATCHED_COLUMN_ALIASES; +import static io.trino.spi.StandardErrorCode.MISSING_CATALOG_NAME; +import static io.trino.spi.StandardErrorCode.MISSING_COLUMN_ALIASES; +import static io.trino.spi.StandardErrorCode.MISSING_COLUMN_NAME; +import static io.trino.spi.StandardErrorCode.MISSING_GROUP_BY; +import static io.trino.spi.StandardErrorCode.MISSING_ORDER_BY; +import static io.trino.spi.StandardErrorCode.MISSING_OVER; +import static io.trino.spi.StandardErrorCode.MISSING_SCHEMA_NAME; +import static io.trino.spi.StandardErrorCode.NESTED_AGGREGATION; +import static io.trino.spi.StandardErrorCode.NESTED_RECURSIVE; +import static io.trino.spi.StandardErrorCode.NESTED_WINDOW; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NULL_TREATMENT_NOT_ALLOWED; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.SYNTAX_ERROR; +import static io.trino.spi.StandardErrorCode.TABLE_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TOO_MANY_ARGUMENTS; +import static io.trino.spi.StandardErrorCode.TOO_MANY_GROUPING_SETS; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.StandardErrorCode.VIEW_IS_RECURSIVE; +import static io.trino.spi.StandardErrorCode.VIEW_IS_STALE; +import static io.trino.spi.connector.ConnectorViewDefinition.ViewColumn; +import static io.trino.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.RowType.anonymousRow; +import static io.trino.spi.type.TinyintType.TINYINT; +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.parser.ParsingOptions.DecimalLiteralTreatment.AS_DECIMAL; +import static io.trino.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; +import static io.trino.testing.TestingEventListenerManager.emptyEventListenerManager; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.transaction.InMemoryTransactionManager.createTestTransactionManager; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.lang.String.format; import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; 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 ce3bcc71bd70..39179733932a 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,9 @@ import com.google.common.collect.ImmutableMap; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.sql.analyzer.FeaturesConfig.DataIntegrityVerification; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; +import io.trino.sql.analyzer.FeaturesConfig.DataIntegrityVerification; +import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; +import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; import org.testng.annotations.Test; import java.util.Map; @@ -29,10 +29,10 @@ 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.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; -import static io.prestosql.sql.analyzer.RegexLibrary.JONI; -import static io.prestosql.sql.analyzer.RegexLibrary.RE2J; +import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; +import static io.trino.sql.analyzer.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; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/trino-main/src/test/java/io/trino/sql/analyzer/TestScope.java b/core/trino-main/src/test/java/io/trino/sql/analyzer/TestScope.java index 26b952636dda..cddf31c95e4a 100644 --- a/core/trino-main/src/test/java/io/trino/sql/analyzer/TestScope.java +++ b/core/trino-main/src/test/java/io/trino/sql/analyzer/TestScope.java @@ -13,14 +13,14 @@ */ package io.trino.sql.analyzer; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/sql/analyzer/TestTypeSignatureTranslator.java b/core/trino-main/src/test/java/io/trino/sql/analyzer/TestTypeSignatureTranslator.java index 8f90736138c2..db8ec6ab167b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/analyzer/TestTypeSignatureTranslator.java +++ b/core/trino-main/src/test/java/io/trino/sql/analyzer/TestTypeSignatureTranslator.java @@ -13,16 +13,16 @@ */ package io.trino.sql.analyzer; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.Identifier; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.Identifier; import org.testng.annotations.Test; import java.util.Comparator; import java.util.Locale; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toDataType; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toTypeSignature; -import static io.prestosql.sql.parser.ParserAssert.type; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toDataType; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toTypeSignature; +import static io.trino.sql.parser.ParserAssert.type; import static org.assertj.core.api.Assertions.assertThat; public class TestTypeSignatureTranslator diff --git a/core/trino-main/src/test/java/io/trino/sql/gen/BenchmarkInCodeGenerator.java b/core/trino-main/src/test/java/io/trino/sql/gen/BenchmarkInCodeGenerator.java index ea5286b0ab57..1cec7e429721 100644 --- a/core/trino-main/src/test/java/io/trino/sql/gen/BenchmarkInCodeGenerator.java +++ b/core/trino-main/src/test/java/io/trino/sql/gen/BenchmarkInCodeGenerator.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -45,16 +45,16 @@ import java.util.Random; import java.util.concurrent.TimeUnit; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.sql.relational.SpecialForm.Form.IN; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.sql.relational.SpecialForm.Form.IN; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.openjdk.jmh.annotations.Mode.AverageTime; @State(Scope.Thread) diff --git a/core/trino-main/src/test/java/io/trino/sql/gen/BenchmarkPageProcessor.java b/core/trino-main/src/test/java/io/trino/sql/gen/BenchmarkPageProcessor.java index 37fa6cd7175d..856464959ced 100644 --- a/core/trino-main/src/test/java/io/trino/sql/gen/BenchmarkPageProcessor.java +++ b/core/trino-main/src/test/java/io/trino/sql/gen/BenchmarkPageProcessor.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SpecialForm; -import io.prestosql.sql.relational.SpecialForm.Form; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SpecialForm; +import io.trino.sql.relational.SpecialForm.Form; import io.trino.tpch.LineItem; import io.trino.tpch.LineItemGenerator; import org.openjdk.jmh.annotations.Benchmark; @@ -48,17 +48,17 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.MULTIPLY; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.MULTIPLY; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; @State(Scope.Thread) @OutputTimeUnit(TimeUnit.SECONDS) diff --git a/core/trino-main/src/test/java/io/trino/sql/gen/BenchmarkPageProcessor2.java b/core/trino-main/src/test/java/io/trino/sql/gen/BenchmarkPageProcessor2.java index f7337e680539..1518aad7a6ba 100644 --- a/core/trino-main/src/test/java/io/trino/sql/gen/BenchmarkPageProcessor2.java +++ b/core/trino-main/src/test/java/io/trino/sql/gen/BenchmarkPageProcessor2.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.SequencePageBuilder; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.index.PageRecordSet; -import io.prestosql.operator.project.CursorProcessor; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SqlToRowExpressionTranslator; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.testing.TestingSession; +import io.trino.SequencePageBuilder; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.index.PageRecordSet; +import io.trino.operator.project.CursorProcessor; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SqlToRowExpressionTranslator; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NodeRef; +import io.trino.testing.TestingSession; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -58,11 +58,11 @@ import java.util.Optional; import java.util.concurrent.TimeUnit; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.ExpressionTestUtils.createExpression; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.ExpressionTestUtils.createExpression; import static java.util.Locale.ENGLISH; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/test/java/io/trino/sql/gen/TestExpressionCompiler.java b/core/trino-main/src/test/java/io/trino/sql/gen/TestExpressionCompiler.java index fc039684c80d..a99665848168 100644 --- a/core/trino-main/src/test/java/io/trino/sql/gen/TestExpressionCompiler.java +++ b/core/trino-main/src/test/java/io/trino/sql/gen/TestExpressionCompiler.java @@ -24,33 +24,33 @@ import io.airlift.log.Logging; import io.airlift.slice.Slice; import io.airlift.units.Duration; -import io.prestosql.operator.scalar.BitwiseFunctions; -import io.prestosql.operator.scalar.FunctionAssertions; -import io.prestosql.operator.scalar.JoniRegexpFunctions; -import io.prestosql.operator.scalar.JsonFunctions; -import io.prestosql.operator.scalar.JsonPath; -import io.prestosql.operator.scalar.MathFunctions; -import io.prestosql.operator.scalar.StringFunctions; -import io.prestosql.operator.scalar.timestamp.ExtractDay; -import io.prestosql.operator.scalar.timestamp.ExtractDayOfWeek; -import io.prestosql.operator.scalar.timestamp.ExtractDayOfYear; -import io.prestosql.operator.scalar.timestamp.ExtractHour; -import io.prestosql.operator.scalar.timestamp.ExtractMinute; -import io.prestosql.operator.scalar.timestamp.ExtractMonth; -import io.prestosql.operator.scalar.timestamp.ExtractQuarter; -import io.prestosql.operator.scalar.timestamp.ExtractSecond; -import io.prestosql.operator.scalar.timestamp.ExtractWeekOfYear; -import io.prestosql.operator.scalar.timestamp.ExtractYear; -import io.prestosql.operator.scalar.timestamp.ExtractYearOfWeek; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.tree.Extract.Field; -import io.prestosql.type.JoniRegexp; -import io.prestosql.type.LikeFunctions; +import io.trino.operator.scalar.BitwiseFunctions; +import io.trino.operator.scalar.FunctionAssertions; +import io.trino.operator.scalar.JoniRegexpFunctions; +import io.trino.operator.scalar.JsonFunctions; +import io.trino.operator.scalar.JsonPath; +import io.trino.operator.scalar.MathFunctions; +import io.trino.operator.scalar.StringFunctions; +import io.trino.operator.scalar.timestamp.ExtractDay; +import io.trino.operator.scalar.timestamp.ExtractDayOfWeek; +import io.trino.operator.scalar.timestamp.ExtractDayOfYear; +import io.trino.operator.scalar.timestamp.ExtractHour; +import io.trino.operator.scalar.timestamp.ExtractMinute; +import io.trino.operator.scalar.timestamp.ExtractMonth; +import io.trino.operator.scalar.timestamp.ExtractQuarter; +import io.trino.operator.scalar.timestamp.ExtractSecond; +import io.trino.operator.scalar.timestamp.ExtractWeekOfYear; +import io.trino.operator.scalar.timestamp.ExtractYear; +import io.trino.operator.scalar.timestamp.ExtractYearOfWeek; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.sql.tree.Extract.Field; +import io.trino.type.JoniRegexp; +import io.trino.type.LikeFunctions; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.testng.annotations.AfterClass; @@ -79,28 +79,28 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.testing.Closeables.closeAllRuntimeException; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.operator.scalar.JoniRegexpCasts.joniRegexp; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.tree.Extract.Field.TIMEZONE_HOUR; -import static io.prestosql.sql.tree.Extract.Field.TIMEZONE_MINUTE; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.SqlVarbinaryTestingUtil.sqlVarbinary; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.operator.scalar.JoniRegexpCasts.joniRegexp; +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.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +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.tree.Extract.Field.TIMEZONE_HOUR; +import static io.trino.sql.tree.Extract.Field.TIMEZONE_MINUTE; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.SqlVarbinaryTestingUtil.sqlVarbinary; +import static io.trino.type.DateTimes.MICROSECONDS_PER_MILLISECOND; +import static io.trino.type.JsonType.JSON; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.StructuralTestUtil.mapType; import static java.lang.Math.cos; import static java.lang.Runtime.getRuntime; import static java.lang.String.format; diff --git a/core/trino-main/src/test/java/io/trino/sql/gen/TestInCodeGenerator.java b/core/trino-main/src/test/java/io/trino/sql/gen/TestInCodeGenerator.java index 17b12a2f99c5..585667dd67a6 100644 --- a/core/trino-main/src/test/java/io/trino/sql/gen/TestInCodeGenerator.java +++ b/core/trino-main/src/test/java/io/trino/sql/gen/TestInCodeGenerator.java @@ -14,26 +14,26 @@ package io.trino.sql.gen; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.sql.relational.CallExpression; -import io.prestosql.sql.relational.RowExpression; +import io.trino.metadata.Metadata; +import io.trino.metadata.MetadataManager; +import io.trino.sql.relational.CallExpression; +import io.trino.sql.relational.RowExpression; import org.testng.annotations.Test; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.gen.InCodeGenerator.SwitchGenerationCase.DIRECT_SWITCH; -import static io.prestosql.sql.gen.InCodeGenerator.SwitchGenerationCase.HASH_SWITCH; -import static io.prestosql.sql.gen.InCodeGenerator.SwitchGenerationCase.SET_CONTAINS; -import static io.prestosql.sql.gen.InCodeGenerator.checkSwitchGenerationCase; -import static io.prestosql.sql.relational.Expressions.constant; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.gen.InCodeGenerator.SwitchGenerationCase.DIRECT_SWITCH; +import static io.trino.sql.gen.InCodeGenerator.SwitchGenerationCase.HASH_SWITCH; +import static io.trino.sql.gen.InCodeGenerator.SwitchGenerationCase.SET_CONTAINS; +import static io.trino.sql.gen.InCodeGenerator.checkSwitchGenerationCase; +import static io.trino.sql.relational.Expressions.constant; import static org.testng.Assert.assertEquals; public class TestInCodeGenerator diff --git a/core/trino-main/src/test/java/io/trino/sql/gen/TestJoinCompiler.java b/core/trino-main/src/test/java/io/trino/sql/gen/TestJoinCompiler.java index 0a947c2ccad9..0c138698cbc4 100644 --- a/core/trino-main/src/test/java/io/trino/sql/gen/TestJoinCompiler.java +++ b/core/trino-main/src/test/java/io/trino/sql/gen/TestJoinCompiler.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.block.BlockAssertions; -import io.prestosql.operator.PagesHashStrategy; -import io.prestosql.operator.SimplePagesHashStrategy; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler.PagesHashStrategyFactory; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; -import io.prestosql.type.TypeTestUtils; +import io.trino.block.BlockAssertions; +import io.trino.operator.PagesHashStrategy; +import io.trino.operator.SimplePagesHashStrategy; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler.PagesHashStrategyFactory; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.type.TypeTestUtils; import org.openjdk.jol.info.ClassLayout; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -36,12 +36,12 @@ import java.util.Optional; import java.util.OptionalInt; -import static io.prestosql.block.BlockAssertions.assertBlockEquals; -import static io.prestosql.operator.PageAssertions.assertPageEquals; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.block.BlockAssertions.assertBlockEquals; +import static io.trino.operator.PageAssertions.assertPageEquals; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/sql/gen/TestPageFunctionCompiler.java b/core/trino-main/src/test/java/io/trino/sql/gen/TestPageFunctionCompiler.java index 4caa7a2c0c6a..da076b82f9a5 100644 --- a/core/trino-main/src/test/java/io/trino/sql/gen/TestPageFunctionCompiler.java +++ b/core/trino-main/src/test/java/io/trino/sql/gen/TestPageFunctionCompiler.java @@ -14,29 +14,29 @@ package io.trino.sql.gen; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.Work; -import io.prestosql.operator.project.PageProjection; -import io.prestosql.operator.project.SelectedPositions; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.sql.relational.CallExpression; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.Work; +import io.trino.operator.project.PageProjection; +import io.trino.operator.project.SelectedPositions; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.sql.relational.CallExpression; import org.testng.annotations.Test; import java.util.Optional; import java.util.function.Supplier; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.function.OperatorType.ADD; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.relational.Expressions.call; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.function.OperatorType.ADD; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.relational.Expressions.call; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotSame; import static org.testng.Assert.assertSame; diff --git a/core/trino-main/src/test/java/io/trino/sql/gen/TestVarArgsToArrayAdapterGenerator.java b/core/trino-main/src/test/java/io/trino/sql/gen/TestVarArgsToArrayAdapterGenerator.java index ba0d4e406560..97352c8a1d43 100644 --- a/core/trino-main/src/test/java/io/trino/sql/gen/TestVarArgsToArrayAdapterGenerator.java +++ b/core/trino-main/src/test/java/io/trino/sql/gen/TestVarArgsToArrayAdapterGenerator.java @@ -15,16 +15,16 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.operator.scalar.ChoicesScalarFunctionImplementation; -import io.prestosql.operator.scalar.ScalarFunctionImplementation; -import io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.ChoicesScalarFunctionImplementation; +import io.trino.operator.scalar.ScalarFunctionImplementation; +import io.trino.spi.function.InvocationConvention.InvocationReturnConvention; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -32,12 +32,12 @@ import java.util.Optional; import java.util.stream.IntStream; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.sql.gen.TestVarArgsToArrayAdapterGenerator.TestVarArgsSum.VAR_ARGS_SUM; -import static io.prestosql.sql.gen.VarArgsToArrayAdapterGenerator.generateVarArgsToArrayAdapter; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.sql.gen.TestVarArgsToArrayAdapterGenerator.TestVarArgsSum.VAR_ARGS_SUM; +import static io.trino.sql.gen.VarArgsToArrayAdapterGenerator.generateVarArgsToArrayAdapter; +import static io.trino.util.Reflection.methodHandle; import static java.lang.String.format; import static java.util.Collections.nCopies; import static java.util.stream.Collectors.toSet; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/AbstractPredicatePushdownTest.java b/core/trino-main/src/test/java/io/trino/sql/planner/AbstractPredicatePushdownTest.java index fe1940d0da35..bca5e2399f89 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/AbstractPredicatePushdownTest.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/AbstractPredicatePushdownTest.java @@ -15,36 +15,36 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.WindowNode; +import io.trino.Session; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.WindowNode; import org.testng.annotations.Test; import java.util.List; -import static io.prestosql.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; -import static io.prestosql.SystemSessionProperties.FILTERING_SEMI_JOIN_TO_INNER; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.assignUniqueId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.output; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.semiJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; +import static io.trino.SystemSessionProperties.FILTERING_SEMI_JOIN_TO_INNER; +import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.assignUniqueId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.output; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.semiJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; public abstract class AbstractPredicatePushdownTest extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/BenchmarkPlanner.java b/core/trino-main/src/test/java/io/trino/sql/planner/BenchmarkPlanner.java index ff9e70b67a80..ceb417a4bdbc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/BenchmarkPlanner.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/BenchmarkPlanner.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.Resources; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.plugin.tpch.ColumnNaming; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.plugin.tpch.ColumnNaming; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.testing.LocalQueryRunner; import io.trino.tpch.Customer; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; @@ -48,9 +48,9 @@ import java.util.stream.IntStream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.tpch.TpchConnectorFactory.TPCH_COLUMN_NAMING_PROPERTY; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchConnectorFactory.TPCH_COLUMN_NAMING_PROPERTY; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestCanonicalize.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestCanonicalize.java index b6c75c5797ea..d4ae2977eed6 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestCanonicalize.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestCanonicalize.java @@ -16,26 +16,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.ExpectedValueProvider; -import io.prestosql.sql.planner.iterative.IterativeOptimizer; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; -import io.prestosql.sql.planner.optimizations.UnaliasSymbolReferences; -import io.prestosql.sql.planner.plan.WindowNode; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.ExpectedValueProvider; +import io.trino.sql.planner.iterative.IterativeOptimizer; +import io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; +import io.trino.sql.planner.optimizations.UnaliasSymbolReferences; +import io.trino.sql.planner.plan.WindowNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.specification; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.specification; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestCanonicalize extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestConnectorExpressionTranslator.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestConnectorExpressionTranslator.java index df848e597a7b..19adb7ef66d1 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestConnectorExpressionTranslator.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestConnectorExpressionTranslator.java @@ -14,31 +14,31 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.FieldDereference; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.testing.TestingSession; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.FieldDereference; +import io.trino.spi.expression.Variable; +import io.trino.spi.type.Type; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.SymbolReference; +import io.trino.testing.TestingSession; import org.testng.annotations.Test; import java.util.Map; import java.util.Optional; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.spi.type.RowType.rowType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.planner.ConnectorExpressionTranslator.translate; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RowType.field; +import static io.trino.spi.type.RowType.rowType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.planner.ConnectorExpressionTranslator.translate; import static org.testng.Assert.assertEquals; public class TestConnectorExpressionTranslator diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestDereferencePushDown.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestDereferencePushDown.java index a1d796d840fa..ec567a22f9b2 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestDereferencePushDown.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestDereferencePushDown.java @@ -15,27 +15,27 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; +import io.trino.Session; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.PlanMatchPattern; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.FILTERING_SEMI_JOIN_TO_INNER; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.output; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.semiJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.unnest; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.SystemSessionProperties.FILTERING_SEMI_JOIN_TO_INNER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +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.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.output; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.semiJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.unnest; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestDereferencePushDown extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestDesugarTryExpressionRewriter.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestDesugarTryExpressionRewriter.java index 29f688919b44..4cc47310fb1f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestDesugarTryExpressionRewriter.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestDesugarTryExpressionRewriter.java @@ -14,21 +14,21 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.scalar.TryFunction; -import io.prestosql.sql.planner.assertions.ExpressionVerifier; -import io.prestosql.sql.planner.assertions.SymbolAliases; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.DecimalLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.TryExpression; -import io.prestosql.type.FunctionType; +import io.trino.operator.scalar.TryFunction; +import io.trino.sql.planner.assertions.ExpressionVerifier; +import io.trino.sql.planner.assertions.SymbolAliases; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.DecimalLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.TryExpression; +import io.trino.type.FunctionType; import org.testng.annotations.Test; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.ADD; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.ADD; import static org.testng.Assert.assertTrue; public class TestDesugarTryExpressionRewriter diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestDeterminismEvaluator.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestDeterminismEvaluator.java index d3ee7416512c..2a01d59f0f38 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestDeterminismEvaluator.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestDeterminismEvaluator.java @@ -14,21 +14,21 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.metadata.MetadataManager; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.List; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestDomainCoercer.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestDomainCoercer.java index 8295cc78caf2..49370a44f05d 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestDomainCoercer.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestDomainCoercer.java @@ -14,29 +14,29 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.metadata.Metadata; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.predicate.Domain.multipleValues; -import static io.prestosql.spi.predicate.Range.greaterThan; -import static io.prestosql.spi.predicate.Range.greaterThanOrEqual; -import static io.prestosql.spi.predicate.Range.lessThan; -import static io.prestosql.spi.predicate.Range.lessThanOrEqual; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.predicate.Domain.multipleValues; +import static io.trino.spi.predicate.Range.greaterThan; +import static io.trino.spi.predicate.Range.greaterThanOrEqual; +import static io.trino.spi.predicate.Range.lessThan; +import static io.trino.spi.predicate.Range.lessThanOrEqual; +import static io.trino.spi.predicate.Range.range; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; import static java.lang.Float.floatToIntBits; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestDomainTranslator.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestDomainTranslator.java index 06f5288f4c32..bbc3f1d9580c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestDomainTranslator.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestDomainTranslator.java @@ -18,37 +18,37 @@ import com.google.common.io.BaseEncoding; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.DomainTranslator.ExtractionResult; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.InListExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.Literal; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.transaction.TestingTransactionManager; -import io.prestosql.type.TypeCoercion; +import io.trino.metadata.Metadata; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.DomainTranslator.ExtractionResult; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.InListExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.Literal; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.StringLiteral; +import io.trino.transaction.TestingTransactionManager; +import io.trino.type.TypeCoercion; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.testng.annotations.AfterClass; @@ -62,40 +62,40 @@ import java.util.concurrent.TimeUnit; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.predicate.TupleDomain.withColumnDomains; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.ExpressionUtils.or; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.tree.BooleanLiteral.FALSE_LITERAL; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.IS_DISTINCT_FROM; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.NOT_EQUAL; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.transaction.TransactionBuilder.transaction; -import static io.prestosql.type.ColorType.COLOR; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.predicate.TupleDomain.withColumnDomains; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.ExpressionUtils.or; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.tree.BooleanLiteral.FALSE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.IS_DISTINCT_FROM; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.NOT_EQUAL; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.transaction.TransactionBuilder.transaction; +import static io.trino.type.ColorType.COLOR; import static java.lang.String.format; import static java.util.Collections.nCopies; import static java.util.Objects.requireNonNull; 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 d76f5f09c6ae..b99f6733abab 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,49 +15,49 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.MatchResult; -import io.prestosql.sql.planner.assertions.Matcher; -import io.prestosql.sql.planner.assertions.SymbolAliases; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.PlanNode; +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; +import io.trino.sql.planner.assertions.SymbolAliases; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.PlanNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; -import static io.prestosql.SystemSessionProperties.FILTERING_SEMI_JOIN_TO_INNER; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.DynamicFilterPattern; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyNot; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.semiJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.plan.JoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; +import static io.trino.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; +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.sql.planner.assertions.PlanMatchPattern.DynamicFilterPattern; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyNot; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.semiJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.plan.JoinNode.Type.FULL; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN_OR_EQUAL; public class TestDynamicFilter extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestEffectivePredicateExtractor.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestEffectivePredicateExtractor.java index 4331c482c842..539a510d69be 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestEffectivePredicateExtractor.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestEffectivePredicateExtractor.java @@ -19,67 +19,67 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.AbstractMockMetadata; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.FunctionInvoker; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.metadata.TableHandle; -import io.prestosql.metadata.TableProperties; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.analyzer.TypeSignatureProvider; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.InListExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Row; -import io.prestosql.testing.TestingMetadata.TestingColumnHandle; -import io.prestosql.testing.TestingSession; -import io.prestosql.testing.TestingTransactionHandle; -import io.prestosql.transaction.TestingTransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.AbstractMockMetadata; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.FunctionInvoker; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.metadata.TableHandle; +import io.trino.metadata.TableProperties; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.analyzer.TypeSignatureProvider; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.InListExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Row; +import io.trino.testing.TestingMetadata.TestingColumnHandle; +import io.trino.testing.TestingSession; +import io.trino.testing.TestingTransactionHandle; +import io.trino.transaction.TestingTransactionManager; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -96,22 +96,22 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.FunctionId.toFunctionId; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.ExpressionUtils.or; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.plan.AggregationNode.globalAggregation; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.sql.tree.BooleanLiteral.FALSE_LITERAL; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.transaction.TransactionBuilder.transaction; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.metadata.FunctionId.toFunctionId; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.ExpressionUtils.or; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.plan.AggregationNode.globalAggregation; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.sql.tree.BooleanLiteral.FALSE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.transaction.TransactionBuilder.transaction; +import static io.trino.type.UnknownType.UNKNOWN; import static org.testng.Assert.assertEquals; @Test(singleThreaded = true) diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestEqualityInference.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestEqualityInference.java index 6b1518700204..3ea336143366 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestEqualityInference.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestEqualityInference.java @@ -18,31 +18,31 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.operator.scalar.TryFunction; -import io.prestosql.sql.ExpressionUtils; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArrayConstructor; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.InListExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NullIfExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.SubscriptExpression; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.WhenClause; -import io.prestosql.type.FunctionType; +import io.trino.metadata.Metadata; +import io.trino.metadata.MetadataManager; +import io.trino.operator.scalar.TryFunction; +import io.trino.sql.ExpressionUtils; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArrayConstructor; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.InListExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NullIfExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.SubscriptExpression; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.WhenClause; +import io.trino.type.FunctionType; import org.testng.annotations.Test; import java.util.Arrays; @@ -54,13 +54,13 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Predicates.not; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.QueryUtil.identifier; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.EqualityInference.isInferenceCandidate; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.QueryUtil.identifier; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.EqualityInference.isInferenceCandidate; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNull; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestGroupingOperationRewriter.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestGroupingOperationRewriter.java index 2faa0b49ceaa..8152767da899 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestGroupingOperationRewriter.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestGroupingOperationRewriter.java @@ -20,7 +20,7 @@ import java.util.List; import java.util.Set; -import static io.prestosql.sql.planner.GroupingOperationRewriter.calculateGrouping; +import static io.trino.sql.planner.GroupingOperationRewriter.calculateGrouping; import static org.testng.Assert.assertEquals; public class TestGroupingOperationRewriter diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestHaving.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestHaving.java index 1df9c86e32ac..f16d9699da69 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestHaving.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestHaving.java @@ -14,16 +14,16 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.plan.AggregationNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.globalAggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +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.globalAggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestHaving extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestInsert.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestInsert.java index ea5be63e71c6..4bb503c46e3e 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestInsert.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestInsert.java @@ -16,32 +16,32 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.connector.MockConnectorTableHandle; -import io.prestosql.plugin.tpch.TpchPartitioningHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.connector.MockConnectorFactory; +import io.trino.connector.MockConnectorTableHandle; +import io.trino.plugin.tpch.TpchPartitioningHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.REDISTRIBUTE_WRITES; -import static io.prestosql.SystemSessionProperties.TASK_WRITER_COUNT; -import static io.prestosql.SystemSessionProperties.USE_PREFERRED_WRITE_PARTITIONING; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.REDISTRIBUTE_WRITES; +import static io.trino.SystemSessionProperties.TASK_WRITER_COUNT; +import static io.trino.SystemSessionProperties.USE_PREFERRED_WRITE_PARTITIONING; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestInsert extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestLiteralEncoder.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestLiteralEncoder.java index 8a7c9f8d9290..da9de2e4f794 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestLiteralEncoder.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestLiteralEncoder.java @@ -17,26 +17,26 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.LiteralFunction; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.metadata.Signature; -import io.prestosql.operator.scalar.Re2JCastToRegexpFunction; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.analyzer.ExpressionAnalyzer; -import io.prestosql.sql.analyzer.Scope; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.transaction.TestingTransactionManager; -import io.prestosql.type.Re2JRegexp; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.LiteralFunction; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.metadata.Signature; +import io.trino.operator.scalar.Re2JCastToRegexpFunction; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.VarcharType; +import io.trino.sql.analyzer.ExpressionAnalyzer; +import io.trino.sql.analyzer.Scope; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NodeRef; +import io.trino.transaction.TestingTransactionManager; +import io.trino.type.Re2JRegexp; import org.testng.annotations.Test; import java.util.Arrays; @@ -47,33 +47,33 @@ import static com.google.common.base.Verify.verify; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.testing.Assertions.assertEqualsIgnoreCase; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.FunctionId.toFunctionId; -import static io.prestosql.metadata.LiteralFunction.LITERAL_FUNCTION_NAME; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.scalar.JoniRegexpCasts.castVarcharToJoniRegexp; -import static io.prestosql.operator.scalar.JsonFunctions.castVarcharToJsonPath; -import static io.prestosql.operator.scalar.StringFunctions.castVarcharToCodePoints; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.TypeSignatureParameter.typeVariable; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.SqlFormatter.formatSql; -import static io.prestosql.sql.planner.ExpressionInterpreter.expressionInterpreter; -import static io.prestosql.transaction.TransactionBuilder.transaction; -import static io.prestosql.type.CodePointsType.CODE_POINTS; -import static io.prestosql.type.JoniRegexpType.JONI_REGEXP; -import static io.prestosql.type.JsonPathType.JSON_PATH; -import static io.prestosql.type.LikePatternType.LIKE_PATTERN; -import static io.prestosql.type.Re2JRegexpType.RE2J_REGEXP_SIGNATURE; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.FunctionId.toFunctionId; +import static io.trino.metadata.LiteralFunction.LITERAL_FUNCTION_NAME; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.scalar.JoniRegexpCasts.castVarcharToJoniRegexp; +import static io.trino.operator.scalar.JsonFunctions.castVarcharToJsonPath; +import static io.trino.operator.scalar.StringFunctions.castVarcharToCodePoints; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.TypeSignatureParameter.typeVariable; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.SqlFormatter.formatSql; +import static io.trino.sql.planner.ExpressionInterpreter.expressionInterpreter; +import static io.trino.transaction.TransactionBuilder.transaction; +import static io.trino.type.CodePointsType.CODE_POINTS; +import static io.trino.type.JoniRegexpType.JONI_REGEXP; +import static io.trino.type.JsonPathType.JSON_PATH; +import static io.trino.type.LikePatternType.LIKE_PATTERN; +import static io.trino.type.Re2JRegexpType.RE2J_REGEXP_SIGNATURE; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Collections.emptyMap; 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 af1c4ecd6add..45e90dea45db 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,31 +18,31 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ListenableFuture; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.JoinNode.EquiJoinClause; +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; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode.EquiJoinClause; import org.testng.annotations.Test; import java.util.Map; import java.util.Optional; import java.util.function.Consumer; -import static io.prestosql.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; -import static io.prestosql.SystemSessionProperties.FORCE_SINGLE_NODE_OUTPUT; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.metadata.AbstractMockMetadata.dummyMetadata; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; +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.metadata.AbstractMockMetadata.dummyMetadata; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.testing.assertions.Assert.assertEquals; import static org.testng.Assert.assertFalse; public class TestLocalDynamicFilterConsumer diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestLocalDynamicFiltersCollector.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestLocalDynamicFiltersCollector.java index de2721c43279..886a9b62ec1a 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestLocalDynamicFiltersCollector.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestLocalDynamicFiltersCollector.java @@ -17,32 +17,32 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.TestingColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.tree.Cast; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.TestingColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.DynamicFilters; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.tree.Cast; import org.testng.annotations.Test; import java.util.concurrent.CompletableFuture; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.testing.assertions.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestLocalExecutionPlanner.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestLocalExecutionPlanner.java index 1b5bfadcfcbe..ab92c9bfb23a 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestLocalExecutionPlanner.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestLocalExecutionPlanner.java @@ -14,15 +14,15 @@ package io.trino.sql.planner; import com.google.common.base.Joiner; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import static io.airlift.testing.Closeables.closeAllRuntimeException; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.StandardErrorCode.COMPILER_ERROR; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.StandardErrorCode.COMPILER_ERROR; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static java.util.Collections.nCopies; public class TestLocalExecutionPlanner 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 7ebc6381bdf9..09a8689a3696 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,52 +16,52 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slices; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.RowType; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.ExpressionMatcher; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.assertions.RowNumberSymbolMatcher; -import io.prestosql.sql.planner.optimizations.AddLocalExchanges; -import io.prestosql.sql.planner.optimizations.CheckSubqueryNodesAreRewritten; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SemiJoinNode.DistributionType; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.StatisticsWriterNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.Row; -import io.prestosql.tests.QueryTemplate; -import io.prestosql.util.MorePredicates; +import io.trino.Session; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +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; +import io.trino.sql.planner.assertions.RowNumberSymbolMatcher; +import io.trino.sql.planner.optimizations.AddLocalExchanges; +import io.trino.sql.planner.optimizations.CheckSubqueryNodesAreRewritten; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SemiJoinNode.DistributionType; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.StatisticsWriterNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.Row; +import io.trino.tests.QueryTemplate; +import io.trino.util.MorePredicates; import org.testng.annotations.Test; import java.util.List; @@ -74,77 +74,77 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.MoreCollectors.toOptional; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.SystemSessionProperties.DISTRIBUTED_SORT; -import static io.prestosql.SystemSessionProperties.FILTERING_SEMI_JOIN_TO_INNER; -import static io.prestosql.SystemSessionProperties.FORCE_SINGLE_NODE_OUTPUT; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.SystemSessionProperties.OPTIMIZE_HASH_GENERATION; -import static io.prestosql.SystemSessionProperties.TASK_CONCURRENCY; -import static io.prestosql.spi.StandardErrorCode.SUBQUERY_MULTIPLE_ROWS; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.CREATED; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.DynamicFilterPattern; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aliasToIndex; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.any; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyNot; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.apply; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.assignUniqueId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.constrainedTableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.constrainedTableScanWithTableLayout; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.identityProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.markDistinct; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.output; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.rowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.semiJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.specification; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictTableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topN; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topNRowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.FINAL; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPLICATE; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.PARTITIONED; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.REPLICATED; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.SortItem.NullOrdering.LAST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; -import static io.prestosql.sql.tree.SortItem.Ordering.DESCENDING; -import static io.prestosql.tests.QueryTemplate.queryTemplate; -import static io.prestosql.util.MorePredicates.isInstanceOfAny; +import static io.trino.SystemSessionProperties.DISTRIBUTED_SORT; +import static io.trino.SystemSessionProperties.FILTERING_SEMI_JOIN_TO_INNER; +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.SystemSessionProperties.OPTIMIZE_HASH_GENERATION; +import static io.trino.SystemSessionProperties.TASK_CONCURRENCY; +import static io.trino.spi.StandardErrorCode.SUBQUERY_MULTIPLE_ROWS; +import static io.trino.spi.predicate.Domain.singleValue; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.LogicalPlanner.Stage.CREATED; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED; +import static io.trino.sql.planner.assertions.PlanMatchPattern.DynamicFilterPattern; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aliasToIndex; +import static io.trino.sql.planner.assertions.PlanMatchPattern.any; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyNot; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.apply; +import static io.trino.sql.planner.assertions.PlanMatchPattern.assignUniqueId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.constrainedTableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.constrainedTableScanWithTableLayout; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.identityProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.markDistinct; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.output; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.rowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.semiJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.specification; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictTableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topNRowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.sql.planner.plan.AggregationNode.Step.FINAL; +import static io.trino.sql.planner.plan.AggregationNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPLICATE; +import static io.trino.sql.planner.plan.JoinNode.DistributionType.PARTITIONED; +import static io.trino.sql.planner.plan.JoinNode.DistributionType.REPLICATED; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.SortItem.NullOrdering.LAST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.tree.SortItem.Ordering.DESCENDING; +import static io.trino.tests.QueryTemplate.queryTemplate; +import static io.trino.util.MorePredicates.isInstanceOfAny; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestOrderBy.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestOrderBy.java index 92807c96c76f..a7700f3f662b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestOrderBy.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestOrderBy.java @@ -13,17 +13,17 @@ */ package io.trino.sql.planner; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.ValuesNode; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.output; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.output; public class TestOrderBy extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestPartialTranslator.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestPartialTranslator.java index 16d8552d1b9a..a96782642f4f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestPartialTranslator.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestPartialTranslator.java @@ -15,38 +15,38 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.transaction.TransactionId; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.type.Type; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.NodeRef; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SymbolReference; +import io.trino.transaction.TransactionId; import org.testng.annotations.Test; import java.util.List; import java.util.Map; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.spi.type.RowType.rowType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.planner.ConnectorExpressionTranslator.translate; -import static io.prestosql.sql.planner.PartialTranslator.extractPartialTranslations; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.ADD; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RowType.field; +import static io.trino.spi.type.RowType.rowType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.planner.ConnectorExpressionTranslator.translate; +import static io.trino.sql.planner.PartialTranslator.extractPartialTranslations; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.ADD; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertEquals; public class TestPartialTranslator 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 587d4702c2aa..369e4409adb0 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,32 +15,32 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.TableScanNode; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.columnReference; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.output; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictOutput; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictTableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; +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.columnReference; +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.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.output; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictOutput; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictTableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; import static org.testng.Assert.fail; public class TestPlanMatchingFramework diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestPredicatePushdown.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestPredicatePushdown.java index dba5c5bb5294..8ed27a27c5bd 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestPredicatePushdown.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestPredicatePushdown.java @@ -17,13 +17,13 @@ import com.google.common.collect.ImmutableMap; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestPredicatePushdown extends AbstractPredicatePushdownTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestPredicatePushdownWithoutDynamicFilter.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestPredicatePushdownWithoutDynamicFilter.java index e0c8c34dad4c..6911c5f5b978 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestPredicatePushdownWithoutDynamicFilter.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestPredicatePushdownWithoutDynamicFilter.java @@ -17,13 +17,13 @@ import com.google.common.collect.ImmutableMap; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestPredicatePushdownWithoutDynamicFilter extends AbstractPredicatePushdownTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestQuantifiedComparison.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestQuantifiedComparison.java index c6d330f9102d..cf68bcfb1655 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestQuantifiedComparison.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestQuantifiedComparison.java @@ -15,22 +15,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.ValuesNode; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.semiJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.semiJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestQuantifiedComparison extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestRecursiveCte.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestRecursiveCte.java index bdfe8128681f..a21f3fb29194 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestRecursiveCte.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestRecursiveCte.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.testing.LocalQueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.CREATED; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.union; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.sql.planner.LogicalPlanner.Stage.CREATED; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.union; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestRecursiveCte extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestRemoveDuplicatePredicates.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestRemoveDuplicatePredicates.java index 33f065e28705..0acbc1acd104 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestRemoveDuplicatePredicates.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestRemoveDuplicatePredicates.java @@ -13,12 +13,12 @@ */ package io.trino.sql.planner; -import io.prestosql.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.BasePlanTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestRemoveDuplicatePredicates extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestSchedulingOrderVisitor.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestSchedulingOrderVisitor.java index e9de3f88db5a..ca2071eba663 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestSchedulingOrderVisitor.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestSchedulingOrderVisitor.java @@ -16,19 +16,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.TestingColumnHandle; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.spi.connector.TestingColumnHandle; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.TableScanNode; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; -import static io.prestosql.metadata.AbstractMockMetadata.dummyMetadata; -import static io.prestosql.sql.planner.SchedulingOrderVisitor.scheduleOrder; +import static io.trino.metadata.AbstractMockMetadata.dummyMetadata; +import static io.trino.sql.planner.SchedulingOrderVisitor.scheduleOrder; import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestSimplifyIn.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestSimplifyIn.java index db719df497bb..3aa6bfdc2e15 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestSimplifyIn.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestSimplifyIn.java @@ -13,12 +13,12 @@ */ package io.trino.sql.planner; -import io.prestosql.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.BasePlanTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestSimplifyIn extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestSortExpressionExtractor.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestSortExpressionExtractor.java index 82226bacd0f6..7564fffa5f0e 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestSortExpressionExtractor.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestSortExpressionExtractor.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.ExpressionTestUtils; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.sql.ExpressionTestUtils; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; import java.util.Arrays; @@ -30,12 +30,12 @@ import java.util.Set; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.ExpressionUtils.extractConjuncts; -import static io.prestosql.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.ExpressionUtils.extractConjuncts; +import static io.trino.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; import static org.testng.Assert.assertEquals; public class TestSortExpressionExtractor diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestSymbolAllocator.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestSymbolAllocator.java index 8602935cae9c..1c5f3d0ef00b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestSymbolAllocator.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestSymbolAllocator.java @@ -14,7 +14,7 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.type.BigintType; +import io.trino.spi.type.BigintType; import org.testng.annotations.Test; import java.util.Set; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestTableScanRedirectionWithPushdown.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestTableScanRedirectionWithPushdown.java index dda9ab32ec43..f541d40199de 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestTableScanRedirectionWithPushdown.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestTableScanRedirectionWithPushdown.java @@ -16,29 +16,29 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.connector.MockConnectorColumnHandle; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.connector.MockConnectorTableHandle; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.Assignment; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.sql.planner.assertions.PlanAssert; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.connector.MockConnectorColumnHandle; +import io.trino.connector.MockConnectorFactory; +import io.trino.connector.MockConnectorTableHandle; +import io.trino.execution.warnings.WarningCollector; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.Assignment; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Variable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.sql.planner.assertions.PlanAssert; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.testing.LocalQueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; @@ -49,18 +49,18 @@ import static com.google.common.base.Predicates.equalTo; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.connector.MockConnectorFactory.ApplyFilter; -import static io.prestosql.connector.MockConnectorFactory.ApplyProjection; -import static io.prestosql.connector.MockConnectorFactory.ApplyTableScanRedirect; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.output; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.connector.MockConnectorFactory.ApplyFilter; +import static io.trino.connector.MockConnectorFactory.ApplyProjection; +import static io.trino.connector.MockConnectorFactory.ApplyTableScanRedirect; +import static io.trino.spi.predicate.Domain.singleValue; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.output; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.transaction.TransactionBuilder.transaction; import static org.assertj.core.api.Assertions.assertThatThrownBy; public class TestTableScanRedirectionWithPushdown diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestTypeValidator.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestTypeValidator.java index 1fa7f4d1ed69..55d5a994d32d 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestTypeValidator.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestTypeValidator.java @@ -18,30 +18,30 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ListMultimap; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.planner.sanity.TypeValidator; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.WindowFrame; -import io.prestosql.testing.TestingMetadata.TestingColumnHandle; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.VarcharType; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.planner.sanity.TypeValidator; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.WindowFrame; +import io.trino.testing.TestingMetadata.TestingColumnHandle; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -49,18 +49,18 @@ import java.util.Optional; import java.util.UUID; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; -import static io.prestosql.testing.TestingHandles.TEST_TABLE_HANDLE; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.testing.TestingHandles.TEST_TABLE_HANDLE; @Test(singleThreaded = true) public class TestTypeValidator diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestUnwrapCastInComparison.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestUnwrapCastInComparison.java index a75b5760c778..97e29bf664ca 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestUnwrapCastInComparison.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestUnwrapCastInComparison.java @@ -13,14 +13,14 @@ */ package io.trino.sql.planner; -import io.prestosql.Session; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.sql.planner.assertions.BasePlanTest; +import io.trino.Session; +import io.trino.spi.type.TimeZoneKey; +import io.trino.sql.planner.assertions.BasePlanTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.output; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.output; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; import static java.lang.String.format; import static java.util.Arrays.asList; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestWindowFrameRange.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestWindowFrameRange.java index f2e832042d62..aad449d3355f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestWindowFrameRange.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestWindowFrameRange.java @@ -15,37 +15,37 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.tree.DecimalLiteral; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.tree.DecimalLiteral; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.CREATED; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.specification; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.windowFrame; -import static io.prestosql.sql.tree.FrameBound.Type.CURRENT_ROW; -import static io.prestosql.sql.tree.FrameBound.Type.FOLLOWING; -import static io.prestosql.sql.tree.FrameBound.Type.PRECEDING; -import static io.prestosql.sql.tree.WindowFrame.Type.RANGE; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.planner.LogicalPlanner.Stage.CREATED; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.specification; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.assertions.PlanMatchPattern.windowFrame; +import static io.trino.sql.tree.FrameBound.Type.CURRENT_ROW; +import static io.trino.sql.tree.FrameBound.Type.FOLLOWING; +import static io.trino.sql.tree.FrameBound.Type.PRECEDING; +import static io.trino.sql.tree.WindowFrame.Type.RANGE; public class TestWindowFrameRange extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestingConnectorIndexHandle.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestingConnectorIndexHandle.java index 33ac11376a53..b7418fe6c4c0 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestingConnectorIndexHandle.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestingConnectorIndexHandle.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner; -import io.prestosql.spi.connector.ConnectorIndexHandle; +import io.trino.spi.connector.ConnectorIndexHandle; public enum TestingConnectorIndexHandle implements ConnectorIndexHandle diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestingConnectorTransactionHandle.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestingConnectorTransactionHandle.java index ca31b783d038..d4fa27931826 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestingConnectorTransactionHandle.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestingConnectorTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum TestingConnectorTransactionHandle implements ConnectorTransactionHandle diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestingWriterTarget.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestingWriterTarget.java index b86df0440612..c31c71e1754b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestingWriterTarget.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestingWriterTarget.java @@ -14,7 +14,7 @@ package io.trino.sql.planner; -import io.prestosql.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TableWriterNode; public class TestingWriterTarget extends TableWriterNode.WriterTarget diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AggregationFunctionMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AggregationFunctionMatcher.java index f287215fc895..287e47608df7 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AggregationFunctionMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AggregationFunctionMatcher.java @@ -13,21 +13,21 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.tree.FunctionCall; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.tree.FunctionCall; import java.util.Map; import java.util.Objects; import java.util.Optional; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.metadata.ResolvedFunction.extractFunctionName; +import static io.trino.metadata.ResolvedFunction.extractFunctionName; import static java.util.Objects.requireNonNull; public class AggregationFunctionMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AggregationMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AggregationMatcher.java index 71136b31f486..2e7194e9cdcc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AggregationMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AggregationMatcher.java @@ -13,13 +13,13 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.PlanNode; import java.util.Collection; import java.util.List; @@ -30,8 +30,8 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; public class AggregationMatcher implements Matcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AggregationStepMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AggregationStepMatcher.java index be25938f7545..a4e62abfd0c5 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AggregationStepMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AggregationStepMatcher.java @@ -13,17 +13,17 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.PlanNode; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; public class AggregationStepMatcher implements Matcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AliasMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AliasMatcher.java index 38b4b285f521..8c0cca5a2fa1 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AliasMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AliasMatcher.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.match; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AliasPresent.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AliasPresent.java index b6b7d1bf2492..b31e36aa6671 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AliasPresent.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AliasPresent.java @@ -13,10 +13,10 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AnySymbol.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AnySymbol.java index 8bf3f955ab15..fc620d6e0f6d 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AnySymbol.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AnySymbol.java @@ -13,8 +13,8 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.SymbolReference; class AnySymbol extends Symbol diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AnySymbolReference.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AnySymbolReference.java index 0d455b75b5ec..c898523839ad 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AnySymbolReference.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AnySymbolReference.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.tree.SymbolReference; class AnySymbolReference extends SymbolReference diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AssignUniqueIdMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AssignUniqueIdMatcher.java index dbc9e4a3857e..d0747428467f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AssignUniqueIdMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/AssignUniqueIdMatcher.java @@ -13,11 +13,11 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/BasePlanTest.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/BasePlanTest.java index a5c2c0de8792..4a91f528cf0e 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/BasePlanTest.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/BasePlanTest.java @@ -16,20 +16,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.sql.planner.LogicalPlanner; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.SubPlan; -import io.prestosql.sql.planner.iterative.IterativeOptimizer; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.planner.optimizations.PruneUnreferencedOutputs; -import io.prestosql.sql.planner.optimizations.UnaliasSymbolReferences; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.execution.warnings.WarningCollector; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.sql.planner.LogicalPlanner; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.SubPlan; +import io.trino.sql.planner.iterative.IterativeOptimizer; +import io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.optimizations.PruneUnreferencedOutputs; +import io.trino.sql.planner.optimizations.UnaliasSymbolReferences; +import io.trino.testing.LocalQueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -40,9 +40,9 @@ import java.util.function.Predicate; import static io.airlift.testing.Closeables.closeAllRuntimeException; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/BasePushdownPlanTest.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/BasePushdownPlanTest.java index 69a4a4acaecd..325b4a5d2631 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/BasePushdownPlanTest.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/BasePushdownPlanTest.java @@ -13,10 +13,10 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.ColumnHandle; +import io.trino.Session; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.ColumnHandle; import java.util.Map; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/BaseStrictSymbolsMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/BaseStrictSymbolsMatcher.java index c1c1bb9bcdc5..a39bff1c93e3 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/BaseStrictSymbolsMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/BaseStrictSymbolsMatcher.java @@ -13,11 +13,11 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; import java.util.Set; import java.util.function.Function; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ColumnHandleMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ColumnHandleMatcher.java index 38e5d15e86d3..5d3cb7ad5d60 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ColumnHandleMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ColumnHandleMatcher.java @@ -13,12 +13,12 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; import java.util.Map; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ColumnReference.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ColumnReference.java index 5430c29d0d88..bf0b3ab81aa6 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ColumnReference.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ColumnReference.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.metadata.TableMetadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.metadata.TableMetadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; import java.util.Map; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ConnectorAwareTableScanMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ConnectorAwareTableScanMatcher.java index 92a5726c1bf9..1efb27d9d149 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ConnectorAwareTableScanMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ConnectorAwareTableScanMatcher.java @@ -13,20 +13,20 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.predicate.TupleDomain; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; import java.util.function.Predicate; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.Util.domainsMatch; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.Util.domainsMatch; import static java.util.Objects.requireNonNull; public class ConnectorAwareTableScanMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/CorrelationMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/CorrelationMatcher.java index 5d01b0668192..7243f6c4e984 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/CorrelationMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/CorrelationMatcher.java @@ -13,20 +13,20 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; import static java.util.Objects.requireNonNull; public class CorrelationMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/DistinctLimitMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/DistinctLimitMatcher.java index 61f046af1fdd..651164485f5c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/DistinctLimitMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/DistinctLimitMatcher.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import java.util.Optional; @@ -27,7 +27,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; import static java.util.Objects.requireNonNull; public class DistinctLimitMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/DistinctMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/DistinctMatcher.java index 3214479bb63c..bd64e3dc5eeb 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/DistinctMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/DistinctMatcher.java @@ -13,17 +13,17 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.PlanNode; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; public class DistinctMatcher implements Matcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/EquiJoinClauseProvider.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/EquiJoinClauseProvider.java index 4cda9c5ae269..2a0cfe50fcd6 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/EquiJoinClauseProvider.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/EquiJoinClauseProvider.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ExchangeMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ExchangeMatcher.java index c16f734ebc1a..acbcd740b5ba 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ExchangeMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ExchangeMatcher.java @@ -14,13 +14,13 @@ package io.trino.sql.planner.assertions; import com.google.common.base.MoreObjects.ToStringHelper; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern.Ordering; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern.Ordering; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import java.util.Optional; @@ -29,8 +29,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.Util.orderingSchemeMatches; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.Util.orderingSchemeMatches; import static java.util.Objects.requireNonNull; final class ExchangeMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ExpressionMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ExpressionMatcher.java index 09a13ba1e6fb..d96efeb461cc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ExpressionMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ExpressionMatcher.java @@ -14,17 +14,17 @@ package io.trino.sql.planner.assertions; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.SymbolReference; import java.util.List; import java.util.Map; @@ -32,7 +32,7 @@ import java.util.stream.Collectors; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; +import static io.trino.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; import static java.util.Objects.requireNonNull; public class ExpressionMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ExpressionVerifier.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ExpressionVerifier.java index 5b4d353f0d51..be301d32d536 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ExpressionVerifier.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ExpressionVerifier.java @@ -13,47 +13,47 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.DecimalLiteral; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.InListExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SubscriptExpression; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.TimestampLiteral; -import io.prestosql.sql.tree.TryExpression; -import io.prestosql.sql.tree.WhenClause; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArithmeticUnaryExpression; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.DecimalLiteral; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.InListExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SubscriptExpression; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.TimestampLiteral; +import io.trino.sql.tree.TryExpression; +import io.trino.sql.tree.WhenClause; import java.util.List; import java.util.Optional; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.metadata.ResolvedFunction.extractFunctionName; +import static io.trino.metadata.ResolvedFunction.extractFunctionName; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/FilterMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/FilterMatcher.java index cb2ea93186e2..966ad7afea21 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/FilterMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/FilterMatcher.java @@ -13,20 +13,20 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.tree.Expression; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.DynamicFilters; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.tree.Expression; import java.util.Optional; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.DynamicFilters.extractDynamicFilters; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.DynamicFilters.extractDynamicFilters; +import static io.trino.sql.ExpressionUtils.combineConjuncts; import static java.util.Objects.requireNonNull; final class FilterMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/FunctionCallProvider.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/FunctionCallProvider.java index f1265d660813..5d2aaaa1dc57 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/FunctionCallProvider.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/FunctionCallProvider.java @@ -15,13 +15,13 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.sql.planner.Symbol; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.WindowFrame; import java.util.List; import java.util.Objects; @@ -29,7 +29,7 @@ import java.util.stream.Collectors; import static com.google.common.base.Verify.verify; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.toSymbolReferences; +import static io.trino.sql.planner.assertions.PlanMatchPattern.toSymbolReferences; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/GroupIdMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/GroupIdMatcher.java index 31abe57d0715..0651e6352663 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/GroupIdMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/GroupIdMatcher.java @@ -13,19 +13,19 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; public class GroupIdMatcher implements Matcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IdentityProjectionMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IdentityProjectionMatcher.java index c5f9844bcd76..b3b3e762c069 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IdentityProjectionMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IdentityProjectionMatcher.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; public class IdentityProjectionMatcher implements Matcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IndexJoinEquiClauseProvider.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IndexJoinEquiClauseProvider.java index 9fd46159b6f5..6d576755332c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IndexJoinEquiClauseProvider.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IndexJoinEquiClauseProvider.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexJoinNode; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IndexJoinMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IndexJoinMatcher.java index 8a10734e9b5c..a371fa9f945f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IndexJoinMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IndexJoinMatcher.java @@ -14,11 +14,11 @@ package io.trino.sql.planner.assertions; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import java.util.Optional; @@ -27,7 +27,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; import static java.util.Objects.requireNonNull; final class IndexJoinMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IndexSourceMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IndexSourceMatcher.java index 5c26a67091f3..0c02dafe413c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IndexSourceMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/IndexSourceMatcher.java @@ -13,17 +13,17 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableMetadata; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableMetadata; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.PlanNode; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; import static java.util.Objects.requireNonNull; final class IndexSourceMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/JoinMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/JoinMatcher.java index bdbfd0196d93..dce07310b6aa 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/JoinMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/JoinMatcher.java @@ -14,19 +14,19 @@ package io.trino.sql.planner.assertions; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.JoinNode.DistributionType; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NotExpression; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.DynamicFilters; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode.DistributionType; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NotExpression; import java.util.HashSet; import java.util.List; @@ -38,12 +38,12 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.DynamicFilters.extractDynamicFilters; -import static io.prestosql.sql.planner.ExpressionExtractor.extractExpressions; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.DynamicFilterPattern; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.IS_DISTINCT_FROM; +import static io.trino.sql.DynamicFilters.extractDynamicFilters; +import static io.trino.sql.planner.ExpressionExtractor.extractExpressions; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.PlanMatchPattern.DynamicFilterPattern; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.sql.tree.ComparisonExpression.Operator.IS_DISTINCT_FROM; import static java.util.Objects.requireNonNull; final class JoinMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/LimitMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/LimitMatcher.java index b050759295bf..89d33649d481 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/LimitMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/LimitMatcher.java @@ -14,21 +14,21 @@ package io.trino.sql.planner.assertions; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.assertions.PlanMatchPattern.Ordering; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.assertions.PlanMatchPattern.Ordering; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; -import static io.prestosql.sql.planner.assertions.Util.orderingSchemeMatches; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.Util.orderingSchemeMatches; import static java.util.Objects.requireNonNull; public class LimitMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/MarkDistinctMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/MarkDistinctMatcher.java index 94e65f4e0411..9e35d2695911 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/MarkDistinctMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/MarkDistinctMatcher.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import java.util.Optional; @@ -27,8 +27,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; import static java.util.Objects.requireNonNull; public class MarkDistinctMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/MatchResult.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/MatchResult.java index eea98ee54975..8470f2aded8f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/MatchResult.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/MatchResult.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.tree.SymbolReference; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/Matcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/Matcher.java index a9b0874ddaa9..b2e3dba8d379 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/Matcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/Matcher.java @@ -13,10 +13,10 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.PlanNode; public interface Matcher { diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/NotPlanNodeMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/NotPlanNodeMatcher.java index 9533f8cb095d..3d59652f90fa 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/NotPlanNodeMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/NotPlanNodeMatcher.java @@ -13,14 +13,14 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.PlanNode; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.match; import static java.util.Objects.requireNonNull; final class NotPlanNodeMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/OffsetMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/OffsetMatcher.java index 46e496914392..fe287defd2c3 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/OffsetMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/OffsetMatcher.java @@ -13,11 +13,11 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.PlanNode; import static com.google.common.base.Preconditions.checkState; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/OrdinalitySymbolMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/OrdinalitySymbolMatcher.java index 6b4f54f42ee7..020bfa3d2927 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/OrdinalitySymbolMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/OrdinalitySymbolMatcher.java @@ -13,11 +13,11 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.UnnestNode; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.UnnestNode; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/OutputMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/OutputMatcher.java index 816fe9d321d7..2905f0bbb77b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/OutputMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/OutputMatcher.java @@ -14,18 +14,18 @@ package io.trino.sql.planner.assertions; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.tree.Expression; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.tree.Expression; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; import static java.util.Objects.requireNonNull; public class OutputMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanAssert.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanAssert.java index e26e09438297..c6304d1f9f68 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanAssert.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanAssert.java @@ -13,19 +13,19 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.CachingStatsProvider; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.CachingStatsProvider; +import io.trino.cost.StatsAndCosts; +import io.trino.cost.StatsCalculator; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.PlanNode; -import static io.prestosql.sql.planner.iterative.Lookup.noLookup; -import static io.prestosql.sql.planner.iterative.Plans.resolveGroupReferences; -import static io.prestosql.sql.planner.planprinter.PlanPrinter.textLogicalPlan; +import static io.trino.sql.planner.iterative.Lookup.noLookup; +import static io.trino.sql.planner.iterative.Plans.resolveGroupReferences; +import static io.trino.sql.planner.planprinter.PlanPrinter.textLogicalPlan; import static java.lang.String.format; public final class PlanAssert diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanMatchPattern.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanMatchPattern.java index 42b78c1f503c..8984d6f020ae 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanMatchPattern.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanMatchPattern.java @@ -16,59 +16,59 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.GroupReference; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.JoinNode.EquiJoinClause; -import io.prestosql.sql.planner.plan.JoinNode.Type; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode.EquiJoinClause; +import io.trino.sql.planner.plan.JoinNode.Type; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.WindowFrame; import java.util.ArrayList; import java.util.Collection; @@ -84,22 +84,22 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_LAST; -import static io.prestosql.spi.connector.SortOrder.DESC_NULLS_FIRST; -import static io.prestosql.spi.connector.SortOrder.DESC_NULLS_LAST; -import static io.prestosql.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; -import static io.prestosql.sql.planner.assertions.StrictAssignedSymbolsMatcher.actualAssignments; -import static io.prestosql.sql.planner.assertions.StrictSymbolsMatcher.actualOutputs; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.IS_DISTINCT_FROM; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.NullOrdering.UNDEFINED; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; -import static io.prestosql.sql.tree.SortItem.Ordering.DESCENDING; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_LAST; +import static io.trino.spi.connector.SortOrder.DESC_NULLS_FIRST; +import static io.trino.spi.connector.SortOrder.DESC_NULLS_LAST; +import static io.trino.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.StrictAssignedSymbolsMatcher.actualAssignments; +import static io.trino.sql.planner.assertions.StrictSymbolsMatcher.actualOutputs; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.IS_DISTINCT_FROM; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.NullOrdering.UNDEFINED; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.tree.SortItem.Ordering.DESCENDING; import static java.util.Collections.nCopies; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanMatchingVisitor.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanMatchingVisitor.java index 08780b73573c..7164ac3c5642 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanMatchingVisitor.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanMatchingVisitor.java @@ -13,23 +13,23 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.GroupReference; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanVisitor; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanVisitor; +import io.trino.sql.planner.plan.ProjectNode; import java.util.List; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; import static java.util.Objects.requireNonNull; final class PlanMatchingVisitor diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanNodeMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanNodeMatcher.java index c081d16f5dd0..c73e629329f4 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanNodeMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanNodeMatcher.java @@ -13,14 +13,14 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.PlanNode; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.match; import static java.util.Objects.requireNonNull; final class PlanNodeMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanTestSymbol.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanTestSymbol.java index bcf800033cc4..39cfa2df3ffd 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanTestSymbol.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PlanTestSymbol.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; public interface PlanTestSymbol { diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PredicateMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PredicateMatcher.java index d19184073904..9ecae4a9270e 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PredicateMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/PredicateMatcher.java @@ -13,14 +13,14 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.PlanNode; import java.util.function.Predicate; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.match; public class PredicateMatcher implements Matcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/RowNumberMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/RowNumberMatcher.java index 4f99a7ab3e57..b19969772bc2 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/RowNumberMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/RowNumberMatcher.java @@ -13,12 +13,12 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.RowNumberNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.RowNumberNode; import java.util.List; import java.util.Optional; @@ -26,9 +26,9 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; import static java.util.Objects.requireNonNull; public class RowNumberMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/RowNumberSymbolMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/RowNumberSymbolMatcher.java index 9806072793b4..085a59935002 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/RowNumberSymbolMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/RowNumberSymbolMatcher.java @@ -13,11 +13,11 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.RowNumberNode; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.RowNumberNode; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/RvalueMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/RvalueMatcher.java index f2da345d7ca7..47e5f24317cf 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/RvalueMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/RvalueMatcher.java @@ -13,10 +13,10 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SemiJoinMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SemiJoinMatcher.java index 0a29c99c12d0..e58d7047b174 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SemiJoinMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SemiJoinMatcher.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.DynamicFilters; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.DynamicFilters; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SemiJoinNode; import java.util.List; import java.util.Optional; @@ -29,11 +29,11 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.DynamicFilters.extractDynamicFilters; -import static io.prestosql.sql.planner.ExpressionExtractor.extractExpressions; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.sql.DynamicFilters.extractDynamicFilters; +import static io.trino.sql.planner.ExpressionExtractor.extractExpressions; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; import static java.util.Objects.requireNonNull; final class SemiJoinMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SetOperationOutputMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SetOperationOutputMatcher.java index 6946b36b1748..b179100eef7c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SetOperationOutputMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SetOperationOutputMatcher.java @@ -13,11 +13,11 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SetOperationNode; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SetOperationNode; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SortMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SortMatcher.java index cf8bd8646a45..efbc7da97c25 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SortMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SortMatcher.java @@ -13,19 +13,19 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.assertions.PlanMatchPattern.Ordering; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SortNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.assertions.PlanMatchPattern.Ordering; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SortNode; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.Util.orderingSchemeMatches; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.Util.orderingSchemeMatches; import static java.util.Objects.requireNonNull; final class SortMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SpatialJoinMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SpatialJoinMatcher.java index 755837ec24f6..49a5eae4ad1d 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SpatialJoinMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SpatialJoinMatcher.java @@ -13,14 +13,14 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode.Type; -import io.prestosql.sql.tree.Expression; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.SpatialJoinNode.Type; +import io.trino.sql.tree.Expression; import java.util.List; import java.util.Optional; @@ -28,8 +28,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; import static java.util.Objects.requireNonNull; public class SpatialJoinMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SpecificationProvider.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SpecificationProvider.java index b71a79c9947b..832ef49df9de 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SpecificationProvider.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SpecificationProvider.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.plan.WindowNode; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.plan.WindowNode; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/StatsOutputRowCountMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/StatsOutputRowCountMatcher.java index 47bcbfc53b3a..359f5853fefc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/StatsOutputRowCountMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/StatsOutputRowCountMatcher.java @@ -13,10 +13,10 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.PlanNode; public class StatsOutputRowCountMatcher implements Matcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/StrictAssignedSymbolsMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/StrictAssignedSymbolsMatcher.java index abd945355a99..5ba356fea2cd 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/StrictAssignedSymbolsMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/StrictAssignedSymbolsMatcher.java @@ -14,12 +14,12 @@ package io.trino.sql.planner.assertions; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; import java.util.Collection; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/StrictSymbolsMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/StrictSymbolsMatcher.java index 196a76ebbd2c..87e9e6df7b73 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/StrictSymbolsMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/StrictSymbolsMatcher.java @@ -14,10 +14,10 @@ package io.trino.sql.planner.assertions; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; import java.util.List; import java.util.Set; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SymbolAlias.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SymbolAlias.java index 92462ab3995b..cc70bd5cee14 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SymbolAlias.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SymbolAlias.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import static java.util.Objects.requireNonNull; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SymbolAliases.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SymbolAliases.java index 191b2a7f2452..43170a554a2f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SymbolAliases.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SymbolAliases.java @@ -14,10 +14,10 @@ package io.trino.sql.planner.assertions; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import java.util.HashMap; import java.util.Map; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SymbolCardinalityMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SymbolCardinalityMatcher.java index 94fdd25b2560..0cca902a9ec5 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SymbolCardinalityMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/SymbolCardinalityMatcher.java @@ -13,10 +13,10 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.PlanNode; import static com.google.common.base.MoreObjects.toStringHelper; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TableScanMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TableScanMatcher.java index 3ea6ad1760ea..34a58da17265 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TableScanMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TableScanMatcher.java @@ -13,21 +13,21 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableMetadata; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableMetadata; +import io.trino.spi.predicate.Domain; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; import java.util.Map; import java.util.Optional; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.Util.domainsMatch; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.Util.domainsMatch; import static java.util.Objects.requireNonNull; final class TableScanMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TableWriterMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TableWriterMatcher.java index 12e21197e156..be3e2151eb11 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TableWriterMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TableWriterMatcher.java @@ -14,20 +14,20 @@ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableWriterNode; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; public class TableWriterMatcher implements Matcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TestExpressionVerifier.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TestExpressionVerifier.java index 1ea02fb6243d..885974081221 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TestExpressionVerifier.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TestExpressionVerifier.java @@ -13,13 +13,13 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; -import static io.prestosql.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; +import static io.trino.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TopNMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TopNMatcher.java index 60d9e62eadfc..5bbed45aa357 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TopNMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TopNMatcher.java @@ -14,21 +14,21 @@ package io.trino.sql.planner.assertions; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.assertions.PlanMatchPattern.Ordering; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNNode.Step; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.assertions.PlanMatchPattern.Ordering; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNNode.Step; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; -import static io.prestosql.sql.planner.assertions.Util.orderingSchemeMatches; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.Util.orderingSchemeMatches; import static java.util.Objects.requireNonNull; public class TopNMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TopNRowNumberMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TopNRowNumberMatcher.java index 2d26b24b75a2..d597ed072bd5 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TopNRowNumberMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TopNRowNumberMatcher.java @@ -13,14 +13,14 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.WindowNode; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.WindowNode; import java.util.List; import java.util.Map; @@ -28,9 +28,9 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; import static java.util.Objects.requireNonNull; public class TopNRowNumberMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TopNRowNumberSymbolMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TopNRowNumberSymbolMatcher.java index 5424c20c87f4..9bffae128cff 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TopNRowNumberSymbolMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/TopNRowNumberSymbolMatcher.java @@ -13,11 +13,11 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/UnnestMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/UnnestMatcher.java index 9d34d50a9057..cba213c69019 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/UnnestMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/UnnestMatcher.java @@ -13,15 +13,15 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.UnnestNode.Mapping; -import io.prestosql.sql.tree.Expression; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.UnnestNode.Mapping; +import io.trino.sql.tree.Expression; import java.util.List; import java.util.Optional; @@ -30,7 +30,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; import static java.util.Objects.requireNonNull; final class UnnestMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/UnnestedSymbolMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/UnnestedSymbolMatcher.java index b5774beaead0..edb6fd8078e9 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/UnnestedSymbolMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/UnnestedSymbolMatcher.java @@ -13,12 +13,12 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.UnnestNode.Mapping; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.UnnestNode.Mapping; import java.util.List; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/Util.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/Util.java index 4093ee253012..c0a98ae2d07f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/Util.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/Util.java @@ -14,15 +14,15 @@ package io.trino.sql.planner.assertions; import com.google.common.collect.Iterables; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern.Ordering; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern.Ordering; import java.util.List; import java.util.Map; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ValuesMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ValuesMatcher.java index e08dfc148556..ef8c2e0a8bf7 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ValuesMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/ValuesMatcher.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.Expression; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.Expression; import java.util.List; import java.util.Map; @@ -28,8 +28,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; import static java.util.Objects.requireNonNull; public class ValuesMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/WindowFrameProvider.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/WindowFrameProvider.java index 9c0b1c51fb82..d397db57b3e3 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/WindowFrameProvider.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/WindowFrameProvider.java @@ -13,10 +13,10 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.WindowFrame; import java.util.Optional; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/WindowFunctionMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/WindowFunctionMatcher.java index c0d5242b10c9..d2996eeaed1c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/WindowFunctionMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/WindowFunctionMatcher.java @@ -13,14 +13,14 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.planner.plan.WindowNode.Function; -import io.prestosql.sql.tree.FunctionCall; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.planner.plan.WindowNode.Function; +import io.trino.sql.tree.FunctionCall; import java.util.Map; import java.util.Objects; @@ -28,7 +28,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.metadata.ResolvedFunction.extractFunctionName; +import static io.trino.metadata.ResolvedFunction.extractFunctionName; import static java.util.Objects.requireNonNull; public class WindowFunctionMatcher diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/WindowMatcher.java b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/WindowMatcher.java index f11f530c5c0e..94d3e733d8d8 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/assertions/WindowMatcher.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/assertions/WindowMatcher.java @@ -13,14 +13,14 @@ */ package io.trino.sql.planner.assertions; -import io.prestosql.Session; -import io.prestosql.cost.StatsProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.FunctionCall; +import io.trino.Session; +import io.trino.cost.StatsProvider; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.FunctionCall; import java.util.LinkedList; import java.util.List; @@ -31,9 +31,9 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH; -import static io.prestosql.sql.planner.assertions.MatchResult.match; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.MatchResult.NO_MATCH; +import static io.trino.sql.planner.assertions.MatchResult.match; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; import static java.util.Objects.requireNonNull; /** diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/TestIterativeOptimizer.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/TestIterativeOptimizer.java index f093628ea017..b927469a6125 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/TestIterativeOptimizer.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/TestIterativeOptimizer.java @@ -16,26 +16,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.spi.PrestoException; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.OPTIMIZER_TIMEOUT; -import static io.prestosql.sql.planner.plan.Patterns.tableScan; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.StandardErrorCode.OPTIMIZER_TIMEOUT; +import static io.trino.sql.planner.plan.Patterns.tableScan; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/TestMemo.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/TestMemo.java index fda4f5d99528..bd83abbe5ab0 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/TestMemo.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/TestMemo.java @@ -14,12 +14,12 @@ package io.trino.sql.planner.iterative; import com.google.common.collect.ImmutableList; -import io.prestosql.cost.PlanCostEstimate; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; +import io.trino.cost.PlanCostEstimate; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; import org.testng.annotations.Test; import java.util.List; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/TestRuleIndex.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/TestRuleIndex.java index c38287b038bd..eae3fd21843b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/TestRuleIndex.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/TestRuleIndex.java @@ -15,19 +15,19 @@ package io.trino.sql.planner.iterative; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.BooleanLiteral; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.BooleanLiteral; import org.testng.annotations.Test; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.metadata.AbstractMockMetadata.dummyMetadata; +import static io.trino.metadata.AbstractMockMetadata.dummyMetadata; import static java.util.stream.Collectors.toSet; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/BenchmarkReorderChainedJoins.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/BenchmarkReorderChainedJoins.java index 9850ff88df66..a3a0f03448ea 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/BenchmarkReorderChainedJoins.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/BenchmarkReorderChainedJoins.java @@ -14,11 +14,11 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -35,7 +35,7 @@ import org.openjdk.jmh.runner.options.OptionsBuilder; import org.openjdk.jmh.runner.options.VerboseMode; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.openjdk.jmh.annotations.Mode.AverageTime; import static org.openjdk.jmh.annotations.Scope.Thread; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/BenchmarkReorderInterconnectedJoins.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/BenchmarkReorderInterconnectedJoins.java index ff68f05dbe38..f8d51a82e2fe 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/BenchmarkReorderInterconnectedJoins.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/BenchmarkReorderInterconnectedJoins.java @@ -14,11 +14,11 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -36,7 +36,7 @@ import org.openjdk.jmh.runner.options.VerboseMode; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.openjdk.jmh.annotations.Mode.AverageTime; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestAddIntermediateAggregations.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestAddIntermediateAggregations.java index 9a8076ebf981..297160b89322 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestAddIntermediateAggregations.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestAddIntermediateAggregations.java @@ -15,34 +15,34 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.assertions.ExpectedValueProvider; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.tree.FunctionCall; +import io.trino.sql.planner.assertions.ExpectedValueProvider; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.tree.FunctionCall; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.ENABLE_INTERMEDIATE_AGGREGATIONS; -import static io.prestosql.SystemSessionProperties.TASK_CONCURRENCY; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anySymbol; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.globalAggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.FINAL; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.INTERMEDIATE; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.SystemSessionProperties.ENABLE_INTERMEDIATE_AGGREGATIONS; +import static io.trino.SystemSessionProperties.TASK_CONCURRENCY; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anySymbol; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.globalAggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.plan.AggregationNode.Step.FINAL; +import static io.trino.sql.planner.plan.AggregationNode.Step.INTERMEDIATE; +import static io.trino.sql.planner.plan.AggregationNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; public class TestAddIntermediateAggregations extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestApplyTableScanRedirection.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestApplyTableScanRedirection.java index 680e66cb99cd..4d9f096409bd 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestApplyTableScanRedirection.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestApplyTableScanRedirection.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.MockConnectorColumnHandle; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.connector.MockConnectorTableHandle; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.RuleTester; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.TestingTransactionHandle; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.connector.MockConnectorColumnHandle; +import io.trino.connector.MockConnectorFactory; +import io.trino.connector.MockConnectorTableHandle; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.TableHandle; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.predicate.TupleDomain; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.RuleTester; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.TestingTransactionHandle; import org.testng.annotations.Test; import java.util.Map; @@ -42,17 +42,17 @@ import static com.google.common.base.Predicates.equalTo; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.connector.MockConnectorFactory.ApplyTableScanRedirect; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.connector.MockConnectorFactory.ApplyTableScanRedirect; +import static io.trino.spi.predicate.Domain.singleValue; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.transaction.TransactionBuilder.transaction; import static org.assertj.core.api.Assertions.assertThatThrownBy; public class TestApplyTableScanRedirection 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 0e4fc927dc58..e9b5ccae4b8f 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,22 +14,22 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.assertions.SymbolAliases; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.metadata.Metadata; +import io.trino.metadata.MetadataManager; +import io.trino.spi.type.Type; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.assertions.SymbolAliases; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.ExpressionTestUtils.assertExpressionEquals; -import static io.prestosql.sql.planner.iterative.rule.CanonicalizeExpressionRewriter.rewrite; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.ExpressionTestUtils.assertExpressionEquals; +import static io.trino.sql.planner.iterative.rule.CanonicalizeExpressionRewriter.rewrite; public class TestCanonicalizeExpressionRewriter { diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestCanonicalizeExpressions.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestCanonicalizeExpressions.java index 27db6e52f0df..f66d4c3487b6 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestCanonicalizeExpressions.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestCanonicalizeExpressions.java @@ -13,11 +13,11 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.tree.BooleanLiteral.FALSE_LITERAL; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.tree.BooleanLiteral.FALSE_LITERAL; public class TestCanonicalizeExpressions extends BaseRuleTest 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 3d91a6710709..b168fd9710f5 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,51 +16,51 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import io.prestosql.cost.CostComparator; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.cost.SymbolStatsEstimate; -import io.prestosql.cost.TaskCountEstimator; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.iterative.rule.test.RuleAssert; -import io.prestosql.sql.planner.iterative.rule.test.RuleTester; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.JoinNode.DistributionType; -import io.prestosql.sql.planner.plan.JoinNode.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.testing.TestingMetadata.TestingColumnHandle; +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; +import io.trino.sql.planner.iterative.rule.test.RuleAssert; +import io.trino.sql.planner.iterative.rule.test.RuleTester; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode.DistributionType; +import io.trino.sql.planner.plan.JoinNode.Type; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.testing.TestingMetadata.TestingColumnHandle; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.enforceSingleRow; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.Lookup.noLookup; -import static io.prestosql.sql.planner.iterative.rule.DetermineJoinDistributionType.getSourceTablesSizeInBytes; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expressions; -import static io.prestosql.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.PARTITIONED; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.REPLICATED; -import static io.prestosql.sql.planner.plan.JoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.sql.planner.assertions.PlanMatchPattern.enforceSingleRow; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.Lookup.noLookup; +import static io.trino.sql.planner.iterative.rule.DetermineJoinDistributionType.getSourceTablesSizeInBytes; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expressions; +import static io.trino.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; +import static io.trino.sql.planner.plan.JoinNode.DistributionType.PARTITIONED; +import static io.trino.sql.planner.plan.JoinNode.DistributionType.REPLICATED; +import static io.trino.sql.planner.plan.JoinNode.Type.FULL; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.lang.Double.NaN; import static org.testng.Assert.assertEquals; 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 eb881ee3f323..830808fdecb1 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,34 +15,34 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.cost.CostComparator; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.cost.SymbolStatsEstimate; -import io.prestosql.cost.TaskCountEstimator; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.RuleAssert; -import io.prestosql.sql.planner.iterative.rule.test.RuleTester; -import io.prestosql.sql.planner.plan.PlanNodeId; +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; +import io.trino.sql.planner.plan.PlanNodeId; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.semiJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expressions; -import static io.prestosql.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; -import static io.prestosql.sql.planner.plan.SemiJoinNode.DistributionType.PARTITIONED; -import static io.prestosql.sql.planner.plan.SemiJoinNode.DistributionType.REPLICATED; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.semiJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expressions; +import static io.trino.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; +import static io.trino.sql.planner.plan.SemiJoinNode.DistributionType.PARTITIONED; +import static io.trino.sql.planner.plan.SemiJoinNode.DistributionType.REPLICATED; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; @Test(singleThreaded = true) public class TestDetermineSemiJoinDistributionType diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestEliminateCrossJoins.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestEliminateCrossJoins.java index 96ac79303a77..2ea2450a8405 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestEliminateCrossJoins.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestEliminateCrossJoins.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.GroupReference; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.optimizations.joins.JoinGraph; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.JoinNode.EquiJoinClause; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.GroupReference; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.optimizations.joins.JoinGraph; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode.EquiJoinClause; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArithmeticUnaryExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; import java.util.Arrays; @@ -40,18 +40,18 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.any; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.iterative.Lookup.noLookup; -import static io.prestosql.sql.planner.iterative.rule.EliminateCrossJoins.getJoinOrder; -import static io.prestosql.sql.planner.iterative.rule.EliminateCrossJoins.isOriginalOrder; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.ADD; -import static io.prestosql.sql.tree.ArithmeticUnaryExpression.Sign.MINUS; +import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; +import static io.trino.sql.planner.assertions.PlanMatchPattern.any; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.iterative.Lookup.noLookup; +import static io.trino.sql.planner.iterative.rule.EliminateCrossJoins.getJoinOrder; +import static io.trino.sql.planner.iterative.rule.EliminateCrossJoins.isOriginalOrder; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.ADD; +import static io.trino.sql.tree.ArithmeticUnaryExpression.Sign.MINUS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestEvaluateZeroSample.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestEvaluateZeroSample.java index 430f96de06d7..b2027eec9b2a 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestEvaluateZeroSample.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestEvaluateZeroSample.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.SampleNode.Type; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.SampleNode.Type; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expressions; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expressions; public class TestEvaluateZeroSample extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestExpressionRewriteRuleSet.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestExpressionRewriteRuleSet.java index a1a1bd18d6c0..fc1e75a01608 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestExpressionRewriteRuleSet.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestExpressionRewriteRuleSet.java @@ -15,29 +15,29 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.DateType; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.DateType; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestExpressionRewriteRuleSet extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementExceptAll.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementExceptAll.java index 802b2980e5e4..1e4bae7b0e4f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementExceptAll.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementExceptAll.java @@ -16,22 +16,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.SetOperationOutputMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.SetOperationOutputMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.specification; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.union; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.specification; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.union; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; public class TestImplementExceptAll extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementExceptDistinctAsUnion.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementExceptDistinctAsUnion.java index 679b6a43cc65..97cc10e6e9cd 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementExceptDistinctAsUnion.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementExceptDistinctAsUnion.java @@ -16,17 +16,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.FilterNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.FilterNode; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.union; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.union; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestImplementExceptDistinctAsUnion extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementFilteredAggregations.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementFilteredAggregations.java index 83356e4f2914..224317feb0fc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementFilteredAggregations.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementFilteredAggregations.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.globalAggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.globalAggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestImplementFilteredAggregations extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementIntersectAll.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementIntersectAll.java index 7ea02333bf68..a07a44cda387 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementIntersectAll.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementIntersectAll.java @@ -16,22 +16,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.SetOperationOutputMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.SetOperationOutputMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.specification; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.union; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.specification; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.union; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; public class TestImplementIntersectAll extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementIntersectDistinctAsUnion.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementIntersectDistinctAsUnion.java index 763035658c55..819011d28f39 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementIntersectDistinctAsUnion.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementIntersectDistinctAsUnion.java @@ -16,17 +16,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.FilterNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.FilterNode; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.union; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.union; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestImplementIntersectDistinctAsUnion extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementLimitWithTies.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementLimitWithTies.java index b8dd1e58dfcd..7cef893773d6 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementLimitWithTies.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementLimitWithTies.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.ExpressionMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.ExpressionMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.specification; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.specification; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; public class TestImplementLimitWithTies extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementOffset.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementOffset.java index 3f8ad8258775..103c021b479e 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementOffset.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestImplementOffset.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.ExpressionMatcher; -import io.prestosql.sql.planner.assertions.RowNumberSymbolMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.ExpressionMatcher; +import io.trino.sql.planner.assertions.RowNumberSymbolMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.rowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.rowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestImplementOffset extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestInlineProjections.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestInlineProjections.java index ecd238ad696b..14c114fa0837 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestInlineProjections.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestInlineProjections.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.RowType; -import io.prestosql.sql.planner.assertions.ExpressionMatcher; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.spi.type.RowType; +import io.trino.sql.planner.assertions.ExpressionMatcher; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestInlineProjections extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestJoinEnumerator.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestJoinEnumerator.java index 6d69c27f2d38..fa992a2587dc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestJoinEnumerator.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestJoinEnumerator.java @@ -16,24 +16,24 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.cost.CachingCostProvider; -import io.prestosql.cost.CachingStatsProvider; -import io.prestosql.cost.CostComparator; -import io.prestosql.cost.CostProvider; -import io.prestosql.cost.PlanCostEstimate; -import io.prestosql.cost.StatsProvider; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.iterative.rule.ReorderJoins.JoinEnumerationResult; -import io.prestosql.sql.planner.iterative.rule.ReorderJoins.JoinEnumerator; -import io.prestosql.sql.planner.iterative.rule.ReorderJoins.MultiJoinNode; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.cost.CachingCostProvider; +import io.trino.cost.CachingStatsProvider; +import io.trino.cost.CostComparator; +import io.trino.cost.CostProvider; +import io.trino.cost.PlanCostEstimate; +import io.trino.cost.StatsProvider; +import io.trino.execution.warnings.WarningCollector; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.iterative.rule.ReorderJoins.JoinEnumerationResult; +import io.trino.sql.planner.iterative.rule.ReorderJoins.JoinEnumerator; +import io.trino.sql.planner.iterative.rule.ReorderJoins.MultiJoinNode; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -42,10 +42,10 @@ import java.util.Optional; import static io.airlift.testing.Closeables.closeAllRuntimeException; -import static io.prestosql.sql.planner.iterative.Lookup.noLookup; -import static io.prestosql.sql.planner.iterative.rule.ReorderJoins.JoinEnumerator.generatePartitions; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.sql.planner.iterative.Lookup.noLookup; +import static io.trino.sql.planner.iterative.rule.ReorderJoins.JoinEnumerator.generatePartitions; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestJoinNodeFlattener.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestJoinNodeFlattener.java index eb34e326222a..6687990eb652 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestJoinNodeFlattener.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestJoinNodeFlattener.java @@ -15,26 +15,26 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.assertions.PlanAssert; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.ReorderJoins.MultiJoinNode; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.JoinNode.EquiJoinClause; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.assertions.PlanAssert; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.ReorderJoins.MultiJoinNode; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode.EquiJoinClause; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArithmeticUnaryExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.LongLiteral; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -44,25 +44,25 @@ import java.util.Optional; import static io.airlift.testing.Closeables.closeAllRuntimeException; -import static io.prestosql.cost.PlanNodeStatsEstimate.unknown; -import static io.prestosql.cost.StatsAndCosts.empty; -import static io.prestosql.metadata.AbstractMockMetadata.dummyMetadata; -import static io.prestosql.sql.ExpressionUtils.and; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.Lookup.noLookup; -import static io.prestosql.sql.planner.iterative.rule.ReorderJoins.MultiJoinNode.toMultiJoinNode; -import static io.prestosql.sql.planner.plan.JoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.ADD; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.SUBTRACT; -import static io.prestosql.sql.tree.ArithmeticUnaryExpression.Sign.MINUS; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.NOT_EQUAL; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.cost.PlanNodeStatsEstimate.unknown; +import static io.trino.cost.StatsAndCosts.empty; +import static io.trino.metadata.AbstractMockMetadata.dummyMetadata; +import static io.trino.sql.ExpressionUtils.and; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.Lookup.noLookup; +import static io.trino.sql.planner.iterative.rule.ReorderJoins.MultiJoinNode.toMultiJoinNode; +import static io.trino.sql.planner.plan.JoinNode.Type.FULL; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.ADD; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.SUBTRACT; +import static io.trino.sql.tree.ArithmeticUnaryExpression.Sign.MINUS; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.NOT_EQUAL; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestLambdaCaptureDesugaringRewriter.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestLambdaCaptureDesugaringRewriter.java index a11455bdaf42..01c79f11796e 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestLambdaCaptureDesugaringRewriter.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestLambdaCaptureDesugaringRewriter.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.tree.BindExpression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.tree.BindExpression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; import org.testng.annotations.Test; import java.util.Map; import java.util.stream.Stream; -import static io.prestosql.sql.planner.iterative.rule.LambdaCaptureDesugaringRewriter.rewrite; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.iterative.rule.LambdaCaptureDesugaringRewriter.rewrite; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; import static java.util.stream.Collectors.toList; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeAdjacentWindows.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeAdjacentWindows.java index 3be0e8ad2e8d..fc33f930b3fb 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeAdjacentWindows.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeAdjacentWindows.java @@ -15,35 +15,35 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.planner.assertions.ExpectedValueProvider; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.metadata.MetadataManager; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.planner.assertions.ExpectedValueProvider; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.WindowFrame; import org.testng.annotations.Test; import java.util.Arrays; import java.util.Optional; import java.util.stream.Collectors; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.specification; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.tree.FrameBound.Type.CURRENT_ROW; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.specification; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.tree.FrameBound.Type.CURRENT_ROW; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; public class TestMergeAdjacentWindows extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeExcept.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeExcept.java index 88155aa5e3b6..cdfe089196d5 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeExcept.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeExcept.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ValuesNode; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.except; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.except; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestMergeExcept extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeFilters.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeFilters.java index 776cc6156ce8..b9def4fd69d8 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeFilters.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeFilters.java @@ -14,14 +14,14 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestMergeFilters extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeIntersect.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeIntersect.java index a2015817fcd6..72cfa628ad24 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeIntersect.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeIntersect.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.PlanNode; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.intersect; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.intersect; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestMergeIntersect extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitOverProjectWithSort.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitOverProjectWithSort.java index c3bb552cc9a1..b30eca39100d 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitOverProjectWithSort.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitOverProjectWithSort.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.ExpressionMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.ExpressionMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topN; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestMergeLimitOverProjectWithSort extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitWithDistinct.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitWithDistinct.java index ce09ab0c3079..dc912cd5ff79 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitWithDistinct.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitWithDistinct.java @@ -14,15 +14,15 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.ValuesNode; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestMergeLimitWithDistinct extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitWithSort.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitWithSort.java index 3fd3dc59a6c2..4de4007ea677 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitWithSort.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitWithSort.java @@ -14,15 +14,15 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topN; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestMergeLimitWithSort extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitWithTopN.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitWithTopN.java index 967efe5137b9..348921ef8e11 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitWithTopN.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimitWithTopN.java @@ -14,15 +14,15 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topN; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestMergeLimitWithTopN extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimits.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimits.java index 61e02f8b9fbe..cef39ff317bc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimits.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeLimits.java @@ -14,15 +14,15 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestMergeLimits extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeUnion.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeUnion.java index 3186bb9f3235..fa2fb7eeaf7e 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeUnion.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMergeUnion.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.UnionNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.UnionNode; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.union; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.union; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestMergeUnion extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMultipleDistinctAggregationToMarkDistinct.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMultipleDistinctAggregationToMarkDistinct.java index f99cb8099da4..fff5f12371c1 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMultipleDistinctAggregationToMarkDistinct.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestMultipleDistinctAggregationToMarkDistinct.java @@ -14,12 +14,12 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestMultipleDistinctAggregationToMarkDistinct extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneAggregationColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneAggregationColumns.java index 69b131778353..1bc73888a95a 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneAggregationColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneAggregationColumns.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; import org.testng.annotations.Test; import java.util.Optional; @@ -27,13 +27,13 @@ import static com.google.common.base.Predicates.alwaysTrue; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; public class TestPruneAggregationColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneAggregationSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneAggregationSourceColumns.java index 2f5a50672c8c..95156c141fc8 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneAggregationSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneAggregationSourceColumns.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.AggregationNode; import org.testng.annotations.Test; import java.util.List; @@ -27,14 +27,14 @@ import static com.google.common.base.Predicates.alwaysTrue; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; public class TestPruneAggregationSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneApplyColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneApplyColumns.java index d0e3b0d8f29d..a4e3a10c7269 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneApplyColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneApplyColumns.java @@ -15,22 +15,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.ExpressionMatcher; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.ExpressionMatcher; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.apply; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.apply; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; public class TestPruneApplyColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneApplyCorrelation.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneApplyCorrelation.java index 2caec934937c..07f77346502f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneApplyCorrelation.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneApplyCorrelation.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.ExpressionMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.ExpressionMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.apply; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.apply; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; public class TestPruneApplyCorrelation extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneApplySourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneApplySourceColumns.java index ae059f3879fe..abcd13f2c490 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneApplySourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneApplySourceColumns.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.ExpressionMatcher; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.ExpressionMatcher; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.apply; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.apply; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneApplySourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneAssignUniqueIdColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneAssignUniqueIdColumns.java index f86b3888c933..9b4f0fcfa4c1 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneAssignUniqueIdColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneAssignUniqueIdColumns.java @@ -14,15 +14,15 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.assignUniqueId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.assignUniqueId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneAssignUniqueIdColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneCorrelatedJoinColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneCorrelatedJoinColumns.java index 3f8b932ec9fe..cbf4243067c1 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneCorrelatedJoinColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneCorrelatedJoinColumns.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.tree.ComparisonExpression; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.tree.ComparisonExpression; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.correlatedJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; +import static io.trino.sql.planner.assertions.PlanMatchPattern.correlatedJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN_OR_EQUAL; public class TestPruneCorrelatedJoinColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneCorrelatedJoinCorrelation.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneCorrelatedJoinCorrelation.java index 307bb641047b..6039f14099a6 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneCorrelatedJoinCorrelation.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneCorrelatedJoinCorrelation.java @@ -14,14 +14,14 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.tree.ComparisonExpression; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.tree.ComparisonExpression; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.correlatedJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.correlatedJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; public class TestPruneCorrelatedJoinCorrelation extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneCountAggregationOverScalar.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneCountAggregationOverScalar.java index 311ac3280a1b..2a40ce20bab7 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneCountAggregationOverScalar.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneCountAggregationOverScalar.java @@ -15,27 +15,27 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.plugin.tpch.TpchTransactionHandle; -import io.prestosql.spi.type.BigintType; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.connector.CatalogName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.plugin.tpch.TpchTransactionHandle; +import io.trino.spi.type.BigintType; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCALE_FACTOR; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.singleGroupingSet; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCALE_FACTOR; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.singleGroupingSet; public class TestPruneCountAggregationOverScalar extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneDeleteSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneDeleteSourceColumns.java index 10ac203b8fc4..edbffc709e41 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneDeleteSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneDeleteSourceColumns.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.DeleteNode; +import io.trino.spi.connector.SchemaTableName; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.DeleteNode; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneDeleteSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneDistinctAggregation.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneDistinctAggregation.java index 45f56ae2ad7c..eaa8afae84ea 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneDistinctAggregation.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneDistinctAggregation.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.AggregationNode; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestPruneDistinctAggregation extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneDistinctLimitSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneDistinctLimitSourceColumns.java index af05cbe92390..17452b53696f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneDistinctLimitSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneDistinctLimitSourceColumns.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.distinctLimit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.distinctLimit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneDistinctLimitSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneEnforceSingleRowColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneEnforceSingleRowColumns.java index 71eb1033acb6..8d49a03b2a90 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneEnforceSingleRowColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneEnforceSingleRowColumns.java @@ -14,15 +14,15 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.enforceSingleRow; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.enforceSingleRow; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneEnforceSingleRowColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExceptSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExceptSourceColumns.java index 35c2800b477f..a1d6e62807f1 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExceptSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExceptSourceColumns.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.except; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.except; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneExceptSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExchangeColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExchangeColumns.java index f65757a610cd..0eb0cdc92ec0 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExchangeColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExchangeColumns.java @@ -16,21 +16,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; public class TestPruneExchangeColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExchangeSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExchangeSourceColumns.java index 7d829589d2cc..f6c7855a4b52 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExchangeSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExchangeSourceColumns.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneExchangeSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExplainAnalyzeSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExplainAnalyzeSourceColumns.java index 29308b323d92..99fe8384d99d 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExplainAnalyzeSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneExplainAnalyzeSourceColumns.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; import org.testng.annotations.Test; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneExplainAnalyzeSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneFilterColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneFilterColumns.java index beda49110771..6d3de615f0eb 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneFilterColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneFilterColumns.java @@ -14,11 +14,11 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; import org.testng.annotations.Test; import java.util.function.Predicate; @@ -26,10 +26,10 @@ import static com.google.common.base.Predicates.alwaysTrue; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneFilterColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneGroupIdColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneGroupIdColumns.java index 209d3af6c064..04744fe84db4 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneGroupIdColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneGroupIdColumns.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.groupId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.groupId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneGroupIdColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneGroupIdSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneGroupIdSourceColumns.java index bfa06ba6b165..459ed621d329 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneGroupIdSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneGroupIdSourceColumns.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.groupId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.groupId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneGroupIdSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneIndexJoinColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneIndexJoinColumns.java index 945b2c0d6e94..44956a5cad5c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneIndexJoinColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneIndexJoinColumns.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.IndexJoinNode.EquiJoinClause; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.IndexJoinNode.EquiJoinClause; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.indexJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.indexJoinEquiClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.IndexJoinNode.Type.INNER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.indexJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.indexJoinEquiClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.IndexJoinNode.Type.INNER; public class TestPruneIndexJoinColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneIndexSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneIndexSourceColumns.java index 23e22bc98c02..521bc132e43e 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneIndexSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneIndexSourceColumns.java @@ -17,29 +17,29 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.plugin.tpch.TpchTransactionHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.connector.CatalogName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.plugin.tpch.TpchTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; import org.testng.annotations.Test; import java.util.Optional; import java.util.function.Predicate; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCALE_FACTOR; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.constrainedIndexSource; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCALE_FACTOR; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.constrainedIndexSource; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; public class TestPruneIndexSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneIntersectSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneIntersectSourceColumns.java index 33e4baf75ebe..d869d5520c81 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneIntersectSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneIntersectSourceColumns.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.intersect; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.intersect; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneIntersectSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneJoinChildrenColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneJoinChildrenColumns.java index 42563c9943ef..5497c897f41a 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneJoinChildrenColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneJoinChildrenColumns.java @@ -16,12 +16,12 @@ import com.google.common.base.Predicates; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; import org.testng.annotations.Test; import java.util.List; @@ -29,11 +29,11 @@ import java.util.function.Predicate; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestPruneJoinChildrenColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneJoinColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneJoinColumns.java index 5799879a82a0..4d823c7a643c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneJoinColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneJoinColumns.java @@ -16,13 +16,13 @@ import com.google.common.base.Predicates; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; import org.testng.annotations.Test; import java.util.List; @@ -30,10 +30,10 @@ import java.util.function.Predicate; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneJoinColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneLimitColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneLimitColumns.java index cf80eeb75c2e..014c051cd870 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneLimitColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneLimitColumns.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; import org.testng.annotations.Test; import java.util.function.Predicate; @@ -27,13 +27,13 @@ import static com.google.common.base.Predicates.alwaysTrue; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestPruneLimitColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneMarkDistinctColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneMarkDistinctColumns.java index d9d2234082bc..9216866bb49a 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneMarkDistinctColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneMarkDistinctColumns.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.markDistinct; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.markDistinct; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneMarkDistinctColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneOffsetColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneOffsetColumns.java index e133a3d7a2c4..1969cd518267 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneOffsetColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneOffsetColumns.java @@ -14,11 +14,11 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; import org.testng.annotations.Test; import java.util.function.Predicate; @@ -26,10 +26,10 @@ import static com.google.common.base.Predicates.alwaysTrue; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.offset; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.offset; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneOffsetColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneOrderByInAggregation.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneOrderByInAggregation.java index 15860a17d979..05b7b8ca29d2 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneOrderByInAggregation.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneOrderByInAggregation.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.tree.SortItem; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.tree.SortItem; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; public class TestPruneOrderByInAggregation extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneOutputSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneOutputSourceColumns.java index fca1f1e6795f..d83e64031875 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneOutputSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneOutputSourceColumns.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictOutput; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictOutput; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneOutputSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneProjectColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneProjectColumns.java index 6b7b1ead2102..98c9683eccb0 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneProjectColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneProjectColumns.java @@ -14,14 +14,14 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneProjectColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneRowNumberColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneRowNumberColumns.java index 1e1d5f7658a8..4a3ca450c7cc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneRowNumberColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneRowNumberColumns.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.RowNumberSymbolMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.RowNumberSymbolMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.rowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.rowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneRowNumberColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSampleColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSampleColumns.java index c2c217c4b988..7ed2602c44c3 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSampleColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSampleColumns.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.SampleNode; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.SampleNode; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.SampleNode.Type.SYSTEM; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.SampleNode.Type.SYSTEM; public class TestPruneSampleColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSemiJoinColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSemiJoinColumns.java index 994d07b3b1d2..1750176248f4 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSemiJoinColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSemiJoinColumns.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; import org.testng.annotations.Test; import java.util.List; @@ -27,10 +27,10 @@ import java.util.function.Predicate; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.semiJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.semiJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneSemiJoinColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSemiJoinFilteringSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSemiJoinFilteringSourceColumns.java index 33923300b3ec..b3dab255ad00 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSemiJoinFilteringSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSemiJoinFilteringSourceColumns.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.PlanNode; import org.testng.annotations.Test; import java.util.List; @@ -26,10 +26,10 @@ import java.util.function.Predicate; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.semiJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.semiJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneSemiJoinFilteringSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSortColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSortColumns.java index 2f4e0f67589e..9d3c6b155673 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSortColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSortColumns.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestPruneSortColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSpatialJoinChildrenColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSpatialJoinChildrenColumns.java index 765e88d14310..a413b72c3594 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSpatialJoinChildrenColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSpatialJoinChildrenColumns.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.SpatialJoinNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.spatialJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.spatialJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestPruneSpatialJoinChildrenColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSpatialJoinColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSpatialJoinColumns.java index 6cfb29b74224..afa6143b9e1b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSpatialJoinColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneSpatialJoinColumns.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.SpatialJoinNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.spatialJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.spatialJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestPruneSpatialJoinColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTableScanColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTableScanColumns.java index 64b6ca844958..a6f5f8c4882a 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTableScanColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTableScanColumns.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.plugin.tpch.TpchTransactionHandle; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.testing.TestingMetadata.TestingColumnHandle; +import io.trino.connector.CatalogName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.plugin.tpch.TpchTransactionHandle; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.testing.TestingMetadata.TestingColumnHandle; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCALE_FACTOR; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictTableScan; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCALE_FACTOR; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictTableScan; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestPruneTableScanColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTableWriterSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTableWriterSourceColumns.java index bf210d9240df..83582c3200a9 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTableWriterSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTableWriterSourceColumns.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.StatisticAggregationsDescriptor; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.StatisticAggregationsDescriptor; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableWriter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableWriter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneTableWriterSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTopNColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTopNColumns.java index 274cea5f08d0..9e19451af586 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTopNColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTopNColumns.java @@ -16,23 +16,23 @@ import com.google.common.base.Predicates; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ProjectNode; import org.testng.annotations.Test; import java.util.function.Predicate; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topN; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestPruneTopNColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTopNRowNumberColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTopNRowNumberColumns.java index 5b5f2bf0ebd1..29bc1c53f9e0 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTopNRowNumberColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneTopNRowNumberColumns.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.TopNRowNumberSymbolMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.WindowNode.Specification; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.TopNRowNumberSymbolMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.WindowNode.Specification; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topNRowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topNRowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneTopNRowNumberColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnionColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnionColumns.java index 09d2022976c3..d6ff06765cdc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnionColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnionColumns.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.union; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.union; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneUnionColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnionSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnionSourceColumns.java index b50f82341ef7..9e7e9884704a 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnionSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnionSourceColumns.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.union; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.union; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneUnionSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnnestColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnnestColumns.java index ba02653cb56d..5ffa369f6cfc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnnestColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnnestColumns.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.UnnestNode.Mapping; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.UnnestNode.Mapping; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.UnnestMapping.unnestMapping; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.unnest; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.UnnestMapping.unnestMapping; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.unnest; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestPruneUnnestColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnnestSourceColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnnestSourceColumns.java index 128bc29ceaad..69a540b821aa 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnnestSourceColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneUnnestSourceColumns.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.UnnestNode.Mapping; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.UnnestNode.Mapping; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.UnnestMapping.unnestMapping; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.unnest; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.UnnestMapping.unnestMapping; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.unnest; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPruneUnnestSourceColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneValuesColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneValuesColumns.java index 9042e772a78a..9423b47e63ee 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneValuesColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneValuesColumns.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestPruneValuesColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneWindowColumns.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneWindowColumns.java index 5aee82d974c6..839ca0d91548 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneWindowColumns.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPruneWindowColumns.java @@ -18,19 +18,19 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.ExpectedValueProvider; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.metadata.ResolvedFunction; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.ExpectedValueProvider; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.WindowFrame; import org.testng.annotations.Test; import java.util.List; @@ -40,17 +40,17 @@ import static com.google.common.base.Predicates.alwaysTrue; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.windowFrame; -import static io.prestosql.sql.tree.FrameBound.Type.CURRENT_ROW; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.assertions.PlanMatchPattern.windowFrame; +import static io.trino.sql.tree.FrameBound.Type.CURRENT_ROW; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; public class TestPruneWindowColumns extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushAggregationThroughOuterJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushAggregationThroughOuterJoin.java index 3d059fdb9c47..b0cdaa206bdc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushAggregationThroughOuterJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushAggregationThroughOuterJoin.java @@ -17,32 +17,32 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.JoinNode.EquiJoinClause; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.JoinNode.EquiJoinClause; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.globalAggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expressions; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.AggregationNode.groupingSets; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +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.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.globalAggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expressions; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.AggregationNode.groupingSets; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; public class TestPushAggregationThroughOuterJoin extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushDistinctLimitIntoTableScan.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushDistinctLimitIntoTableScan.java index 38c47207a779..31e507da7342 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushDistinctLimitIntoTableScan.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushDistinctLimitIntoTableScan.java @@ -15,22 +15,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.MockConnectorColumnHandle; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.connector.MockConnectorFactory.ApplyAggregation; -import io.prestosql.connector.MockConnectorTableHandle; -import io.prestosql.connector.MockConnectorTransactionHandle; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.AggregationApplicationResult; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.TestingSession; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.connector.MockConnectorColumnHandle; +import io.trino.connector.MockConnectorFactory; +import io.trino.connector.MockConnectorFactory.ApplyAggregation; +import io.trino.connector.MockConnectorTableHandle; +import io.trino.connector.MockConnectorTransactionHandle; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.AggregationApplicationResult; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.TestingSession; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -41,10 +41,10 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; import static java.util.stream.Collectors.toUnmodifiableList; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushDownDereferencesRules.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushDownDereferencesRules.java index 870b299518b3..811844149bb9 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushDownDereferencesRules.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushDownDereferencesRules.java @@ -15,62 +15,62 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.assertions.ExpressionMatcher; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.WindowFrame; -import io.prestosql.testing.TestingTransactionHandle; +import io.trino.connector.CatalogName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.assertions.ExpressionMatcher; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.WindowFrame; +import io.trino.testing.TestingTransactionHandle; import org.testng.annotations.Test; import java.util.Optional; import static com.google.common.base.Predicates.equalTo; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.spi.type.RowType.rowType; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.UnnestMapping.unnestMapping; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.assignUniqueId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.markDistinct; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.rowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.semiJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topN; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topNRowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.unnest; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.iterative.rule.test.RuleTester.CATALOG_ID; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.RowType.field; +import static io.trino.spi.type.RowType.rowType; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.planner.assertions.PlanMatchPattern.UnnestMapping.unnestMapping; +import static io.trino.sql.planner.assertions.PlanMatchPattern.assignUniqueId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.markDistinct; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.rowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.semiJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topNRowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.unnest; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.iterative.rule.test.RuleTester.CATALOG_ID; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; import static java.util.Collections.singletonList; public class TestPushDownDereferencesRules diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughMarkDistinct.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughMarkDistinct.java index de4c2b2a4d8e..194ce321524c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughMarkDistinct.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughMarkDistinct.java @@ -14,13 +14,13 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.ValuesNode; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; public class TestPushLimitThroughMarkDistinct extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughOffset.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughOffset.java index a8d46819fcc2..7748e25370f2 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughOffset.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughOffset.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.offset; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.offset; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestPushLimitThroughOffset extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughOuterJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughOuterJoin.java index 14971e596b82..2d6809a48252 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughOuterJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughOuterJoin.java @@ -14,18 +14,18 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.JoinNode.EquiJoinClause; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.JoinNode.EquiJoinClause; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.JoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.JoinNode.Type.FULL; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; public class TestPushLimitThroughOuterJoin extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughProject.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughProject.java index 9b3036618aae..04b44620e0a8 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughProject.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughProject.java @@ -15,30 +15,30 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.RowType; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.ExpressionMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.spi.type.RowType; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.ExpressionMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.ADD; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.ADD; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestPushLimitThroughProject extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughUnion.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughUnion.java index 901a6db491bf..d6b1c21b574a 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughUnion.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushLimitThroughUnion.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.union; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.union; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPushLimitThroughUnion extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushOffsetThroughProject.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushOffsetThroughProject.java index d48f60849c50..258c45ee3bc7 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushOffsetThroughProject.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushOffsetThroughProject.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.offset; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.offset; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; public class TestPushOffsetThroughProject extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPartialAggregationThroughJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPartialAggregationThroughJoin.java index f675d3f8b9f5..b0f615dcb2e1 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPartialAggregationThroughJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPartialAggregationThroughJoin.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.JoinNode.EquiJoinClause; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.JoinNode.EquiJoinClause; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.PUSH_PARTIAL_AGGREGATION_THROUGH_JOIN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.SystemSessionProperties.PUSH_PARTIAL_AGGREGATION_THROUGH_JOIN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.plan.AggregationNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestPushPartialAggregationThroughJoin extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPredicateIntoTableScan.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPredicateIntoTableScan.java index ad065158f8d6..e4447bbed3bd 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPredicateIntoTableScan.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPredicateIntoTableScan.java @@ -16,30 +16,30 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slices; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.plugin.tpch.TpchTableLayoutHandle; -import io.prestosql.plugin.tpch.TpchTransactionHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.connector.CatalogName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.plugin.tpch.TpchTableLayoutHandle; +import io.trino.plugin.tpch.TpchTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -47,17 +47,17 @@ import java.util.Optional; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.constrainedTableScanWithTableLayout; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.MODULUS; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.LogicalBinaryExpression.Operator.AND; -import static io.prestosql.sql.tree.LogicalBinaryExpression.Operator.OR; +import static io.trino.spi.predicate.Domain.singleValue; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.planner.assertions.PlanMatchPattern.constrainedTableScanWithTableLayout; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.MODULUS; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.LogicalBinaryExpression.Operator.AND; +import static io.trino.sql.tree.LogicalBinaryExpression.Operator.OR; public class TestPushPredicateIntoTableScan extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPredicateThroughProjectIntoRowNumber.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPredicateThroughProjectIntoRowNumber.java index 427d273e2811..4ad3c5d7fc11 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPredicateThroughProjectIntoRowNumber.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPredicateThroughProjectIntoRowNumber.java @@ -16,20 +16,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.RowNumberSymbolMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.RowNumberSymbolMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.rowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.rowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPushPredicateThroughProjectIntoRowNumber extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPredicateThroughProjectIntoWindow.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPredicateThroughProjectIntoWindow.java index 251d7eb812c1..43b68eac8405 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPredicateThroughProjectIntoWindow.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushPredicateThroughProjectIntoWindow.java @@ -16,30 +16,30 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.TopNRowNumberSymbolMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.WindowNode.Frame; -import io.prestosql.sql.planner.plan.WindowNode.Function; -import io.prestosql.sql.planner.plan.WindowNode.Specification; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.TopNRowNumberSymbolMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.WindowNode.Frame; +import io.trino.sql.planner.plan.WindowNode.Function; +import io.trino.sql.planner.plan.WindowNode.Specification; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topNRowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.FrameBound.Type.CURRENT_ROW; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; -import static io.prestosql.sql.tree.WindowFrame.Type.RANGE; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topNRowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.FrameBound.Type.CURRENT_ROW; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; +import static io.trino.sql.tree.WindowFrame.Type.RANGE; public class TestPushPredicateThroughProjectIntoWindow extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionIntoTableScan.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionIntoTableScan.java index 71fe462cd1c4..665a0db08ec2 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionIntoTableScan.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionIntoTableScan.java @@ -15,38 +15,38 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.connector.MockConnectorTableHandle; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.spi.connector.Assignment; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Constant; -import io.prestosql.spi.expression.FieldDereference; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.rule.test.RuleTester; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.connector.MockConnectorFactory; +import io.trino.connector.MockConnectorTableHandle; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.spi.connector.Assignment; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Constant; +import io.trino.spi.expression.FieldDereference; +import io.trino.spi.expression.Variable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.rule.test.RuleTester; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; import java.util.List; @@ -56,15 +56,15 @@ import static com.google.common.base.Predicates.equalTo; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.sql.planner.ConnectorExpressionTranslator.translate; -import static io.prestosql.sql.planner.TypeProvider.viewOf; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.RowType.field; +import static io.trino.sql.planner.ConnectorExpressionTranslator.translate; +import static io.trino.sql.planner.TypeProvider.viewOf; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Arrays.asList; public class TestPushProjectionIntoTableScan diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionThroughExchange.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionThroughExchange.java index 186f1c14b6ed..9182a127dc94 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionThroughExchange.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionThroughExchange.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestPushProjectionThroughExchange extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionThroughJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionThroughJoin.java index 9297ad870bdc..785482615c76 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionThroughJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionThroughJoin.java @@ -15,38 +15,38 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArithmeticUnaryExpression; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.cost.PlanNodeStatsEstimate.unknown; -import static io.prestosql.cost.StatsAndCosts.empty; -import static io.prestosql.metadata.AbstractMockMetadata.dummyMetadata; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.sql.planner.assertions.PlanAssert.assertPlan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.iterative.Lookup.noLookup; -import static io.prestosql.sql.planner.iterative.rule.PushProjectionThroughJoin.pushProjectionThroughJoin; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.ADD; -import static io.prestosql.sql.tree.ArithmeticUnaryExpression.Sign.MINUS; -import static io.prestosql.sql.tree.ArithmeticUnaryExpression.Sign.PLUS; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.cost.PlanNodeStatsEstimate.unknown; +import static io.trino.cost.StatsAndCosts.empty; +import static io.trino.metadata.AbstractMockMetadata.dummyMetadata; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.sql.planner.assertions.PlanAssert.assertPlan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.iterative.Lookup.noLookup; +import static io.trino.sql.planner.iterative.rule.PushProjectionThroughJoin.pushProjectionThroughJoin; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.ADD; +import static io.trino.sql.tree.ArithmeticUnaryExpression.Sign.MINUS; +import static io.trino.sql.tree.ArithmeticUnaryExpression.Sign.PLUS; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionThroughUnion.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionThroughUnion.java index eec985b31a3e..374ac1d3d34c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionThroughUnion.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushProjectionThroughUnion.java @@ -16,22 +16,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.RowType; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.LongLiteral; +import io.trino.spi.type.RowType; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.LongLiteral; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.union; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.union; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPushProjectionThroughUnion extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushSampleIntoTableScan.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushSampleIntoTableScan.java index c7f3a0fcddf7..92a7ab879155 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushSampleIntoTableScan.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushSampleIntoTableScan.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.AbstractMockMetadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.SampleType; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.SampleNode.Type; -import io.prestosql.sql.planner.plan.TableScanNode; +import io.trino.Session; +import io.trino.metadata.AbstractMockMetadata; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.SampleType; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.SampleNode.Type; +import io.trino.sql.planner.plan.TableScanNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; public class TestPushSampleIntoTableScan extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTableWriteThroughUnion.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTableWriteThroughUnion.java index db38c2125ee8..a681c36b3926 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTableWriteThroughUnion.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTableWriteThroughUnion.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableWriter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.union; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableWriter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.union; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestPushTableWriteThroughUnion extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTopNIntoTableScan.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTopNIntoTableScan.java index 7b6081b320ea..ddee27dd379c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTopNIntoTableScan.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTopNIntoTableScan.java @@ -15,22 +15,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.connector.MockConnectorTableHandle; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TopNApplicationResult; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.RuleTester; -import io.prestosql.sql.planner.plan.TopNNode; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.connector.MockConnectorFactory; +import io.trino.connector.MockConnectorTableHandle; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TopNApplicationResult; +import io.trino.spi.predicate.TupleDomain; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.RuleTester; +import io.trino.sql.planner.plan.TopNNode; import org.testng.annotations.Test; import java.util.HashMap; @@ -40,15 +40,15 @@ import static com.google.common.base.Predicates.equalTo; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topN; -import static io.prestosql.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topN; +import static io.trino.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestPushTopNIntoTableScan { diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTopNThroughOuterJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTopNThroughOuterJoin.java index 0ebc2fd14bc0..b3fd292d3b85 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTopNThroughOuterJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTopNThroughOuterJoin.java @@ -14,23 +14,23 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.JoinNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.JoinNode; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topN; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.JoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; -import static io.prestosql.sql.planner.plan.TopNNode.Step.FINAL; -import static io.prestosql.sql.planner.plan.TopNNode.Step.PARTIAL; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.JoinNode.Type.FULL; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.sql.planner.plan.TopNNode.Step.FINAL; +import static io.trino.sql.planner.plan.TopNNode.Step.PARTIAL; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestPushTopNThroughOuterJoin extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTopNThroughProject.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTopNThroughProject.java index fd9df6282205..d5a868ad0319 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTopNThroughProject.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestPushTopNThroughProject.java @@ -15,30 +15,30 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.RowType; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.ExpressionMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.testing.TestingMetadata; +import io.trino.spi.type.RowType; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.ExpressionMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.SymbolReference; +import io.trino.testing.TestingMetadata; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topN; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.ADD; -import static io.prestosql.sql.tree.SortItem.NullOrdering.FIRST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.ADD; +import static io.trino.sql.tree.SortItem.NullOrdering.FIRST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; public class TestPushTopNThroughProject extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveAggregationInSemiJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveAggregationInSemiJoin.java index 8ab48b2f6c13..dbf8d3314ed9 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveAggregationInSemiJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveAggregationInSemiJoin.java @@ -14,18 +14,18 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.PlanNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.semiJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.semiJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestRemoveAggregationInSemiJoin extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveEmptyDelete.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveEmptyDelete.java index a8cf20836091..471f7d9eb295 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveEmptyDelete.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveEmptyDelete.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.plugin.tpch.TpchTransactionHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.BigintType; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.plugin.tpch.TpchTransactionHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.BigintType; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.iterative.rule.test.RuleTester.CONNECTOR_ID; +import static io.trino.sql.planner.iterative.rule.test.RuleTester.CONNECTOR_ID; public class TestRemoveEmptyDelete extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveFullSample.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveFullSample.java index 9a814ab4a66d..2b7f1194ea9f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveFullSample.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveFullSample.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.SampleNode.Type; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.SampleNode.Type; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expressions; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expressions; public class TestRemoveFullSample extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantCrossJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantCrossJoin.java index 539f82223484..8c632cade423 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantCrossJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantCrossJoin.java @@ -13,11 +13,11 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestRemoveRedundantCrossJoin extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantDistinctLimit.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantDistinctLimit.java index 855f3f1c5fff..3ee6cbbb8e47 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantDistinctLimit.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantDistinctLimit.java @@ -14,12 +14,12 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ValuesNode; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; public class TestRemoveRedundantDistinctLimit extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantEnforceSingleRowNode.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantEnforceSingleRowNode.java index 3285413a84a8..5acdf6c448d4 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantEnforceSingleRowNode.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantEnforceSingleRowNode.java @@ -14,14 +14,14 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.AggregationNode; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestRemoveRedundantEnforceSingleRowNode extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantExists.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantExists.java index 5ddca129da65..8d3846fbc805 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantExists.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantExists.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.testing.TestingMetadata; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.SymbolReference; +import io.trino.testing.TestingMetadata; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; public class TestRemoveRedundantExists extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantJoin.java index 66fbbbb207b1..33051323e8ae 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantJoin.java @@ -13,14 +13,14 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.JoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.JoinNode.Type.RIGHT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.JoinNode.Type.FULL; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.JoinNode.Type.RIGHT; public class TestRemoveRedundantJoin extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantLimit.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantLimit.java index 50033bae0c0d..150f87a97837 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantLimit.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantLimit.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ValuesNode; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expressions; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expressions; public class TestRemoveRedundantLimit extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantOffset.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantOffset.java index 86a221d800a7..079ca6b79625 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantOffset.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantOffset.java @@ -14,11 +14,11 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestRemoveRedundantOffset extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantSort.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantSort.java index f52e7706e683..ba0050a06a02 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantSort.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantSort.java @@ -14,14 +14,14 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ValuesNode; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestRemoveRedundantSort extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantTableScanPredicate.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantTableScanPredicate.java index e933da29e975..f68c6e373df7 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantTableScanPredicate.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantTableScanPredicate.java @@ -15,40 +15,40 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.plugin.tpch.TpchTableLayoutHandle; -import io.prestosql.plugin.tpch.TpchTransactionHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.connector.CatalogName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.plugin.tpch.TpchTableLayoutHandle; +import io.trino.plugin.tpch.TpchTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.constrainedTableScanWithTableLayout; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.tree.ArithmeticBinaryExpression.Operator.MODULUS; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.LogicalBinaryExpression.Operator.AND; -import static io.prestosql.sql.tree.LogicalBinaryExpression.Operator.OR; +import static io.trino.spi.predicate.Domain.singleValue; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.planner.assertions.PlanMatchPattern.constrainedTableScanWithTableLayout; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.tree.ArithmeticBinaryExpression.Operator.MODULUS; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.LogicalBinaryExpression.Operator.AND; +import static io.trino.sql.tree.LogicalBinaryExpression.Operator.OR; public class TestRemoveRedundantTableScanPredicate extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantTopN.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantTopN.java index 428c26e2c610..ec63d9139ad8 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantTopN.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveRedundantTopN.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.ValuesNode; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expressions; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expressions; public class TestRemoveRedundantTopN extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveTrivialFilters.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveTrivialFilters.java index 628aa9815fef..22f41b484a29 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveTrivialFilters.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveTrivialFilters.java @@ -14,10 +14,10 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestRemoveTrivialFilters extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveUnreferencedScalarApplyNodes.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveUnreferencedScalarApplyNodes.java index b0f8e0081f9d..59a01edb9cab 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveUnreferencedScalarApplyNodes.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveUnreferencedScalarApplyNodes.java @@ -15,11 +15,11 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestRemoveUnreferencedScalarApplyNodes extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveUnreferencedScalarSubqueries.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveUnreferencedScalarSubqueries.java index a69def45d4dc..16d9ab04ee83 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveUnreferencedScalarSubqueries.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestRemoveUnreferencedScalarSubqueries.java @@ -14,19 +14,19 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.BigintType; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.LongLiteral; +import io.trino.spi.type.BigintType; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.LongLiteral; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.FULL; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; import static java.util.Collections.emptyList; public class TestRemoveUnreferencedScalarSubqueries 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 2dd89ad73fa8..d8595eeb460b 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,24 +15,24 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.cost.CostComparator; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.cost.SymbolStatsEstimate; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.RuleAssert; -import io.prestosql.sql.planner.iterative.rule.test.RuleTester; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.JoinNode.EquiJoinClause; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.cost.CostComparator; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.cost.SymbolStatsEstimate; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; +import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.RuleAssert; +import io.trino.sql.planner.iterative.rule.test.RuleTester; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.JoinNode.EquiJoinClause; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.tree.ArithmeticUnaryExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -40,25 +40,25 @@ import java.util.Optional; import static io.airlift.testing.Closeables.closeAllRuntimeException; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.AUTOMATIC; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictProject; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.PARTITIONED; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.REPLICATED; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.tree.ArithmeticUnaryExpression.Sign.MINUS; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.EQUAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; +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; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictProject; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; +import static io.trino.sql.planner.plan.JoinNode.DistributionType.PARTITIONED; +import static io.trino.sql.planner.plan.JoinNode.DistributionType.REPLICATED; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.tree.ArithmeticUnaryExpression.Sign.MINUS; +import static io.trino.sql.tree.ComparisonExpression.Operator.EQUAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; public class TestReorderJoins { diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestSimplifyExpressions.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestSimplifyExpressions.java index e0edfadd3388..0405184e778a 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestSimplifyExpressions.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestSimplifyExpressions.java @@ -13,19 +13,19 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.LiteralEncoder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.SymbolsExtractor; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.ExpressionRewriter; -import io.prestosql.sql.tree.ExpressionTreeRewriter; -import io.prestosql.sql.tree.LogicalBinaryExpression; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.LiteralEncoder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.SymbolsExtractor; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.ExpressionRewriter; +import io.trino.sql.tree.ExpressionTreeRewriter; +import io.trino.sql.tree.LogicalBinaryExpression; import org.testng.annotations.Test; import java.util.Comparator; @@ -33,17 +33,17 @@ import java.util.Map; import java.util.stream.Collectors; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.sql.ExpressionUtils.binaryExpression; -import static io.prestosql.sql.ExpressionUtils.extractPredicates; -import static io.prestosql.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; -import static io.prestosql.sql.planner.iterative.rule.SimplifyExpressions.rewrite; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.sql.ExpressionUtils.binaryExpression; +import static io.trino.sql.ExpressionUtils.extractPredicates; +import static io.trino.sql.ExpressionUtils.rewriteIdentifiersToSymbolReferences; +import static io.trino.sql.planner.iterative.rule.SimplifyExpressions.rewrite; import static java.util.stream.Collectors.toList; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestSingleDistinctAggregationToGroupBy.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestSingleDistinctAggregationToGroupBy.java index 2b39e19c7b0c..cdca8ff5d703 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestSingleDistinctAggregationToGroupBy.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestSingleDistinctAggregationToGroupBy.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.assertions.ExpectedValueProvider; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.FunctionCall; +import io.trino.sql.planner.assertions.ExpectedValueProvider; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.FunctionCall; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.globalAggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.globalAggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; public class TestSingleDistinctAggregationToGroupBy extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestSwapAdjacentWindowsBySpecifications.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestSwapAdjacentWindowsBySpecifications.java index ed37d5dfd4f0..80a8a3bcd32f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestSwapAdjacentWindowsBySpecifications.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestSwapAdjacentWindowsBySpecifications.java @@ -15,28 +15,28 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.planner.assertions.ExpectedValueProvider; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.metadata.MetadataManager; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.planner.assertions.ExpectedValueProvider; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.WindowFrame; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.specification; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; -import static io.prestosql.sql.tree.FrameBound.Type.CURRENT_ROW; -import static io.prestosql.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.specification; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.tree.FrameBound.Type.CURRENT_ROW; +import static io.trino.sql.tree.FrameBound.Type.UNBOUNDED_PRECEDING; public class TestSwapAdjacentWindowsBySpecifications extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedDistinctAggregationWithProjection.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedDistinctAggregationWithProjection.java index 668042ab982c..a6cea9398267 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedDistinctAggregationWithProjection.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedDistinctAggregationWithProjection.java @@ -15,24 +15,24 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.assignUniqueId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.assignUniqueId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; public class TestTransformCorrelatedDistinctAggregationWithProjection extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedDistinctAggregationWithoutProjection.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedDistinctAggregationWithoutProjection.java index e7ff4957e4e7..39ccc6251ef3 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedDistinctAggregationWithoutProjection.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedDistinctAggregationWithoutProjection.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.CorrelatedJoinNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.assignUniqueId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.assignUniqueId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; public class TestTransformCorrelatedDistinctAggregationWithoutProjection extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGlobalAggregationWithProjection.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGlobalAggregationWithProjection.java index 0ef75765f9c9..2e62fd4ac7a9 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGlobalAggregationWithProjection.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGlobalAggregationWithProjection.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.JoinNode; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.JoinNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.assignUniqueId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.assignUniqueId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; public class TestTransformCorrelatedGlobalAggregationWithProjection extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGlobalAggregationWithoutProjection.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGlobalAggregationWithoutProjection.java index 99b4ce3729c2..543b004dc7f4 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGlobalAggregationWithoutProjection.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGlobalAggregationWithoutProjection.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.JoinNode; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.JoinNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.assignUniqueId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.assignUniqueId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; public class TestTransformCorrelatedGlobalAggregationWithoutProjection extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGroupedAggregationWithProjection.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGroupedAggregationWithProjection.java index 6866067487af..d58083524b38 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGroupedAggregationWithProjection.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGroupedAggregationWithProjection.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.JoinNode; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.JoinNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.assignUniqueId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.assignUniqueId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; public class TestTransformCorrelatedGroupedAggregationWithProjection extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGroupedAggregationWithoutProjection.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGroupedAggregationWithoutProjection.java index c2b9cc39dc8d..b26cd5bf6ce9 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGroupedAggregationWithoutProjection.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedGroupedAggregationWithoutProjection.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.JoinNode; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.JoinNode; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.assignUniqueId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.assignUniqueId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; public class TestTransformCorrelatedGroupedAggregationWithoutProjection extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedJoinToJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedJoinToJoin.java index 485fd75e815f..d1872d4e704a 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedJoinToJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedJoinToJoin.java @@ -14,23 +14,23 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.LongLiteral; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.LongLiteral; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.LESS_THAN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.tree.ComparisonExpression.Operator.LESS_THAN; public class TestTransformCorrelatedJoinToJoin extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedScalarSubquery.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedScalarSubquery.java index 51d11e197215..63f850d23faa 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedScalarSubquery.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedScalarSubquery.java @@ -16,39 +16,39 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.sql.planner.FunctionCallBuilder; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.WhenClause; +import io.trino.spi.StandardErrorCode; +import io.trino.sql.planner.FunctionCallBuilder; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.WhenClause; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureTranslator.toSqlType; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.assignUniqueId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.correlatedJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.markDistinct; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expressions; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureTranslator.toSqlType; +import static io.trino.sql.planner.assertions.PlanMatchPattern.assignUniqueId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.correlatedJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.markDistinct; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expressions; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; public class TestTransformCorrelatedScalarSubquery extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedSingleRowSubqueryToProject.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedSingleRowSubqueryToProject.java index 8cc586ca6fd7..8e13bddd1871 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedSingleRowSubqueryToProject.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformCorrelatedSingleRowSubqueryToProject.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.plugin.tpch.TpchTransactionHandle; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.connector.CatalogName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.plugin.tpch.TpchTransactionHandle; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCALE_FACTOR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCALE_FACTOR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestTransformCorrelatedSingleRowSubqueryToProject extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformExistsApplyToCorrelatedJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformExistsApplyToCorrelatedJoin.java index 5de9c439738d..8ee0cf4a7e64 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformExistsApplyToCorrelatedJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformExistsApplyToCorrelatedJoin.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.FilterNode; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.FilterNode; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.correlatedJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.correlatedJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; public class TestTransformExistsApplyToCorrelatedJoin extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformFilteringSemiJoinToInnerJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformFilteringSemiJoinToInnerJoin.java index 3d57ea2b8889..a144992c9601 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformFilteringSemiJoinToInnerJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformFilteringSemiJoinToInnerJoin.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestTransformFilteringSemiJoinToInnerJoin extends BaseRuleTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformUncorrelatedInPredicateSubqueryToSemiJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformUncorrelatedInPredicateSubqueryToSemiJoin.java index 2993ca047174..aa40e999e355 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformUncorrelatedInPredicateSubqueryToSemiJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformUncorrelatedInPredicateSubqueryToSemiJoin.java @@ -13,17 +13,17 @@ */ package io.trino.sql.planner.iterative.rule; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.SymbolReference; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.SymbolReference; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; import static java.util.Collections.emptyList; public class TestTransformUncorrelatedInPredicateSubqueryToSemiJoin diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformUncorrelatedSubqueryToJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformUncorrelatedSubqueryToJoin.java index a5cc3d5eea88..f2a7844b2f04 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformUncorrelatedSubqueryToJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestTransformUncorrelatedSubqueryToJoin.java @@ -15,24 +15,24 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.assertions.ExpressionMatcher; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.tree.ComparisonExpression; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.assertions.ExpressionMatcher; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.tree.ComparisonExpression; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.FULL; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; -import static io.prestosql.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.sql.tree.ComparisonExpression.Operator.GREATER_THAN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.FULL; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.LEFT; +import static io.trino.sql.planner.plan.CorrelatedJoinNode.Type.RIGHT; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.ComparisonExpression.Operator.GREATER_THAN; import static java.util.Collections.emptyList; public class TestTransformUncorrelatedSubqueryToJoin diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestUnwrapCastInComparison.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestUnwrapCastInComparison.java index 1e5d3ea84c6f..4da8a5441072 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestUnwrapCastInComparison.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestUnwrapCastInComparison.java @@ -19,7 +19,7 @@ import java.time.ZoneId; import java.time.ZoneOffset; -import static io.prestosql.sql.planner.iterative.rule.UnwrapCastInComparison.isTimestampToTimestampWithTimeZoneInjectiveAt; +import static io.trino.sql.planner.iterative.rule.UnwrapCastInComparison.isTimestampToTimestampWithTimeZoneInjectiveAt; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/BaseRuleTest.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/BaseRuleTest.java index 9af9259febbd..69b23c86ae8b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/BaseRuleTest.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/BaseRuleTest.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.Plugin; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.spi.Plugin; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -24,7 +24,7 @@ import java.util.Optional; import static io.airlift.testing.Closeables.closeAllRuntimeException; -import static io.prestosql.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; +import static io.trino.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; public abstract class BaseRuleTest { diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/PlanBuilder.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/PlanBuilder.java index d1d0842fb0b2..7c17963fe1ac 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/PlanBuilder.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/PlanBuilder.java @@ -19,82 +19,82 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.ListMultimap; import com.google.common.collect.Maps; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.IndexHandle; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.ExpressionUtils; -import io.prestosql.sql.analyzer.TypeSignatureProvider; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Partitioning; -import io.prestosql.sql.planner.PartitioningScheme; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TestingConnectorIndexHandle; -import io.prestosql.sql.planner.TestingConnectorTransactionHandle; -import io.prestosql.sql.planner.TestingWriterTarget; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.AggregationNode.Aggregation; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.ApplyNode; -import io.prestosql.sql.planner.plan.AssignUniqueId; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.CorrelatedJoinNode; -import io.prestosql.sql.planner.plan.DeleteNode; -import io.prestosql.sql.planner.plan.DistinctLimitNode; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.EnforceSingleRowNode; -import io.prestosql.sql.planner.plan.ExceptNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.GroupIdNode; -import io.prestosql.sql.planner.plan.IndexJoinNode; -import io.prestosql.sql.planner.plan.IndexSourceNode; -import io.prestosql.sql.planner.plan.IntersectNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.OffsetNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.RowNumberNode; -import io.prestosql.sql.planner.plan.SampleNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.SortNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.StatisticAggregations; -import io.prestosql.sql.planner.plan.StatisticAggregationsDescriptor; -import io.prestosql.sql.planner.plan.TableFinishNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.TableWriterNode; -import io.prestosql.sql.planner.plan.TableWriterNode.DeleteTarget; -import io.prestosql.sql.planner.plan.TopNNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.UnionNode; -import io.prestosql.sql.planner.plan.UnnestNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.planner.plan.WindowNode.Specification; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.Row; -import io.prestosql.testing.TestingHandle; -import io.prestosql.testing.TestingMetadata; -import io.prestosql.testing.TestingMetadata.TestingTableHandle; -import io.prestosql.testing.TestingTransactionHandle; +import io.trino.connector.CatalogName; +import io.trino.metadata.IndexHandle; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.sql.ExpressionUtils; +import io.trino.sql.analyzer.TypeSignatureProvider; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Partitioning; +import io.trino.sql.planner.PartitioningScheme; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TestingConnectorIndexHandle; +import io.trino.sql.planner.TestingConnectorTransactionHandle; +import io.trino.sql.planner.TestingWriterTarget; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.AggregationNode.Aggregation; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.ApplyNode; +import io.trino.sql.planner.plan.AssignUniqueId; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.CorrelatedJoinNode; +import io.trino.sql.planner.plan.DeleteNode; +import io.trino.sql.planner.plan.DistinctLimitNode; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.EnforceSingleRowNode; +import io.trino.sql.planner.plan.ExceptNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.GroupIdNode; +import io.trino.sql.planner.plan.IndexJoinNode; +import io.trino.sql.planner.plan.IndexSourceNode; +import io.trino.sql.planner.plan.IntersectNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.OffsetNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.RowNumberNode; +import io.trino.sql.planner.plan.SampleNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.SortNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.StatisticAggregations; +import io.trino.sql.planner.plan.StatisticAggregationsDescriptor; +import io.trino.sql.planner.plan.TableFinishNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.TableWriterNode; +import io.trino.sql.planner.plan.TableWriterNode.DeleteTarget; +import io.trino.sql.planner.plan.TopNNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.UnionNode; +import io.trino.sql.planner.plan.UnnestNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.planner.plan.WindowNode.Specification; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.Row; +import io.trino.testing.TestingHandle; +import io.trino.testing.TestingMetadata; +import io.trino.testing.TestingMetadata.TestingTableHandle; +import io.trino.testing.TestingTransactionHandle; import java.util.ArrayList; import java.util.Arrays; @@ -111,13 +111,13 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; -import static io.prestosql.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; -import static io.prestosql.util.MoreLists.nElements; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static io.trino.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.util.MoreLists.nElements; import static java.lang.String.format; import static java.util.Collections.emptyList; import static java.util.function.Function.identity; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/RuleAssert.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/RuleAssert.java index 6505ad2deeb4..044c6c53865b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/RuleAssert.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/RuleAssert.java @@ -14,32 +14,32 @@ package io.trino.sql.planner.iterative.rule.test; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.cost.CachingCostProvider; -import io.prestosql.cost.CachingStatsProvider; -import io.prestosql.cost.CostCalculator; -import io.prestosql.cost.CostProvider; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.cost.StatsProvider; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Match; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AccessControl; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.Lookup; -import io.prestosql.sql.planner.iterative.Memo; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.cost.CachingCostProvider; +import io.trino.cost.CachingStatsProvider; +import io.trino.cost.CostCalculator; +import io.trino.cost.CostProvider; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.cost.StatsAndCosts; +import io.trino.cost.StatsCalculator; +import io.trino.cost.StatsProvider; +import io.trino.execution.warnings.WarningCollector; +import io.trino.matching.Capture; +import io.trino.matching.Match; +import io.trino.matching.Pattern; +import io.trino.metadata.Metadata; +import io.trino.security.AccessControl; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.Lookup; +import io.trino.sql.planner.iterative.Memo; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.transaction.TransactionManager; import java.util.HashMap; import java.util.Map; @@ -49,10 +49,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.MoreCollectors.toOptional; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.sql.planner.assertions.PlanAssert.assertPlan; -import static io.prestosql.sql.planner.planprinter.PlanPrinter.textLogicalPlan; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.matching.Capture.newCapture; +import static io.trino.sql.planner.assertions.PlanAssert.assertPlan; +import static io.trino.sql.planner.planprinter.PlanPrinter.textLogicalPlan; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.testng.Assert.fail; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/RuleTester.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/RuleTester.java index 17de291f2b96..d4c11798be31 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/RuleTester.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/RuleTester.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.Metadata; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.security.AccessControl; -import io.prestosql.spi.Plugin; -import io.prestosql.split.PageSourceManager; -import io.prestosql.split.SplitManager; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.Metadata; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.security.AccessControl; +import io.trino.spi.Plugin; +import io.trino.split.PageSourceManager; +import io.trino.split.SplitManager; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.testing.LocalQueryRunner; +import io.trino.transaction.TransactionManager; import java.io.Closeable; import java.util.List; import java.util.Map; import java.util.Optional; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Objects.requireNonNull; public class RuleTester diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/TestRuleTester.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/TestRuleTester.java index fcf7816f3f2a..c9852be6719f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/TestRuleTester.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/TestRuleTester.java @@ -14,27 +14,27 @@ package io.trino.sql.planner.iterative.rule.test; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.spi.connector.TestingColumnHandle; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.iterative.Rule.Context; -import io.prestosql.sql.planner.iterative.Rule.Result; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.testing.TestingTransactionHandle; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.spi.connector.TestingColumnHandle; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.iterative.Rule.Context; +import io.trino.sql.planner.iterative.Rule.Result; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.testing.TestingTransactionHandle; import org.testng.annotations.Test; import java.util.List; import java.util.Map; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.iterative.rule.test.RuleTester.defaultRuleTester; import static java.util.Objects.requireNonNull; import static org.assertj.core.api.Assertions.assertThatThrownBy; 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 76f88476267f..24e1680c624c 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,62 +17,62 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.assertions.RowNumberSymbolMatcher; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.JoinNode.DistributionType; -import io.prestosql.sql.planner.plan.MarkDistinctNode; -import io.prestosql.sql.planner.plan.ValuesNode; -import io.prestosql.testing.LocalQueryRunner; +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; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.JoinNode.DistributionType; +import io.trino.sql.planner.plan.MarkDistinctNode; +import io.trino.sql.planner.plan.ValuesNode; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.IGNORE_DOWNSTREAM_PREFERENCES; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.SystemSessionProperties.SPILL_ENABLED; -import static io.prestosql.SystemSessionProperties.TASK_CONCURRENCY; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.PARTITIONED; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.ELIMINATE_CROSS_JOINS; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.any; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyNot; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.output; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.rowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topN; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPLICATE; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.REPLICATED; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.TopNNode.Step.FINAL; -import static io.prestosql.sql.tree.SortItem.NullOrdering.LAST; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +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; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.output; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.rowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topN; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPLICATE; +import static io.trino.sql.planner.plan.JoinNode.DistributionType.REPLICATED; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.plan.TopNNode.Step.FINAL; +import static io.trino.sql.tree.SortItem.NullOrdering.LAST; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestAddExchangesPlans extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestCardinalityExtractorPlanVisitor.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestCardinalityExtractorPlanVisitor.java index ae5d7f6cf70a..7e44db9fddc7 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestCardinalityExtractorPlanVisitor.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestCardinalityExtractorPlanVisitor.java @@ -17,16 +17,16 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Range; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.TestingColumnHandle; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.AggregationNode; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.TestingColumnHandle; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.AggregationNode; import org.testng.annotations.Test; -import static io.prestosql.metadata.AbstractMockMetadata.dummyMetadata; -import static io.prestosql.sql.planner.optimizations.QueryCardinalityUtil.extractCardinality; +import static io.trino.metadata.AbstractMockMetadata.dummyMetadata; +import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.extractCardinality; import static java.util.Collections.emptyList; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestEliminateCrossJoins.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestEliminateCrossJoins.java index 5e50042ded2b..c59e042f00df 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestEliminateCrossJoins.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestEliminateCrossJoins.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.SystemSessionProperties; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; +import io.trino.SystemSessionProperties; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.PlanMatchPattern; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.strictTableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.strictTableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestEliminateCrossJoins extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestEliminateSorts.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestEliminateSorts.java index 89e973509396..6cbc53e4f90d 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestEliminateSorts.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestEliminateSorts.java @@ -16,29 +16,29 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.ExpectedValueProvider; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.IterativeOptimizer; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; -import io.prestosql.sql.planner.plan.WindowNode; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.ExpectedValueProvider; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.IterativeOptimizer; +import io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; +import io.trino.sql.planner.plan.WindowNode; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.output; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.sort; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.specification; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.output; +import static io.trino.sql.planner.assertions.PlanMatchPattern.sort; +import static io.trino.sql.planner.assertions.PlanMatchPattern.specification; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; public class TestEliminateSorts extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestExpressionEquivalence.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestExpressionEquivalence.java index 426318df507c..c4980a1c5707 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestExpressionEquivalence.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestExpressionEquivalence.java @@ -16,31 +16,31 @@ import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.tree.Expression; -import io.prestosql.transaction.TestingTransactionManager; +import io.trino.metadata.Metadata; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.tree.Expression; +import io.trino.transaction.TestingTransactionManager; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; import java.util.Set; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.ExpressionTestUtils.planExpression; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; -import static io.prestosql.sql.planner.SymbolsExtractor.extractUnique; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.ExpressionTestUtils.planExpression; +import static io.trino.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; +import static io.trino.sql.planner.SymbolsExtractor.extractUnique; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.lang.String.format; import static java.util.function.Function.identity; import static java.util.stream.Collectors.toMap; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestForceSingleNodeOutput.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestForceSingleNodeOutput.java index 649ef526d3fc..49132c8a9872 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestForceSingleNodeOutput.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestForceSingleNodeOutput.java @@ -13,18 +13,18 @@ */ package io.trino.sql.planner.optimizations; -import io.prestosql.Session; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ExchangeNode; +import io.trino.Session; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ExchangeNode; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.FORCE_SINGLE_NODE_OUTPUT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.output; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.SystemSessionProperties.FORCE_SINGLE_NODE_OUTPUT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.output; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; public class TestForceSingleNodeOutput extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestFullOuterJoinWithCoalesce.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestFullOuterJoinWithCoalesce.java index d21361f1e066..856694a9fb3b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestFullOuterJoinWithCoalesce.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestFullOuterJoinWithCoalesce.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.BasePlanTest; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.sql.planner.plan.JoinNode.Type.FULL; +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; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.plan.JoinNode.Type.FULL; public class TestFullOuterJoinWithCoalesce extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestLocalProperties.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestLocalProperties.java index 6f27fefcdfd3..150d27115f77 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestLocalProperties.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestLocalProperties.java @@ -23,13 +23,13 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConstantProperty; -import io.prestosql.spi.connector.GroupingProperty; -import io.prestosql.spi.connector.LocalProperty; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.connector.SortingProperty; -import io.prestosql.testing.TestingMetadata.TestingColumnHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConstantProperty; +import io.trino.spi.connector.GroupingProperty; +import io.trino.spi.connector.LocalProperty; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.connector.SortingProperty; +import io.trino.testing.TestingMetadata.TestingColumnHandle; import org.testng.annotations.Test; import java.io.IOException; @@ -40,8 +40,8 @@ import java.util.Optional; import java.util.function.Function; -import static io.prestosql.sql.planner.optimizations.LocalProperties.extractLeadingConstants; -import static io.prestosql.sql.planner.optimizations.LocalProperties.stripLeadingConstants; +import static io.trino.sql.planner.optimizations.LocalProperties.extractLeadingConstants; +import static io.trino.sql.planner.optimizations.LocalProperties.stripLeadingConstants; import static org.testng.Assert.assertEquals; public class TestLocalProperties diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestMergeWindows.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestMergeWindows.java index 707bd2e4c54b..065847e57e26 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestMergeWindows.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestMergeWindows.java @@ -16,19 +16,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.ExpectedValueProvider; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.IterativeOptimizer; -import io.prestosql.sql.planner.iterative.Rule; -import io.prestosql.sql.planner.iterative.rule.GatherAndMergeWindows; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.ExpectedValueProvider; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.IterativeOptimizer; +import io.trino.sql.planner.iterative.Rule; +import io.trino.sql.planner.iterative.rule.GatherAndMergeWindows; +import io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.WindowFrame; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; @@ -36,17 +36,17 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.any; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyNot; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.specification; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.assertions.PlanMatchPattern.any; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyNot; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.specification; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; public class TestMergeWindows extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestOptimizeMixedDistinctAggregations.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestOptimizeMixedDistinctAggregations.java index 373202c7dd02..53c81183eacc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestOptimizeMixedDistinctAggregations.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestOptimizeMixedDistinctAggregations.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.SystemSessionProperties; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.ExpectedValueProvider; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.IterativeOptimizer; -import io.prestosql.sql.planner.iterative.rule.MultipleDistinctAggregationToMarkDistinct; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; -import io.prestosql.sql.planner.iterative.rule.SingleDistinctAggregationToGroupBy; -import io.prestosql.sql.tree.FunctionCall; +import io.trino.SystemSessionProperties; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.ExpectedValueProvider; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.IterativeOptimizer; +import io.trino.sql.planner.iterative.rule.MultipleDistinctAggregationToMarkDistinct; +import io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; +import io.trino.sql.planner.iterative.rule.SingleDistinctAggregationToGroupBy; +import io.trino.sql.tree.FunctionCall; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; @@ -33,16 +33,16 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anySymbol; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.groupId; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anySymbol; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.groupId; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; public class TestOptimizeMixedDistinctAggregations extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestRemoveUnsupportedDynamicFilters.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestRemoveUnsupportedDynamicFilters.java index 3e6dc2913f86..3749a1b60b77 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestRemoveUnsupportedDynamicFilters.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestRemoveUnsupportedDynamicFilters.java @@ -15,54 +15,54 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.CatalogName; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.PlanAssert; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.RemoveUnsupportedDynamicFilters; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.SpatialJoinNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.sanity.DynamicFiltersChecker; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.testing.TestingTransactionHandle; +import io.trino.connector.CatalogName; +import io.trino.cost.StatsAndCosts; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.PlanAssert; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.RemoveUnsupportedDynamicFilters; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.SpatialJoinNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.sanity.DynamicFiltersChecker; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.SymbolReference; +import io.trino.testing.TestingTransactionHandle; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.DynamicFilters.createDynamicFilterExpression; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.ExpressionUtils.combineDisjuncts; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.output; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.semiJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.spatialJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.DynamicFilters.createDynamicFilterExpression; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.ExpressionUtils.combineDisjuncts; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.output; +import static io.trino.sql.planner.assertions.PlanMatchPattern.semiJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.spatialJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; @Test(singleThreaded = true) // e.g. PlanBuilder is mutable public class TestRemoveUnsupportedDynamicFilters diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestReorderWindows.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestReorderWindows.java index 938ca54f00f6..4c35f4e545fd 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestReorderWindows.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestReorderWindows.java @@ -16,31 +16,31 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.ExpectedValueProvider; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.IterativeOptimizer; -import io.prestosql.sql.planner.iterative.rule.GatherAndMergeWindows; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; -import io.prestosql.sql.planner.plan.WindowNode; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.spi.connector.SortOrder; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.ExpectedValueProvider; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.IterativeOptimizer; +import io.trino.sql.planner.iterative.rule.GatherAndMergeWindows; +import io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; +import io.trino.sql.planner.plan.WindowNode; +import io.trino.sql.tree.WindowFrame; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.specification; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.specification; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; public class TestReorderWindows extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestSetFlattening.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestSetFlattening.java index c435a6987b3b..4c160221d297 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestSetFlattening.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestSetFlattening.java @@ -15,24 +15,24 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.IterativeOptimizer; -import io.prestosql.sql.planner.iterative.rule.MergeExcept; -import io.prestosql.sql.planner.iterative.rule.MergeIntersect; -import io.prestosql.sql.planner.iterative.rule.MergeUnion; -import io.prestosql.sql.planner.iterative.rule.PruneDistinctAggregation; -import io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.IterativeOptimizer; +import io.trino.sql.planner.iterative.rule.MergeExcept; +import io.trino.sql.planner.iterative.rule.MergeIntersect; +import io.trino.sql.planner.iterative.rule.MergeUnion; +import io.trino.sql.planner.iterative.rule.PruneDistinctAggregation; +import io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections; import org.testng.annotations.Test; import java.util.List; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.except; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.intersect; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.union; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.except; +import static io.trino.sql.planner.assertions.PlanMatchPattern.intersect; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.union; public class TestSetFlattening extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestUnion.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestUnion.java index f4080cd5bb32..b0d15c67e3b2 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestUnion.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestUnion.java @@ -14,23 +14,23 @@ package io.trino.sql.planner.optimizations; import com.google.common.collect.Iterables; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TopNNode; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TopNNode; import org.testng.annotations.Test; import java.util.List; import java.util.Map; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; import static java.util.stream.Collectors.toList; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; 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 0b06d82a8bd6..0b71315541fc 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.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.sql.analyzer.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 3fdf72ec7142..bf0896d5e47e 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,40 +15,40 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.planner.assertions.BasePlanTest; +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.prestosql.SystemSessionProperties.FORCE_SINGLE_NODE_OUTPUT; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_LAST; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.ELIMINATE_CROSS_JOINS; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.rowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.specification; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topNRowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.window; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.FINAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.GATHER; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPLICATE; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.PARTITIONED; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.REPLICATED; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +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; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.rowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.singleGroupingSet; +import static io.trino.sql.planner.assertions.PlanMatchPattern.specification; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topNRowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.window; +import static io.trino.sql.planner.plan.AggregationNode.Step.FINAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.GATHER; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPLICATE; +import static io.trino.sql.planner.plan.JoinNode.DistributionType.PARTITIONED; +import static io.trino.sql.planner.plan.JoinNode.DistributionType.REPLICATED; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestWindow extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestWindowFilterPushDown.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestWindowFilterPushDown.java index ece1c9dc0942..329d64706e82 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestWindowFilterPushDown.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestWindowFilterPushDown.java @@ -15,31 +15,31 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.assertions.RowNumberSymbolMatcher; -import io.prestosql.sql.planner.assertions.TopNRowNumberSymbolMatcher; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.TopNRowNumberNode; -import io.prestosql.sql.planner.plan.WindowNode; +import io.trino.Session; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.assertions.RowNumberSymbolMatcher; +import io.trino.sql.planner.assertions.TopNRowNumberSymbolMatcher; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.TopNRowNumberNode; +import io.trino.sql.planner.plan.WindowNode; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.SystemSessionProperties.OPTIMIZE_TOP_N_ROW_NUMBER; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_LAST; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.any; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyNot; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.limit; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.output; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.rowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.topNRowNumber; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.SystemSessionProperties.OPTIMIZE_TOP_N_ROW_NUMBER; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_LAST; +import static io.trino.sql.planner.assertions.PlanMatchPattern.any; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyNot; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.limit; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.output; +import static io.trino.sql.planner.assertions.PlanMatchPattern.rowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.topNRowNumber; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestWindowFilterPushDown extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/plan/TestAssingments.java b/core/trino-main/src/test/java/io/trino/sql/planner/plan/TestAssingments.java index f300925793aa..969036ddc6ee 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/plan/TestAssingments.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/plan/TestAssingments.java @@ -14,10 +14,10 @@ package io.trino.sql.planner.plan; import com.google.common.collect.ImmutableCollection; -import io.prestosql.sql.planner.Symbol; +import io.trino.sql.planner.Symbol; import org.testng.annotations.Test; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static org.testng.Assert.assertTrue; public class TestAssingments diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/plan/TestStatisticAggregationsDescriptor.java b/core/trino-main/src/test/java/io/trino/sql/planner/plan/TestStatisticAggregationsDescriptor.java index 8f14d045e092..42a53a40bc1f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/plan/TestStatisticAggregationsDescriptor.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/plan/TestStatisticAggregationsDescriptor.java @@ -16,17 +16,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.reflect.TypeToken; import io.airlift.json.JsonCodec; -import io.prestosql.spi.statistics.ColumnStatisticMetadata; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; +import io.trino.spi.statistics.ColumnStatisticMetadata; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; import org.testng.annotations.Test; -import static io.prestosql.spi.statistics.TableStatisticType.ROW_COUNT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.plan.StatisticAggregationsDescriptor.ColumnStatisticMetadataKeyDeserializer.deserialize; -import static io.prestosql.sql.planner.plan.StatisticAggregationsDescriptor.ColumnStatisticMetadataKeySerializer.serialize; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.spi.statistics.TableStatisticType.ROW_COUNT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.plan.StatisticAggregationsDescriptor.ColumnStatisticMetadataKeyDeserializer.deserialize; +import static io.trino.sql.planner.plan.StatisticAggregationsDescriptor.ColumnStatisticMetadataKeySerializer.serialize; +import static io.trino.testing.assertions.Assert.assertEquals; public class TestStatisticAggregationsDescriptor { diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/plan/TestWindowNode.java b/core/trino-main/src/test/java/io/trino/sql/planner/plan/TestWindowNode.java index 4022581988c2..4dd89cdc5791 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/plan/TestWindowNode.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/plan/TestWindowNode.java @@ -19,26 +19,26 @@ import com.google.common.collect.ImmutableSet; import io.airlift.json.ObjectMapperProvider; import io.airlift.slice.Slice; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.server.ExpressionSerialization.ExpressionDeserializer; -import io.prestosql.server.ExpressionSerialization.ExpressionSerializer; -import io.prestosql.server.SliceSerialization.SliceDeserializer; -import io.prestosql.server.SliceSerialization.SliceSerializer; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.OrderingScheme; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.WindowFrame; -import io.prestosql.type.TypeDeserializer; -import io.prestosql.type.TypeSignatureDeserializer; -import io.prestosql.type.TypeSignatureKeyDeserializer; +import io.trino.metadata.MetadataManager; +import io.trino.metadata.ResolvedFunction; +import io.trino.server.ExpressionSerialization.ExpressionDeserializer; +import io.trino.server.ExpressionSerialization.ExpressionSerializer; +import io.trino.server.SliceSerialization.SliceDeserializer; +import io.trino.server.SliceSerialization.SliceSerializer; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.OrderingScheme; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.WindowFrame; +import io.trino.type.TypeDeserializer; +import io.trino.type.TypeSignatureDeserializer; +import io.trino.type.TypeSignatureKeyDeserializer; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -47,9 +47,9 @@ import java.util.Set; import java.util.UUID; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static org.testng.Assert.assertEquals; public class TestWindowNode diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/planprinter/TestWindowOperatorStats.java b/core/trino-main/src/test/java/io/trino/sql/planner/planprinter/TestWindowOperatorStats.java index 43dda05ef0a7..150c3759435f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/planprinter/TestWindowOperatorStats.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/planprinter/TestWindowOperatorStats.java @@ -13,7 +13,7 @@ */ package io.trino.sql.planner.planprinter; -import io.prestosql.operator.WindowInfo; +import io.trino.operator.WindowInfo; import org.testng.annotations.Test; import static java.util.Collections.emptyList; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestDynamicFiltersChecker.java b/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestDynamicFiltersChecker.java index 8556245f195a..2851e92bd1cf 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestDynamicFiltersChecker.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestDynamicFiltersChecker.java @@ -16,36 +16,36 @@ import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.DynamicFilterId; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.testing.TestingTransactionHandle; +import io.trino.connector.CatalogName; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.DynamicFilterId; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.testing.TestingTransactionHandle; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.DynamicFilters.createDynamicFilterExpression; -import static io.prestosql.sql.ExpressionUtils.combineConjuncts; -import static io.prestosql.sql.ExpressionUtils.combineDisjuncts; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.DynamicFilters.createDynamicFilterExpression; +import static io.trino.sql.ExpressionUtils.combineConjuncts; +import static io.trino.sql.ExpressionUtils.combineDisjuncts; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestDynamicFiltersChecker extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestValidateAggregationsWithDefaultValues.java b/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestValidateAggregationsWithDefaultValues.java index d8ebf835f460..b46a791d7c48 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestValidateAggregationsWithDefaultValues.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestValidateAggregationsWithDefaultValues.java @@ -16,36 +16,36 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.testing.TestingTransactionHandle; +import io.trino.connector.CatalogName; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.testing.TestingTransactionHandle; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.FINAL; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.AggregationNode.groupingSets; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.LOCAL; -import static io.prestosql.sql.planner.plan.ExchangeNode.Scope.REMOTE; -import static io.prestosql.sql.planner.plan.ExchangeNode.Type.REPARTITION; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.plan.AggregationNode.Step.FINAL; +import static io.trino.sql.planner.plan.AggregationNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.AggregationNode.groupingSets; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.LOCAL; +import static io.trino.sql.planner.plan.ExchangeNode.Scope.REMOTE; +import static io.trino.sql.planner.plan.ExchangeNode.Type.REPARTITION; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestValidateAggregationsWithDefaultValues extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestValidateStreamingAggregations.java b/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestValidateStreamingAggregations.java index a94f6b450f18..732bc24c980d 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestValidateStreamingAggregations.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestValidateStreamingAggregations.java @@ -15,28 +15,28 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.plugin.tpch.TpchTransactionHandle; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.PlanNode; +import io.trino.connector.CatalogName; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.metadata.TableHandle; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.plugin.tpch.TpchTransactionHandle; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.PlanNode; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Optional; import java.util.function.Function; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; public class TestValidateStreamingAggregations extends BasePlanTest diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestVerifyOnlyOneOutputNode.java b/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestVerifyOnlyOneOutputNode.java index 1b861d9329fb..f7ab0be2786b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestVerifyOnlyOneOutputNode.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/sanity/TestVerifyOnlyOneOutputNode.java @@ -14,16 +14,16 @@ package io.trino.sql.planner.sanity; import com.google.common.collect.ImmutableList; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.PlanNodeIdAllocator; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.planner.plan.ExplainAnalyzeNode; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.execution.warnings.WarningCollector; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.PlanNodeIdAllocator; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.planner.plan.ExplainAnalyzeNode; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.ValuesNode; import org.testng.annotations.Test; public class TestVerifyOnlyOneOutputNode diff --git a/core/trino-main/src/test/java/io/trino/sql/query/QueryAssertions.java b/core/trino-main/src/test/java/io/trino/sql/query/QueryAssertions.java index cb661db0fcf9..6f6f4b0d201c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/QueryAssertions.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/QueryAssertions.java @@ -13,23 +13,23 @@ */ package io.trino.sql.query; -import io.prestosql.Session; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimeWithTimeZone; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.assertions.PlanAssert; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.plan.PlanNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.execution.warnings.WarningCollector; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimeWithTimeZone; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.assertions.PlanAssert; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.plan.PlanNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; import org.assertj.core.api.AbstractAssert; import org.assertj.core.api.AssertProvider; import org.assertj.core.api.ListAssert; @@ -45,11 +45,11 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.testing.Assertions.assertEqualsIgnoreOrder; -import static io.prestosql.sql.planner.assertions.PlanAssert.assertPlan; -import static io.prestosql.sql.query.QueryAssertions.ExpressionAssert.newExpressionAssert; -import static io.prestosql.sql.query.QueryAssertions.QueryAssert.newQueryAssert; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.sql.planner.assertions.PlanAssert.assertPlan; +import static io.trino.sql.query.QueryAssertions.ExpressionAssert.newExpressionAssert; +import static io.trino.sql.query.QueryAssertions.QueryAssert.newQueryAssert; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.util.Objects.requireNonNull; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/sql/query/TestColumnMask.java b/core/trino-main/src/test/java/io/trino/sql/query/TestColumnMask.java index 3819878713ff..3b6a0a18b620 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestColumnMask.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestColumnMask.java @@ -15,28 +15,28 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.TestingAccessControlManager; +import io.trino.Session; +import io.trino.connector.MockConnectorFactory; +import io.trino.metadata.QualifiedObjectName; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.Identity; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.VarcharType; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.TestingAccessControlManager; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SELECT_COLUMN; -import static io.prestosql.testing.TestingAccessControlManager.privilege; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SELECT_COLUMN; +import static io.trino.testing.TestingAccessControlManager.privilege; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-main/src/test/java/io/trino/sql/query/TestDistinctAggregationsNoMarkDistinct.java b/core/trino-main/src/test/java/io/trino/sql/query/TestDistinctAggregationsNoMarkDistinct.java index d807fbe43f46..627d20b28f7f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestDistinctAggregationsNoMarkDistinct.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestDistinctAggregationsNoMarkDistinct.java @@ -15,8 +15,8 @@ import org.testng.annotations.BeforeClass; -import static io.prestosql.SystemSessionProperties.USE_MARK_DISTINCT; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.USE_MARK_DISTINCT; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestDistinctAggregationsNoMarkDistinct extends TestDistinctAggregations diff --git a/core/trino-main/src/test/java/io/trino/sql/query/TestExecute.java b/core/trino-main/src/test/java/io/trino/sql/query/TestExecute.java index 2296f572c331..4f9a9e02684b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestExecute.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestExecute.java @@ -13,7 +13,7 @@ */ package io.trino.sql.query; -import io.prestosql.Session; +import io.trino.Session; 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/query/TestFilteredAggregations.java b/core/trino-main/src/test/java/io/trino/sql/query/TestFilteredAggregations.java index 229af9270ff4..8710f7f87483 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestFilteredAggregations.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestFilteredAggregations.java @@ -14,18 +14,18 @@ package io.trino.sql.query; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.plan.FilterNode; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.plan.FilterNode; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; -import static io.prestosql.util.MorePredicates.isInstanceOfAny; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.util.MorePredicates.isInstanceOfAny; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertFalse; diff --git a/core/trino-main/src/test/java/io/trino/sql/query/TestPrecomputedHashes.java b/core/trino-main/src/test/java/io/trino/sql/query/TestPrecomputedHashes.java index ef8f076ff047..dc9f5622a2d7 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestPrecomputedHashes.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestPrecomputedHashes.java @@ -13,13 +13,13 @@ */ package io.trino.sql.query; -import io.prestosql.Session; +import io.trino.Session; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.OPTIMIZE_HASH_GENERATION; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.OPTIMIZE_HASH_GENERATION; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; public class TestPrecomputedHashes diff --git a/core/trino-main/src/test/java/io/trino/sql/query/TestRecursiveCte.java b/core/trino-main/src/test/java/io/trino/sql/query/TestRecursiveCte.java index 98247b9269dc..a249b270109b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestRecursiveCte.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestRecursiveCte.java @@ -17,7 +17,7 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.getMaxRecursionDepth; +import static io.trino.SystemSessionProperties.getMaxRecursionDepth; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-main/src/test/java/io/trino/sql/query/TestRowFilter.java b/core/trino-main/src/test/java/io/trino/sql/query/TestRowFilter.java index 57f4903c67ed..4244de30253d 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestRowFilter.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestRowFilter.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.TestingAccessControlManager; +import io.trino.Session; +import io.trino.connector.MockConnectorFactory; +import io.trino.metadata.QualifiedObjectName; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.Identity; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.VarcharType; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.TestingAccessControlManager; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-main/src/test/java/io/trino/sql/query/TestSelectAll.java b/core/trino-main/src/test/java/io/trino/sql/query/TestSelectAll.java index 5a1be5719cd1..a8a2aa50a27f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestSelectAll.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestSelectAll.java @@ -13,7 +13,7 @@ */ package io.trino.sql.query; -import io.prestosql.testing.MaterializedResult; +import io.trino.testing.MaterializedResult; 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/query/TestSessionFunctions.java b/core/trino-main/src/test/java/io/trino/sql/query/TestSessionFunctions.java index 4cb35c23afaa..f6caa42e09c5 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestSessionFunctions.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestSessionFunctions.java @@ -13,14 +13,14 @@ */ package io.trino.sql.query; -import io.prestosql.Session; -import io.prestosql.spi.security.Identity; -import io.prestosql.sql.SqlPath; +import io.trino.Session; +import io.trino.spi.security.Identity; +import io.trino.sql.SqlPath; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; public class TestSessionFunctions diff --git a/core/trino-main/src/test/java/io/trino/sql/query/TestShowQueries.java b/core/trino-main/src/test/java/io/trino/sql/query/TestShowQueries.java index 05ab0d8fd2d2..0f48e45eb9a0 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestShowQueries.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestShowQueries.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.connector.MockConnectorFactory; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/sql/query/TestSubqueries.java b/core/trino-main/src/test/java/io/trino/sql/query/TestSubqueries.java index d2cddd2ea90c..8ac3dea880fc 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestSubqueries.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestSubqueries.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.JoinNode; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.node; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.FINAL; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.PARTIAL; -import static io.prestosql.sql.planner.plan.AggregationNode.Step.SINGLE; +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.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.node; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.AggregationNode.Step.FINAL; +import static io.trino.sql.planner.plan.AggregationNode.Step.PARTIAL; +import static io.trino.sql.planner.plan.AggregationNode.Step.SINGLE; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-main/src/test/java/io/trino/sql/query/TestTDigestFunctions.java b/core/trino-main/src/test/java/io/trino/sql/query/TestTDigestFunctions.java index 314286e7635e..d22648a3e158 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestTDigestFunctions.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestTDigestFunctions.java @@ -13,7 +13,7 @@ */ package io.trino.sql.query; -import io.prestosql.testing.MaterializedResult; +import io.trino.testing.MaterializedResult; 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/query/TestUnwrapCastInComparison.java b/core/trino-main/src/test/java/io/trino/sql/query/TestUnwrapCastInComparison.java index c4af5657c4fa..7dfd5a407189 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestUnwrapCastInComparison.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestUnwrapCastInComparison.java @@ -14,8 +14,8 @@ package io.trino.sql.query; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.Session; +import io.trino.spi.type.TimeZoneKey; 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/query/TestWith.java b/core/trino-main/src/test/java/io/trino/sql/query/TestWith.java index 078ebee815ad..4ad20892910c 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestWith.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestWith.java @@ -14,15 +14,15 @@ package io.trino.sql.query; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/trino-main/src/test/java/io/trino/sql/relational/TestDeterminismEvaluator.java b/core/trino-main/src/test/java/io/trino/sql/relational/TestDeterminismEvaluator.java index 1aecb2681973..1ec3d01635cb 100644 --- a/core/trino-main/src/test/java/io/trino/sql/relational/TestDeterminismEvaluator.java +++ b/core/trino-main/src/test/java/io/trino/sql/relational/TestDeterminismEvaluator.java @@ -14,17 +14,17 @@ package io.trino.sql.relational; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.ResolvedFunction; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.metadata.Metadata; +import io.trino.metadata.ResolvedFunction; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; import static java.util.Collections.singletonList; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/tests/BogusType.java b/core/trino-main/src/test/java/io/trino/tests/BogusType.java index b945403142ea..1c371de6c53c 100644 --- a/core/trino-main/src/test/java/io/trino/tests/BogusType.java +++ b/core/trino-main/src/test/java/io/trino/tests/BogusType.java @@ -13,10 +13,10 @@ */ package io.trino.tests; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractLongType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractLongType; +import io.trino.spi.type.TypeSignature; public final class BogusType extends AbstractLongType diff --git a/core/trino-main/src/test/java/io/trino/transaction/TestTransactionManager.java b/core/trino-main/src/test/java/io/trino/transaction/TestTransactionManager.java index 4dbcf01d1f60..9d46d6bbe757 100644 --- a/core/trino-main/src/test/java/io/trino/transaction/TestTransactionManager.java +++ b/core/trino-main/src/test/java/io/trino/transaction/TestTransactionManager.java @@ -16,19 +16,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.units.Duration; -import io.prestosql.connector.CatalogName; -import io.prestosql.connector.informationschema.InformationSchemaConnector; -import io.prestosql.connector.system.SystemConnector; -import io.prestosql.metadata.Catalog; -import io.prestosql.metadata.CatalogManager; -import io.prestosql.metadata.InMemoryNodeManager; -import io.prestosql.metadata.InternalNodeManager; -import io.prestosql.metadata.Metadata; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.connector.CatalogName; +import io.trino.connector.informationschema.InformationSchemaConnector; +import io.trino.connector.system.SystemConnector; +import io.trino.metadata.Catalog; +import io.trino.metadata.CatalogManager; +import io.trino.metadata.InMemoryNodeManager; +import io.trino.metadata.InternalNodeManager; +import io.trino.metadata.Metadata; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -39,13 +39,13 @@ import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.connector.CatalogName.createInformationSchemaCatalogName; -import static io.prestosql.connector.CatalogName.createSystemTablesCatalogName; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.StandardErrorCode.TRANSACTION_ALREADY_ABORTED; -import static io.prestosql.testing.assertions.Assert.assertEventually; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.connector.CatalogName.createInformationSchemaCatalogName; +import static io.trino.connector.CatalogName.createSystemTablesCatalogName; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.StandardErrorCode.TRANSACTION_ALREADY_ABORTED; +import static io.trino.testing.assertions.Assert.assertEventually; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/trino-main/src/test/java/io/trino/transaction/TestingTransactionManager.java b/core/trino-main/src/test/java/io/trino/transaction/TestingTransactionManager.java index 315a030b3d7b..076dc4ca86d3 100644 --- a/core/trino-main/src/test/java/io/trino/transaction/TestingTransactionManager.java +++ b/core/trino-main/src/test/java/io/trino/transaction/TestingTransactionManager.java @@ -18,10 +18,10 @@ import com.google.common.collect.ImmutableMap; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.Duration; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.CatalogMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.connector.CatalogName; +import io.trino.metadata.CatalogMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import org.joda.time.DateTime; import java.util.List; diff --git a/core/trino-main/src/test/java/io/trino/type/AbstractTestType.java b/core/trino-main/src/test/java/io/trino/type/AbstractTestType.java index 97945a73a3ab..a71f4d7a386b 100644 --- a/core/trino-main/src/test/java/io/trino/type/AbstractTestType.java +++ b/core/trino-main/src/test/java/io/trino/type/AbstractTestType.java @@ -18,18 +18,18 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; -import io.prestosql.type.BlockTypeOperators.BlockPositionIsDistinctFrom; -import io.prestosql.type.BlockTypeOperators.BlockPositionXxHash64; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.type.BlockTypeOperators.BlockPositionIsDistinctFrom; +import io.trino.type.BlockTypeOperators.BlockPositionXxHash64; import org.testng.annotations.Test; import java.util.List; @@ -40,21 +40,21 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.block.BlockSerdeUtil.writeBlock; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.OperatorAssertion.toRow; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_LAST; -import static io.prestosql.spi.connector.SortOrder.DESC_NULLS_FIRST; -import static io.prestosql.spi.connector.SortOrder.DESC_NULLS_LAST; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.util.StructuralTestUtil.arrayBlockOf; -import static io.prestosql.util.StructuralTestUtil.mapBlockOf; +import static io.trino.block.BlockSerdeUtil.writeBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.OperatorAssertion.toRow; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_LAST; +import static io.trino.spi.connector.SortOrder.DESC_NULLS_FIRST; +import static io.trino.spi.connector.SortOrder.DESC_NULLS_LAST; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.util.StructuralTestUtil.arrayBlockOf; +import static io.trino.util.StructuralTestUtil.mapBlockOf; import static java.util.Collections.unmodifiableSortedMap; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/type/BenchmarkDecimalOperators.java b/core/trino-main/src/test/java/io/trino/type/BenchmarkDecimalOperators.java index 5b49d9ec4a03..2542de52200d 100644 --- a/core/trino-main/src/test/java/io/trino/type/BenchmarkDecimalOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/BenchmarkDecimalOperators.java @@ -14,25 +14,25 @@ package io.trino.type; import com.google.common.collect.ImmutableList; -import io.prestosql.RowPagesBuilder; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.relational.SqlToRowExpressionTranslator; -import io.prestosql.sql.tree.Expression; +import io.trino.RowPagesBuilder; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.project.PageProcessor; +import io.trino.spi.Page; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.relational.SqlToRowExpressionTranslator; +import io.trino.sql.tree.Expression; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Measurement; @@ -59,15 +59,15 @@ import java.util.concurrent.TimeUnit; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.ExpressionTestUtils.createExpression; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.ExpressionTestUtils.createExpression; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.lang.String.format; import static java.math.BigInteger.ONE; import static java.math.BigInteger.ZERO; diff --git a/core/trino-main/src/test/java/io/trino/type/TestArrayOperators.java b/core/trino-main/src/test/java/io/trino/type/TestArrayOperators.java index 66eed1d70ce9..e2b1494a7e97 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestArrayOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestArrayOperators.java @@ -19,16 +19,16 @@ import com.google.common.primitives.Ints; import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.block.Block; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.StandardTypes; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -41,33 +41,33 @@ import java.util.TimeZone; import java.util.concurrent.TimeUnit; -import static io.prestosql.block.BlockSerdeUtil.writeBlock; -import static io.prestosql.operator.aggregation.TypedSet.MAX_FUNCTION_MEMORY; -import static io.prestosql.spi.StandardErrorCode.AMBIGUOUS_FUNCTION_CALL; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_FUNCTION_MEMORY_LIMIT; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.StructuralTestUtil.arrayBlockOf; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.block.BlockSerdeUtil.writeBlock; +import static io.trino.operator.aggregation.TypedSet.MAX_FUNCTION_MEMORY; +import static io.trino.spi.StandardErrorCode.AMBIGUOUS_FUNCTION_CALL; +import static io.trino.spi.StandardErrorCode.EXCEEDED_FUNCTION_MEMORY_LIMIT; +import static io.trino.spi.StandardErrorCode.FUNCTION_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.type.JsonType.JSON; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.StructuralTestUtil.arrayBlockOf; +import static io.trino.util.StructuralTestUtil.mapType; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.NaN; import static java.lang.Double.POSITIVE_INFINITY; diff --git a/core/trino-main/src/test/java/io/trino/type/TestBigintArrayType.java b/core/trino-main/src/test/java/io/trino/type/TestBigintArrayType.java index cd9b8ffdf31c..efeb21737e0e 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestBigintArrayType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestBigintArrayType.java @@ -13,17 +13,17 @@ */ package io.trino.type; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.metadata.Metadata; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.util.StructuralTestUtil.arrayBlockOf; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.util.StructuralTestUtil.arrayBlockOf; public class TestBigintArrayType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestBigintOperators.java b/core/trino-main/src/test/java/io/trino/type/TestBigintOperators.java index 2d3abd7b2fab..8384a898ba44 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestBigintOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestBigintOperators.java @@ -13,15 +13,15 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; public class TestBigintOperators diff --git a/core/trino-main/src/test/java/io/trino/type/TestBigintType.java b/core/trino-main/src/test/java/io/trino/type/TestBigintType.java index 16d35c3a489d..451c897c06be 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestBigintType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestBigintType.java @@ -13,10 +13,10 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestBigintType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestBigintVarcharMapType.java b/core/trino-main/src/test/java/io/trino/type/TestBigintVarcharMapType.java index 586665dbc787..2df0d7b72c03 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestBigintVarcharMapType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestBigintVarcharMapType.java @@ -14,16 +14,16 @@ package io.trino.type; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.Map; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.StructuralTestUtil.mapBlockOf; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.StructuralTestUtil.mapBlockOf; +import static io.trino.util.StructuralTestUtil.mapType; public class TestBigintVarcharMapType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestBooleanOperators.java b/core/trino-main/src/test/java/io/trino/type/TestBooleanOperators.java index b3632d06abb1..550d75ad01fc 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestBooleanOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestBooleanOperators.java @@ -13,13 +13,13 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestBooleanOperators extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/type/TestBooleanType.java b/core/trino-main/src/test/java/io/trino/type/TestBooleanType.java index 06d8e43c5b91..d4b76679df20 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestBooleanType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestBooleanType.java @@ -13,10 +13,10 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BooleanType.BOOLEAN; public class TestBooleanType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestCastDependencies.java b/core/trino-main/src/test/java/io/trino/type/TestCastDependencies.java index f23c68568425..0ce37fccf2a8 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestCastDependencies.java +++ b/core/trino-main/src/test/java/io/trino/type/TestCastDependencies.java @@ -14,29 +14,29 @@ package io.trino.type; import io.airlift.slice.Slice; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.CastDependency; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.OperatorDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.PrestoException; +import io.trino.spi.function.CastDependency; +import io.trino.spi.function.Convention; +import io.trino.spi.function.OperatorDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.StandardTypes; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.lang.invoke.MethodHandle; import static com.google.common.base.Throwables.throwIfInstanceOf; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestCastDependencies extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/type/TestCharOperators.java b/core/trino-main/src/test/java/io/trino/type/TestCharOperators.java index b10a29d5d3b5..4c339366c97f 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestCharOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestCharOperators.java @@ -13,11 +13,11 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BooleanType.BOOLEAN; public class TestCharOperators extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/type/TestCharParametricType.java b/core/trino-main/src/test/java/io/trino/type/TestCharParametricType.java index d68ca5c72261..1ff00cfeb5c7 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestCharParametricType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestCharParametricType.java @@ -13,10 +13,10 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; -import static io.prestosql.spi.type.CharType.createCharType; +import static io.trino.spi.type.CharType.createCharType; public class TestCharParametricType extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/type/TestCharType.java b/core/trino-main/src/test/java/io/trino/type/TestCharType.java index 94e3935745b3..cc2abea934d8 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestCharType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestCharType.java @@ -16,15 +16,15 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.CharType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.CharType; import org.testng.annotations.Test; import static io.airlift.slice.SliceUtf8.codePointToUtf8; import static io.airlift.slice.Slices.EMPTY_SLICE; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.lang.Character.MAX_CODE_POINT; import static java.lang.Character.MIN_SUPPLEMENTARY_CODE_POINT; import static java.lang.Character.isSupplementaryCodePoint; diff --git a/core/trino-main/src/test/java/io/trino/type/TestCharacterStringCasts.java b/core/trino-main/src/test/java/io/trino/type/TestCharacterStringCasts.java index 41ce149824b7..1e6870046677 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestCharacterStringCasts.java +++ b/core/trino-main/src/test/java/io/trino/type/TestCharacterStringCasts.java @@ -13,14 +13,14 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.operator.scalar.CharacterStringCasts.varcharToCharSaturatedFloorCast; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.operator.scalar.CharacterStringCasts.varcharToCharSaturatedFloorCast; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; import static org.testng.Assert.assertEquals; public class TestCharacterStringCasts diff --git a/core/trino-main/src/test/java/io/trino/type/TestColorArrayType.java b/core/trino-main/src/test/java/io/trino/type/TestColorArrayType.java index 9d8d4f334c7e..4725f62ff3d5 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestColorArrayType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestColorArrayType.java @@ -13,17 +13,17 @@ */ package io.trino.type; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.metadata.Metadata; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.type.ColorType.COLOR; -import static io.prestosql.util.StructuralTestUtil.arrayBlockOf; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.type.ColorType.COLOR; +import static io.trino.util.StructuralTestUtil.arrayBlockOf; public class TestColorArrayType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestColorType.java b/core/trino-main/src/test/java/io/trino/type/TestColorType.java index 62ca339fe314..8e493e8c97a5 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestColorType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestColorType.java @@ -13,11 +13,11 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; -import static io.prestosql.operator.scalar.ColorFunctions.rgb; -import static io.prestosql.type.ColorType.COLOR; +import static io.trino.operator.scalar.ColorFunctions.rgb; +import static io.trino.type.ColorType.COLOR; public class TestColorType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestConventionDependencies.java b/core/trino-main/src/test/java/io/trino/type/TestConventionDependencies.java index 90f50e7a5d80..0e36aad99df5 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestConventionDependencies.java +++ b/core/trino-main/src/test/java/io/trino/type/TestConventionDependencies.java @@ -13,27 +13,27 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.FunctionDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.Convention; +import io.trino.spi.function.FunctionDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.lang.invoke.MethodHandle; import static com.google.common.base.Throwables.throwIfInstanceOf; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.IntegerType.INTEGER; public class TestConventionDependencies extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/type/TestDate.java b/core/trino-main/src/test/java/io/trino/type/TestDate.java index 746eb929240f..249a20b6c305 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestDate.java +++ b/core/trino-main/src/test/java/io/trino/type/TestDate.java @@ -13,26 +13,26 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.testng.annotations.Test; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.util.DateTimeZoneIndex.getDateTimeZone; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.util.DateTimeZoneIndex.getDateTimeZone; import static org.joda.time.DateTimeZone.UTC; public class TestDate diff --git a/core/trino-main/src/test/java/io/trino/type/TestDateTimeOperators.java b/core/trino-main/src/test/java/io/trino/type/TestDateTimeOperators.java index c19dc6cbedd8..e2a07063083d 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestDateTimeOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestDateTimeOperators.java @@ -13,27 +13,27 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.testng.annotations.Test; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.joda.time.DateTimeZone.UTC; public class TestDateTimeOperators diff --git a/core/trino-main/src/test/java/io/trino/type/TestDateType.java b/core/trino-main/src/test/java/io/trino/type/TestDateType.java index 845d09b51451..d1c344cba340 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestDateType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestDateType.java @@ -13,11 +13,11 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.SqlDate; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.SqlDate; -import static io.prestosql.spi.type.DateType.DATE; +import static io.trino.spi.type.DateType.DATE; public class TestDateType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestDecimalCasts.java b/core/trino-main/src/test/java/io/trino/type/TestDecimalCasts.java index f207c9c52235..d1e84ee4e5f1 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestDecimalCasts.java +++ b/core/trino-main/src/test/java/io/trino/type/TestDecimalCasts.java @@ -13,17 +13,17 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestDecimalCasts extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/type/TestDecimalOperators.java b/core/trino-main/src/test/java/io/trino/type/TestDecimalOperators.java index b179dbb30872..6629d6da68e8 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestDecimalOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestDecimalOperators.java @@ -13,14 +13,14 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DecimalType.createDecimalType; public class TestDecimalOperators extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/type/TestDecimalParametricType.java b/core/trino-main/src/test/java/io/trino/type/TestDecimalParametricType.java index 9322399f3da3..945df2b1454c 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestDecimalParametricType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestDecimalParametricType.java @@ -13,7 +13,7 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; public class TestDecimalParametricType diff --git a/core/trino-main/src/test/java/io/trino/type/TestDecimalToDecimalCasts.java b/core/trino-main/src/test/java/io/trino/type/TestDecimalToDecimalCasts.java index f4e68cf3a637..857ec1d94d13 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestDecimalToDecimalCasts.java +++ b/core/trino-main/src/test/java/io/trino/type/TestDecimalToDecimalCasts.java @@ -13,7 +13,7 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; public class TestDecimalToDecimalCasts diff --git a/core/trino-main/src/test/java/io/trino/type/TestDoubleOperators.java b/core/trino-main/src/test/java/io/trino/type/TestDoubleOperators.java index f53c09c26d54..62d307b8c09d 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestDoubleOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestDoubleOperators.java @@ -13,21 +13,21 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; import java.lang.invoke.MethodHandle; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Double.doubleToLongBits; import static java.lang.Double.doubleToRawLongBits; import static java.lang.Double.isNaN; diff --git a/core/trino-main/src/test/java/io/trino/type/TestDoubleType.java b/core/trino-main/src/test/java/io/trino/type/TestDoubleType.java index d625e4237108..7ab8a0dd4329 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestDoubleType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestDoubleType.java @@ -13,14 +13,14 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.LongArrayBlockBuilder; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; -import io.prestosql.type.BlockTypeOperators.BlockPositionXxHash64; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.LongArrayBlockBuilder; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.type.BlockTypeOperators.BlockPositionXxHash64; import org.testng.annotations.Test; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.Double.doubleToLongBits; import static java.lang.Double.doubleToRawLongBits; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/type/TestFunctionType.java b/core/trino-main/src/test/java/io/trino/type/TestFunctionType.java index bdec8129a7d6..5483fd037691 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestFunctionType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestFunctionType.java @@ -14,13 +14,13 @@ package io.trino.type; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RowType.field; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RowType.field; import static org.testng.Assert.assertEquals; public class TestFunctionType diff --git a/core/trino-main/src/test/java/io/trino/type/TestInstanceFunction.java b/core/trino-main/src/test/java/io/trino/type/TestInstanceFunction.java index f93e5b98d3cf..b209772f6a88 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestInstanceFunction.java +++ b/core/trino-main/src/test/java/io/trino/type/TestInstanceFunction.java @@ -13,14 +13,14 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestInstanceFunction extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/type/TestIntegerArrayType.java b/core/trino-main/src/test/java/io/trino/type/TestIntegerArrayType.java index dc23a8fd61c0..92d44d439c75 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestIntegerArrayType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestIntegerArrayType.java @@ -13,17 +13,17 @@ */ package io.trino.type; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.metadata.Metadata; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.util.StructuralTestUtil.arrayBlockOf; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.util.StructuralTestUtil.arrayBlockOf; public class TestIntegerArrayType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestIntegerOperators.java b/core/trino-main/src/test/java/io/trino/type/TestIntegerOperators.java index 4e319892aad0..d0a084572262 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestIntegerOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestIntegerOperators.java @@ -13,20 +13,20 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; public class TestIntegerOperators diff --git a/core/trino-main/src/test/java/io/trino/type/TestIntegerType.java b/core/trino-main/src/test/java/io/trino/type/TestIntegerType.java index e627de75fa98..94e3ddae963a 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestIntegerType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestIntegerType.java @@ -13,10 +13,10 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.IntegerType.INTEGER; public class TestIntegerType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestIntegerVarcharMapType.java b/core/trino-main/src/test/java/io/trino/type/TestIntegerVarcharMapType.java index bb1862949a32..42c130e6ddf0 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestIntegerVarcharMapType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestIntegerVarcharMapType.java @@ -14,16 +14,16 @@ package io.trino.type; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.Map; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.StructuralTestUtil.mapBlockOf; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.StructuralTestUtil.mapBlockOf; +import static io.trino.util.StructuralTestUtil.mapType; public class TestIntegerVarcharMapType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestIntervalDayTime.java b/core/trino-main/src/test/java/io/trino/type/TestIntervalDayTime.java index 6f2c2af3297d..a755acc9659a 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestIntervalDayTime.java +++ b/core/trino-main/src/test/java/io/trino/type/TestIntervalDayTime.java @@ -13,15 +13,15 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.type.Type; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.type.Type; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; import static java.util.concurrent.TimeUnit.DAYS; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/type/TestIntervalDayTimeType.java b/core/trino-main/src/test/java/io/trino/type/TestIntervalDayTimeType.java index 05e17447b389..21a68da74e8b 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestIntervalDayTimeType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestIntervalDayTimeType.java @@ -13,10 +13,10 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; public class TestIntervalDayTimeType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestIntervalYearMonth.java b/core/trino-main/src/test/java/io/trino/type/TestIntervalYearMonth.java index 82dd870fe45d..c6ce828a9dfc 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestIntervalYearMonth.java +++ b/core/trino-main/src/test/java/io/trino/type/TestIntervalYearMonth.java @@ -13,15 +13,15 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.type.Type; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.type.Type; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/type/TestIntervalYearMonthType.java b/core/trino-main/src/test/java/io/trino/type/TestIntervalYearMonthType.java index 43f17e0e8dd9..4b771672e1c2 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestIntervalYearMonthType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestIntervalYearMonthType.java @@ -13,10 +13,10 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; -import static io.prestosql.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; +import static io.trino.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; public class TestIntervalYearMonthType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestIpAddressOperators.java b/core/trino-main/src/test/java/io/trino/type/TestIpAddressOperators.java index f7cd31cf42c3..bd3b0ef97fa3 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestIpAddressOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestIpAddressOperators.java @@ -15,19 +15,19 @@ import com.google.common.net.InetAddresses; import io.airlift.slice.Slices; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import org.testng.annotations.Test; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.SqlVarbinaryTestingUtil.sqlVarbinaryFromHex; -import static io.prestosql.type.IpAddressType.IPADDRESS; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.SqlVarbinaryTestingUtil.sqlVarbinaryFromHex; +import static io.trino.type.IpAddressType.IPADDRESS; public class TestIpAddressOperators extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/type/TestIpAddressType.java b/core/trino-main/src/test/java/io/trino/type/TestIpAddressType.java index 978446af08a9..a57f787b07b9 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestIpAddressType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestIpAddressType.java @@ -16,12 +16,12 @@ import com.google.common.net.InetAddresses; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import org.testng.annotations.Test; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.type.IpAddressType.IPADDRESS; +import static io.trino.type.IpAddressType.IPADDRESS; import static org.testng.Assert.assertEquals; public class TestIpAddressType diff --git a/core/trino-main/src/test/java/io/trino/type/TestJsonOperators.java b/core/trino-main/src/test/java/io/trino/type/TestJsonOperators.java index cef5418029b8..c24715f8108d 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestJsonOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestJsonOperators.java @@ -15,33 +15,33 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.MaterializedResult; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.MaterializedResult; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +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.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.StructuralTestUtil.mapType; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.POSITIVE_INFINITY; import static java.lang.String.format; diff --git a/core/trino-main/src/test/java/io/trino/type/TestJsonType.java b/core/trino-main/src/test/java/io/trino/type/TestJsonType.java index 62c704cf88a7..22650b5da4a2 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestJsonType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestJsonType.java @@ -15,10 +15,10 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; -import static io.prestosql.type.JsonType.JSON; +import static io.trino.type.JsonType.JSON; public class TestJsonType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestLongDecimalType.java b/core/trino-main/src/test/java/io/trino/type/TestLongDecimalType.java index 526ee52aadc8..625e4b39874b 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestLongDecimalType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestLongDecimalType.java @@ -15,19 +15,19 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDecimal; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDecimal; import org.testng.annotations.Test; import java.math.BigDecimal; import java.math.BigInteger; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.spi.type.Decimals.encodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.writeBigDecimal; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToBigInteger; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.Decimals.encodeUnscaledValue; +import static io.trino.spi.type.Decimals.writeBigDecimal; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToBigInteger; import static org.testng.Assert.assertEquals; public class TestLongDecimalType diff --git a/core/trino-main/src/test/java/io/trino/type/TestMapOperators.java b/core/trino-main/src/test/java/io/trino/type/TestMapOperators.java index 9f1283b66f9d..60be6d90a1d9 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestMapOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestMapOperators.java @@ -17,17 +17,17 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import io.airlift.slice.Slice; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -37,28 +37,28 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.SqlVarbinaryTestingUtil.sqlVarbinary; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.type.UnknownType.UNKNOWN; -import static io.prestosql.util.StructuralTestUtil.appendToBlockBuilder; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +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.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.SqlVarbinaryTestingUtil.sqlVarbinary; +import static io.trino.type.JsonType.JSON; +import static io.trino.type.UnknownType.UNKNOWN; +import static io.trino.util.StructuralTestUtil.appendToBlockBuilder; +import static io.trino.util.StructuralTestUtil.mapType; import static java.lang.String.format; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; diff --git a/core/trino-main/src/test/java/io/trino/type/TestRealOperators.java b/core/trino-main/src/test/java/io/trino/type/TestRealOperators.java index 15abeba2a5f0..fba0793b83a7 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestRealOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestRealOperators.java @@ -13,24 +13,24 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; import java.lang.invoke.MethodHandle; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Float.floatToIntBits; import static java.lang.Float.intBitsToFloat; import static java.lang.Float.isNaN; diff --git a/core/trino-main/src/test/java/io/trino/type/TestRealType.java b/core/trino-main/src/test/java/io/trino/type/TestRealType.java index e76599d81c0a..ae63fbcf3cc6 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestRealType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestRealType.java @@ -13,13 +13,13 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.IntArrayBlockBuilder; -import io.prestosql.type.BlockTypeOperators.BlockPositionHashCode; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.IntArrayBlockBuilder; +import io.trino.type.BlockTypeOperators.BlockPositionHashCode; import org.testng.annotations.Test; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.floatToIntBits; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; diff --git a/core/trino-main/src/test/java/io/trino/type/TestRowOperators.java b/core/trino-main/src/test/java/io/trino/type/TestRowOperators.java index 75c6d62c2be8..1b0953978926 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestRowOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestRowOperators.java @@ -19,17 +19,17 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import io.airlift.slice.Slice; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.operator.scalar.CombineHashFunction; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.CombineHashFunction; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -40,27 +40,27 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +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.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.RowType.field; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.StructuralTestUtil.mapType; import static java.lang.String.format; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; diff --git a/core/trino-main/src/test/java/io/trino/type/TestRowParametricType.java b/core/trino-main/src/test/java/io/trino/type/TestRowParametricType.java index f25be5fd42e3..48f739459b93 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestRowParametricType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestRowParametricType.java @@ -13,25 +13,25 @@ */ package io.trino.type; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.RowFieldName; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeParameter; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.RowFieldName; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeParameter; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.StandardTypes.ROW; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.StandardTypes.ROW; +import static io.trino.testing.assertions.Assert.assertEquals; public class TestRowParametricType { diff --git a/core/trino-main/src/test/java/io/trino/type/TestShortDecimalType.java b/core/trino-main/src/test/java/io/trino/type/TestShortDecimalType.java index be355c346e78..bdea4a4d983c 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestShortDecimalType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestShortDecimalType.java @@ -13,12 +13,12 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDecimal; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDecimal; -import static io.prestosql.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DecimalType.createDecimalType; public class TestShortDecimalType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestSimpleRowType.java b/core/trino-main/src/test/java/io/trino/type/TestSimpleRowType.java index 5a2c3654faa6..ef718bfc9ce3 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestSimpleRowType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestSimpleRowType.java @@ -14,18 +14,18 @@ package io.trino.type; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.RowBlockBuilder; -import io.prestosql.spi.block.SingleRowBlockWriter; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.RowBlockBuilder; +import io.trino.spi.block.SingleRowBlockWriter; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; import java.util.List; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.RowType.field; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestSimpleRowType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestSingleAccessMethodCompiler.java b/core/trino-main/src/test/java/io/trino/type/TestSingleAccessMethodCompiler.java index 1583cf8853a5..f7fa78182559 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestSingleAccessMethodCompiler.java +++ b/core/trino-main/src/test/java/io/trino/type/TestSingleAccessMethodCompiler.java @@ -19,7 +19,7 @@ import java.util.function.LongFunction; import java.util.function.LongUnaryOperator; -import static io.prestosql.type.SingleAccessMethodCompiler.compileSingleAccessMethod; +import static io.trino.type.SingleAccessMethodCompiler.compileSingleAccessMethod; import static java.lang.invoke.MethodHandles.lookup; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/type/TestSmallintArrayType.java b/core/trino-main/src/test/java/io/trino/type/TestSmallintArrayType.java index f1b97314934d..560517bc375c 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestSmallintArrayType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestSmallintArrayType.java @@ -13,17 +13,17 @@ */ package io.trino.type; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.metadata.Metadata; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.util.StructuralTestUtil.arrayBlockOf; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.util.StructuralTestUtil.arrayBlockOf; public class TestSmallintArrayType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestSmallintOperators.java b/core/trino-main/src/test/java/io/trino/type/TestSmallintOperators.java index 4d5b6c6c43b0..580524fce5c4 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestSmallintOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestSmallintOperators.java @@ -13,20 +13,20 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; public class TestSmallintOperators diff --git a/core/trino-main/src/test/java/io/trino/type/TestSmallintType.java b/core/trino-main/src/test/java/io/trino/type/TestSmallintType.java index 2ef08c7eb770..20032f39a038 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestSmallintType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestSmallintType.java @@ -13,10 +13,10 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; -import static io.prestosql.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.SmallintType.SMALLINT; public class TestSmallintType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestSmallintVarcharMapType.java b/core/trino-main/src/test/java/io/trino/type/TestSmallintVarcharMapType.java index 9b0c1062327d..6f04a6d179e4 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestSmallintVarcharMapType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestSmallintVarcharMapType.java @@ -14,16 +14,16 @@ package io.trino.type; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.Map; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.StructuralTestUtil.mapBlockOf; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.StructuralTestUtil.mapBlockOf; +import static io.trino.util.StructuralTestUtil.mapType; public class TestSmallintVarcharMapType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestTime.java b/core/trino-main/src/test/java/io/trino/type/TestTime.java index a2aaddf363c5..3a193da36633 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTime.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTime.java @@ -13,18 +13,18 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.testing.TestingSession; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.type.TimeZoneKey; +import io.trino.testing.TestingSession; import org.joda.time.DateTimeZone; import org.testng.annotations.Test; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; -import static io.prestosql.util.DateTimeZoneIndex.getDateTimeZone; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.util.DateTimeZoneIndex.getDateTimeZone; public class TestTime extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/type/TestTimeType.java b/core/trino-main/src/test/java/io/trino/type/TestTimeType.java index 3ab5048ee1cd..97090b04ca42 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTimeType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTimeType.java @@ -13,11 +13,11 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.SqlTime; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.SqlTime; -import static io.prestosql.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeType.TIME; public class TestTimeType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestTimeWithTimeZoneType.java b/core/trino-main/src/test/java/io/trino/type/TestTimeWithTimeZoneType.java index 06c0ed0629bc..485f213a5613 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTimeWithTimeZoneType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTimeWithTimeZoneType.java @@ -13,14 +13,14 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.SqlTimeWithTimeZone; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.SqlTimeWithTimeZone; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; public class TestTimeWithTimeZoneType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestTimestamp.java b/core/trino-main/src/test/java/io/trino/type/TestTimestamp.java index 54bfd5534851..0089eb1ec93e 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTimestamp.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTimestamp.java @@ -13,11 +13,11 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.testing.TestingSession; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; +import io.trino.testing.TestingSession; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.testng.annotations.Test; @@ -25,21 +25,21 @@ import java.time.LocalDateTime; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.StandardErrorCode.INVALID_LITERAL; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimeOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.util.DateTimeZoneIndex.getDateTimeZone; +import static io.trino.spi.StandardErrorCode.INVALID_LITERAL; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.DateTimeTestingUtils.sqlTimeOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.type.JsonType.JSON; +import static io.trino.util.DateTimeZoneIndex.getDateTimeZone; import static org.joda.time.DateTimeZone.UTC; public class TestTimestamp diff --git a/core/trino-main/src/test/java/io/trino/type/TestTimestampType.java b/core/trino-main/src/test/java/io/trino/type/TestTimestampType.java index 125f30ae21bf..a0cbbdab7e55 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTimestampType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTimestampType.java @@ -13,11 +13,11 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.SqlTimestamp; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.SqlTimestamp; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; public class TestTimestampType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestTimestampWithTimeZone.java b/core/trino-main/src/test/java/io/trino/type/TestTimestampWithTimeZone.java index e0976b45b23b..93fa2178c564 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTimestampWithTimeZone.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTimestampWithTimeZone.java @@ -13,32 +13,32 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.testng.annotations.Test; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.StandardErrorCode.INVALID_LITERAL; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimeOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; -import static io.prestosql.util.DateTimeZoneIndex.getDateTimeZone; +import static io.trino.spi.StandardErrorCode.INVALID_LITERAL; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.DateTimeTestingUtils.sqlTimeOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.util.DateTimeZoneIndex.getDateTimeZone; import static org.joda.time.DateTimeZone.UTC; public class TestTimestampWithTimeZone diff --git a/core/trino-main/src/test/java/io/trino/type/TestTimestampWithTimeZoneType.java b/core/trino-main/src/test/java/io/trino/type/TestTimestampWithTimeZoneType.java index 1fea05b35609..b45d99e8d6a4 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTimestampWithTimeZoneType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTimestampWithTimeZoneType.java @@ -13,14 +13,14 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.SqlTimestampWithTimeZone; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; public class TestTimestampWithTimeZoneType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestTinyintArrayType.java b/core/trino-main/src/test/java/io/trino/type/TestTinyintArrayType.java index dbfbc160777b..ca616786546c 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTinyintArrayType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTinyintArrayType.java @@ -13,17 +13,17 @@ */ package io.trino.type; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.metadata.Metadata; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.util.StructuralTestUtil.arrayBlockOf; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.util.StructuralTestUtil.arrayBlockOf; public class TestTinyintArrayType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestTinyintOperators.java b/core/trino-main/src/test/java/io/trino/type/TestTinyintOperators.java index 4ea1467f1702..104bc75ff9ac 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTinyintOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTinyintOperators.java @@ -13,20 +13,20 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.DIVISION_BY_ZERO; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.DIVISION_BY_ZERO; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; public class TestTinyintOperators diff --git a/core/trino-main/src/test/java/io/trino/type/TestTinyintType.java b/core/trino-main/src/test/java/io/trino/type/TestTinyintType.java index be47923bcbc8..a50541cc25ec 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTinyintType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTinyintType.java @@ -13,10 +13,10 @@ */ package io.trino.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TinyintType.TINYINT; public class TestTinyintType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestTinyintVarcharMapType.java b/core/trino-main/src/test/java/io/trino/type/TestTinyintVarcharMapType.java index b307a1632a3e..223c83f63440 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTinyintVarcharMapType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTinyintVarcharMapType.java @@ -14,16 +14,16 @@ package io.trino.type; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.Map; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.StructuralTestUtil.mapBlockOf; -import static io.prestosql.util.StructuralTestUtil.mapType; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.StructuralTestUtil.mapBlockOf; +import static io.trino.util.StructuralTestUtil.mapType; public class TestTinyintVarcharMapType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestTypeCoercion.java b/core/trino-main/src/test/java/io/trino/type/TestTypeCoercion.java index 0a59336b9bba..eeae81b3a6f3 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTypeCoercion.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTypeCoercion.java @@ -14,40 +14,40 @@ package io.trino.type; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.Metadata; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import org.testng.annotations.Test; import java.util.Optional; import java.util.Set; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.RowType.anonymousRow; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.spi.type.RowType.rowType; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.JoniRegexpType.JONI_REGEXP; -import static io.prestosql.type.JsonPathType.JSON_PATH; -import static io.prestosql.type.Re2JRegexpType.RE2J_REGEXP_SIGNATURE; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.RowType.anonymousRow; +import static io.trino.spi.type.RowType.field; +import static io.trino.spi.type.RowType.rowType; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +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.type.JoniRegexpType.JONI_REGEXP; +import static io.trino.type.JsonPathType.JSON_PATH; +import static io.trino.type.Re2JRegexpType.RE2J_REGEXP_SIGNATURE; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertEquals; diff --git a/core/trino-main/src/test/java/io/trino/type/TestTypeRegistry.java b/core/trino-main/src/test/java/io/trino/type/TestTypeRegistry.java index 0c098c3d88df..e89dc13062fd 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestTypeRegistry.java +++ b/core/trino-main/src/test/java/io/trino/type/TestTypeRegistry.java @@ -14,18 +14,18 @@ package io.trino.type; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeNotFoundException; -import io.prestosql.spi.type.TypeSignature; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeNotFoundException; +import io.trino.spi.type.TypeSignature; import org.testng.annotations.Test; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.IS_DISTINCT_FROM; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.IS_DISTINCT_FROM; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; import static org.assertj.core.api.Assertions.assertThatThrownBy; public class TestTypeRegistry diff --git a/core/trino-main/src/test/java/io/trino/type/TestUnknownOperators.java b/core/trino-main/src/test/java/io/trino/type/TestUnknownOperators.java index 4d4ad47a1dc7..3fda00b9d89d 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestUnknownOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestUnknownOperators.java @@ -13,19 +13,19 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.type.UnknownType.UNKNOWN; public class TestUnknownOperators extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/type/TestUnknownType.java b/core/trino-main/src/test/java/io/trino/type/TestUnknownType.java index 1bcd5f131df4..2b0c23437538 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestUnknownType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestUnknownType.java @@ -13,7 +13,7 @@ */ package io.trino.type; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.type.UnknownType.UNKNOWN; public class TestUnknownType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestUuidOperators.java b/core/trino-main/src/test/java/io/trino/type/TestUuidOperators.java index 1621fc2e2051..6c2a54152527 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestUuidOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestUuidOperators.java @@ -13,21 +13,21 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import org.testng.annotations.Test; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.SqlVarbinaryTestingUtil.sqlVarbinaryFromHex; -import static io.prestosql.type.UuidOperators.castFromVarcharToUuid; -import static io.prestosql.type.UuidType.UUID; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.SqlVarbinaryTestingUtil.sqlVarbinaryFromHex; +import static io.trino.type.UuidOperators.castFromVarcharToUuid; +import static io.trino.type.UuidType.UUID; import static org.testng.Assert.assertEquals; public class TestUuidOperators diff --git a/core/trino-main/src/test/java/io/trino/type/TestUuidType.java b/core/trino-main/src/test/java/io/trino/type/TestUuidType.java index ccb4baa1a93a..9f722c499b64 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestUuidType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestUuidType.java @@ -15,14 +15,14 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import org.testng.annotations.Test; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.type.UuidOperators.castFromVarcharToUuid; -import static io.prestosql.type.UuidType.UUID; +import static io.trino.type.UuidOperators.castFromVarcharToUuid; +import static io.trino.type.UuidType.UUID; import static org.testng.Assert.assertEquals; public class TestUuidType diff --git a/core/trino-main/src/test/java/io/trino/type/TestVarbinaryType.java b/core/trino-main/src/test/java/io/trino/type/TestVarbinaryType.java index 37fddec6a15d..386cb4d3d963 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestVarbinaryType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestVarbinaryType.java @@ -15,11 +15,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.SqlVarbinary; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.SqlVarbinary; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarbinaryType.VARBINARY; public class TestVarbinaryType extends AbstractTestType diff --git a/core/trino-main/src/test/java/io/trino/type/TestVarcharOperators.java b/core/trino-main/src/test/java/io/trino/type/TestVarcharOperators.java index ac9f2e46a365..312e2326818f 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestVarcharOperators.java +++ b/core/trino-main/src/test/java/io/trino/type/TestVarcharOperators.java @@ -13,13 +13,13 @@ */ package io.trino.type; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.Test; -import static io.prestosql.spi.function.OperatorType.INDETERMINATE; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.function.OperatorType.INDETERMINATE; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; public class TestVarcharOperators extends AbstractTestFunctions diff --git a/core/trino-main/src/test/java/io/trino/type/TestVarcharType.java b/core/trino-main/src/test/java/io/trino/type/TestVarcharType.java index d401dd08cb6e..5c0624044f2a 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestVarcharType.java +++ b/core/trino-main/src/test/java/io/trino/type/TestVarcharType.java @@ -15,14 +15,14 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.testng.annotations.Test; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; import static org.testng.Assert.assertEquals; public class TestVarcharType diff --git a/core/trino-main/src/test/java/io/trino/type/TypeTestUtils.java b/core/trino-main/src/test/java/io/trino/type/TypeTestUtils.java index a46f9c91f32d..3f51e8ba09ff 100644 --- a/core/trino-main/src/test/java/io/trino/type/TypeTestUtils.java +++ b/core/trino-main/src/test/java/io/trino/type/TypeTestUtils.java @@ -14,18 +14,18 @@ package io.trino.type; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.HashGenerator; -import io.prestosql.operator.InterpretedHashGenerator; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.operator.HashGenerator; +import io.trino.operator.InterpretedHashGenerator; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public final class TypeTestUtils { diff --git a/core/trino-main/src/test/java/io/trino/type/setdigest/TestSetDigest.java b/core/trino-main/src/test/java/io/trino/type/setdigest/TestSetDigest.java index 3aaa29fd6bba..0af9ff9565d4 100644 --- a/core/trino-main/src/test/java/io/trino/type/setdigest/TestSetDigest.java +++ b/core/trino-main/src/test/java/io/trino/type/setdigest/TestSetDigest.java @@ -28,10 +28,10 @@ import java.util.Random; import java.util.Set; -import static io.prestosql.type.setdigest.SetDigest.DEFAULT_MAX_HASHES; -import static io.prestosql.type.setdigest.SetDigest.NUMBER_OF_BUCKETS; -import static io.prestosql.type.setdigest.SetDigestFunctions.hashCounts; -import static io.prestosql.type.setdigest.SetDigestFunctions.intersectionCardinality; +import static io.trino.type.setdigest.SetDigest.DEFAULT_MAX_HASHES; +import static io.trino.type.setdigest.SetDigest.NUMBER_OF_BUCKETS; +import static io.trino.type.setdigest.SetDigestFunctions.hashCounts; +import static io.trino.type.setdigest.SetDigestFunctions.intersectionCardinality; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/util/BenchmarkPagesSort.java b/core/trino-main/src/test/java/io/trino/util/BenchmarkPagesSort.java index ed65963ee7db..fa7fca3e17db 100644 --- a/core/trino-main/src/test/java/io/trino/util/BenchmarkPagesSort.java +++ b/core/trino-main/src/test/java/io/trino/util/BenchmarkPagesSort.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Streams; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.WorkProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.OrderingCompiler; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.PagesIndex; +import io.trino.operator.WorkProcessor; +import io.trino.spi.Page; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.OrderingCompiler; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -47,11 +47,11 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.SequencePageBuilder.createSequencePage; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.util.MergeSortedPages.mergeSortedPages; +import static io.trino.SequencePageBuilder.createSequencePage; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.util.MergeSortedPages.mergeSortedPages; import static java.util.Collections.nCopies; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.openjdk.jmh.annotations.Mode.AverageTime; diff --git a/core/trino-main/src/test/java/io/trino/util/StructuralTestUtil.java b/core/trino-main/src/test/java/io/trino/util/StructuralTestUtil.java index 911f9372d56e..3d1060900184 100644 --- a/core/trino-main/src/test/java/io/trino/util/StructuralTestUtil.java +++ b/core/trino-main/src/test/java/io/trino/util/StructuralTestUtil.java @@ -16,23 +16,23 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.metadata.Metadata; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; import java.math.BigDecimal; import java.util.Map; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.floatToRawIntBits; public final class StructuralTestUtil diff --git a/core/trino-main/src/test/java/io/trino/util/TestFailures.java b/core/trino-main/src/test/java/io/trino/util/TestFailures.java index 1b3fdf414554..c8f9ced540fa 100644 --- a/core/trino-main/src/test/java/io/trino/util/TestFailures.java +++ b/core/trino-main/src/test/java/io/trino/util/TestFailures.java @@ -13,13 +13,13 @@ */ package io.trino.util; -import io.prestosql.execution.ExecutionFailureInfo; -import io.prestosql.spi.PrestoException; +import io.trino.execution.ExecutionFailureInfo; +import io.trino.spi.PrestoException; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.TOO_MANY_REQUESTS_FAILED; -import static io.prestosql.util.Failures.toFailure; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.TOO_MANY_REQUESTS_FAILED; +import static io.trino.util.Failures.toFailure; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNull; diff --git a/core/trino-main/src/test/java/io/trino/util/TestHashCollisionsEstimator.java b/core/trino-main/src/test/java/io/trino/util/TestHashCollisionsEstimator.java index d46a8984bf15..38c6bd30814a 100644 --- a/core/trino-main/src/test/java/io/trino/util/TestHashCollisionsEstimator.java +++ b/core/trino-main/src/test/java/io/trino/util/TestHashCollisionsEstimator.java @@ -16,8 +16,8 @@ import com.google.common.collect.ImmutableList; import org.testng.annotations.Test; -import static io.prestosql.util.HashCollisionsEstimator.estimateNumberOfHashCollisions; -import static io.prestosql.util.HashCollisionsSimulator.simulate; +import static io.trino.util.HashCollisionsEstimator.estimateNumberOfHashCollisions; +import static io.trino.util.HashCollisionsSimulator.simulate; import static java.lang.Math.pow; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/util/TestMergeSortedPages.java b/core/trino-main/src/test/java/io/trino/util/TestMergeSortedPages.java index 389c496bd1b7..2eee4b27690c 100644 --- a/core/trino-main/src/test/java/io/trino/util/TestMergeSortedPages.java +++ b/core/trino-main/src/test/java/io/trino/util/TestMergeSortedPages.java @@ -14,34 +14,34 @@ package io.trino.util; import com.google.common.collect.ImmutableList; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.operator.DriverYieldSignal; -import io.prestosql.operator.PageWithPositionComparator; -import io.prestosql.operator.SimplePageWithPositionComparator; -import io.prestosql.operator.WorkProcessor; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.testing.MaterializedResult; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.operator.DriverYieldSignal; +import io.trino.operator.PageWithPositionComparator; +import io.trino.operator.SimplePageWithPositionComparator; +import io.trino.operator.WorkProcessor; +import io.trino.spi.Page; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.testing.MaterializedResult; import org.testng.annotations.Test; import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.operator.OperatorAssertion.toMaterializedResult; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.connector.SortOrder.DESC_NULLS_FIRST; -import static io.prestosql.spi.connector.SortOrder.DESC_NULLS_LAST; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.operator.OperatorAssertion.toMaterializedResult; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.connector.SortOrder.DESC_NULLS_FIRST; +import static io.trino.spi.connector.SortOrder.DESC_NULLS_LAST; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-main/src/test/java/io/trino/util/TestTimeZoneUtils.java b/core/trino-main/src/test/java/io/trino/util/TestTimeZoneUtils.java index 1871b8b79838..76bdc4b7f74f 100644 --- a/core/trino-main/src/test/java/io/trino/util/TestTimeZoneUtils.java +++ b/core/trino-main/src/test/java/io/trino/util/TestTimeZoneUtils.java @@ -13,7 +13,7 @@ */ package io.trino.util; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.spi.type.TimeZoneKey; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.testng.annotations.Test; @@ -21,13 +21,13 @@ import java.time.ZoneId; import java.util.TreeSet; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.isUtcZoneId; -import static io.prestosql.util.DateTimeZoneIndex.getDateTimeZone; -import static io.prestosql.util.DateTimeZoneIndex.packDateTimeWithZone; -import static io.prestosql.util.DateTimeZoneIndex.unpackDateTimeZone; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TimeZoneKey.isUtcZoneId; +import static io.trino.util.DateTimeZoneIndex.getDateTimeZone; +import static io.trino.util.DateTimeZoneIndex.packDateTimeWithZone; +import static io.trino.util.DateTimeZoneIndex.unpackDateTimeZone; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/core/trino-parser/src/main/java/io/trino/sql/ExpressionFormatter.java b/core/trino-parser/src/main/java/io/trino/sql/ExpressionFormatter.java index 38b37d39f3fd..df733e2a143a 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/ExpressionFormatter.java +++ b/core/trino-parser/src/main/java/io/trino/sql/ExpressionFormatter.java @@ -16,80 +16,80 @@ import com.google.common.base.CharMatcher; import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.AllRows; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; -import io.prestosql.sql.tree.ArrayConstructor; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.AtTimeZone; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.BinaryLiteral; -import io.prestosql.sql.tree.BindExpression; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CharLiteral; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Cube; -import io.prestosql.sql.tree.CurrentPath; -import io.prestosql.sql.tree.CurrentTime; -import io.prestosql.sql.tree.CurrentUser; -import io.prestosql.sql.tree.DateTimeDataType; -import io.prestosql.sql.tree.DecimalLiteral; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Extract; -import io.prestosql.sql.tree.FieldReference; -import io.prestosql.sql.tree.Format; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GenericDataType; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.GroupingElement; -import io.prestosql.sql.tree.GroupingOperation; -import io.prestosql.sql.tree.GroupingSets; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.InListExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.IntervalDayTimeDataType; -import io.prestosql.sql.tree.IntervalLiteral; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullIfExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.NumericParameter; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.QuantifiedComparisonExpression; -import io.prestosql.sql.tree.Rollup; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.RowDataType; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.SimpleGroupBy; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SubqueryExpression; -import io.prestosql.sql.tree.SubscriptExpression; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.sql.tree.TimeLiteral; -import io.prestosql.sql.tree.TimestampLiteral; -import io.prestosql.sql.tree.TryExpression; -import io.prestosql.sql.tree.TypeParameter; -import io.prestosql.sql.tree.WhenClause; -import io.prestosql.sql.tree.Window; -import io.prestosql.sql.tree.WindowFrame; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.AllRows; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArithmeticUnaryExpression; +import io.trino.sql.tree.ArrayConstructor; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.AtTimeZone; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.BinaryLiteral; +import io.trino.sql.tree.BindExpression; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CharLiteral; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Cube; +import io.trino.sql.tree.CurrentPath; +import io.trino.sql.tree.CurrentTime; +import io.trino.sql.tree.CurrentUser; +import io.trino.sql.tree.DateTimeDataType; +import io.trino.sql.tree.DecimalLiteral; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Extract; +import io.trino.sql.tree.FieldReference; +import io.trino.sql.tree.Format; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GenericDataType; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.GroupingElement; +import io.trino.sql.tree.GroupingOperation; +import io.trino.sql.tree.GroupingSets; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.InListExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.IntervalDayTimeDataType; +import io.trino.sql.tree.IntervalLiteral; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullIfExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.NumericParameter; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.QuantifiedComparisonExpression; +import io.trino.sql.tree.Rollup; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.RowDataType; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.SimpleGroupBy; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SubqueryExpression; +import io.trino.sql.tree.SubscriptExpression; +import io.trino.sql.tree.SymbolReference; +import io.trino.sql.tree.TimeLiteral; +import io.trino.sql.tree.TimestampLiteral; +import io.trino.sql.tree.TryExpression; +import io.trino.sql.tree.TypeParameter; +import io.trino.sql.tree.WhenClause; +import io.trino.sql.tree.Window; +import io.trino.sql.tree.WindowFrame; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; @@ -102,8 +102,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.sql.SqlFormatter.formatName; -import static io.prestosql.sql.SqlFormatter.formatSql; +import static io.trino.sql.SqlFormatter.formatName; +import static io.trino.sql.SqlFormatter.formatSql; import static java.lang.String.format; import static java.util.stream.Collectors.toList; diff --git a/core/trino-parser/src/main/java/io/trino/sql/QueryUtil.java b/core/trino-parser/src/main/java/io/trino/sql/QueryUtil.java index d31208f16ac7..4664f1cfa4c6 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/QueryUtil.java +++ b/core/trino-parser/src/main/java/io/trino/sql/QueryUtil.java @@ -14,41 +14,41 @@ package io.trino.sql; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.tree.AliasedRelation; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GroupBy; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.Offset; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.QueryBody; -import io.prestosql.sql.tree.QuerySpecification; -import io.prestosql.sql.tree.Relation; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.Select; -import io.prestosql.sql.tree.SelectItem; -import io.prestosql.sql.tree.SingleColumn; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.Table; -import io.prestosql.sql.tree.TableSubquery; -import io.prestosql.sql.tree.Values; -import io.prestosql.sql.tree.WhenClause; +import io.trino.sql.tree.AliasedRelation; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GroupBy; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.Offset; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.QueryBody; +import io.trino.sql.tree.QuerySpecification; +import io.trino.sql.tree.Relation; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.Select; +import io.trino.sql.tree.SelectItem; +import io.trino.sql.tree.SingleColumn; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.Table; +import io.trino.sql.tree.TableSubquery; +import io.trino.sql.tree.Values; +import io.trino.sql.tree.WhenClause; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; -import static io.prestosql.sql.tree.BooleanLiteral.FALSE_LITERAL; -import static io.prestosql.sql.tree.BooleanLiteral.TRUE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.FALSE_LITERAL; +import static io.trino.sql.tree.BooleanLiteral.TRUE_LITERAL; import static java.util.Arrays.asList; public final class QueryUtil diff --git a/core/trino-parser/src/main/java/io/trino/sql/ReservedIdentifiers.java b/core/trino-parser/src/main/java/io/trino/sql/ReservedIdentifiers.java index 27c2de7b1026..952a1b8e4dcb 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/ReservedIdentifiers.java +++ b/core/trino-parser/src/main/java/io/trino/sql/ReservedIdentifiers.java @@ -14,11 +14,11 @@ package io.trino.sql; import com.google.common.collect.ImmutableSet; -import io.prestosql.sql.parser.ParsingException; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlBaseLexer; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.Identifier; +import io.trino.sql.parser.ParsingException; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlBaseLexer; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.Identifier; import org.antlr.v4.runtime.Vocabulary; import java.io.IOException; diff --git a/core/trino-parser/src/main/java/io/trino/sql/SqlFormatter.java b/core/trino-parser/src/main/java/io/trino/sql/SqlFormatter.java index 9b4190a3bbab..ac65a129c305 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/SqlFormatter.java +++ b/core/trino-parser/src/main/java/io/trino/sql/SqlFormatter.java @@ -15,106 +15,106 @@ import com.google.common.base.Joiner; import com.google.common.base.Strings; -import io.prestosql.sql.tree.AddColumn; -import io.prestosql.sql.tree.AliasedRelation; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.Analyze; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.Call; -import io.prestosql.sql.tree.CallArgument; -import io.prestosql.sql.tree.ColumnDefinition; -import io.prestosql.sql.tree.Comment; -import io.prestosql.sql.tree.Commit; -import io.prestosql.sql.tree.CreateMaterializedView; -import io.prestosql.sql.tree.CreateRole; -import io.prestosql.sql.tree.CreateSchema; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.CreateTableAsSelect; -import io.prestosql.sql.tree.CreateView; -import io.prestosql.sql.tree.Deallocate; -import io.prestosql.sql.tree.Delete; -import io.prestosql.sql.tree.DescribeInput; -import io.prestosql.sql.tree.DescribeOutput; -import io.prestosql.sql.tree.DropColumn; -import io.prestosql.sql.tree.DropMaterializedView; -import io.prestosql.sql.tree.DropRole; -import io.prestosql.sql.tree.DropSchema; -import io.prestosql.sql.tree.DropTable; -import io.prestosql.sql.tree.DropView; -import io.prestosql.sql.tree.Except; -import io.prestosql.sql.tree.Execute; -import io.prestosql.sql.tree.Explain; -import io.prestosql.sql.tree.ExplainFormat; -import io.prestosql.sql.tree.ExplainOption; -import io.prestosql.sql.tree.ExplainType; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FetchFirst; -import io.prestosql.sql.tree.Grant; -import io.prestosql.sql.tree.GrantRoles; -import io.prestosql.sql.tree.GrantorSpecification; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.Insert; -import io.prestosql.sql.tree.Intersect; -import io.prestosql.sql.tree.Isolation; -import io.prestosql.sql.tree.Join; -import io.prestosql.sql.tree.JoinCriteria; -import io.prestosql.sql.tree.JoinOn; -import io.prestosql.sql.tree.JoinUsing; -import io.prestosql.sql.tree.Lateral; -import io.prestosql.sql.tree.LikeClause; -import io.prestosql.sql.tree.Limit; -import io.prestosql.sql.tree.NaturalJoin; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.Offset; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.Prepare; -import io.prestosql.sql.tree.PrincipalSpecification; -import io.prestosql.sql.tree.Property; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.QuerySpecification; -import io.prestosql.sql.tree.RefreshMaterializedView; -import io.prestosql.sql.tree.Relation; -import io.prestosql.sql.tree.RenameColumn; -import io.prestosql.sql.tree.RenameSchema; -import io.prestosql.sql.tree.RenameTable; -import io.prestosql.sql.tree.RenameView; -import io.prestosql.sql.tree.ResetSession; -import io.prestosql.sql.tree.Revoke; -import io.prestosql.sql.tree.RevokeRoles; -import io.prestosql.sql.tree.Rollback; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SampledRelation; -import io.prestosql.sql.tree.Select; -import io.prestosql.sql.tree.SelectItem; -import io.prestosql.sql.tree.SetPath; -import io.prestosql.sql.tree.SetRole; -import io.prestosql.sql.tree.SetSchemaAuthorization; -import io.prestosql.sql.tree.SetSession; -import io.prestosql.sql.tree.SetTableAuthorization; -import io.prestosql.sql.tree.SetViewAuthorization; -import io.prestosql.sql.tree.ShowCatalogs; -import io.prestosql.sql.tree.ShowColumns; -import io.prestosql.sql.tree.ShowCreate; -import io.prestosql.sql.tree.ShowFunctions; -import io.prestosql.sql.tree.ShowGrants; -import io.prestosql.sql.tree.ShowRoleGrants; -import io.prestosql.sql.tree.ShowRoles; -import io.prestosql.sql.tree.ShowSchemas; -import io.prestosql.sql.tree.ShowSession; -import io.prestosql.sql.tree.ShowStats; -import io.prestosql.sql.tree.ShowTables; -import io.prestosql.sql.tree.SingleColumn; -import io.prestosql.sql.tree.StartTransaction; -import io.prestosql.sql.tree.Table; -import io.prestosql.sql.tree.TableSubquery; -import io.prestosql.sql.tree.TransactionAccessMode; -import io.prestosql.sql.tree.TransactionMode; -import io.prestosql.sql.tree.Union; -import io.prestosql.sql.tree.Unnest; -import io.prestosql.sql.tree.Values; -import io.prestosql.sql.tree.With; -import io.prestosql.sql.tree.WithQuery; +import io.trino.sql.tree.AddColumn; +import io.trino.sql.tree.AliasedRelation; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.Analyze; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.Call; +import io.trino.sql.tree.CallArgument; +import io.trino.sql.tree.ColumnDefinition; +import io.trino.sql.tree.Comment; +import io.trino.sql.tree.Commit; +import io.trino.sql.tree.CreateMaterializedView; +import io.trino.sql.tree.CreateRole; +import io.trino.sql.tree.CreateSchema; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.CreateTableAsSelect; +import io.trino.sql.tree.CreateView; +import io.trino.sql.tree.Deallocate; +import io.trino.sql.tree.Delete; +import io.trino.sql.tree.DescribeInput; +import io.trino.sql.tree.DescribeOutput; +import io.trino.sql.tree.DropColumn; +import io.trino.sql.tree.DropMaterializedView; +import io.trino.sql.tree.DropRole; +import io.trino.sql.tree.DropSchema; +import io.trino.sql.tree.DropTable; +import io.trino.sql.tree.DropView; +import io.trino.sql.tree.Except; +import io.trino.sql.tree.Execute; +import io.trino.sql.tree.Explain; +import io.trino.sql.tree.ExplainFormat; +import io.trino.sql.tree.ExplainOption; +import io.trino.sql.tree.ExplainType; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FetchFirst; +import io.trino.sql.tree.Grant; +import io.trino.sql.tree.GrantRoles; +import io.trino.sql.tree.GrantorSpecification; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.Insert; +import io.trino.sql.tree.Intersect; +import io.trino.sql.tree.Isolation; +import io.trino.sql.tree.Join; +import io.trino.sql.tree.JoinCriteria; +import io.trino.sql.tree.JoinOn; +import io.trino.sql.tree.JoinUsing; +import io.trino.sql.tree.Lateral; +import io.trino.sql.tree.LikeClause; +import io.trino.sql.tree.Limit; +import io.trino.sql.tree.NaturalJoin; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.Offset; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.Prepare; +import io.trino.sql.tree.PrincipalSpecification; +import io.trino.sql.tree.Property; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.QuerySpecification; +import io.trino.sql.tree.RefreshMaterializedView; +import io.trino.sql.tree.Relation; +import io.trino.sql.tree.RenameColumn; +import io.trino.sql.tree.RenameSchema; +import io.trino.sql.tree.RenameTable; +import io.trino.sql.tree.RenameView; +import io.trino.sql.tree.ResetSession; +import io.trino.sql.tree.Revoke; +import io.trino.sql.tree.RevokeRoles; +import io.trino.sql.tree.Rollback; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SampledRelation; +import io.trino.sql.tree.Select; +import io.trino.sql.tree.SelectItem; +import io.trino.sql.tree.SetPath; +import io.trino.sql.tree.SetRole; +import io.trino.sql.tree.SetSchemaAuthorization; +import io.trino.sql.tree.SetSession; +import io.trino.sql.tree.SetTableAuthorization; +import io.trino.sql.tree.SetViewAuthorization; +import io.trino.sql.tree.ShowCatalogs; +import io.trino.sql.tree.ShowColumns; +import io.trino.sql.tree.ShowCreate; +import io.trino.sql.tree.ShowFunctions; +import io.trino.sql.tree.ShowGrants; +import io.trino.sql.tree.ShowRoleGrants; +import io.trino.sql.tree.ShowRoles; +import io.trino.sql.tree.ShowSchemas; +import io.trino.sql.tree.ShowSession; +import io.trino.sql.tree.ShowStats; +import io.trino.sql.tree.ShowTables; +import io.trino.sql.tree.SingleColumn; +import io.trino.sql.tree.StartTransaction; +import io.trino.sql.tree.Table; +import io.trino.sql.tree.TableSubquery; +import io.trino.sql.tree.TransactionAccessMode; +import io.trino.sql.tree.TransactionMode; +import io.trino.sql.tree.Union; +import io.trino.sql.tree.Unnest; +import io.trino.sql.tree.Values; +import io.trino.sql.tree.With; +import io.trino.sql.tree.WithQuery; import java.util.ArrayList; import java.util.Iterator; @@ -124,10 +124,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.sql.ExpressionFormatter.formatExpression; -import static io.prestosql.sql.ExpressionFormatter.formatGroupBy; -import static io.prestosql.sql.ExpressionFormatter.formatOrderBy; -import static io.prestosql.sql.ExpressionFormatter.formatStringLiteral; +import static io.trino.sql.ExpressionFormatter.formatExpression; +import static io.trino.sql.ExpressionFormatter.formatGroupBy; +import static io.trino.sql.ExpressionFormatter.formatOrderBy; +import static io.trino.sql.ExpressionFormatter.formatStringLiteral; import static java.lang.String.format; import static java.util.stream.Collectors.joining; diff --git a/core/trino-parser/src/main/java/io/trino/sql/TreePrinter.java b/core/trino-parser/src/main/java/io/trino/sql/TreePrinter.java index ff002f629a75..b3f449e762c8 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/TreePrinter.java +++ b/core/trino-parser/src/main/java/io/trino/sql/TreePrinter.java @@ -15,42 +15,42 @@ import com.google.common.base.Joiner; import com.google.common.base.Strings; -import io.prestosql.sql.tree.AliasedRelation; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.AstVisitor; -import io.prestosql.sql.tree.BinaryLiteral; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.Cube; -import io.prestosql.sql.tree.DefaultTraversalVisitor; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.GroupingElement; -import io.prestosql.sql.tree.GroupingSets; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.QuerySpecification; -import io.prestosql.sql.tree.Rollup; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.SampledRelation; -import io.prestosql.sql.tree.Select; -import io.prestosql.sql.tree.SimpleGroupBy; -import io.prestosql.sql.tree.SingleColumn; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SubqueryExpression; -import io.prestosql.sql.tree.Table; -import io.prestosql.sql.tree.TableSubquery; -import io.prestosql.sql.tree.Values; +import io.trino.sql.tree.AliasedRelation; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.AstVisitor; +import io.trino.sql.tree.BinaryLiteral; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.Cube; +import io.trino.sql.tree.DefaultTraversalVisitor; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.GroupingElement; +import io.trino.sql.tree.GroupingSets; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.QuerySpecification; +import io.trino.sql.tree.Rollup; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.SampledRelation; +import io.trino.sql.tree.Select; +import io.trino.sql.tree.SimpleGroupBy; +import io.trino.sql.tree.SingleColumn; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SubqueryExpression; +import io.trino.sql.tree.Table; +import io.trino.sql.tree.TableSubquery; +import io.trino.sql.tree.Values; import java.io.PrintStream; import java.util.IdentityHashMap; diff --git a/core/trino-parser/src/main/java/io/trino/sql/parser/AstBuilder.java b/core/trino-parser/src/main/java/io/trino/sql/parser/AstBuilder.java index 85edb6d6e965..e598d17f903a 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/parser/AstBuilder.java +++ b/core/trino-parser/src/main/java/io/trino/sql/parser/AstBuilder.java @@ -17,182 +17,182 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; -import io.prestosql.sql.tree.AddColumn; -import io.prestosql.sql.tree.AliasedRelation; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.AllRows; -import io.prestosql.sql.tree.Analyze; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArithmeticUnaryExpression; -import io.prestosql.sql.tree.ArrayConstructor; -import io.prestosql.sql.tree.AtTimeZone; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.BinaryLiteral; -import io.prestosql.sql.tree.BindExpression; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Call; -import io.prestosql.sql.tree.CallArgument; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CharLiteral; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ColumnDefinition; -import io.prestosql.sql.tree.Comment; -import io.prestosql.sql.tree.Commit; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.CreateMaterializedView; -import io.prestosql.sql.tree.CreateRole; -import io.prestosql.sql.tree.CreateSchema; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.CreateTableAsSelect; -import io.prestosql.sql.tree.CreateView; -import io.prestosql.sql.tree.Cube; -import io.prestosql.sql.tree.CurrentPath; -import io.prestosql.sql.tree.CurrentTime; -import io.prestosql.sql.tree.CurrentUser; -import io.prestosql.sql.tree.DataType; -import io.prestosql.sql.tree.DataTypeParameter; -import io.prestosql.sql.tree.DateTimeDataType; -import io.prestosql.sql.tree.Deallocate; -import io.prestosql.sql.tree.DecimalLiteral; -import io.prestosql.sql.tree.Delete; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.DescribeInput; -import io.prestosql.sql.tree.DescribeOutput; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.DropColumn; -import io.prestosql.sql.tree.DropMaterializedView; -import io.prestosql.sql.tree.DropRole; -import io.prestosql.sql.tree.DropSchema; -import io.prestosql.sql.tree.DropTable; -import io.prestosql.sql.tree.DropView; -import io.prestosql.sql.tree.Except; -import io.prestosql.sql.tree.Execute; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.Explain; -import io.prestosql.sql.tree.ExplainFormat; -import io.prestosql.sql.tree.ExplainOption; -import io.prestosql.sql.tree.ExplainType; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Extract; -import io.prestosql.sql.tree.FetchFirst; -import io.prestosql.sql.tree.Format; -import io.prestosql.sql.tree.FrameBound; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.FunctionCall.NullTreatment; -import io.prestosql.sql.tree.GenericDataType; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.Grant; -import io.prestosql.sql.tree.GrantOnType; -import io.prestosql.sql.tree.GrantRoles; -import io.prestosql.sql.tree.GrantorSpecification; -import io.prestosql.sql.tree.GroupBy; -import io.prestosql.sql.tree.GroupingElement; -import io.prestosql.sql.tree.GroupingOperation; -import io.prestosql.sql.tree.GroupingSets; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.InListExpression; -import io.prestosql.sql.tree.InPredicate; -import io.prestosql.sql.tree.Insert; -import io.prestosql.sql.tree.Intersect; -import io.prestosql.sql.tree.IntervalDayTimeDataType; -import io.prestosql.sql.tree.IntervalLiteral; -import io.prestosql.sql.tree.IsNotNullPredicate; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.Isolation; -import io.prestosql.sql.tree.Join; -import io.prestosql.sql.tree.JoinCriteria; -import io.prestosql.sql.tree.JoinOn; -import io.prestosql.sql.tree.JoinUsing; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.Lateral; -import io.prestosql.sql.tree.LikeClause; -import io.prestosql.sql.tree.LikePredicate; -import io.prestosql.sql.tree.Limit; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NaturalJoin; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeLocation; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullIfExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.NumericParameter; -import io.prestosql.sql.tree.Offset; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.PathElement; -import io.prestosql.sql.tree.PathSpecification; -import io.prestosql.sql.tree.Prepare; -import io.prestosql.sql.tree.PrincipalSpecification; -import io.prestosql.sql.tree.Property; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.QuantifiedComparisonExpression; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.QueryBody; -import io.prestosql.sql.tree.QuerySpecification; -import io.prestosql.sql.tree.RefreshMaterializedView; -import io.prestosql.sql.tree.Relation; -import io.prestosql.sql.tree.RenameColumn; -import io.prestosql.sql.tree.RenameSchema; -import io.prestosql.sql.tree.RenameTable; -import io.prestosql.sql.tree.RenameView; -import io.prestosql.sql.tree.ResetSession; -import io.prestosql.sql.tree.Revoke; -import io.prestosql.sql.tree.RevokeRoles; -import io.prestosql.sql.tree.Rollback; -import io.prestosql.sql.tree.Rollup; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.RowDataType; -import io.prestosql.sql.tree.SampledRelation; -import io.prestosql.sql.tree.SearchedCaseExpression; -import io.prestosql.sql.tree.Select; -import io.prestosql.sql.tree.SelectItem; -import io.prestosql.sql.tree.SetPath; -import io.prestosql.sql.tree.SetRole; -import io.prestosql.sql.tree.SetSchemaAuthorization; -import io.prestosql.sql.tree.SetSession; -import io.prestosql.sql.tree.SetTableAuthorization; -import io.prestosql.sql.tree.SetViewAuthorization; -import io.prestosql.sql.tree.ShowCatalogs; -import io.prestosql.sql.tree.ShowColumns; -import io.prestosql.sql.tree.ShowCreate; -import io.prestosql.sql.tree.ShowFunctions; -import io.prestosql.sql.tree.ShowGrants; -import io.prestosql.sql.tree.ShowRoleGrants; -import io.prestosql.sql.tree.ShowRoles; -import io.prestosql.sql.tree.ShowSchemas; -import io.prestosql.sql.tree.ShowSession; -import io.prestosql.sql.tree.ShowStats; -import io.prestosql.sql.tree.ShowTables; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.SimpleGroupBy; -import io.prestosql.sql.tree.SingleColumn; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.StartTransaction; -import io.prestosql.sql.tree.Statement; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SubqueryExpression; -import io.prestosql.sql.tree.SubscriptExpression; -import io.prestosql.sql.tree.Table; -import io.prestosql.sql.tree.TableElement; -import io.prestosql.sql.tree.TableSubquery; -import io.prestosql.sql.tree.TimeLiteral; -import io.prestosql.sql.tree.TimestampLiteral; -import io.prestosql.sql.tree.TransactionAccessMode; -import io.prestosql.sql.tree.TransactionMode; -import io.prestosql.sql.tree.TryExpression; -import io.prestosql.sql.tree.TypeParameter; -import io.prestosql.sql.tree.Union; -import io.prestosql.sql.tree.Unnest; -import io.prestosql.sql.tree.Use; -import io.prestosql.sql.tree.Values; -import io.prestosql.sql.tree.WhenClause; -import io.prestosql.sql.tree.Window; -import io.prestosql.sql.tree.WindowFrame; -import io.prestosql.sql.tree.With; -import io.prestosql.sql.tree.WithQuery; +import io.trino.sql.tree.AddColumn; +import io.trino.sql.tree.AliasedRelation; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.AllRows; +import io.trino.sql.tree.Analyze; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArithmeticUnaryExpression; +import io.trino.sql.tree.ArrayConstructor; +import io.trino.sql.tree.AtTimeZone; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.BinaryLiteral; +import io.trino.sql.tree.BindExpression; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Call; +import io.trino.sql.tree.CallArgument; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CharLiteral; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ColumnDefinition; +import io.trino.sql.tree.Comment; +import io.trino.sql.tree.Commit; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.CreateMaterializedView; +import io.trino.sql.tree.CreateRole; +import io.trino.sql.tree.CreateSchema; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.CreateTableAsSelect; +import io.trino.sql.tree.CreateView; +import io.trino.sql.tree.Cube; +import io.trino.sql.tree.CurrentPath; +import io.trino.sql.tree.CurrentTime; +import io.trino.sql.tree.CurrentUser; +import io.trino.sql.tree.DataType; +import io.trino.sql.tree.DataTypeParameter; +import io.trino.sql.tree.DateTimeDataType; +import io.trino.sql.tree.Deallocate; +import io.trino.sql.tree.DecimalLiteral; +import io.trino.sql.tree.Delete; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.DescribeInput; +import io.trino.sql.tree.DescribeOutput; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.DropColumn; +import io.trino.sql.tree.DropMaterializedView; +import io.trino.sql.tree.DropRole; +import io.trino.sql.tree.DropSchema; +import io.trino.sql.tree.DropTable; +import io.trino.sql.tree.DropView; +import io.trino.sql.tree.Except; +import io.trino.sql.tree.Execute; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.Explain; +import io.trino.sql.tree.ExplainFormat; +import io.trino.sql.tree.ExplainOption; +import io.trino.sql.tree.ExplainType; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Extract; +import io.trino.sql.tree.FetchFirst; +import io.trino.sql.tree.Format; +import io.trino.sql.tree.FrameBound; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.FunctionCall.NullTreatment; +import io.trino.sql.tree.GenericDataType; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.Grant; +import io.trino.sql.tree.GrantOnType; +import io.trino.sql.tree.GrantRoles; +import io.trino.sql.tree.GrantorSpecification; +import io.trino.sql.tree.GroupBy; +import io.trino.sql.tree.GroupingElement; +import io.trino.sql.tree.GroupingOperation; +import io.trino.sql.tree.GroupingSets; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.InListExpression; +import io.trino.sql.tree.InPredicate; +import io.trino.sql.tree.Insert; +import io.trino.sql.tree.Intersect; +import io.trino.sql.tree.IntervalDayTimeDataType; +import io.trino.sql.tree.IntervalLiteral; +import io.trino.sql.tree.IsNotNullPredicate; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.Isolation; +import io.trino.sql.tree.Join; +import io.trino.sql.tree.JoinCriteria; +import io.trino.sql.tree.JoinOn; +import io.trino.sql.tree.JoinUsing; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.Lateral; +import io.trino.sql.tree.LikeClause; +import io.trino.sql.tree.LikePredicate; +import io.trino.sql.tree.Limit; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NaturalJoin; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeLocation; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullIfExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.NumericParameter; +import io.trino.sql.tree.Offset; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.PathElement; +import io.trino.sql.tree.PathSpecification; +import io.trino.sql.tree.Prepare; +import io.trino.sql.tree.PrincipalSpecification; +import io.trino.sql.tree.Property; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.QuantifiedComparisonExpression; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.QueryBody; +import io.trino.sql.tree.QuerySpecification; +import io.trino.sql.tree.RefreshMaterializedView; +import io.trino.sql.tree.Relation; +import io.trino.sql.tree.RenameColumn; +import io.trino.sql.tree.RenameSchema; +import io.trino.sql.tree.RenameTable; +import io.trino.sql.tree.RenameView; +import io.trino.sql.tree.ResetSession; +import io.trino.sql.tree.Revoke; +import io.trino.sql.tree.RevokeRoles; +import io.trino.sql.tree.Rollback; +import io.trino.sql.tree.Rollup; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.RowDataType; +import io.trino.sql.tree.SampledRelation; +import io.trino.sql.tree.SearchedCaseExpression; +import io.trino.sql.tree.Select; +import io.trino.sql.tree.SelectItem; +import io.trino.sql.tree.SetPath; +import io.trino.sql.tree.SetRole; +import io.trino.sql.tree.SetSchemaAuthorization; +import io.trino.sql.tree.SetSession; +import io.trino.sql.tree.SetTableAuthorization; +import io.trino.sql.tree.SetViewAuthorization; +import io.trino.sql.tree.ShowCatalogs; +import io.trino.sql.tree.ShowColumns; +import io.trino.sql.tree.ShowCreate; +import io.trino.sql.tree.ShowFunctions; +import io.trino.sql.tree.ShowGrants; +import io.trino.sql.tree.ShowRoleGrants; +import io.trino.sql.tree.ShowRoles; +import io.trino.sql.tree.ShowSchemas; +import io.trino.sql.tree.ShowSession; +import io.trino.sql.tree.ShowStats; +import io.trino.sql.tree.ShowTables; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.SimpleGroupBy; +import io.trino.sql.tree.SingleColumn; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.StartTransaction; +import io.trino.sql.tree.Statement; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SubqueryExpression; +import io.trino.sql.tree.SubscriptExpression; +import io.trino.sql.tree.Table; +import io.trino.sql.tree.TableElement; +import io.trino.sql.tree.TableSubquery; +import io.trino.sql.tree.TimeLiteral; +import io.trino.sql.tree.TimestampLiteral; +import io.trino.sql.tree.TransactionAccessMode; +import io.trino.sql.tree.TransactionMode; +import io.trino.sql.tree.TryExpression; +import io.trino.sql.tree.TypeParameter; +import io.trino.sql.tree.Union; +import io.trino.sql.tree.Unnest; +import io.trino.sql.tree.Use; +import io.trino.sql.tree.Values; +import io.trino.sql.tree.WhenClause; +import io.trino.sql.tree.Window; +import io.trino.sql.tree.WindowFrame; +import io.trino.sql.tree.With; +import io.trino.sql.tree.WithQuery; import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.tree.ParseTree; @@ -204,9 +204,9 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.sql.QueryUtil.query; -import static io.prestosql.sql.parser.SqlBaseParser.TIME; -import static io.prestosql.sql.parser.SqlBaseParser.TIMESTAMP; +import static io.trino.sql.QueryUtil.query; +import static io.trino.sql.parser.SqlBaseParser.TIME; +import static io.trino.sql.parser.SqlBaseParser.TIMESTAMP; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-parser/src/main/java/io/trino/sql/parser/ParsingException.java b/core/trino-parser/src/main/java/io/trino/sql/parser/ParsingException.java index 98a518f4a2ae..3882d54f09ce 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/parser/ParsingException.java +++ b/core/trino-parser/src/main/java/io/trino/sql/parser/ParsingException.java @@ -13,7 +13,7 @@ */ package io.trino.sql.parser; -import io.prestosql.sql.tree.NodeLocation; +import io.trino.sql.tree.NodeLocation; import org.antlr.v4.runtime.RecognitionException; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/trino-parser/src/main/java/io/trino/sql/parser/SqlParser.java b/core/trino-parser/src/main/java/io/trino/sql/parser/SqlParser.java index 9f21bdf2d903..d50f08fcd0ef 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/parser/SqlParser.java +++ b/core/trino-parser/src/main/java/io/trino/sql/parser/SqlParser.java @@ -13,11 +13,11 @@ */ package io.trino.sql.parser; -import io.prestosql.sql.tree.DataType; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.PathSpecification; -import io.prestosql.sql.tree.Statement; +import io.trino.sql.tree.DataType; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.PathSpecification; +import io.trino.sql.tree.Statement; import org.antlr.v4.runtime.BaseErrorListener; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonToken; diff --git a/core/trino-parser/src/main/java/io/trino/sql/testing/TreeAssertions.java b/core/trino-parser/src/main/java/io/trino/sql/testing/TreeAssertions.java index a415437cd2b4..f57151532aac 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/testing/TreeAssertions.java +++ b/core/trino-parser/src/main/java/io/trino/sql/testing/TreeAssertions.java @@ -15,19 +15,19 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.parser.ParsingException; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.DefaultTraversalVisitor; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.Statement; +import io.trino.sql.parser.ParsingException; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.DefaultTraversalVisitor; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.Statement; import javax.annotation.Nullable; import java.util.List; -import static io.prestosql.sql.SqlFormatter.formatSql; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; +import static io.trino.sql.SqlFormatter.formatSql; +import static io.trino.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; import static java.lang.String.format; public final class TreeAssertions diff --git a/core/trino-parser/src/main/java/io/trino/sql/tree/BinaryLiteral.java b/core/trino-parser/src/main/java/io/trino/sql/tree/BinaryLiteral.java index 8943a9c354ee..4cfe1442438e 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/tree/BinaryLiteral.java +++ b/core/trino-parser/src/main/java/io/trino/sql/tree/BinaryLiteral.java @@ -16,7 +16,7 @@ import com.google.common.io.BaseEncoding; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.sql.parser.ParsingException; +import io.trino.sql.parser.ParsingException; import java.util.Objects; import java.util.Optional; diff --git a/core/trino-parser/src/main/java/io/trino/sql/tree/Expression.java b/core/trino-parser/src/main/java/io/trino/sql/tree/Expression.java index b2238965abc3..30e8fc555032 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/tree/Expression.java +++ b/core/trino-parser/src/main/java/io/trino/sql/tree/Expression.java @@ -13,7 +13,7 @@ */ package io.trino.sql.tree; -import io.prestosql.sql.ExpressionFormatter; +import io.trino.sql.ExpressionFormatter; import java.util.Optional; diff --git a/core/trino-parser/src/main/java/io/trino/sql/tree/GenericLiteral.java b/core/trino-parser/src/main/java/io/trino/sql/tree/GenericLiteral.java index cf51cdd4a03c..2737b676946e 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/tree/GenericLiteral.java +++ b/core/trino-parser/src/main/java/io/trino/sql/tree/GenericLiteral.java @@ -13,7 +13,7 @@ */ package io.trino.sql.tree; -import io.prestosql.sql.parser.ParsingException; +import io.trino.sql.parser.ParsingException; import java.util.Objects; import java.util.Optional; diff --git a/core/trino-parser/src/main/java/io/trino/sql/tree/LongLiteral.java b/core/trino-parser/src/main/java/io/trino/sql/tree/LongLiteral.java index 96fc27a1b8ef..3e434ef0701f 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/tree/LongLiteral.java +++ b/core/trino-parser/src/main/java/io/trino/sql/tree/LongLiteral.java @@ -13,7 +13,7 @@ */ package io.trino.sql.tree; -import io.prestosql.sql.parser.ParsingException; +import io.trino.sql.parser.ParsingException; import java.util.Optional; diff --git a/core/trino-parser/src/main/java/io/trino/sql/util/AstUtils.java b/core/trino-parser/src/main/java/io/trino/sql/util/AstUtils.java index 50d0ce3ffb2e..c69823519e3d 100644 --- a/core/trino-parser/src/main/java/io/trino/sql/util/AstUtils.java +++ b/core/trino-parser/src/main/java/io/trino/sql/util/AstUtils.java @@ -15,7 +15,7 @@ import com.google.common.graph.SuccessorsFunction; import com.google.common.graph.Traverser; -import io.prestosql.sql.tree.Node; +import io.trino.sql.tree.Node; import java.util.List; import java.util.OptionalInt; diff --git a/core/trino-parser/src/main/java/io/trino/type/TypeCalculation.java b/core/trino-parser/src/main/java/io/trino/type/TypeCalculation.java index 85e20ca19fa5..7a6fc7a4b450 100644 --- a/core/trino-parser/src/main/java/io/trino/type/TypeCalculation.java +++ b/core/trino-parser/src/main/java/io/trino/type/TypeCalculation.java @@ -13,16 +13,16 @@ */ package io.trino.type; -import io.prestosql.sql.parser.CaseInsensitiveStream; -import io.prestosql.sql.parser.ParsingException; -import io.prestosql.type.TypeCalculationParser.ArithmeticBinaryContext; -import io.prestosql.type.TypeCalculationParser.ArithmeticUnaryContext; -import io.prestosql.type.TypeCalculationParser.BinaryFunctionContext; -import io.prestosql.type.TypeCalculationParser.IdentifierContext; -import io.prestosql.type.TypeCalculationParser.NullLiteralContext; -import io.prestosql.type.TypeCalculationParser.NumericLiteralContext; -import io.prestosql.type.TypeCalculationParser.ParenthesizedExpressionContext; -import io.prestosql.type.TypeCalculationParser.TypeCalculationContext; +import io.trino.sql.parser.CaseInsensitiveStream; +import io.trino.sql.parser.ParsingException; +import io.trino.type.TypeCalculationParser.ArithmeticBinaryContext; +import io.trino.type.TypeCalculationParser.ArithmeticUnaryContext; +import io.trino.type.TypeCalculationParser.BinaryFunctionContext; +import io.trino.type.TypeCalculationParser.IdentifierContext; +import io.trino.type.TypeCalculationParser.NullLiteralContext; +import io.trino.type.TypeCalculationParser.NumericLiteralContext; +import io.trino.type.TypeCalculationParser.ParenthesizedExpressionContext; +import io.trino.type.TypeCalculationParser.TypeCalculationContext; import org.antlr.v4.runtime.BaseErrorListener; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; @@ -36,12 +36,12 @@ import java.util.Map; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.type.TypeCalculationParser.ASTERISK; -import static io.prestosql.type.TypeCalculationParser.MAX; -import static io.prestosql.type.TypeCalculationParser.MIN; -import static io.prestosql.type.TypeCalculationParser.MINUS; -import static io.prestosql.type.TypeCalculationParser.PLUS; -import static io.prestosql.type.TypeCalculationParser.SLASH; +import static io.trino.type.TypeCalculationParser.ASTERISK; +import static io.trino.type.TypeCalculationParser.MAX; +import static io.trino.type.TypeCalculationParser.MIN; +import static io.trino.type.TypeCalculationParser.MINUS; +import static io.trino.type.TypeCalculationParser.PLUS; +import static io.trino.type.TypeCalculationParser.SLASH; import static java.util.Objects.requireNonNull; public final class TypeCalculation diff --git a/core/trino-parser/src/test/java/io/trino/sql/parser/ParserAssert.java b/core/trino-parser/src/test/java/io/trino/sql/parser/ParserAssert.java index e6653da69e8d..21f70b7a459e 100644 --- a/core/trino-parser/src/test/java/io/trino/sql/parser/ParserAssert.java +++ b/core/trino-parser/src/test/java/io/trino/sql/parser/ParserAssert.java @@ -13,10 +13,10 @@ */ package io.trino.sql.parser; -import io.prestosql.sql.SqlFormatter; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.Statement; +import io.trino.sql.SqlFormatter; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.Statement; import org.assertj.core.api.AssertProvider; import org.assertj.core.api.RecursiveComparisonAssert; import org.assertj.core.api.recursive.comparison.RecursiveComparisonConfiguration; @@ -24,8 +24,8 @@ import java.util.function.Function; -import static io.prestosql.sql.SqlFormatter.formatSql; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DECIMAL; +import static io.trino.sql.SqlFormatter.formatSql; +import static io.trino.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DECIMAL; public class ParserAssert extends RecursiveComparisonAssert diff --git a/core/trino-parser/src/test/java/io/trino/sql/parser/TestParsingException.java b/core/trino-parser/src/test/java/io/trino/sql/parser/TestParsingException.java index e21291844e50..bfe625d305f7 100644 --- a/core/trino-parser/src/test/java/io/trino/sql/parser/TestParsingException.java +++ b/core/trino-parser/src/test/java/io/trino/sql/parser/TestParsingException.java @@ -13,7 +13,7 @@ */ package io.trino.sql.parser; -import io.prestosql.sql.tree.NodeLocation; +import io.trino.sql.tree.NodeLocation; import org.testng.annotations.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/trino-parser/src/test/java/io/trino/sql/parser/TestSqlParser.java b/core/trino-parser/src/test/java/io/trino/sql/parser/TestSqlParser.java index 51bb0800640d..5bea82a70578 100644 --- a/core/trino-parser/src/test/java/io/trino/sql/parser/TestSqlParser.java +++ b/core/trino-parser/src/test/java/io/trino/sql/parser/TestSqlParser.java @@ -17,150 +17,150 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; -import io.prestosql.sql.tree.AddColumn; -import io.prestosql.sql.tree.AliasedRelation; -import io.prestosql.sql.tree.AllColumns; -import io.prestosql.sql.tree.AllRows; -import io.prestosql.sql.tree.Analyze; -import io.prestosql.sql.tree.ArithmeticBinaryExpression; -import io.prestosql.sql.tree.ArrayConstructor; -import io.prestosql.sql.tree.AtTimeZone; -import io.prestosql.sql.tree.BetweenPredicate; -import io.prestosql.sql.tree.BinaryLiteral; -import io.prestosql.sql.tree.BooleanLiteral; -import io.prestosql.sql.tree.Call; -import io.prestosql.sql.tree.CallArgument; -import io.prestosql.sql.tree.Cast; -import io.prestosql.sql.tree.CharLiteral; -import io.prestosql.sql.tree.CoalesceExpression; -import io.prestosql.sql.tree.ColumnDefinition; -import io.prestosql.sql.tree.Comment; -import io.prestosql.sql.tree.Commit; -import io.prestosql.sql.tree.ComparisonExpression; -import io.prestosql.sql.tree.CreateMaterializedView; -import io.prestosql.sql.tree.CreateRole; -import io.prestosql.sql.tree.CreateSchema; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.CreateTableAsSelect; -import io.prestosql.sql.tree.CreateView; -import io.prestosql.sql.tree.Cube; -import io.prestosql.sql.tree.CurrentTime; -import io.prestosql.sql.tree.Deallocate; -import io.prestosql.sql.tree.DecimalLiteral; -import io.prestosql.sql.tree.Delete; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.DescribeInput; -import io.prestosql.sql.tree.DescribeOutput; -import io.prestosql.sql.tree.DoubleLiteral; -import io.prestosql.sql.tree.DropColumn; -import io.prestosql.sql.tree.DropMaterializedView; -import io.prestosql.sql.tree.DropRole; -import io.prestosql.sql.tree.DropSchema; -import io.prestosql.sql.tree.DropTable; -import io.prestosql.sql.tree.DropView; -import io.prestosql.sql.tree.Execute; -import io.prestosql.sql.tree.ExistsPredicate; -import io.prestosql.sql.tree.Explain; -import io.prestosql.sql.tree.ExplainFormat; -import io.prestosql.sql.tree.ExplainType; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FetchFirst; -import io.prestosql.sql.tree.Format; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.FunctionCall.NullTreatment; -import io.prestosql.sql.tree.GenericLiteral; -import io.prestosql.sql.tree.Grant; -import io.prestosql.sql.tree.GrantOnType; -import io.prestosql.sql.tree.GrantRoles; -import io.prestosql.sql.tree.GrantorSpecification; -import io.prestosql.sql.tree.GroupBy; -import io.prestosql.sql.tree.GroupingOperation; -import io.prestosql.sql.tree.GroupingSets; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.IfExpression; -import io.prestosql.sql.tree.Insert; -import io.prestosql.sql.tree.Intersect; -import io.prestosql.sql.tree.IntervalLiteral; -import io.prestosql.sql.tree.IntervalLiteral.IntervalField; -import io.prestosql.sql.tree.IntervalLiteral.Sign; -import io.prestosql.sql.tree.IsNullPredicate; -import io.prestosql.sql.tree.Isolation; -import io.prestosql.sql.tree.Join; -import io.prestosql.sql.tree.JoinOn; -import io.prestosql.sql.tree.LambdaArgumentDeclaration; -import io.prestosql.sql.tree.LambdaExpression; -import io.prestosql.sql.tree.Lateral; -import io.prestosql.sql.tree.LikeClause; -import io.prestosql.sql.tree.Limit; -import io.prestosql.sql.tree.LogicalBinaryExpression; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.NaturalJoin; -import io.prestosql.sql.tree.Node; -import io.prestosql.sql.tree.NodeLocation; -import io.prestosql.sql.tree.NotExpression; -import io.prestosql.sql.tree.NullIfExpression; -import io.prestosql.sql.tree.NullLiteral; -import io.prestosql.sql.tree.Offset; -import io.prestosql.sql.tree.OrderBy; -import io.prestosql.sql.tree.Parameter; -import io.prestosql.sql.tree.PathElement; -import io.prestosql.sql.tree.PathSpecification; -import io.prestosql.sql.tree.Prepare; -import io.prestosql.sql.tree.PrincipalSpecification; -import io.prestosql.sql.tree.Property; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.QuantifiedComparisonExpression; -import io.prestosql.sql.tree.Query; -import io.prestosql.sql.tree.QuerySpecification; -import io.prestosql.sql.tree.RefreshMaterializedView; -import io.prestosql.sql.tree.RenameColumn; -import io.prestosql.sql.tree.RenameSchema; -import io.prestosql.sql.tree.RenameTable; -import io.prestosql.sql.tree.RenameView; -import io.prestosql.sql.tree.ResetSession; -import io.prestosql.sql.tree.Revoke; -import io.prestosql.sql.tree.RevokeRoles; -import io.prestosql.sql.tree.Rollback; -import io.prestosql.sql.tree.Rollup; -import io.prestosql.sql.tree.Row; -import io.prestosql.sql.tree.Select; -import io.prestosql.sql.tree.SelectItem; -import io.prestosql.sql.tree.SetPath; -import io.prestosql.sql.tree.SetRole; -import io.prestosql.sql.tree.SetSession; -import io.prestosql.sql.tree.SetTableAuthorization; -import io.prestosql.sql.tree.SetViewAuthorization; -import io.prestosql.sql.tree.ShowCatalogs; -import io.prestosql.sql.tree.ShowColumns; -import io.prestosql.sql.tree.ShowFunctions; -import io.prestosql.sql.tree.ShowGrants; -import io.prestosql.sql.tree.ShowRoleGrants; -import io.prestosql.sql.tree.ShowRoles; -import io.prestosql.sql.tree.ShowSchemas; -import io.prestosql.sql.tree.ShowSession; -import io.prestosql.sql.tree.ShowStats; -import io.prestosql.sql.tree.ShowTables; -import io.prestosql.sql.tree.SimpleCaseExpression; -import io.prestosql.sql.tree.SimpleGroupBy; -import io.prestosql.sql.tree.SingleColumn; -import io.prestosql.sql.tree.SortItem; -import io.prestosql.sql.tree.StartTransaction; -import io.prestosql.sql.tree.Statement; -import io.prestosql.sql.tree.StringLiteral; -import io.prestosql.sql.tree.SubqueryExpression; -import io.prestosql.sql.tree.SubscriptExpression; -import io.prestosql.sql.tree.Table; -import io.prestosql.sql.tree.TableSubquery; -import io.prestosql.sql.tree.TimeLiteral; -import io.prestosql.sql.tree.TimestampLiteral; -import io.prestosql.sql.tree.TransactionAccessMode; -import io.prestosql.sql.tree.Union; -import io.prestosql.sql.tree.Unnest; -import io.prestosql.sql.tree.Values; -import io.prestosql.sql.tree.WhenClause; -import io.prestosql.sql.tree.Window; -import io.prestosql.sql.tree.With; -import io.prestosql.sql.tree.WithQuery; +import io.trino.sql.tree.AddColumn; +import io.trino.sql.tree.AliasedRelation; +import io.trino.sql.tree.AllColumns; +import io.trino.sql.tree.AllRows; +import io.trino.sql.tree.Analyze; +import io.trino.sql.tree.ArithmeticBinaryExpression; +import io.trino.sql.tree.ArrayConstructor; +import io.trino.sql.tree.AtTimeZone; +import io.trino.sql.tree.BetweenPredicate; +import io.trino.sql.tree.BinaryLiteral; +import io.trino.sql.tree.BooleanLiteral; +import io.trino.sql.tree.Call; +import io.trino.sql.tree.CallArgument; +import io.trino.sql.tree.Cast; +import io.trino.sql.tree.CharLiteral; +import io.trino.sql.tree.CoalesceExpression; +import io.trino.sql.tree.ColumnDefinition; +import io.trino.sql.tree.Comment; +import io.trino.sql.tree.Commit; +import io.trino.sql.tree.ComparisonExpression; +import io.trino.sql.tree.CreateMaterializedView; +import io.trino.sql.tree.CreateRole; +import io.trino.sql.tree.CreateSchema; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.CreateTableAsSelect; +import io.trino.sql.tree.CreateView; +import io.trino.sql.tree.Cube; +import io.trino.sql.tree.CurrentTime; +import io.trino.sql.tree.Deallocate; +import io.trino.sql.tree.DecimalLiteral; +import io.trino.sql.tree.Delete; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.DescribeInput; +import io.trino.sql.tree.DescribeOutput; +import io.trino.sql.tree.DoubleLiteral; +import io.trino.sql.tree.DropColumn; +import io.trino.sql.tree.DropMaterializedView; +import io.trino.sql.tree.DropRole; +import io.trino.sql.tree.DropSchema; +import io.trino.sql.tree.DropTable; +import io.trino.sql.tree.DropView; +import io.trino.sql.tree.Execute; +import io.trino.sql.tree.ExistsPredicate; +import io.trino.sql.tree.Explain; +import io.trino.sql.tree.ExplainFormat; +import io.trino.sql.tree.ExplainType; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FetchFirst; +import io.trino.sql.tree.Format; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.FunctionCall.NullTreatment; +import io.trino.sql.tree.GenericLiteral; +import io.trino.sql.tree.Grant; +import io.trino.sql.tree.GrantOnType; +import io.trino.sql.tree.GrantRoles; +import io.trino.sql.tree.GrantorSpecification; +import io.trino.sql.tree.GroupBy; +import io.trino.sql.tree.GroupingOperation; +import io.trino.sql.tree.GroupingSets; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.IfExpression; +import io.trino.sql.tree.Insert; +import io.trino.sql.tree.Intersect; +import io.trino.sql.tree.IntervalLiteral; +import io.trino.sql.tree.IntervalLiteral.IntervalField; +import io.trino.sql.tree.IntervalLiteral.Sign; +import io.trino.sql.tree.IsNullPredicate; +import io.trino.sql.tree.Isolation; +import io.trino.sql.tree.Join; +import io.trino.sql.tree.JoinOn; +import io.trino.sql.tree.LambdaArgumentDeclaration; +import io.trino.sql.tree.LambdaExpression; +import io.trino.sql.tree.Lateral; +import io.trino.sql.tree.LikeClause; +import io.trino.sql.tree.Limit; +import io.trino.sql.tree.LogicalBinaryExpression; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.NaturalJoin; +import io.trino.sql.tree.Node; +import io.trino.sql.tree.NodeLocation; +import io.trino.sql.tree.NotExpression; +import io.trino.sql.tree.NullIfExpression; +import io.trino.sql.tree.NullLiteral; +import io.trino.sql.tree.Offset; +import io.trino.sql.tree.OrderBy; +import io.trino.sql.tree.Parameter; +import io.trino.sql.tree.PathElement; +import io.trino.sql.tree.PathSpecification; +import io.trino.sql.tree.Prepare; +import io.trino.sql.tree.PrincipalSpecification; +import io.trino.sql.tree.Property; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.QuantifiedComparisonExpression; +import io.trino.sql.tree.Query; +import io.trino.sql.tree.QuerySpecification; +import io.trino.sql.tree.RefreshMaterializedView; +import io.trino.sql.tree.RenameColumn; +import io.trino.sql.tree.RenameSchema; +import io.trino.sql.tree.RenameTable; +import io.trino.sql.tree.RenameView; +import io.trino.sql.tree.ResetSession; +import io.trino.sql.tree.Revoke; +import io.trino.sql.tree.RevokeRoles; +import io.trino.sql.tree.Rollback; +import io.trino.sql.tree.Rollup; +import io.trino.sql.tree.Row; +import io.trino.sql.tree.Select; +import io.trino.sql.tree.SelectItem; +import io.trino.sql.tree.SetPath; +import io.trino.sql.tree.SetRole; +import io.trino.sql.tree.SetSession; +import io.trino.sql.tree.SetTableAuthorization; +import io.trino.sql.tree.SetViewAuthorization; +import io.trino.sql.tree.ShowCatalogs; +import io.trino.sql.tree.ShowColumns; +import io.trino.sql.tree.ShowFunctions; +import io.trino.sql.tree.ShowGrants; +import io.trino.sql.tree.ShowRoleGrants; +import io.trino.sql.tree.ShowRoles; +import io.trino.sql.tree.ShowSchemas; +import io.trino.sql.tree.ShowSession; +import io.trino.sql.tree.ShowStats; +import io.trino.sql.tree.ShowTables; +import io.trino.sql.tree.SimpleCaseExpression; +import io.trino.sql.tree.SimpleGroupBy; +import io.trino.sql.tree.SingleColumn; +import io.trino.sql.tree.SortItem; +import io.trino.sql.tree.StartTransaction; +import io.trino.sql.tree.Statement; +import io.trino.sql.tree.StringLiteral; +import io.trino.sql.tree.SubqueryExpression; +import io.trino.sql.tree.SubscriptExpression; +import io.trino.sql.tree.Table; +import io.trino.sql.tree.TableSubquery; +import io.trino.sql.tree.TimeLiteral; +import io.trino.sql.tree.TimestampLiteral; +import io.trino.sql.tree.TransactionAccessMode; +import io.trino.sql.tree.Union; +import io.trino.sql.tree.Unnest; +import io.trino.sql.tree.Values; +import io.trino.sql.tree.WhenClause; +import io.trino.sql.tree.Window; +import io.trino.sql.tree.With; +import io.trino.sql.tree.WithQuery; import org.testng.annotations.Test; import java.util.ArrayList; @@ -168,36 +168,36 @@ import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.QueryUtil.ascending; -import static io.prestosql.sql.QueryUtil.identifier; -import static io.prestosql.sql.QueryUtil.ordering; -import static io.prestosql.sql.QueryUtil.query; -import static io.prestosql.sql.QueryUtil.quotedIdentifier; -import static io.prestosql.sql.QueryUtil.row; -import static io.prestosql.sql.QueryUtil.selectList; -import static io.prestosql.sql.QueryUtil.simpleQuery; -import static io.prestosql.sql.QueryUtil.subquery; -import static io.prestosql.sql.QueryUtil.table; -import static io.prestosql.sql.QueryUtil.values; -import static io.prestosql.sql.SqlFormatter.formatSql; -import static io.prestosql.sql.parser.ParserAssert.expression; -import static io.prestosql.sql.parser.ParserAssert.statement; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DECIMAL; -import static io.prestosql.sql.parser.TreeNodes.columnDefinition; -import static io.prestosql.sql.parser.TreeNodes.dateTimeType; -import static io.prestosql.sql.parser.TreeNodes.field; -import static io.prestosql.sql.parser.TreeNodes.location; -import static io.prestosql.sql.parser.TreeNodes.property; -import static io.prestosql.sql.parser.TreeNodes.qualifiedName; -import static io.prestosql.sql.parser.TreeNodes.rowType; -import static io.prestosql.sql.parser.TreeNodes.simpleType; -import static io.prestosql.sql.testing.TreeAssertions.assertFormattedSql; -import static io.prestosql.sql.tree.ArithmeticUnaryExpression.negative; -import static io.prestosql.sql.tree.ArithmeticUnaryExpression.positive; -import static io.prestosql.sql.tree.DateTimeDataType.Type.TIMESTAMP; -import static io.prestosql.sql.tree.SortItem.NullOrdering.UNDEFINED; -import static io.prestosql.sql.tree.SortItem.Ordering.ASCENDING; -import static io.prestosql.sql.tree.SortItem.Ordering.DESCENDING; +import static io.trino.sql.QueryUtil.ascending; +import static io.trino.sql.QueryUtil.identifier; +import static io.trino.sql.QueryUtil.ordering; +import static io.trino.sql.QueryUtil.query; +import static io.trino.sql.QueryUtil.quotedIdentifier; +import static io.trino.sql.QueryUtil.row; +import static io.trino.sql.QueryUtil.selectList; +import static io.trino.sql.QueryUtil.simpleQuery; +import static io.trino.sql.QueryUtil.subquery; +import static io.trino.sql.QueryUtil.table; +import static io.trino.sql.QueryUtil.values; +import static io.trino.sql.SqlFormatter.formatSql; +import static io.trino.sql.parser.ParserAssert.expression; +import static io.trino.sql.parser.ParserAssert.statement; +import static io.trino.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DECIMAL; +import static io.trino.sql.parser.TreeNodes.columnDefinition; +import static io.trino.sql.parser.TreeNodes.dateTimeType; +import static io.trino.sql.parser.TreeNodes.field; +import static io.trino.sql.parser.TreeNodes.location; +import static io.trino.sql.parser.TreeNodes.property; +import static io.trino.sql.parser.TreeNodes.qualifiedName; +import static io.trino.sql.parser.TreeNodes.rowType; +import static io.trino.sql.parser.TreeNodes.simpleType; +import static io.trino.sql.testing.TreeAssertions.assertFormattedSql; +import static io.trino.sql.tree.ArithmeticUnaryExpression.negative; +import static io.trino.sql.tree.ArithmeticUnaryExpression.positive; +import static io.trino.sql.tree.DateTimeDataType.Type.TIMESTAMP; +import static io.trino.sql.tree.SortItem.NullOrdering.UNDEFINED; +import static io.trino.sql.tree.SortItem.Ordering.ASCENDING; +import static io.trino.sql.tree.SortItem.Ordering.DESCENDING; import static java.lang.String.format; import static java.util.Collections.emptyList; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/trino-parser/src/test/java/io/trino/sql/parser/TestStatementBuilder.java b/core/trino-parser/src/test/java/io/trino/sql/parser/TestStatementBuilder.java index f80dc726de9b..132fddd4f1e5 100644 --- a/core/trino-parser/src/test/java/io/trino/sql/parser/TestStatementBuilder.java +++ b/core/trino-parser/src/test/java/io/trino/sql/parser/TestStatementBuilder.java @@ -14,17 +14,17 @@ package io.trino.sql.parser; import com.google.common.io.Resources; -import io.prestosql.sql.SqlFormatter; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.Statement; +import io.trino.sql.SqlFormatter; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.Statement; import org.testng.annotations.Test; import java.io.IOException; import java.io.UncheckedIOException; import static com.google.common.base.Strings.repeat; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; -import static io.prestosql.sql.testing.TreeAssertions.assertFormattedSql; +import static io.trino.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; +import static io.trino.sql.testing.TreeAssertions.assertFormattedSql; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; diff --git a/core/trino-parser/src/test/java/io/trino/sql/parser/TestStatementSplitter.java b/core/trino-parser/src/test/java/io/trino/sql/parser/TestStatementSplitter.java index b86807c37abd..80f4d52d5f8a 100644 --- a/core/trino-parser/src/test/java/io/trino/sql/parser/TestStatementSplitter.java +++ b/core/trino-parser/src/test/java/io/trino/sql/parser/TestStatementSplitter.java @@ -20,9 +20,9 @@ import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.sql.parser.StatementSplitter.Statement; -import static io.prestosql.sql.parser.StatementSplitter.isEmptyStatement; -import static io.prestosql.sql.parser.StatementSplitter.squeezeStatement; +import static io.trino.sql.parser.StatementSplitter.Statement; +import static io.trino.sql.parser.StatementSplitter.isEmptyStatement; +import static io.trino.sql.parser.StatementSplitter.squeezeStatement; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-parser/src/test/java/io/trino/sql/parser/TestTypeParser.java b/core/trino-parser/src/test/java/io/trino/sql/parser/TestTypeParser.java index 31ee813564c1..eca1ada4fd6d 100644 --- a/core/trino-parser/src/test/java/io/trino/sql/parser/TestTypeParser.java +++ b/core/trino-parser/src/test/java/io/trino/sql/parser/TestTypeParser.java @@ -15,22 +15,22 @@ import org.testng.annotations.Test; -import static io.prestosql.sql.parser.ParserAssert.type; -import static io.prestosql.sql.parser.TreeNodes.dateTimeType; -import static io.prestosql.sql.parser.TreeNodes.field; -import static io.prestosql.sql.parser.TreeNodes.identifier; -import static io.prestosql.sql.parser.TreeNodes.intervalType; -import static io.prestosql.sql.parser.TreeNodes.location; -import static io.prestosql.sql.parser.TreeNodes.parameter; -import static io.prestosql.sql.parser.TreeNodes.parametricType; -import static io.prestosql.sql.parser.TreeNodes.rowType; -import static io.prestosql.sql.parser.TreeNodes.simpleType; -import static io.prestosql.sql.tree.DateTimeDataType.Type.TIME; -import static io.prestosql.sql.tree.DateTimeDataType.Type.TIMESTAMP; -import static io.prestosql.sql.tree.IntervalDayTimeDataType.Field.DAY; -import static io.prestosql.sql.tree.IntervalDayTimeDataType.Field.MONTH; -import static io.prestosql.sql.tree.IntervalDayTimeDataType.Field.SECOND; -import static io.prestosql.sql.tree.IntervalDayTimeDataType.Field.YEAR; +import static io.trino.sql.parser.ParserAssert.type; +import static io.trino.sql.parser.TreeNodes.dateTimeType; +import static io.trino.sql.parser.TreeNodes.field; +import static io.trino.sql.parser.TreeNodes.identifier; +import static io.trino.sql.parser.TreeNodes.intervalType; +import static io.trino.sql.parser.TreeNodes.location; +import static io.trino.sql.parser.TreeNodes.parameter; +import static io.trino.sql.parser.TreeNodes.parametricType; +import static io.trino.sql.parser.TreeNodes.rowType; +import static io.trino.sql.parser.TreeNodes.simpleType; +import static io.trino.sql.tree.DateTimeDataType.Type.TIME; +import static io.trino.sql.tree.DateTimeDataType.Type.TIMESTAMP; +import static io.trino.sql.tree.IntervalDayTimeDataType.Field.DAY; +import static io.trino.sql.tree.IntervalDayTimeDataType.Field.MONTH; +import static io.trino.sql.tree.IntervalDayTimeDataType.Field.SECOND; +import static io.trino.sql.tree.IntervalDayTimeDataType.Field.YEAR; import static org.assertj.core.api.Assertions.assertThat; public class TestTypeParser diff --git a/core/trino-parser/src/test/java/io/trino/sql/parser/TreeNodes.java b/core/trino-parser/src/test/java/io/trino/sql/parser/TreeNodes.java index 7ec9aaa45d69..9fd9285687fb 100644 --- a/core/trino-parser/src/test/java/io/trino/sql/parser/TreeNodes.java +++ b/core/trino-parser/src/test/java/io/trino/sql/parser/TreeNodes.java @@ -14,20 +14,20 @@ package io.trino.sql.parser; import com.google.common.collect.ImmutableList; -import io.prestosql.sql.tree.ColumnDefinition; -import io.prestosql.sql.tree.DataType; -import io.prestosql.sql.tree.DataTypeParameter; -import io.prestosql.sql.tree.DateTimeDataType; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.GenericDataType; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.IntervalDayTimeDataType; -import io.prestosql.sql.tree.NodeLocation; -import io.prestosql.sql.tree.NumericParameter; -import io.prestosql.sql.tree.Property; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.RowDataType; -import io.prestosql.sql.tree.TypeParameter; +import io.trino.sql.tree.ColumnDefinition; +import io.trino.sql.tree.DataType; +import io.trino.sql.tree.DataTypeParameter; +import io.trino.sql.tree.DateTimeDataType; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.GenericDataType; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.IntervalDayTimeDataType; +import io.trino.sql.tree.NodeLocation; +import io.trino.sql.tree.NumericParameter; +import io.trino.sql.tree.Property; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.RowDataType; +import io.trino.sql.tree.TypeParameter; import java.util.Arrays; import java.util.List; diff --git a/core/trino-parser/src/test/java/io/trino/type/TestTypeCalculation.java b/core/trino-parser/src/test/java/io/trino/type/TestTypeCalculation.java index a7eb2a816ea1..d5b6e48f799d 100644 --- a/core/trino-parser/src/test/java/io/trino/type/TestTypeCalculation.java +++ b/core/trino-parser/src/test/java/io/trino/type/TestTypeCalculation.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableMap; import org.testng.annotations.Test; -import static io.prestosql.type.TypeCalculation.calculateLiteralValue; +import static io.trino.type.TypeCalculation.calculateLiteralValue; import static org.testng.Assert.assertEquals; public class TestTypeCalculation diff --git a/core/trino-server-rpm/src/test/java/io/trino/server/rpm/ServerIT.java b/core/trino-server-rpm/src/test/java/io/trino/server/rpm/ServerIT.java index f00b6bcc1bdd..8e51db9a7a9f 100644 --- a/core/trino-server-rpm/src/test/java/io/trino/server/rpm/ServerIT.java +++ b/core/trino-server-rpm/src/test/java/io/trino/server/rpm/ServerIT.java @@ -30,7 +30,7 @@ import java.util.List; import java.util.Set; -import static io.prestosql.testing.assertions.Assert.assertEventually; +import static io.trino.testing.assertions.Assert.assertEventually; import static java.lang.String.format; import static java.sql.DriverManager.getConnection; import static java.util.Arrays.asList; diff --git a/core/trino-spi/src/main/java/io/trino/spi/NodeManager.java b/core/trino-spi/src/main/java/io/trino/spi/NodeManager.java index 45cb0d3f0ca2..1c85f569d4dc 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/NodeManager.java +++ b/core/trino-spi/src/main/java/io/trino/spi/NodeManager.java @@ -15,7 +15,7 @@ import java.util.Set; -import static io.prestosql.spi.StandardErrorCode.NO_NODES_AVAILABLE; +import static io.trino.spi.StandardErrorCode.NO_NODES_AVAILABLE; public interface NodeManager { diff --git a/core/trino-spi/src/main/java/io/trino/spi/Page.java b/core/trino-spi/src/main/java/io/trino/spi/Page.java index 8d8904891aa5..9ef5c56b0794 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/Page.java +++ b/core/trino-spi/src/main/java/io/trino/spi/Page.java @@ -13,9 +13,9 @@ */ package io.trino.spi; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.DictionaryId; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.DictionaryId; import org.openjdk.jol.info.ClassLayout; import java.util.ArrayList; @@ -25,7 +25,7 @@ import java.util.Map; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.DictionaryId.randomDictionaryId; +import static io.trino.spi.block.DictionaryId.randomDictionaryId; import static java.lang.Math.min; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/PageBuilder.java b/core/trino-spi/src/main/java/io/trino/spi/PageBuilder.java index c10d6d8efc41..0cb14448a09c 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/PageBuilder.java +++ b/core/trino-spi/src/main/java/io/trino/spi/PageBuilder.java @@ -13,15 +13,15 @@ */ package io.trino.spi; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.type.Type; import java.util.List; import java.util.Optional; -import static io.prestosql.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; +import static io.trino.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/PageIndexerFactory.java b/core/trino-spi/src/main/java/io/trino/spi/PageIndexerFactory.java index 59a84ad0f352..9b0233ef9f13 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/PageIndexerFactory.java +++ b/core/trino-spi/src/main/java/io/trino/spi/PageIndexerFactory.java @@ -13,7 +13,7 @@ */ package io.trino.spi; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/PageSorter.java b/core/trino-spi/src/main/java/io/trino/spi/PageSorter.java index 3bf3060f44a7..7e23dfce5334 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/PageSorter.java +++ b/core/trino-spi/src/main/java/io/trino/spi/PageSorter.java @@ -13,8 +13,8 @@ */ package io.trino.spi; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/Plugin.java b/core/trino-spi/src/main/java/io/trino/spi/Plugin.java index 310910d95b44..9a5401c4ce39 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/Plugin.java +++ b/core/trino-spi/src/main/java/io/trino/spi/Plugin.java @@ -13,17 +13,17 @@ */ package io.trino.spi; -import io.prestosql.spi.block.BlockEncoding; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.eventlistener.EventListenerFactory; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; -import io.prestosql.spi.security.CertificateAuthenticatorFactory; -import io.prestosql.spi.security.GroupProviderFactory; -import io.prestosql.spi.security.PasswordAuthenticatorFactory; -import io.prestosql.spi.security.SystemAccessControlFactory; -import io.prestosql.spi.session.SessionPropertyConfigurationManagerFactory; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.BlockEncoding; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.eventlistener.EventListenerFactory; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; +import io.trino.spi.security.CertificateAuthenticatorFactory; +import io.trino.spi.security.GroupProviderFactory; +import io.trino.spi.security.PasswordAuthenticatorFactory; +import io.trino.spi.security.SystemAccessControlFactory; +import io.trino.spi.session.SessionPropertyConfigurationManagerFactory; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.Type; import java.util.Set; diff --git a/core/trino-spi/src/main/java/io/trino/spi/StandardErrorCode.java b/core/trino-spi/src/main/java/io/trino/spi/StandardErrorCode.java index ac4e9249f8ac..8545693a9aea 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/StandardErrorCode.java +++ b/core/trino-spi/src/main/java/io/trino/spi/StandardErrorCode.java @@ -13,9 +13,9 @@ */ package io.trino.spi; -import static io.prestosql.spi.ErrorType.INSUFFICIENT_RESOURCES; -import static io.prestosql.spi.ErrorType.INTERNAL_ERROR; -import static io.prestosql.spi.ErrorType.USER_ERROR; +import static io.trino.spi.ErrorType.INSUFFICIENT_RESOURCES; +import static io.trino.spi.ErrorType.INTERNAL_ERROR; +import static io.trino.spi.ErrorType.USER_ERROR; public enum StandardErrorCode implements ErrorCodeSupplier diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/AbstractArrayBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/AbstractArrayBlock.java index 9f65867c6f14..799cf9a0a207 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/AbstractArrayBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/AbstractArrayBlock.java @@ -17,12 +17,12 @@ import java.util.List; -import static io.prestosql.spi.block.ArrayBlock.createArrayBlockInternal; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidPositions; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.compactOffsets; +import static io.trino.spi.block.ArrayBlock.createArrayBlockInternal; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidPositions; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.compactOffsets; import static java.util.Collections.singletonList; public abstract class AbstractArrayBlock diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/AbstractMapBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/AbstractMapBlock.java index b455dda6904b..c37d64ffaf6a 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/AbstractMapBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/AbstractMapBlock.java @@ -14,7 +14,7 @@ package io.trino.spi.block; -import io.prestosql.spi.type.MapType; +import io.trino.spi.type.MapType; import javax.annotation.Nullable; @@ -22,13 +22,13 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidPositions; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.compactOffsets; -import static io.prestosql.spi.block.MapBlock.createMapBlockInternal; -import static io.prestosql.spi.block.MapHashTables.HASH_MULTIPLIER; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidPositions; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.compactOffsets; +import static io.trino.spi.block.MapBlock.createMapBlockInternal; +import static io.trino.spi.block.MapHashTables.HASH_MULTIPLIER; import static java.util.Objects.requireNonNull; public abstract class AbstractMapBlock diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/AbstractRowBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/AbstractRowBlock.java index fd8b7cb7647a..0ee533dfcab6 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/AbstractRowBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/AbstractRowBlock.java @@ -15,13 +15,13 @@ import java.util.List; -import static io.prestosql.spi.block.BlockUtil.arraySame; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidPositions; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.compactOffsets; -import static io.prestosql.spi.block.RowBlock.createRowBlockInternal; +import static io.trino.spi.block.BlockUtil.arraySame; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidPositions; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.compactOffsets; +import static io.trino.spi.block.RowBlock.createRowBlockInternal; public abstract class AbstractRowBlock implements Block diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/AbstractVariableWidthBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/AbstractVariableWidthBlock.java index 6d5a05665ddb..bdfabee0f23f 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/AbstractVariableWidthBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/AbstractVariableWidthBlock.java @@ -18,7 +18,7 @@ import io.airlift.slice.XxHash64; import static io.airlift.slice.Slices.EMPTY_SLICE; -import static io.prestosql.spi.block.BlockUtil.checkValidPosition; +import static io.trino.spi.block.BlockUtil.checkValidPosition; public abstract class AbstractVariableWidthBlock implements Block diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/ArrayBlockBuilder.java b/core/trino-spi/src/main/java/io/trino/spi/block/ArrayBlockBuilder.java index 843781c60174..4250e3b55cfa 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/ArrayBlockBuilder.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/ArrayBlockBuilder.java @@ -13,7 +13,7 @@ */ package io.trino.spi.block; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -22,8 +22,8 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.ArrayBlock.createArrayBlockInternal; -import static io.prestosql.spi.block.BlockUtil.calculateBlockResetSize; +import static io.trino.spi.block.ArrayBlock.createArrayBlockInternal; +import static io.trino.spi.block.BlockUtil.calculateBlockResetSize; import static java.lang.Math.max; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/ArrayBlockEncoding.java b/core/trino-spi/src/main/java/io/trino/spi/block/ArrayBlockEncoding.java index 1e8082e0abcb..8d6df66e838c 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/ArrayBlockEncoding.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/ArrayBlockEncoding.java @@ -17,9 +17,9 @@ import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import static io.prestosql.spi.block.ArrayBlock.createArrayBlockInternal; -import static io.prestosql.spi.block.EncoderUtil.decodeNullBits; -import static io.prestosql.spi.block.EncoderUtil.encodeNullsAsBits; +import static io.trino.spi.block.ArrayBlock.createArrayBlockInternal; +import static io.trino.spi.block.EncoderUtil.decodeNullBits; +import static io.trino.spi.block.EncoderUtil.encodeNullsAsBits; public class ArrayBlockEncoding implements BlockEncoding diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/Block.java b/core/trino-spi/src/main/java/io/trino/spi/block/Block.java index 5879b446f581..9907aeea0485 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/Block.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/Block.java @@ -19,8 +19,8 @@ import java.util.List; import java.util.function.BiConsumer; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.DictionaryId.randomDictionaryId; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.DictionaryId.randomDictionaryId; public interface Block { diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/BlockEncodingSerde.java b/core/trino-spi/src/main/java/io/trino/spi/block/BlockEncodingSerde.java index b33bb0ae3b47..9111d8eaedba 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/BlockEncodingSerde.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/BlockEncodingSerde.java @@ -15,7 +15,7 @@ import io.airlift.slice.SliceInput; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; public interface BlockEncodingSerde { diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/ByteArrayBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/ByteArrayBlock.java index f7666b873077..c5c810121507 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/ByteArrayBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/ByteArrayBlock.java @@ -23,10 +23,10 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.countUsedPositions; public class ByteArrayBlock implements Block diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/ByteArrayBlockBuilder.java b/core/trino-spi/src/main/java/io/trino/spi/block/ByteArrayBlockBuilder.java index 57302608c625..5a789cc520de 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/ByteArrayBlockBuilder.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/ByteArrayBlockBuilder.java @@ -23,10 +23,10 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.calculateBlockResetSize; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.BlockUtil.calculateBlockResetSize; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.countUsedPositions; import static java.lang.Math.max; public class ByteArrayBlockBuilder diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/ByteArrayBlockEncoding.java b/core/trino-spi/src/main/java/io/trino/spi/block/ByteArrayBlockEncoding.java index c809875f9e40..3d4486e797ef 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/ByteArrayBlockEncoding.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/ByteArrayBlockEncoding.java @@ -18,9 +18,9 @@ import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import static io.prestosql.spi.block.EncoderUtil.decodeNullBits; -import static io.prestosql.spi.block.EncoderUtil.encodeNullsAsBits; -import static io.prestosql.spi.block.EncoderUtil.retrieveNullBits; +import static io.trino.spi.block.EncoderUtil.decodeNullBits; +import static io.trino.spi.block.EncoderUtil.encodeNullsAsBits; +import static io.trino.spi.block.EncoderUtil.retrieveNullBits; import static java.lang.System.arraycopy; public class ByteArrayBlockEncoding diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/DictionaryBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/DictionaryBlock.java index a5b739bb116e..1508a2917f98 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/DictionaryBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/DictionaryBlock.java @@ -24,12 +24,12 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidPosition; -import static io.prestosql.spi.block.BlockUtil.checkValidPositions; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; -import static io.prestosql.spi.block.DictionaryId.randomDictionaryId; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidPosition; +import static io.trino.spi.block.BlockUtil.checkValidPositions; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.DictionaryId.randomDictionaryId; import static java.lang.Math.min; import static java.util.Collections.singletonList; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/DuplicateMapKeyException.java b/core/trino-spi/src/main/java/io/trino/spi/block/DuplicateMapKeyException.java index 21e6176ce2bc..8d4eb679656f 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/DuplicateMapKeyException.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/DuplicateMapKeyException.java @@ -13,13 +13,13 @@ */ package io.trino.spi.block; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; import static java.lang.String.format; public class DuplicateMapKeyException diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/Int128ArrayBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/Int128ArrayBlock.java index 487567048013..34b80ca10f72 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/Int128ArrayBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/Int128ArrayBlock.java @@ -23,10 +23,10 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.countUsedPositions; public class Int128ArrayBlock implements Block diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/Int128ArrayBlockBuilder.java b/core/trino-spi/src/main/java/io/trino/spi/block/Int128ArrayBlockBuilder.java index 825e51119c5a..c32669c47876 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/Int128ArrayBlockBuilder.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/Int128ArrayBlockBuilder.java @@ -24,12 +24,12 @@ import static io.airlift.slice.SizeOf.SIZE_OF_LONG; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.calculateBlockResetSize; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; -import static io.prestosql.spi.block.Int128ArrayBlock.INT128_BYTES; +import static io.trino.spi.block.BlockUtil.calculateBlockResetSize; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.Int128ArrayBlock.INT128_BYTES; import static java.lang.Math.max; public class Int128ArrayBlockBuilder diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/Int128ArrayBlockEncoding.java b/core/trino-spi/src/main/java/io/trino/spi/block/Int128ArrayBlockEncoding.java index 018c01f6cdad..45625b697d24 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/Int128ArrayBlockEncoding.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/Int128ArrayBlockEncoding.java @@ -18,8 +18,8 @@ import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import static io.prestosql.spi.block.EncoderUtil.decodeNullBits; -import static io.prestosql.spi.block.EncoderUtil.encodeNullsAsBits; +import static io.trino.spi.block.EncoderUtil.decodeNullBits; +import static io.trino.spi.block.EncoderUtil.encodeNullsAsBits; public class Int128ArrayBlockEncoding implements BlockEncoding diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/Int96ArrayBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/Int96ArrayBlock.java index fcd32a4c466f..16e27419e26f 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/Int96ArrayBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/Int96ArrayBlock.java @@ -23,10 +23,10 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.countUsedPositions; public class Int96ArrayBlock implements Block diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/Int96ArrayBlockBuilder.java b/core/trino-spi/src/main/java/io/trino/spi/block/Int96ArrayBlockBuilder.java index 1dbe7fdd12d9..b39ba18d008e 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/Int96ArrayBlockBuilder.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/Int96ArrayBlockBuilder.java @@ -24,12 +24,12 @@ import static io.airlift.slice.SizeOf.SIZE_OF_LONG; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.calculateBlockResetSize; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; -import static io.prestosql.spi.block.Int96ArrayBlock.INT96_BYTES; +import static io.trino.spi.block.BlockUtil.calculateBlockResetSize; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.Int96ArrayBlock.INT96_BYTES; import static java.lang.Math.max; public class Int96ArrayBlockBuilder diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/Int96ArrayBlockEncoding.java b/core/trino-spi/src/main/java/io/trino/spi/block/Int96ArrayBlockEncoding.java index fefe5d6781c8..8e9da83a5be5 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/Int96ArrayBlockEncoding.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/Int96ArrayBlockEncoding.java @@ -18,9 +18,9 @@ import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import static io.prestosql.spi.block.EncoderUtil.decodeNullBits; -import static io.prestosql.spi.block.EncoderUtil.encodeNullsAsBits; -import static io.prestosql.spi.block.EncoderUtil.retrieveNullBits; +import static io.trino.spi.block.EncoderUtil.decodeNullBits; +import static io.trino.spi.block.EncoderUtil.encodeNullsAsBits; +import static io.trino.spi.block.EncoderUtil.retrieveNullBits; import static java.lang.System.arraycopy; public class Int96ArrayBlockEncoding diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayBlock.java index 5baba2a23a3d..5f71315d4829 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayBlock.java @@ -23,10 +23,10 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.countUsedPositions; public class IntArrayBlock implements Block diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayBlockBuilder.java b/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayBlockBuilder.java index 5b40e8e09311..889ee237d331 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayBlockBuilder.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayBlockBuilder.java @@ -23,10 +23,10 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.calculateBlockResetSize; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.BlockUtil.calculateBlockResetSize; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.countUsedPositions; import static java.lang.Math.max; public class IntArrayBlockBuilder diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayBlockEncoding.java b/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayBlockEncoding.java index 2526bd8b71b0..86483ca9be0a 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayBlockEncoding.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayBlockEncoding.java @@ -18,9 +18,9 @@ import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import static io.prestosql.spi.block.EncoderUtil.decodeNullBits; -import static io.prestosql.spi.block.EncoderUtil.encodeNullsAsBits; -import static io.prestosql.spi.block.EncoderUtil.retrieveNullBits; +import static io.trino.spi.block.EncoderUtil.decodeNullBits; +import static io.trino.spi.block.EncoderUtil.encodeNullsAsBits; +import static io.trino.spi.block.EncoderUtil.retrieveNullBits; import static java.lang.System.arraycopy; public class IntArrayBlockEncoding diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayList.java b/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayList.java index 47676bb65db9..ed8fb300da3e 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayList.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/IntArrayList.java @@ -15,7 +15,7 @@ import java.util.Arrays; -import static io.prestosql.spi.block.BlockUtil.MAX_ARRAY_SIZE; +import static io.trino.spi.block.BlockUtil.MAX_ARRAY_SIZE; import static java.lang.String.format; /** diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/LazyBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/LazyBlock.java index 568640429330..4174449b3f7d 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/LazyBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/LazyBlock.java @@ -24,8 +24,8 @@ import java.util.function.BiConsumer; import java.util.function.Consumer; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; import static java.lang.String.format; import static java.util.Collections.singletonList; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/LongArrayBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/LongArrayBlock.java index b28106ee6b60..62df5bcde39b 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/LongArrayBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/LongArrayBlock.java @@ -23,10 +23,10 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.countUsedPositions; import static java.lang.Math.toIntExact; public class LongArrayBlock diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/LongArrayBlockBuilder.java b/core/trino-spi/src/main/java/io/trino/spi/block/LongArrayBlockBuilder.java index b86c59a8c0ae..c92d9df68efa 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/LongArrayBlockBuilder.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/LongArrayBlockBuilder.java @@ -23,10 +23,10 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.calculateBlockResetSize; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.BlockUtil.calculateBlockResetSize; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.countUsedPositions; import static java.lang.Math.max; import static java.lang.Math.toIntExact; diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/LongArrayBlockEncoding.java b/core/trino-spi/src/main/java/io/trino/spi/block/LongArrayBlockEncoding.java index 5e14a11e4bf2..14819c8d363b 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/LongArrayBlockEncoding.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/LongArrayBlockEncoding.java @@ -18,9 +18,9 @@ import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import static io.prestosql.spi.block.EncoderUtil.decodeNullBits; -import static io.prestosql.spi.block.EncoderUtil.encodeNullsAsBits; -import static io.prestosql.spi.block.EncoderUtil.retrieveNullBits; +import static io.trino.spi.block.EncoderUtil.decodeNullBits; +import static io.trino.spi.block.EncoderUtil.encodeNullsAsBits; +import static io.trino.spi.block.EncoderUtil.retrieveNullBits; import static java.lang.System.arraycopy; public class LongArrayBlockEncoding diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/MapBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/MapBlock.java index c1f934859f14..eeb299299dfe 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/MapBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/MapBlock.java @@ -14,7 +14,7 @@ package io.trino.spi.block; -import io.prestosql.spi.type.MapType; +import io.trino.spi.type.MapType; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -23,7 +23,7 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.MapHashTables.HASH_MULTIPLIER; +import static io.trino.spi.block.MapHashTables.HASH_MULTIPLIER; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/MapBlockBuilder.java b/core/trino-spi/src/main/java/io/trino/spi/block/MapBlockBuilder.java index ec6540975da8..1eb05d0c6481 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/MapBlockBuilder.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/MapBlockBuilder.java @@ -14,7 +14,7 @@ package io.trino.spi.block; -import io.prestosql.spi.type.MapType; +import io.trino.spi.type.MapType; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -24,10 +24,10 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.calculateBlockResetSize; -import static io.prestosql.spi.block.BlockUtil.calculateNewArraySize; -import static io.prestosql.spi.block.MapBlock.createMapBlockInternal; -import static io.prestosql.spi.block.MapHashTables.HASH_MULTIPLIER; +import static io.trino.spi.block.BlockUtil.calculateBlockResetSize; +import static io.trino.spi.block.BlockUtil.calculateNewArraySize; +import static io.trino.spi.block.MapBlock.createMapBlockInternal; +import static io.trino.spi.block.MapHashTables.HASH_MULTIPLIER; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/MapBlockEncoding.java b/core/trino-spi/src/main/java/io/trino/spi/block/MapBlockEncoding.java index 52190b4db2a9..dcbe8991d417 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/MapBlockEncoding.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/MapBlockEncoding.java @@ -16,13 +16,13 @@ import io.airlift.slice.SliceInput; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.type.MapType; +import io.trino.spi.type.MapType; import java.util.Optional; import static io.airlift.slice.Slices.wrappedIntArray; -import static io.prestosql.spi.block.MapBlock.createMapBlockInternal; -import static io.prestosql.spi.block.MapHashTables.HASH_MULTIPLIER; +import static io.trino.spi.block.MapBlock.createMapBlockInternal; +import static io.trino.spi.block.MapHashTables.HASH_MULTIPLIER; import static java.lang.String.format; public class MapBlockEncoding diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/MapHashTables.java b/core/trino-spi/src/main/java/io/trino/spi/block/MapHashTables.java index c7a7077a5bce..75f7e703c092 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/MapHashTables.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/MapHashTables.java @@ -13,8 +13,8 @@ */ package io.trino.spi.block; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.MapType; +import io.trino.spi.PrestoException; +import io.trino.spi.type.MapType; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -25,7 +25,7 @@ import java.util.Optional; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; @ThreadSafe diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/MethodHandleUtil.java b/core/trino-spi/src/main/java/io/trino/spi/block/MethodHandleUtil.java index d4ce3da42000..f3f054d188f7 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/MethodHandleUtil.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/MethodHandleUtil.java @@ -14,14 +14,14 @@ package io.trino.spi.block; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Type; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.lang.String.format; public final class MethodHandleUtil diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/RowBlockBuilder.java b/core/trino-spi/src/main/java/io/trino/spi/block/RowBlockBuilder.java index 02e5f18aa2a5..22e9d9375c62 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/RowBlockBuilder.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/RowBlockBuilder.java @@ -14,7 +14,7 @@ package io.trino.spi.block; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -24,8 +24,8 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.calculateBlockResetSize; -import static io.prestosql.spi.block.RowBlock.createRowBlockInternal; +import static io.trino.spi.block.BlockUtil.calculateBlockResetSize; +import static io.trino.spi.block.RowBlock.createRowBlockInternal; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/RowBlockEncoding.java b/core/trino-spi/src/main/java/io/trino/spi/block/RowBlockEncoding.java index 230ff22ec7b1..40efb5f7348f 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/RowBlockEncoding.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/RowBlockEncoding.java @@ -18,7 +18,7 @@ import io.airlift.slice.SliceOutput; import static io.airlift.slice.Slices.wrappedIntArray; -import static io.prestosql.spi.block.RowBlock.createRowBlockInternal; +import static io.trino.spi.block.RowBlock.createRowBlockInternal; public class RowBlockEncoding implements BlockEncoding diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/RunLengthEncodedBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/RunLengthEncodedBlock.java index ecec17efe4d8..fd27111d5061 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/RunLengthEncodedBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/RunLengthEncodedBlock.java @@ -14,16 +14,16 @@ package io.trino.spi.block; import io.airlift.slice.Slice; -import io.prestosql.spi.predicate.Utils; -import io.prestosql.spi.type.Type; +import io.trino.spi.predicate.Utils; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.util.List; import java.util.function.BiConsumer; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidPosition; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidPosition; +import static io.trino.spi.block.BlockUtil.checkValidRegion; import static java.lang.String.format; import static java.util.Collections.singletonList; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/ShortArrayBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/ShortArrayBlock.java index 9bacd7fe58bb..b5ca7f90beb7 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/ShortArrayBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/ShortArrayBlock.java @@ -23,10 +23,10 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.countUsedPositions; public class ShortArrayBlock implements Block diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/ShortArrayBlockBuilder.java b/core/trino-spi/src/main/java/io/trino/spi/block/ShortArrayBlockBuilder.java index 7da91e3af674..94854b35a573 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/ShortArrayBlockBuilder.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/ShortArrayBlockBuilder.java @@ -23,10 +23,10 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.calculateBlockResetSize; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.countUsedPositions; +import static io.trino.spi.block.BlockUtil.calculateBlockResetSize; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.countUsedPositions; import static java.lang.Math.max; public class ShortArrayBlockBuilder diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/ShortArrayBlockEncoding.java b/core/trino-spi/src/main/java/io/trino/spi/block/ShortArrayBlockEncoding.java index c687255dca4a..5c98827bc2ad 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/ShortArrayBlockEncoding.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/ShortArrayBlockEncoding.java @@ -18,9 +18,9 @@ import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import static io.prestosql.spi.block.EncoderUtil.decodeNullBits; -import static io.prestosql.spi.block.EncoderUtil.encodeNullsAsBits; -import static io.prestosql.spi.block.EncoderUtil.retrieveNullBits; +import static io.trino.spi.block.EncoderUtil.decodeNullBits; +import static io.trino.spi.block.EncoderUtil.encodeNullsAsBits; +import static io.trino.spi.block.EncoderUtil.retrieveNullBits; import static java.lang.System.arraycopy; public class ShortArrayBlockEncoding diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/SingleMapBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/SingleMapBlock.java index 6cb9884392ea..05e1fc69a448 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/SingleMapBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/SingleMapBlock.java @@ -14,8 +14,8 @@ package io.trino.spi.block; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.lang.invoke.MethodHandle; @@ -23,10 +23,10 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOfIntArray; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.block.MapHashTables.HASH_MULTIPLIER; -import static io.prestosql.spi.block.MapHashTables.computePosition; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.block.MapHashTables.HASH_MULTIPLIER; +import static io.trino.spi.block.MapHashTables.computePosition; import static java.lang.String.format; public class SingleMapBlock diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/SingleMapBlockEncoding.java b/core/trino-spi/src/main/java/io/trino/spi/block/SingleMapBlockEncoding.java index 5b0725b1f331..86038744e1b6 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/SingleMapBlockEncoding.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/SingleMapBlockEncoding.java @@ -16,12 +16,12 @@ import io.airlift.slice.SliceInput; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.type.MapType; +import io.trino.spi.type.MapType; import java.util.Optional; import static io.airlift.slice.Slices.wrappedIntArray; -import static io.prestosql.spi.block.MapHashTables.HASH_MULTIPLIER; +import static io.trino.spi.block.MapHashTables.HASH_MULTIPLIER; import static java.lang.String.format; public class SingleMapBlockEncoding diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlock.java b/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlock.java index 5846e4e882a3..3874fca622cd 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlock.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlock.java @@ -24,11 +24,11 @@ import java.util.function.BiConsumer; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.compactOffsets; -import static io.prestosql.spi.block.BlockUtil.compactSlice; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.compactOffsets; +import static io.trino.spi.block.BlockUtil.compactSlice; public class VariableWidthBlock extends AbstractVariableWidthBlock diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlockBuilder.java b/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlockBuilder.java index 2c7d69008b3e..01460cabb98a 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlockBuilder.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlockBuilder.java @@ -29,16 +29,16 @@ import static io.airlift.slice.SizeOf.SIZE_OF_LONG; import static io.airlift.slice.SizeOf.SIZE_OF_SHORT; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.block.BlockUtil.MAX_ARRAY_SIZE; -import static io.prestosql.spi.block.BlockUtil.calculateBlockResetBytes; -import static io.prestosql.spi.block.BlockUtil.calculateBlockResetSize; -import static io.prestosql.spi.block.BlockUtil.checkArrayRange; -import static io.prestosql.spi.block.BlockUtil.checkValidPosition; -import static io.prestosql.spi.block.BlockUtil.checkValidPositions; -import static io.prestosql.spi.block.BlockUtil.checkValidRegion; -import static io.prestosql.spi.block.BlockUtil.compactArray; -import static io.prestosql.spi.block.BlockUtil.compactOffsets; -import static io.prestosql.spi.block.BlockUtil.compactSlice; +import static io.trino.spi.block.BlockUtil.MAX_ARRAY_SIZE; +import static io.trino.spi.block.BlockUtil.calculateBlockResetBytes; +import static io.trino.spi.block.BlockUtil.calculateBlockResetSize; +import static io.trino.spi.block.BlockUtil.checkArrayRange; +import static io.trino.spi.block.BlockUtil.checkValidPosition; +import static io.trino.spi.block.BlockUtil.checkValidPositions; +import static io.trino.spi.block.BlockUtil.checkValidRegion; +import static io.trino.spi.block.BlockUtil.compactArray; +import static io.trino.spi.block.BlockUtil.compactOffsets; +import static io.trino.spi.block.BlockUtil.compactSlice; import static java.lang.Math.min; public class VariableWidthBlockBuilder diff --git a/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlockEncoding.java b/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlockEncoding.java index 9f7ec517d913..8f7b320999d8 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlockEncoding.java +++ b/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlockEncoding.java @@ -19,8 +19,8 @@ import io.airlift.slice.Slices; import static io.airlift.slice.SizeOf.SIZE_OF_INT; -import static io.prestosql.spi.block.EncoderUtil.decodeNullBits; -import static io.prestosql.spi.block.EncoderUtil.encodeNullsAsBits; +import static io.trino.spi.block.EncoderUtil.decodeNullBits; +import static io.trino.spi.block.EncoderUtil.encodeNullsAsBits; public class VariableWidthBlockEncoding implements BlockEncoding diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/AggregateFunction.java b/core/trino-spi/src/main/java/io/trino/spi/connector/AggregateFunction.java index 647fdc12f07d..672602f78078 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/AggregateFunction.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/AggregateFunction.java @@ -13,8 +13,8 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.type.Type; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.type.Type; import java.util.List; import java.util.Objects; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/AggregationApplicationResult.java b/core/trino-spi/src/main/java/io/trino/spi/connector/AggregationApplicationResult.java index dda5ff981df5..59e053ff666d 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/AggregationApplicationResult.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/AggregationApplicationResult.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.expression.ConnectorExpression; +import io.trino.spi.expression.ConnectorExpression; import java.util.List; import java.util.Map; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/Assignment.java b/core/trino-spi/src/main/java/io/trino/spi/connector/Assignment.java index 58149428e49e..a779ad98e8a0 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/Assignment.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/Assignment.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/BucketFunction.java b/core/trino-spi/src/main/java/io/trino/spi/connector/BucketFunction.java index 01870d4737e1..5b954f20798d 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/BucketFunction.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/BucketFunction.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.Page; +import io.trino.spi.Page; public interface BucketFunction { diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/CatalogSchemaTableName.java b/core/trino-spi/src/main/java/io/trino/spi/connector/CatalogSchemaTableName.java index 43e2d75aaa62..ad7be567a7e3 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/CatalogSchemaTableName.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/CatalogSchemaTableName.java @@ -18,7 +18,7 @@ import java.util.Objects; -import static io.prestosql.spi.connector.SchemaUtil.checkNotEmpty; +import static io.trino.spi.connector.SchemaUtil.checkNotEmpty; import static java.util.Objects.requireNonNull; public final class CatalogSchemaTableName diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ColumnMetadata.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ColumnMetadata.java index 25fa6662302d..d89af0f487ab 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ColumnMetadata.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ColumnMetadata.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -22,7 +22,7 @@ import java.util.Objects; import java.util.Optional; -import static io.prestosql.spi.connector.SchemaUtil.checkNotEmpty; +import static io.trino.spi.connector.SchemaUtil.checkNotEmpty; import static java.util.Collections.emptyMap; import static java.util.Collections.unmodifiableMap; import static java.util.Locale.ENGLISH; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/Connector.java b/core/trino-spi/src/main/java/io/trino/spi/connector/Connector.java index a131d0ca149e..d018ca689614 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/Connector.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/Connector.java @@ -13,10 +13,10 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import java.util.List; import java.util.Optional; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorAccessControl.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorAccessControl.java index 1c65194c4ff0..1e87f082c874 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorAccessControl.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorAccessControl.java @@ -13,55 +13,55 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import java.util.Optional; import java.util.Set; -import static io.prestosql.spi.security.AccessDeniedException.denyAddColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateRole; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateView; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateViewWithSelect; -import static io.prestosql.spi.security.AccessDeniedException.denyDeleteTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyDropRole; -import static io.prestosql.spi.security.AccessDeniedException.denyDropSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyDropTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropView; -import static io.prestosql.spi.security.AccessDeniedException.denyExecuteProcedure; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantSchemaPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyInsertTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameView; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeSchemaPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denySelectColumns; -import static io.prestosql.spi.security.AccessDeniedException.denySetCatalogSessionProperty; -import static io.prestosql.spi.security.AccessDeniedException.denySetRole; -import static io.prestosql.spi.security.AccessDeniedException.denySetSchemaAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denySetTableAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denySetViewAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denyShowColumns; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCurrentRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyShowRoleAuthorizationDescriptors; -import static io.prestosql.spi.security.AccessDeniedException.denyShowRoleGrants; -import static io.prestosql.spi.security.AccessDeniedException.denyShowRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyShowSchemas; -import static io.prestosql.spi.security.AccessDeniedException.denyShowTables; +import static io.trino.spi.security.AccessDeniedException.denyAddColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateRole; +import static io.trino.spi.security.AccessDeniedException.denyCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateView; +import static io.trino.spi.security.AccessDeniedException.denyCreateViewWithSelect; +import static io.trino.spi.security.AccessDeniedException.denyDeleteTable; +import static io.trino.spi.security.AccessDeniedException.denyDropColumn; +import static io.trino.spi.security.AccessDeniedException.denyDropRole; +import static io.trino.spi.security.AccessDeniedException.denyDropSchema; +import static io.trino.spi.security.AccessDeniedException.denyDropTable; +import static io.trino.spi.security.AccessDeniedException.denyDropView; +import static io.trino.spi.security.AccessDeniedException.denyExecuteProcedure; +import static io.trino.spi.security.AccessDeniedException.denyGrantRoles; +import static io.trino.spi.security.AccessDeniedException.denyGrantSchemaPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyGrantTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denyInsertTable; +import static io.trino.spi.security.AccessDeniedException.denyRenameColumn; +import static io.trino.spi.security.AccessDeniedException.denyRenameSchema; +import static io.trino.spi.security.AccessDeniedException.denyRenameTable; +import static io.trino.spi.security.AccessDeniedException.denyRenameView; +import static io.trino.spi.security.AccessDeniedException.denyRevokeRoles; +import static io.trino.spi.security.AccessDeniedException.denyRevokeSchemaPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyRevokeTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denySelectColumns; +import static io.trino.spi.security.AccessDeniedException.denySetCatalogSessionProperty; +import static io.trino.spi.security.AccessDeniedException.denySetRole; +import static io.trino.spi.security.AccessDeniedException.denySetSchemaAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetTableAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetViewAuthorization; +import static io.trino.spi.security.AccessDeniedException.denyShowColumns; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyShowCurrentRoles; +import static io.trino.spi.security.AccessDeniedException.denyShowRoleAuthorizationDescriptors; +import static io.trino.spi.security.AccessDeniedException.denyShowRoleGrants; +import static io.trino.spi.security.AccessDeniedException.denyShowRoles; +import static io.trino.spi.security.AccessDeniedException.denyShowSchemas; +import static io.trino.spi.security.AccessDeniedException.denyShowTables; import static java.util.Collections.emptySet; public interface ConnectorAccessControl diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorBucketNodeMap.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorBucketNodeMap.java index af7c86fa9a73..b8228f732f49 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorBucketNodeMap.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorBucketNodeMap.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.Node; +import io.trino.spi.Node; import java.util.List; import java.util.Optional; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorContext.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorContext.java index 248fef650841..450c312e896d 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorContext.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorContext.java @@ -13,11 +13,11 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.VersionEmbedder; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.NodeManager; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.PageSorter; +import io.trino.spi.VersionEmbedder; +import io.trino.spi.type.TypeManager; public interface ConnectorContext { diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMaterializedViewDefinition.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMaterializedViewDefinition.java index bdef79f49314..e496be8a3e99 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMaterializedViewDefinition.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMaterializedViewDefinition.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.type.TypeId; +import io.trino.spi.type.TypeId; import java.util.List; import java.util.Map; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java index be539502e8a4..e4fc56197695 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java @@ -14,18 +14,18 @@ package io.trino.spi.connector; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Constant; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.GrantInfo; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.statistics.TableStatisticsMetadata; +import io.trino.spi.PrestoException; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Constant; +import io.trino.spi.expression.Variable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.GrantInfo; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.statistics.TableStatisticsMetadata; import javax.annotation.Nullable; @@ -38,8 +38,8 @@ import java.util.Set; import java.util.stream.Collectors; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorNodePartitioningProvider.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorNodePartitioningProvider.java index 0ebf5ddb9e84..5bcaa5a92af6 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorNodePartitioningProvider.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorNodePartitioningProvider.java @@ -13,12 +13,12 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; import java.util.function.ToIntFunction; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; import static java.util.Collections.singletonList; public interface ConnectorNodePartitioningProvider diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorPageSink.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorPageSink.java index 2ae0e33d3363..82e296e5ad7e 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorPageSink.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorPageSink.java @@ -14,7 +14,7 @@ package io.trino.spi.connector; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.Collection; import java.util.concurrent.CompletableFuture; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorPageSource.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorPageSource.java index 05f056d9caa6..57389fa902e9 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorPageSource.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorPageSource.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.io.Closeable; import java.io.IOException; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorPageSourceProvider.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorPageSourceProvider.java index fda248072841..33adc336677f 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorPageSourceProvider.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorPageSourceProvider.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorResolvedIndex.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorResolvedIndex.java index 0a6ae43a9d5e..d3a0a36e4753 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorResolvedIndex.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorResolvedIndex.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSecurityContext.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSecurityContext.java index ce67d793aa5f..122e53fa2cf9 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSecurityContext.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSecurityContext.java @@ -13,8 +13,8 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.security.ConnectorIdentity; +import io.trino.spi.QueryId; +import io.trino.spi.security.ConnectorIdentity; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSession.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSession.java index 10053e01373f..d5896d6186a3 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSession.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSession.java @@ -13,8 +13,8 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.type.TimeZoneKey; import java.time.Instant; import java.util.Locale; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSplit.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSplit.java index 32d0ebbbcd4d..996d16b679b0 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSplit.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSplit.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSplitManager.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSplitManager.java index 9317d7c8339b..4a4cdab7a277 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSplitManager.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSplitManager.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain; import java.util.function.Supplier; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTableLayout.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTableLayout.java index e06fd089a1b9..0156c45bebc3 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTableLayout.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTableLayout.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain; import java.util.List; import java.util.Objects; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTableLayoutResult.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTableLayoutResult.java index b093bac18250..5a307e6ca020 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTableLayoutResult.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTableLayoutResult.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTablePartitioning.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTablePartitioning.java index 7a3c877a3b4e..ba5238f921d4 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTablePartitioning.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTablePartitioning.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.Node; +import io.trino.spi.Node; import java.util.List; import java.util.Objects; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTableProperties.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTableProperties.java index 7b5dbac1fc4b..aa5ed4ddf3b0 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTableProperties.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorTableProperties.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain; import java.util.List; import java.util.Objects; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorViewDefinition.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorViewDefinition.java index c71d2a6bbc9f..bd29dfa818a8 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorViewDefinition.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorViewDefinition.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.type.TypeId; +import io.trino.spi.type.TypeId; import java.util.List; import java.util.Optional; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/Constraint.java b/core/trino-spi/src/main/java/io/trino/spi/connector/Constraint.java index 4ee69e940514..03445f7c6854 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/Constraint.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/Constraint.java @@ -13,8 +13,8 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; import java.util.Map; import java.util.Optional; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConstraintApplicationResult.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConstraintApplicationResult.java index b22cb4e930ac..acc73364ce8a 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConstraintApplicationResult.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConstraintApplicationResult.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/DiscretePredicates.java b/core/trino-spi/src/main/java/io/trino/spi/connector/DiscretePredicates.java index 03137710aa82..b970163c57eb 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/DiscretePredicates.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/DiscretePredicates.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/DynamicFilter.java b/core/trino-spi/src/main/java/io/trino/spi/connector/DynamicFilter.java index 3f1d0aa9ad89..52e432f0d12f 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/DynamicFilter.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/DynamicFilter.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain; import java.util.concurrent.CompletableFuture; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/EmptyPageSource.java b/core/trino-spi/src/main/java/io/trino/spi/connector/EmptyPageSource.java index b67512b1cf0e..6dc9e61aded0 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/EmptyPageSource.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/EmptyPageSource.java @@ -14,8 +14,8 @@ package io.trino.spi.connector; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; +import io.trino.spi.Page; +import io.trino.spi.block.Block; import java.util.Collection; import java.util.Collections; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/FixedPageSource.java b/core/trino-spi/src/main/java/io/trino/spi/connector/FixedPageSource.java index fdfe668007f9..f54d0032dcb1 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/FixedPageSource.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/FixedPageSource.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.Iterator; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/FixedSplitSource.java b/core/trino-spi/src/main/java/io/trino/spi/connector/FixedSplitSource.java index 382b8e20bc07..e6b6db94a404 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/FixedSplitSource.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/FixedSplitSource.java @@ -16,7 +16,7 @@ import java.util.List; import java.util.concurrent.CompletableFuture; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; import static java.util.Objects.requireNonNull; import static java.util.concurrent.CompletableFuture.completedFuture; import static java.util.stream.Collectors.toUnmodifiableList; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/InMemoryRecordSet.java b/core/trino-spi/src/main/java/io/trino/spi/connector/InMemoryRecordSet.java index 0f8a18990ebe..759d795907d3 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/InMemoryRecordSet.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/InMemoryRecordSet.java @@ -15,10 +15,10 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,17 +27,17 @@ import java.util.Iterator; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.isLongDecimal; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.isLongDecimal; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/NotFoundException.java b/core/trino-spi/src/main/java/io/trino/spi/connector/NotFoundException.java index 583b851cfb98..8d6c2f5cf9ef 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/NotFoundException.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/NotFoundException.java @@ -13,9 +13,9 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; public abstract class NotFoundException extends PrestoException diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ProjectionApplicationResult.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ProjectionApplicationResult.java index 45ba9457aa15..69a34eaaef0e 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ProjectionApplicationResult.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ProjectionApplicationResult.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.expression.ConnectorExpression; +import io.trino.spi.expression.ConnectorExpression; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/RecordCursor.java b/core/trino-spi/src/main/java/io/trino/spi/connector/RecordCursor.java index f5194b43727d..a3a2a7337767 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/RecordCursor.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/RecordCursor.java @@ -14,7 +14,7 @@ package io.trino.spi.connector; import io.airlift.slice.Slice; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.io.Closeable; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/RecordPageSource.java b/core/trino-spi/src/main/java/io/trino/spi/connector/RecordPageSource.java index c96dd1d327a4..d101cb7114f2 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/RecordPageSource.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/RecordPageSource.java @@ -14,10 +14,10 @@ package io.trino.spi.connector; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/RecordSet.java b/core/trino-spi/src/main/java/io/trino/spi/connector/RecordSet.java index d9c2fc7c7f6a..23547b64c702 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/RecordSet.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/RecordSet.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/SchemaTableName.java b/core/trino-spi/src/main/java/io/trino/spi/connector/SchemaTableName.java index 79a81d11cc13..35548344427a 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/SchemaTableName.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/SchemaTableName.java @@ -18,7 +18,7 @@ import java.util.Objects; -import static io.prestosql.spi.connector.SchemaUtil.checkNotEmpty; +import static io.trino.spi.connector.SchemaUtil.checkNotEmpty; import static java.util.Locale.ENGLISH; public class SchemaTableName diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/SchemaTablePrefix.java b/core/trino-spi/src/main/java/io/trino/spi/connector/SchemaTablePrefix.java index 4926b5e4e48f..ada29952dd15 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/SchemaTablePrefix.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/SchemaTablePrefix.java @@ -16,7 +16,7 @@ import java.util.Objects; import java.util.Optional; -import static io.prestosql.spi.connector.SchemaUtil.checkNotEmpty; +import static io.trino.spi.connector.SchemaUtil.checkNotEmpty; public class SchemaTablePrefix { diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/StandardWarningCode.java b/core/trino-spi/src/main/java/io/trino/spi/connector/StandardWarningCode.java index 2a250c763068..df9e44c957f0 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/StandardWarningCode.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/StandardWarningCode.java @@ -13,8 +13,8 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.WarningCode; -import io.prestosql.spi.WarningCodeSupplier; +import io.trino.spi.WarningCode; +import io.trino.spi.WarningCodeSupplier; public enum StandardWarningCode implements WarningCodeSupplier diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/SystemTable.java b/core/trino-spi/src/main/java/io/trino/spi/connector/SystemTable.java index 7a91c4a67017..ad5af77d9ebc 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/SystemTable.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/SystemTable.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain; /** * Exactly one of {@link #cursor} or {@link #pageSource} must be implemented. diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/TableScanRedirectApplicationResult.java b/core/trino-spi/src/main/java/io/trino/spi/connector/TableScanRedirectApplicationResult.java index f205e7e9306c..d1c619058b00 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/TableScanRedirectApplicationResult.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/TableScanRedirectApplicationResult.java @@ -13,7 +13,7 @@ */ package io.trino.spi.connector; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain; import java.util.Map; diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/UpdatablePageSource.java b/core/trino-spi/src/main/java/io/trino/spi/connector/UpdatablePageSource.java index cdb176575124..a89b0f4e5bf2 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/UpdatablePageSource.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/UpdatablePageSource.java @@ -14,7 +14,7 @@ package io.trino.spi.connector; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import java.util.Collection; import java.util.concurrent.CompletableFuture; diff --git a/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryCompletedEvent.java b/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryCompletedEvent.java index 03a991c1ea87..2dcc101dd9f2 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryCompletedEvent.java +++ b/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryCompletedEvent.java @@ -13,7 +13,7 @@ */ package io.trino.spi.eventlistener; -import io.prestosql.spi.PrestoWarning; +import io.trino.spi.PrestoWarning; import java.time.Instant; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryContext.java b/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryContext.java index a7a6be612310..5a5a16ed3196 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryContext.java +++ b/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryContext.java @@ -14,9 +14,9 @@ package io.trino.spi.eventlistener; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.resourcegroups.QueryType; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.session.ResourceEstimates; +import io.trino.spi.resourcegroups.QueryType; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.session.ResourceEstimates; import java.util.Map; import java.util.Optional; diff --git a/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryFailureInfo.java b/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryFailureInfo.java index 4182d7e1fcea..cfa3a1218c8f 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryFailureInfo.java +++ b/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryFailureInfo.java @@ -13,7 +13,7 @@ */ package io.trino.spi.eventlistener; -import io.prestosql.spi.ErrorCode; +import io.trino.spi.ErrorCode; import java.util.Optional; diff --git a/core/trino-spi/src/main/java/io/trino/spi/expression/ConnectorExpression.java b/core/trino-spi/src/main/java/io/trino/spi/expression/ConnectorExpression.java index 35adf50ff5e5..c58206631406 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/expression/ConnectorExpression.java +++ b/core/trino-spi/src/main/java/io/trino/spi/expression/ConnectorExpression.java @@ -13,7 +13,7 @@ */ package io.trino.spi.expression; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/expression/Constant.java b/core/trino-spi/src/main/java/io/trino/spi/expression/Constant.java index 300d39789f3e..c8a4d9483dce 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/expression/Constant.java +++ b/core/trino-spi/src/main/java/io/trino/spi/expression/Constant.java @@ -13,7 +13,7 @@ */ package io.trino.spi.expression; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; import java.util.Objects; diff --git a/core/trino-spi/src/main/java/io/trino/spi/expression/FieldDereference.java b/core/trino-spi/src/main/java/io/trino/spi/expression/FieldDereference.java index 943c9026748f..3ba1973d6ccc 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/expression/FieldDereference.java +++ b/core/trino-spi/src/main/java/io/trino/spi/expression/FieldDereference.java @@ -13,7 +13,7 @@ */ package io.trino.spi.expression; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; import java.util.Objects; diff --git a/core/trino-spi/src/main/java/io/trino/spi/expression/Variable.java b/core/trino-spi/src/main/java/io/trino/spi/expression/Variable.java index 4e7599ef7fd4..b428ffabf660 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/expression/Variable.java +++ b/core/trino-spi/src/main/java/io/trino/spi/expression/Variable.java @@ -13,7 +13,7 @@ */ package io.trino.spi.expression; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; import java.util.Objects; diff --git a/core/trino-spi/src/main/java/io/trino/spi/function/AccumulatorStateSerializer.java b/core/trino-spi/src/main/java/io/trino/spi/function/AccumulatorStateSerializer.java index b3acbc3909d4..4a4521a5653a 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/function/AccumulatorStateSerializer.java +++ b/core/trino-spi/src/main/java/io/trino/spi/function/AccumulatorStateSerializer.java @@ -13,9 +13,9 @@ */ package io.trino.spi.function; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public interface AccumulatorStateSerializer { diff --git a/core/trino-spi/src/main/java/io/trino/spi/function/CombineFunction.java b/core/trino-spi/src/main/java/io/trino/spi/function/CombineFunction.java index b61e752bc1a6..dcab1f8c32af 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/function/CombineFunction.java +++ b/core/trino-spi/src/main/java/io/trino/spi/function/CombineFunction.java @@ -13,7 +13,7 @@ */ package io.trino.spi.function; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import java.lang.annotation.Retention; import java.lang.annotation.Target; diff --git a/core/trino-spi/src/main/java/io/trino/spi/function/Convention.java b/core/trino-spi/src/main/java/io/trino/spi/function/Convention.java index bb6126b1a704..f60ec51a131b 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/function/Convention.java +++ b/core/trino-spi/src/main/java/io/trino/spi/function/Convention.java @@ -13,8 +13,8 @@ */ package io.trino.spi.function; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.spi.function.InvocationConvention.InvocationReturnConvention; public @interface Convention { diff --git a/core/trino-spi/src/main/java/io/trino/spi/function/RankingWindowFunction.java b/core/trino-spi/src/main/java/io/trino/spi/function/RankingWindowFunction.java index 63d8d1422189..4297b00779c4 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/function/RankingWindowFunction.java +++ b/core/trino-spi/src/main/java/io/trino/spi/function/RankingWindowFunction.java @@ -13,7 +13,7 @@ */ package io.trino.spi.function; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; public abstract class RankingWindowFunction implements WindowFunction diff --git a/core/trino-spi/src/main/java/io/trino/spi/function/ScalarFunctionAdapter.java b/core/trino-spi/src/main/java/io/trino/spi/function/ScalarFunctionAdapter.java index 087f71dc66bb..4acd0f81fc2e 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/function/ScalarFunctionAdapter.java +++ b/core/trino-spi/src/main/java/io/trino/spi/function/ScalarFunctionAdapter.java @@ -14,13 +14,13 @@ package io.trino.spi.function; import io.airlift.slice.Slice; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention; -import io.prestosql.spi.type.Type; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.block.Block; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.spi.function.InvocationConvention.InvocationReturnConvention; +import io.trino.spi.type.Type; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodType; @@ -28,17 +28,17 @@ import java.util.Objects; import java.util.stream.IntStream; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.RETURN_NULL_ON_NULL; -import static io.prestosql.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.THROW_ON_NULL; -import static io.prestosql.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.UNDEFINED_VALUE_FOR_NULL; -import static io.prestosql.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.UNSUPPORTED; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.FUNCTION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.RETURN_NULL_ON_NULL; +import static io.trino.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.THROW_ON_NULL; +import static io.trino.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.UNDEFINED_VALUE_FOR_NULL; +import static io.trino.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.UNSUPPORTED; import static java.lang.invoke.MethodHandles.collectArguments; import static java.lang.invoke.MethodHandles.constant; import static java.lang.invoke.MethodHandles.dropArguments; diff --git a/core/trino-spi/src/main/java/io/trino/spi/function/ValueWindowFunction.java b/core/trino-spi/src/main/java/io/trino/spi/function/ValueWindowFunction.java index b24ee5bacbb1..020718fa845e 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/function/ValueWindowFunction.java +++ b/core/trino-spi/src/main/java/io/trino/spi/function/ValueWindowFunction.java @@ -13,7 +13,7 @@ */ package io.trino.spi.function; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; public abstract class ValueWindowFunction implements WindowFunction diff --git a/core/trino-spi/src/main/java/io/trino/spi/function/WindowFunction.java b/core/trino-spi/src/main/java/io/trino/spi/function/WindowFunction.java index d8d536340b52..762b32945d51 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/function/WindowFunction.java +++ b/core/trino-spi/src/main/java/io/trino/spi/function/WindowFunction.java @@ -13,7 +13,7 @@ */ package io.trino.spi.function; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; public interface WindowFunction { diff --git a/core/trino-spi/src/main/java/io/trino/spi/function/WindowIndex.java b/core/trino-spi/src/main/java/io/trino/spi/function/WindowIndex.java index 2acd2d080bea..79d04c4ee3df 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/function/WindowIndex.java +++ b/core/trino-spi/src/main/java/io/trino/spi/function/WindowIndex.java @@ -14,8 +14,8 @@ package io.trino.spi.function; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; /** * A window index contains the sorted values for a window partition. diff --git a/core/trino-spi/src/main/java/io/trino/spi/memory/MemoryPoolInfo.java b/core/trino-spi/src/main/java/io/trino/spi/memory/MemoryPoolInfo.java index 554a413dbc96..841fce1a7211 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/memory/MemoryPoolInfo.java +++ b/core/trino-spi/src/main/java/io/trino/spi/memory/MemoryPoolInfo.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.QueryId; +import io.trino.spi.QueryId; import java.util.List; import java.util.Map; diff --git a/core/trino-spi/src/main/java/io/trino/spi/predicate/AllOrNoneValueSet.java b/core/trino-spi/src/main/java/io/trino/spi/predicate/AllOrNoneValueSet.java index 90ffe8c38e26..bab487796f71 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/predicate/AllOrNoneValueSet.java +++ b/core/trino-spi/src/main/java/io/trino/spi/predicate/AllOrNoneValueSet.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import java.util.List; import java.util.Objects; diff --git a/core/trino-spi/src/main/java/io/trino/spi/predicate/Domain.java b/core/trino-spi/src/main/java/io/trino/spi/predicate/Domain.java index 5e567f4c1363..e50344cec524 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/predicate/Domain.java +++ b/core/trino-spi/src/main/java/io/trino/spi/predicate/Domain.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/predicate/EquatableValueSet.java b/core/trino-spi/src/main/java/io/trino/spi/predicate/EquatableValueSet.java index 9ae47f4d7c8b..4c05dc3f6bf7 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/predicate/EquatableValueSet.java +++ b/core/trino-spi/src/main/java/io/trino/spi/predicate/EquatableValueSet.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import java.lang.invoke.MethodHandle; import java.util.Collection; @@ -33,12 +33,12 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.predicate.Utils.TUPLE_DOMAIN_TYPE_OPERATORS; -import static io.prestosql.spi.predicate.Utils.handleThrowable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.predicate.Utils.TUPLE_DOMAIN_TYPE_OPERATORS; +import static io.trino.spi.predicate.Utils.handleThrowable; import static java.lang.String.format; import static java.util.Collections.unmodifiableCollection; import static java.util.Collections.unmodifiableSet; diff --git a/core/trino-spi/src/main/java/io/trino/spi/predicate/Marker.java b/core/trino-spi/src/main/java/io/trino/spi/predicate/Marker.java index c61f5529ddca..f4daac60f7ab 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/predicate/Marker.java +++ b/core/trino-spi/src/main/java/io/trino/spi/predicate/Marker.java @@ -15,26 +15,26 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import java.lang.invoke.MethodHandle; import java.util.Objects; import java.util.Optional; import java.util.StringJoiner; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.predicate.Utils.TUPLE_DOMAIN_TYPE_OPERATORS; -import static io.prestosql.spi.predicate.Utils.blockToNativeValue; -import static io.prestosql.spi.predicate.Utils.handleThrowable; -import static io.prestosql.spi.predicate.Utils.nativeValueToBlock; -import static io.prestosql.spi.type.TypeUtils.isFloatingPointNaN; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.predicate.Utils.TUPLE_DOMAIN_TYPE_OPERATORS; +import static io.trino.spi.predicate.Utils.blockToNativeValue; +import static io.trino.spi.predicate.Utils.handleThrowable; +import static io.trino.spi.predicate.Utils.nativeValueToBlock; +import static io.trino.spi.type.TypeUtils.isFloatingPointNaN; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/predicate/NullableValue.java b/core/trino-spi/src/main/java/io/trino/spi/predicate/NullableValue.java index 445d36c4d3a6..a62773e1e156 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/predicate/NullableValue.java +++ b/core/trino-spi/src/main/java/io/trino/spi/predicate/NullableValue.java @@ -15,19 +15,19 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodType; import java.util.Objects; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.predicate.Utils.TUPLE_DOMAIN_TYPE_OPERATORS; -import static io.prestosql.spi.predicate.Utils.handleThrowable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.predicate.Utils.TUPLE_DOMAIN_TYPE_OPERATORS; +import static io.trino.spi.predicate.Utils.handleThrowable; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/predicate/Range.java b/core/trino-spi/src/main/java/io/trino/spi/predicate/Range.java index 6bf2e397eb1c..90134743b6e0 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/predicate/Range.java +++ b/core/trino-spi/src/main/java/io/trino/spi/predicate/Range.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/core/trino-spi/src/main/java/io/trino/spi/predicate/SortedRangeSet.java b/core/trino-spi/src/main/java/io/trino/spi/predicate/SortedRangeSet.java index f8715632bd40..dcadf67d768e 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/predicate/SortedRangeSet.java +++ b/core/trino-spi/src/main/java/io/trino/spi/predicate/SortedRangeSet.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.Collection; @@ -32,7 +32,7 @@ import java.util.function.Function; import java.util.stream.Collectors; -import static io.prestosql.spi.type.TypeUtils.isFloatingPointNaN; +import static io.trino.spi.type.TypeUtils.isFloatingPointNaN; import static java.lang.String.format; import static java.util.Arrays.asList; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/predicate/TupleDomain.java b/core/trino-spi/src/main/java/io/trino/spi/predicate/TupleDomain.java index f276a01817d4..dd58c04b386b 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/predicate/TupleDomain.java +++ b/core/trino-spi/src/main/java/io/trino/spi/predicate/TupleDomain.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.Arrays; diff --git a/core/trino-spi/src/main/java/io/trino/spi/predicate/Utils.java b/core/trino-spi/src/main/java/io/trino/spi/predicate/Utils.java index 1ed170a48cfd..04659e56719f 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/predicate/Utils.java +++ b/core/trino-spi/src/main/java/io/trino/spi/predicate/Utils.java @@ -13,15 +13,15 @@ */ package io.trino.spi.predicate; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import javax.annotation.Nullable; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.spi.type.TypeUtils.writeNativeValue; import static java.lang.String.format; public final class Utils diff --git a/core/trino-spi/src/main/java/io/trino/spi/predicate/ValueSet.java b/core/trino-spi/src/main/java/io/trino/spi/predicate/ValueSet.java index c80d3478a932..ec0e8239549c 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/predicate/ValueSet.java +++ b/core/trino-spi/src/main/java/io/trino/spi/predicate/ValueSet.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import java.util.Collection; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/procedure/Procedure.java b/core/trino-spi/src/main/java/io/trino/spi/procedure/Procedure.java index 80535188f437..c09c4f9bee5b 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/procedure/Procedure.java +++ b/core/trino-spi/src/main/java/io/trino/spi/procedure/Procedure.java @@ -13,9 +13,9 @@ */ package io.trino.spi.procedure; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import javax.annotation.Nullable; diff --git a/core/trino-spi/src/main/java/io/trino/spi/resourcegroups/ResourceGroupConfigurationManagerContext.java b/core/trino-spi/src/main/java/io/trino/spi/resourcegroups/ResourceGroupConfigurationManagerContext.java index 002207884a77..61f52c1d6a40 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/resourcegroups/ResourceGroupConfigurationManagerContext.java +++ b/core/trino-spi/src/main/java/io/trino/spi/resourcegroups/ResourceGroupConfigurationManagerContext.java @@ -13,7 +13,7 @@ */ package io.trino.spi.resourcegroups; -import io.prestosql.spi.memory.ClusterMemoryPoolManager; +import io.trino.spi.memory.ClusterMemoryPoolManager; public interface ResourceGroupConfigurationManagerContext { diff --git a/core/trino-spi/src/main/java/io/trino/spi/resourcegroups/SelectionCriteria.java b/core/trino-spi/src/main/java/io/trino/spi/resourcegroups/SelectionCriteria.java index 24f5df49644e..9bc47f35b673 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/resourcegroups/SelectionCriteria.java +++ b/core/trino-spi/src/main/java/io/trino/spi/resourcegroups/SelectionCriteria.java @@ -13,7 +13,7 @@ */ package io.trino.spi.resourcegroups; -import io.prestosql.spi.session.ResourceEstimates; +import io.trino.spi.session.ResourceEstimates; import java.util.Optional; import java.util.Set; diff --git a/core/trino-spi/src/main/java/io/trino/spi/security/AccessDeniedException.java b/core/trino-spi/src/main/java/io/trino/spi/security/AccessDeniedException.java index 8f7ce7022b7b..6b9f0b40e309 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/security/AccessDeniedException.java +++ b/core/trino-spi/src/main/java/io/trino/spi/security/AccessDeniedException.java @@ -13,14 +13,14 @@ */ package io.trino.spi.security; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.security.Principal; import java.util.Collection; import java.util.Optional; import java.util.Set; -import static io.prestosql.spi.StandardErrorCode.PERMISSION_DENIED; +import static io.trino.spi.StandardErrorCode.PERMISSION_DENIED; import static java.lang.String.format; public class AccessDeniedException diff --git a/core/trino-spi/src/main/java/io/trino/spi/security/GrantInfo.java b/core/trino-spi/src/main/java/io/trino/spi/security/GrantInfo.java index 2ceaa46ce1ba..40edffae1792 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/security/GrantInfo.java +++ b/core/trino-spi/src/main/java/io/trino/spi/security/GrantInfo.java @@ -13,7 +13,7 @@ */ package io.trino.spi.security; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import java.util.Objects; import java.util.Optional; diff --git a/core/trino-spi/src/main/java/io/trino/spi/security/SystemAccessControl.java b/core/trino-spi/src/main/java/io/trino/spi/security/SystemAccessControl.java index c85e75bbacc4..83d0c9a71d98 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/security/SystemAccessControl.java +++ b/core/trino-spi/src/main/java/io/trino/spi/security/SystemAccessControl.java @@ -13,59 +13,59 @@ */ package io.trino.spi.security; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaRoutineName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaRoutineName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.type.Type; import java.security.Principal; import java.util.Locale; import java.util.Optional; import java.util.Set; -import static io.prestosql.spi.security.AccessDeniedException.denyAddColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCatalogAccess; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateView; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateViewWithSelect; -import static io.prestosql.spi.security.AccessDeniedException.denyDeleteTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyDropSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyDropTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropView; -import static io.prestosql.spi.security.AccessDeniedException.denyExecuteFunction; -import static io.prestosql.spi.security.AccessDeniedException.denyExecuteProcedure; -import static io.prestosql.spi.security.AccessDeniedException.denyExecuteQuery; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantExecuteFunctionPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantSchemaPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyImpersonateUser; -import static io.prestosql.spi.security.AccessDeniedException.denyInsertTable; -import static io.prestosql.spi.security.AccessDeniedException.denyKillQuery; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeSchemaPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denySelectColumns; -import static io.prestosql.spi.security.AccessDeniedException.denySetCatalogSessionProperty; -import static io.prestosql.spi.security.AccessDeniedException.denySetSchemaAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denySetSystemSessionProperty; -import static io.prestosql.spi.security.AccessDeniedException.denySetTableAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denySetUser; -import static io.prestosql.spi.security.AccessDeniedException.denySetViewAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denyShowColumns; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyShowRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyShowSchemas; -import static io.prestosql.spi.security.AccessDeniedException.denyShowTables; -import static io.prestosql.spi.security.AccessDeniedException.denyViewQuery; +import static io.trino.spi.security.AccessDeniedException.denyAddColumn; +import static io.trino.spi.security.AccessDeniedException.denyCatalogAccess; +import static io.trino.spi.security.AccessDeniedException.denyCommentColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateView; +import static io.trino.spi.security.AccessDeniedException.denyCreateViewWithSelect; +import static io.trino.spi.security.AccessDeniedException.denyDeleteTable; +import static io.trino.spi.security.AccessDeniedException.denyDropColumn; +import static io.trino.spi.security.AccessDeniedException.denyDropSchema; +import static io.trino.spi.security.AccessDeniedException.denyDropTable; +import static io.trino.spi.security.AccessDeniedException.denyDropView; +import static io.trino.spi.security.AccessDeniedException.denyExecuteFunction; +import static io.trino.spi.security.AccessDeniedException.denyExecuteProcedure; +import static io.trino.spi.security.AccessDeniedException.denyExecuteQuery; +import static io.trino.spi.security.AccessDeniedException.denyGrantExecuteFunctionPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyGrantSchemaPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyGrantTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denyImpersonateUser; +import static io.trino.spi.security.AccessDeniedException.denyInsertTable; +import static io.trino.spi.security.AccessDeniedException.denyKillQuery; +import static io.trino.spi.security.AccessDeniedException.denyRenameColumn; +import static io.trino.spi.security.AccessDeniedException.denyRenameSchema; +import static io.trino.spi.security.AccessDeniedException.denyRenameTable; +import static io.trino.spi.security.AccessDeniedException.denyRevokeSchemaPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyRevokeTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denySelectColumns; +import static io.trino.spi.security.AccessDeniedException.denySetCatalogSessionProperty; +import static io.trino.spi.security.AccessDeniedException.denySetSchemaAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetSystemSessionProperty; +import static io.trino.spi.security.AccessDeniedException.denySetTableAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetUser; +import static io.trino.spi.security.AccessDeniedException.denySetViewAuthorization; +import static io.trino.spi.security.AccessDeniedException.denyShowColumns; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyShowRoles; +import static io.trino.spi.security.AccessDeniedException.denyShowSchemas; +import static io.trino.spi.security.AccessDeniedException.denyShowTables; +import static io.trino.spi.security.AccessDeniedException.denyViewQuery; import static java.lang.String.format; import static java.util.Collections.emptySet; diff --git a/core/trino-spi/src/main/java/io/trino/spi/security/SystemSecurityContext.java b/core/trino-spi/src/main/java/io/trino/spi/security/SystemSecurityContext.java index b8290e83a3f3..18b176aef3cb 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/security/SystemSecurityContext.java +++ b/core/trino-spi/src/main/java/io/trino/spi/security/SystemSecurityContext.java @@ -13,7 +13,7 @@ */ package io.trino.spi.security; -import io.prestosql.spi.QueryId; +import io.trino.spi.QueryId; import java.util.Optional; diff --git a/core/trino-spi/src/main/java/io/trino/spi/session/PropertyMetadata.java b/core/trino-spi/src/main/java/io/trino/spi/session/PropertyMetadata.java index 8d5ba00cb058..f6f8f7823f6f 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/session/PropertyMetadata.java +++ b/core/trino-spi/src/main/java/io/trino/spi/session/PropertyMetadata.java @@ -13,18 +13,18 @@ */ package io.trino.spi.session; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.EnumSet; import java.util.function.Consumer; import java.util.function.Function; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/session/SessionConfigurationContext.java b/core/trino-spi/src/main/java/io/trino/spi/session/SessionConfigurationContext.java index c25756409bb2..27952b98a6dc 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/session/SessionConfigurationContext.java +++ b/core/trino-spi/src/main/java/io/trino/spi/session/SessionConfigurationContext.java @@ -13,7 +13,7 @@ */ package io.trino.spi.session; -import io.prestosql.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.ResourceGroupId; import java.util.Optional; import java.util.Set; diff --git a/core/trino-spi/src/main/java/io/trino/spi/session/SessionPropertyConfigurationManagerFactory.java b/core/trino-spi/src/main/java/io/trino/spi/session/SessionPropertyConfigurationManagerFactory.java index e8212bad29c5..3278e5fbdb0b 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/session/SessionPropertyConfigurationManagerFactory.java +++ b/core/trino-spi/src/main/java/io/trino/spi/session/SessionPropertyConfigurationManagerFactory.java @@ -13,7 +13,7 @@ */ package io.trino.spi.session; -import io.prestosql.spi.resourcegroups.SessionPropertyConfigurationManagerContext; +import io.trino.spi.resourcegroups.SessionPropertyConfigurationManagerContext; import java.util.Map; diff --git a/core/trino-spi/src/main/java/io/trino/spi/statistics/ComputedStatistics.java b/core/trino-spi/src/main/java/io/trino/spi/statistics/ComputedStatistics.java index ad18d097a886..d94597564298 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/statistics/ComputedStatistics.java +++ b/core/trino-spi/src/main/java/io/trino/spi/statistics/ComputedStatistics.java @@ -13,7 +13,7 @@ */ package io.trino.spi.statistics; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import java.util.HashMap; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/statistics/TableStatistics.java b/core/trino-spi/src/main/java/io/trino/spi/statistics/TableStatistics.java index 9ad5ce5eca58..5bb38e6d1ab5 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/statistics/TableStatistics.java +++ b/core/trino-spi/src/main/java/io/trino/spi/statistics/TableStatistics.java @@ -14,7 +14,7 @@ package io.trino.spi.statistics; -import io.prestosql.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnHandle; import java.util.LinkedHashMap; import java.util.Map; diff --git a/core/trino-spi/src/main/java/io/trino/spi/transaction/IsolationLevel.java b/core/trino-spi/src/main/java/io/trino/spi/transaction/IsolationLevel.java index a1836f50401c..fc3424fd6d89 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/transaction/IsolationLevel.java +++ b/core/trino-spi/src/main/java/io/trino/spi/transaction/IsolationLevel.java @@ -13,9 +13,9 @@ */ package io.trino.spi.transaction; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.UNSUPPORTED_ISOLATION_LEVEL; +import static io.trino.spi.StandardErrorCode.UNSUPPORTED_ISOLATION_LEVEL; import static java.lang.String.format; public enum IsolationLevel diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/AbstractIntType.java b/core/trino-spi/src/main/java/io/trino/spi/type/AbstractIntType.java index c633cfcb2d18..d93aa43eba30 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/AbstractIntType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/AbstractIntType.java @@ -15,22 +15,22 @@ import io.airlift.slice.Slice; import io.airlift.slice.XxHash64; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.IntArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.function.ScalarOperator; - -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.IntArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.function.ScalarOperator; + +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/AbstractLongType.java b/core/trino-spi/src/main/java/io/trino/spi/type/AbstractLongType.java index ba6c1e794489..92d7d16aee0f 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/AbstractLongType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/AbstractLongType.java @@ -15,20 +15,20 @@ import io.airlift.slice.Slice; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.LongArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.function.ScalarOperator; - -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.LongArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.function.ScalarOperator; + +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.Long.rotateLeft; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/AbstractType.java b/core/trino-spi/src/main/java/io/trino/spi/type/AbstractType.java index 8cb013b5ca50..2719f3a5ea0e 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/AbstractType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/AbstractType.java @@ -14,8 +14,8 @@ package io.trino.spi.type; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/AbstractVariableWidthType.java b/core/trino-spi/src/main/java/io/trino/spi/type/AbstractVariableWidthType.java index 2ecf018f9191..45f4a71c4d75 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/AbstractVariableWidthType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/AbstractVariableWidthType.java @@ -13,10 +13,10 @@ */ package io.trino.spi.type; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.block.VariableWidthBlockBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.block.VariableWidthBlockBuilder; import static java.lang.Math.min; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/ArrayType.java b/core/trino-spi/src/main/java/io/trino/spi/type/ArrayType.java index 4d336a682ad9..26002158d297 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/ArrayType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/ArrayType.java @@ -14,14 +14,14 @@ package io.trino.spi.type; import io.airlift.slice.Slice; -import io.prestosql.spi.block.AbstractArrayBlock; -import io.prestosql.spi.block.ArrayBlockBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.OperatorMethodHandle; +import io.trino.spi.block.AbstractArrayBlock; +import io.trino.spi.block.ArrayBlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.OperatorMethodHandle; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -31,16 +31,16 @@ import java.util.Collections; import java.util.List; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.type.StandardTypes.ARRAY; -import static io.prestosql.spi.type.TypeUtils.NULL_HASH_CODE; -import static io.prestosql.spi.type.TypeUtils.checkElementNotNull; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.type.StandardTypes.ARRAY; +import static io.trino.spi.type.TypeUtils.NULL_HASH_CODE; +import static io.trino.spi.type.TypeUtils.checkElementNotNull; import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/BigintType.java b/core/trino-spi/src/main/java/io/trino/spi/type/BigintType.java index 4b1ad93c8651..a2b5eeb5d638 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/BigintType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/BigintType.java @@ -13,8 +13,8 @@ */ package io.trino.spi.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; import java.util.Optional; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/BooleanType.java b/core/trino-spi/src/main/java/io/trino/spi/type/BooleanType.java index 10506eed2979..4da53974d14b 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/BooleanType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/BooleanType.java @@ -14,20 +14,20 @@ package io.trino.spi.type; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.ByteArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.ScalarOperator; - -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.ByteArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.ScalarOperator; + +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.invoke.MethodHandles.lookup; public final class BooleanType diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/CharType.java b/core/trino-spi/src/main/java/io/trino/spi/type/CharType.java index 610e765c2885..6ee15053558c 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/CharType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/CharType.java @@ -16,26 +16,26 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.slice.XxHash64; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.ScalarOperator; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.ScalarOperator; import java.util.Objects; import static io.airlift.slice.SliceUtf8.countCodePoints; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.Chars.compareChars; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.spi.type.Slices.sliceRepresentation; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.Chars.compareChars; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.spi.type.Slices.sliceRepresentation; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.lookup; import static java.util.Collections.singletonList; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/Chars.java b/core/trino-spi/src/main/java/io/trino/spi/type/Chars.java index 2363fa5fe08c..1a55fdbf50a8 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/Chars.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/Chars.java @@ -17,8 +17,8 @@ import io.airlift.slice.Slices; import static io.airlift.slice.SliceUtf8.countCodePoints; -import static io.prestosql.spi.type.Varchars.byteCount; -import static io.prestosql.spi.type.Varchars.truncateToLength; +import static io.trino.spi.type.Varchars.byteCount; +import static io.trino.spi.type.Varchars.truncateToLength; import static java.util.Objects.requireNonNull; public final class Chars diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/DateTimeEncoding.java b/core/trino-spi/src/main/java/io/trino/spi/type/DateTimeEncoding.java index a3e73b44da7f..70a997e4dd9b 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/DateTimeEncoding.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/DateTimeEncoding.java @@ -13,8 +13,8 @@ */ package io.trino.spi.type; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; import static java.util.Objects.requireNonNull; public final class DateTimeEncoding diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/DateType.java b/core/trino-spi/src/main/java/io/trino/spi/type/DateType.java index 77842b02861f..e9b78bf62a2f 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/DateType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/DateType.java @@ -13,8 +13,8 @@ */ package io.trino.spi.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; // // A date is stored as days from 1970-01-01. diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/DecimalConversions.java b/core/trino-spi/src/main/java/io/trino/spi/type/DecimalConversions.java index bca6db856f37..a9ad0c768e62 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/DecimalConversions.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/DecimalConversions.java @@ -14,18 +14,18 @@ package io.trino.spi.type; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.math.BigDecimal; import java.math.BigInteger; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.type.Decimals.overflows; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.compareAbsolute; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.rescale; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToBigInteger; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToUnscaledLongUnsafe; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.type.Decimals.overflows; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.compareAbsolute; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.rescale; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToBigInteger; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToUnscaledLongUnsafe; import static java.lang.Double.parseDouble; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/DecimalType.java b/core/trino-spi/src/main/java/io/trino/spi/type/DecimalType.java index 93bdeb0a89b3..af45bcb403b3 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/DecimalType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/DecimalType.java @@ -13,14 +13,14 @@ */ package io.trino.spi.type; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.util.List; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.Decimals.MAX_PRECISION; -import static io.prestosql.spi.type.Decimals.MAX_SHORT_PRECISION; -import static io.prestosql.spi.type.TypeSignatureParameter.numericParameter; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.Decimals.MAX_PRECISION; +import static io.trino.spi.type.Decimals.MAX_SHORT_PRECISION; +import static io.trino.spi.type.TypeSignatureParameter.numericParameter; import static java.lang.String.format; public abstract class DecimalType diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/Decimals.java b/core/trino-spi/src/main/java/io/trino/spi/type/Decimals.java index 7a3161c4d8f2..3cc0a1626f40 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/Decimals.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/Decimals.java @@ -14,9 +14,9 @@ package io.trino.spi.type; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import java.math.BigDecimal; import java.math.BigInteger; @@ -26,11 +26,11 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.toUnscaledString; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToBigInteger; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.toUnscaledString; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToBigInteger; import static java.lang.Math.abs; import static java.lang.Math.pow; import static java.lang.Math.round; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/DoubleType.java b/core/trino-spi/src/main/java/io/trino/spi/type/DoubleType.java index dc6de40e10bb..81f155a58306 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/DoubleType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/DoubleType.java @@ -14,25 +14,25 @@ package io.trino.spi.type; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.LongArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.IsNull; -import io.prestosql.spi.function.ScalarOperator; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.LongArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.IsNull; +import io.trino.spi.function.ScalarOperator; import java.util.Optional; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.IS_DISTINCT_FROM; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.IS_DISTINCT_FROM; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.Double.doubleToLongBits; import static java.lang.Double.longBitsToDouble; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/FixedWidthType.java b/core/trino-spi/src/main/java/io/trino/spi/type/FixedWidthType.java index 9951e8f515d6..ba524efa2233 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/FixedWidthType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/FixedWidthType.java @@ -13,7 +13,7 @@ */ package io.trino.spi.type; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; /** * FixedWidthType is a type that has a fixed size for every value. diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/HyperLogLogType.java b/core/trino-spi/src/main/java/io/trino/spi/type/HyperLogLogType.java index 20905094afa9..26a9ae187b75 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/HyperLogLogType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/HyperLogLogType.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; // Layout is :, where // size: is a short describing the length of the hll bytes diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/IntegerType.java b/core/trino-spi/src/main/java/io/trino/spi/type/IntegerType.java index 308a7c335962..e3d4e20b84dd 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/IntegerType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/IntegerType.java @@ -13,8 +13,8 @@ */ package io.trino.spi.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; import java.util.Optional; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/LongDecimalType.java b/core/trino-spi/src/main/java/io/trino/spi/type/LongDecimalType.java index 1a889496ac97..f8b0eb559217 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/LongDecimalType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/LongDecimalType.java @@ -16,25 +16,25 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.Int128ArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.ScalarOperator; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.Int128ArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.ScalarOperator; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; -import static io.prestosql.spi.block.Int128ArrayBlock.INT128_BYTES; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.Decimals.decodeUnscaledValue; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.UNSCALED_DECIMAL_128_SLICE_LENGTH; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.compare; +import static io.trino.spi.block.Int128ArrayBlock.INT128_BYTES; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.Decimals.decodeUnscaledValue; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.UNSCALED_DECIMAL_128_SLICE_LENGTH; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.compare; import static java.lang.invoke.MethodHandles.lookup; final class LongDecimalType diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/LongTimeWithTimeZone.java b/core/trino-spi/src/main/java/io/trino/spi/type/LongTimeWithTimeZone.java index 28bd3a970924..037cf9189184 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/LongTimeWithTimeZone.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/LongTimeWithTimeZone.java @@ -15,7 +15,7 @@ import java.util.Objects; -import static io.prestosql.spi.type.TimeWithTimeZoneTypes.normalize; +import static io.trino.spi.type.TimeWithTimeZoneTypes.normalize; public final class LongTimeWithTimeZone implements Comparable diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/LongTimeWithTimeZoneType.java b/core/trino-spi/src/main/java/io/trino/spi/type/LongTimeWithTimeZoneType.java index 893d9e4630bd..fb92de185738 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/LongTimeWithTimeZoneType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/LongTimeWithTimeZoneType.java @@ -14,25 +14,25 @@ package io.trino.spi.type; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.Int96ArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.ScalarOperator; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.Int96ArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.ScalarOperator; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TimeWithTimeZoneTypes.normalizePicos; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TimeWithTimeZoneTypes.normalizePicos; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestamp.java b/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestamp.java index 24998f0e66bb..20bdc9bfcd8a 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestamp.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestamp.java @@ -15,7 +15,7 @@ import java.util.Objects; -import static io.prestosql.spi.type.Timestamps.formatTimestamp; +import static io.trino.spi.type.Timestamps.formatTimestamp; public final class LongTimestamp implements Comparable diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestampType.java b/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestampType.java index 3a99d44388c1..613dde2b7e4d 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestampType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestampType.java @@ -14,23 +14,23 @@ package io.trino.spi.type; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.Int96ArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.ScalarOperator; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.Int96ArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.ScalarOperator; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestampWithTimeZone.java b/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestampWithTimeZone.java index 819ec0169cec..995e9bf9091e 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestampWithTimeZone.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestampWithTimeZone.java @@ -15,7 +15,7 @@ import java.util.Objects; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; public final class LongTimestampWithTimeZone implements Comparable diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestampWithTimeZoneType.java b/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestampWithTimeZoneType.java index 82b6a8cfbe01..1b3e059e7a7e 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestampWithTimeZoneType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/LongTimestampWithTimeZoneType.java @@ -14,26 +14,26 @@ package io.trino.spi.type; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.Int96ArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.ScalarOperator; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.Int96ArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.ScalarOperator; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/MapType.java b/core/trino-spi/src/main/java/io/trino/spi/type/MapType.java index 8c9e0dc59670..3e5396608f90 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/MapType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/MapType.java @@ -13,15 +13,15 @@ */ package io.trino.spi.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.MapBlock; -import io.prestosql.spi.block.MapBlockBuilder; -import io.prestosql.spi.block.SingleMapBlock; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.OperatorMethodHandle; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.MapBlock; +import io.trino.spi.block.MapBlockBuilder; +import io.trino.spi.block.SingleMapBlock; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.OperatorMethodHandle; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -32,15 +32,15 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.type.TypeOperatorDeclaration.NO_TYPE_OPERATOR_DECLARATION; -import static io.prestosql.spi.type.TypeUtils.NULL_HASH_CODE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.type.TypeOperatorDeclaration.NO_TYPE_OPERATOR_DECLARATION; +import static io.trino.spi.type.TypeUtils.NULL_HASH_CODE; import static java.lang.String.format; import static java.lang.invoke.MethodType.methodType; import static java.util.Arrays.asList; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/P4HyperLogLogType.java b/core/trino-spi/src/main/java/io/trino/spi/type/P4HyperLogLogType.java index 61ca91287856..9594572368ed 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/P4HyperLogLogType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/P4HyperLogLogType.java @@ -15,11 +15,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; public class P4HyperLogLogType extends AbstractVariableWidthType diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/QuantileDigestType.java b/core/trino-spi/src/main/java/io/trino/spi/type/QuantileDigestType.java index 0c257bbd8529..7356ac558a29 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/QuantileDigestType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/QuantileDigestType.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; import java.util.List; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/RealType.java b/core/trino-spi/src/main/java/io/trino/spi/type/RealType.java index 7a2ccb22f0ab..ae51423e99ae 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/RealType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/RealType.java @@ -14,24 +14,24 @@ package io.trino.spi.type; import io.airlift.slice.XxHash64; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.IsNull; -import io.prestosql.spi.function.ScalarOperator; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.IsNull; +import io.trino.spi.function.ScalarOperator; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.IS_DISTINCT_FROM; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.IS_DISTINCT_FROM; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.Float.floatToIntBits; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/RowType.java b/core/trino-spi/src/main/java/io/trino/spi/type/RowType.java index fcb5d1b82011..d18cf79952b1 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/RowType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/RowType.java @@ -13,15 +13,15 @@ */ package io.trino.spi.type; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.RowBlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.OperatorMethodHandle; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.RowBlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.OperatorMethodHandle; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles.Lookup; @@ -33,14 +33,14 @@ import java.util.function.Function; import java.util.stream.Collectors; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.type.StandardTypes.ROW; -import static io.prestosql.spi.type.TypeUtils.NULL_HASH_CODE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.type.StandardTypes.ROW; +import static io.trino.spi.type.TypeUtils.NULL_HASH_CODE; import static java.lang.Boolean.FALSE; import static java.lang.Boolean.TRUE; import static java.lang.invoke.MethodHandles.collectArguments; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/ShortDecimalType.java b/core/trino-spi/src/main/java/io/trino/spi/type/ShortDecimalType.java index 92158daa32b5..a12c3b62563d 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/ShortDecimalType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/ShortDecimalType.java @@ -14,24 +14,24 @@ package io.trino.spi.type; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.LongArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.ScalarOperator; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.LongArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.ScalarOperator; import java.math.BigInteger; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.invoke.MethodHandles.lookup; final class ShortDecimalType diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/ShortTimeWithTimeZoneType.java b/core/trino-spi/src/main/java/io/trino/spi/type/ShortTimeWithTimeZoneType.java index 3cfb97b87d39..84c3b40e6848 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/ShortTimeWithTimeZoneType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/ShortTimeWithTimeZoneType.java @@ -15,25 +15,25 @@ import io.airlift.slice.Slice; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.LongArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.ScalarOperator; - -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.spi.type.TimeWithTimeZoneTypes.normalizePackedTime; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.LongArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.ScalarOperator; + +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.spi.type.TimeWithTimeZoneTypes.normalizePackedTime; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/ShortTimestampType.java b/core/trino-spi/src/main/java/io/trino/spi/type/ShortTimestampType.java index 8a427986808b..0b4c0f368fef 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/ShortTimestampType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/ShortTimestampType.java @@ -14,21 +14,21 @@ package io.trino.spi.type; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.LongArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.ScalarOperator; - -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.LongArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.ScalarOperator; + +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/ShortTimestampWithTimeZoneType.java b/core/trino-spi/src/main/java/io/trino/spi/type/ShortTimestampWithTimeZoneType.java index 560aab02b00d..588d883e7e5a 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/ShortTimestampWithTimeZoneType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/ShortTimestampWithTimeZoneType.java @@ -15,23 +15,23 @@ import io.airlift.slice.Slice; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.LongArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.ScalarOperator; - -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.LongArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.ScalarOperator; + +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/SmallintType.java b/core/trino-spi/src/main/java/io/trino/spi/type/SmallintType.java index d2423e7cd3d2..6fb4bf74cac3 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/SmallintType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/SmallintType.java @@ -14,25 +14,25 @@ package io.trino.spi.type; import io.airlift.slice.XxHash64; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.block.ShortArrayBlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.ScalarOperator; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.block.ShortArrayBlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.ScalarOperator; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/SqlTime.java b/core/trino-spi/src/main/java/io/trino/spi/type/SqlTime.java index 5e762d0743ca..0ec4ed14f5e4 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/SqlTime.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/SqlTime.java @@ -17,16 +17,16 @@ import java.util.Objects; -import static io.prestosql.spi.type.TimeType.MAX_PRECISION; -import static io.prestosql.spi.type.Timestamps.MINUTES_PER_HOUR; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_DAY; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_HOUR; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MINUTE; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.POWERS_OF_TEN; -import static io.prestosql.spi.type.Timestamps.SECONDS_PER_MINUTE; -import static io.prestosql.spi.type.Timestamps.rescale; -import static io.prestosql.spi.type.Timestamps.round; +import static io.trino.spi.type.TimeType.MAX_PRECISION; +import static io.trino.spi.type.Timestamps.MINUTES_PER_HOUR; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_DAY; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_HOUR; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MINUTE; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.POWERS_OF_TEN; +import static io.trino.spi.type.Timestamps.SECONDS_PER_MINUTE; +import static io.trino.spi.type.Timestamps.rescale; +import static io.trino.spi.type.Timestamps.round; import static java.lang.String.format; public final class SqlTime diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/SqlTimeWithTimeZone.java b/core/trino-spi/src/main/java/io/trino/spi/type/SqlTimeWithTimeZone.java index 1e82b0aa6c55..bc5e4780e46c 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/SqlTimeWithTimeZone.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/SqlTimeWithTimeZone.java @@ -17,13 +17,13 @@ import java.util.Objects; -import static io.prestosql.spi.type.TimeType.MAX_PRECISION; -import static io.prestosql.spi.type.Timestamps.MINUTES_PER_HOUR; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_HOUR; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MINUTE; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.POWERS_OF_TEN; -import static io.prestosql.spi.type.Timestamps.SECONDS_PER_MINUTE; +import static io.trino.spi.type.TimeType.MAX_PRECISION; +import static io.trino.spi.type.Timestamps.MINUTES_PER_HOUR; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_HOUR; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MINUTE; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.POWERS_OF_TEN; +import static io.trino.spi.type.Timestamps.SECONDS_PER_MINUTE; import static java.lang.Math.abs; import static java.lang.String.format; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/SqlTimestamp.java b/core/trino-spi/src/main/java/io/trino/spi/type/SqlTimestamp.java index 6d579d194879..a7363b708e37 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/SqlTimestamp.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/SqlTimestamp.java @@ -19,13 +19,13 @@ import java.time.ZoneOffset; import java.util.Objects; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.spi.type.Timestamps.formatTimestamp; -import static io.prestosql.spi.type.Timestamps.round; -import static io.prestosql.spi.type.Timestamps.roundDiv; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.spi.type.Timestamps.formatTimestamp; +import static io.trino.spi.type.Timestamps.round; +import static io.trino.spi.type.Timestamps.roundDiv; import static java.lang.Math.floorDiv; import static java.lang.Math.floorMod; import static java.lang.String.format; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/SqlTimestampWithTimeZone.java b/core/trino-spi/src/main/java/io/trino/spi/type/SqlTimestampWithTimeZone.java index e51f826064c6..1483d0c02634 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/SqlTimestampWithTimeZone.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/SqlTimestampWithTimeZone.java @@ -20,11 +20,11 @@ import java.time.ZonedDateTime; import java.util.Objects; -import static io.prestosql.spi.type.Timestamps.MILLISECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.formatTimestampWithTimeZone; -import static io.prestosql.spi.type.Timestamps.round; -import static io.prestosql.spi.type.Timestamps.roundDiv; +import static io.trino.spi.type.Timestamps.MILLISECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.formatTimestampWithTimeZone; +import static io.trino.spi.type.Timestamps.round; +import static io.trino.spi.type.Timestamps.roundDiv; import static java.lang.Math.floorDiv; import static java.lang.Math.floorMod; import static java.lang.Math.toIntExact; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TimeType.java b/core/trino-spi/src/main/java/io/trino/spi/type/TimeType.java index ea13ed38486f..1a2aaf06f416 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TimeType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TimeType.java @@ -14,19 +14,19 @@ package io.trino.spi.type; import io.airlift.slice.XxHash64; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.ScalarOperator; - -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.ScalarOperator; + +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TimeWithTimeZoneType.java b/core/trino-spi/src/main/java/io/trino/spi/type/TimeWithTimeZoneType.java index 639478979f2b..3aa5c12d9a61 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TimeWithTimeZoneType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TimeWithTimeZoneType.java @@ -13,9 +13,9 @@ */ package io.trino.spi.type; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; import static java.lang.String.format; public abstract class TimeWithTimeZoneType diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TimeWithTimeZoneTypes.java b/core/trino-spi/src/main/java/io/trino/spi/type/TimeWithTimeZoneTypes.java index 7f74f2d61f5b..9472de0b1c3b 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TimeWithTimeZoneTypes.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TimeWithTimeZoneTypes.java @@ -13,12 +13,12 @@ */ package io.trino.spi.type; -import static io.prestosql.spi.type.DateTimeEncoding.unpackOffsetMinutes; -import static io.prestosql.spi.type.DateTimeEncoding.unpackTimeNanos; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_DAY; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MINUTE; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_DAY; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MINUTE; +import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes; +import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_DAY; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MINUTE; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_DAY; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MINUTE; import static java.lang.Math.floorMod; public final class TimeWithTimeZoneTypes diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TimeZoneKey.java b/core/trino-spi/src/main/java/io/trino/spi/type/TimeZoneKey.java index 0ffca68d42e5..d314b6c852bd 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TimeZoneKey.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TimeZoneKey.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.io.IOException; import java.io.InputStream; @@ -31,7 +31,7 @@ import java.util.Set; import java.util.TreeMap; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; import static java.lang.Math.abs; import static java.lang.Math.max; import static java.lang.String.format; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TimeZoneNotSupportedException.java b/core/trino-spi/src/main/java/io/trino/spi/type/TimeZoneNotSupportedException.java index 691d59b3994e..f600aa01a379 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TimeZoneNotSupportedException.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TimeZoneNotSupportedException.java @@ -13,9 +13,9 @@ */ package io.trino.spi.type; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; public class TimeZoneNotSupportedException extends PrestoException diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TimestampType.java b/core/trino-spi/src/main/java/io/trino/spi/type/TimestampType.java index 0716fbfb4bfa..54d5aee8fb90 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TimestampType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TimestampType.java @@ -13,9 +13,9 @@ */ package io.trino.spi.type; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; import static java.lang.String.format; /** diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TimestampTypes.java b/core/trino-spi/src/main/java/io/trino/spi/type/TimestampTypes.java index 536d38f59700..c5243dcbb3ac 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TimestampTypes.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TimestampTypes.java @@ -13,7 +13,7 @@ */ package io.trino.spi.type; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; public final class TimestampTypes { diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TimestampWithTimeZoneType.java b/core/trino-spi/src/main/java/io/trino/spi/type/TimestampWithTimeZoneType.java index f162f7da6efe..96cd139f0554 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TimestampWithTimeZoneType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TimestampWithTimeZoneType.java @@ -13,9 +13,9 @@ */ package io.trino.spi.type; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; +import static io.trino.spi.StandardErrorCode.NUMERIC_VALUE_OUT_OF_RANGE; import static java.lang.String.format; public abstract class TimestampWithTimeZoneType diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/Timestamps.java b/core/trino-spi/src/main/java/io/trino/spi/type/Timestamps.java index 89f36e117fdc..8a1d76136456 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/Timestamps.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/Timestamps.java @@ -18,7 +18,7 @@ import java.time.ZoneId; import java.time.format.DateTimeFormatter; -import static io.prestosql.spi.type.TimestampType.MAX_PRECISION; +import static io.trino.spi.type.TimestampType.MAX_PRECISION; import static java.lang.Math.floorDiv; import static java.lang.Math.floorMod; import static java.lang.String.format; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TinyintType.java b/core/trino-spi/src/main/java/io/trino/spi/type/TinyintType.java index 4384c2fd8bb8..cfe546401bea 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TinyintType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TinyintType.java @@ -14,25 +14,25 @@ package io.trino.spi.type; import io.airlift.slice.XxHash64; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.block.ByteArrayBlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.ScalarOperator; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.block.ByteArrayBlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.ScalarOperator; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.HASH_CODE; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.HASH_CODE; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/Type.java b/core/trino-spi/src/main/java/io/trino/spi/type/Type.java index b7fa60b6d856..97d248b44bda 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/Type.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/Type.java @@ -15,15 +15,15 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.connector.ConnectorSession; import java.util.List; import java.util.Optional; -import static io.prestosql.spi.type.TypeOperatorDeclaration.NO_TYPE_OPERATOR_DECLARATION; +import static io.trino.spi.type.TypeOperatorDeclaration.NO_TYPE_OPERATOR_DECLARATION; import static java.util.Objects.requireNonNull; public interface Type diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TypeNotFoundException.java b/core/trino-spi/src/main/java/io/trino/spi/type/TypeNotFoundException.java index 4f73e5f2698a..f9c78da59a86 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TypeNotFoundException.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TypeNotFoundException.java @@ -13,9 +13,9 @@ */ package io.trino.spi.type; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.TYPE_NOT_FOUND; +import static io.trino.spi.StandardErrorCode.TYPE_NOT_FOUND; import static java.util.Objects.requireNonNull; public class TypeNotFoundException diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TypeOperatorDeclaration.java b/core/trino-spi/src/main/java/io/trino/spi/type/TypeOperatorDeclaration.java index babb9b4dc135..b9b3bd71b624 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TypeOperatorDeclaration.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TypeOperatorDeclaration.java @@ -13,18 +13,18 @@ */ package io.trino.spi.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention; -import io.prestosql.spi.function.IsNull; -import io.prestosql.spi.function.OperatorMethodHandle; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlNullable; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.spi.function.InvocationConvention.InvocationReturnConvention; +import io.trino.spi.function.IsNull; +import io.trino.spi.function.OperatorMethodHandle; +import io.trino.spi.function.OperatorType; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlNullable; import java.lang.annotation.Annotation; import java.lang.invoke.MethodHandle; @@ -36,13 +36,13 @@ import java.util.Collection; import java.util.List; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; import static java.lang.String.format; import static java.lang.invoke.MethodType.methodType; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TypeOperators.java b/core/trino-spi/src/main/java/io/trino/spi/type/TypeOperators.java index 7ba0ed2bd21e..26a0c0c9646d 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TypeOperators.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TypeOperators.java @@ -13,16 +13,16 @@ */ package io.trino.spi.type; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention; -import io.prestosql.spi.function.OperatorMethodHandle; -import io.prestosql.spi.function.OperatorType; -import io.prestosql.spi.function.ScalarFunctionAdapter; -import io.prestosql.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.spi.function.InvocationConvention.InvocationReturnConvention; +import io.trino.spi.function.OperatorMethodHandle; +import io.trino.spi.function.OperatorType; +import io.trino.spi.function.ScalarFunctionAdapter; +import io.trino.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -38,17 +38,17 @@ import java.util.function.BiFunction; import java.util.function.Supplier; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_NOT_FOUND; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.LESS_THAN; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.StandardErrorCode.FUNCTION_NOT_FOUND; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.NULLABLE_RETURN; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.LESS_THAN; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.collectArguments; import static java.lang.invoke.MethodHandles.dropArguments; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TypeSignature.java b/core/trino-spi/src/main/java/io/trino/spi/type/TypeSignature.java index 34d0f1921fb5..e702b5e5ed41 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TypeSignature.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TypeSignature.java @@ -24,8 +24,8 @@ import java.util.Objects; import java.util.stream.Collectors; -import static io.prestosql.spi.type.StandardTypes.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TypeSignatureParameter.typeParameter; +import static io.trino.spi.type.StandardTypes.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TypeSignatureParameter.typeParameter; import static java.lang.String.format; import static java.util.Arrays.asList; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/TypeUtils.java b/core/trino-spi/src/main/java/io/trino/spi/type/TypeUtils.java index a840726adbaf..791dc6fc18b0 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/TypeUtils.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/TypeUtils.java @@ -15,15 +15,15 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import javax.annotation.Nullable; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/UnscaledDecimal128Arithmetic.java b/core/trino-spi/src/main/java/io/trino/spi/type/UnscaledDecimal128Arithmetic.java index dd6962d89054..c1de3f97a99d 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/UnscaledDecimal128Arithmetic.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/UnscaledDecimal128Arithmetic.java @@ -21,8 +21,8 @@ import static io.airlift.slice.SizeOf.SIZE_OF_INT; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; -import static io.prestosql.spi.type.Decimals.MAX_PRECISION; -import static io.prestosql.spi.type.Decimals.longTenToNth; +import static io.trino.spi.type.Decimals.MAX_PRECISION; +import static io.trino.spi.type.Decimals.longTenToNth; import static java.lang.Integer.toUnsignedLong; import static java.lang.Math.abs; import static java.lang.System.arraycopy; diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/VarbinaryType.java b/core/trino-spi/src/main/java/io/trino/spi/type/VarbinaryType.java index 60af84f18e4a..33f496980e39 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/VarbinaryType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/VarbinaryType.java @@ -15,18 +15,18 @@ import io.airlift.slice.Slice; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlNullable; - -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlNullable; + +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.invoke.MethodHandles.lookup; public final class VarbinaryType diff --git a/core/trino-spi/src/main/java/io/trino/spi/type/VarcharType.java b/core/trino-spi/src/main/java/io/trino/spi/type/VarcharType.java index 13bf1e2cc470..106feabd0df8 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/type/VarcharType.java +++ b/core/trino-spi/src/main/java/io/trino/spi/type/VarcharType.java @@ -17,23 +17,23 @@ import io.airlift.slice.SliceUtf8; import io.airlift.slice.Slices; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockBuilderStatus; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.ScalarOperator; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilderStatus; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.ScalarOperator; import java.util.Objects; import java.util.Optional; import static io.airlift.slice.SliceUtf8.countCodePoints; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.Slices.sliceRepresentation; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.Slices.sliceRepresentation; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.Character.MAX_CODE_POINT; import static java.lang.String.format; import static java.lang.invoke.MethodHandles.lookup; diff --git a/core/trino-spi/src/test/java/io/trino/spi/TestPage.java b/core/trino-spi/src/test/java/io/trino/spi/TestPage.java index 9b6753a0960a..1fd848ec8ec9 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/TestPage.java +++ b/core/trino-spi/src/test/java/io/trino/spi/TestPage.java @@ -15,17 +15,17 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.DictionaryId; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.DictionaryId; import org.testng.annotations.Test; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Verify.verifyNotNull; -import static io.prestosql.spi.block.DictionaryId.randomDictionaryId; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.block.DictionaryId.randomDictionaryId; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-spi/src/test/java/io/trino/spi/TestPrestoException.java b/core/trino-spi/src/test/java/io/trino/spi/TestPrestoException.java index abd1f78d9970..2f5c62b22f2a 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/TestPrestoException.java +++ b/core/trino-spi/src/test/java/io/trino/spi/TestPrestoException.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.ErrorType.USER_ERROR; +import static io.trino.spi.ErrorType.USER_ERROR; import static org.testng.Assert.assertEquals; public class TestPrestoException diff --git a/core/trino-spi/src/test/java/io/trino/spi/TestStandardErrorCode.java b/core/trino-spi/src/test/java/io/trino/spi/TestStandardErrorCode.java index ae63995fe157..df055fb418ac 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/TestStandardErrorCode.java +++ b/core/trino-spi/src/test/java/io/trino/spi/TestStandardErrorCode.java @@ -21,8 +21,8 @@ import static io.airlift.testing.Assertions.assertGreaterThan; import static io.airlift.testing.Assertions.assertLessThan; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_INSUFFICIENT_RESOURCES; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.util.Arrays.asList; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/BaseBlockEncodingTest.java b/core/trino-spi/src/test/java/io/trino/spi/block/BaseBlockEncodingTest.java index e4ded562f362..7ee9cf0453a7 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/BaseBlockEncodingTest.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/BaseBlockEncodingTest.java @@ -14,7 +14,7 @@ package io.trino.spi.block; import io.airlift.slice.DynamicSliceOutput; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -23,7 +23,7 @@ import java.util.stream.IntStream; import java.util.stream.Stream; -import static io.prestosql.spi.block.BlockTestUtils.assertBlockEquals; +import static io.trino.spi.block.BlockTestUtils.assertBlockEquals; public abstract class BaseBlockEncodingTest { diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/BlockTestUtils.java b/core/trino-spi/src/test/java/io/trino/spi/block/BlockTestUtils.java index 4a2763f2b5fd..7ae2ff15ff7c 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/BlockTestUtils.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/BlockTestUtils.java @@ -13,9 +13,9 @@ */ package io.trino.spi.block; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; -import static io.prestosql.spi.block.TestingSession.SESSION; +import static io.trino.spi.block.TestingSession.SESSION; import static org.testng.Assert.assertEquals; public class BlockTestUtils diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestArrayBlockBuilder.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestArrayBlockBuilder.java index 8fe3bbdbcefe..0673f4ddfabf 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestArrayBlockBuilder.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestArrayBlockBuilder.java @@ -16,7 +16,7 @@ import org.openjdk.jol.info.ClassLayout; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestBlockRetainedSizeBreakdown.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestBlockRetainedSizeBreakdown.java index 67aa5528c2be..4aaec6e77a5f 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestBlockRetainedSizeBreakdown.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestBlockRetainedSizeBreakdown.java @@ -14,7 +14,7 @@ package io.trino.spi.block; import io.airlift.slice.DynamicSliceOutput; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import it.unimi.dsi.fastutil.Hash.Strategy; import it.unimi.dsi.fastutil.objects.Object2LongOpenCustomHashMap; import org.testng.annotations.Test; @@ -23,12 +23,12 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.function.BiConsumer; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TypeUtils.writeNativeValue; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; public class TestBlockRetainedSizeBreakdown diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestBlockUtil.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestBlockUtil.java index af9bfdd18803..0399387457e1 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestBlockUtil.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestBlockUtil.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.block.BlockUtil.MAX_ARRAY_SIZE; +import static io.trino.spi.block.BlockUtil.MAX_ARRAY_SIZE; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestByteArrayBlockEncoding.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestByteArrayBlockEncoding.java index d3d4baf9f7d3..c5a0e25d793b 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestByteArrayBlockEncoding.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestByteArrayBlockEncoding.java @@ -13,11 +13,11 @@ */ package io.trino.spi.block; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Random; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TinyintType.TINYINT; public class TestByteArrayBlockEncoding extends BaseBlockEncodingTest diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestDictionaryBlockEncoding.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestDictionaryBlockEncoding.java index 6967aa596714..e53f31eecb60 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestDictionaryBlockEncoding.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestDictionaryBlockEncoding.java @@ -16,8 +16,8 @@ import io.airlift.slice.DynamicSliceOutput; import org.testng.annotations.Test; -import static io.prestosql.spi.block.BlockTestUtils.assertBlockEquals; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.block.BlockTestUtils.assertBlockEquals; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestInt128ArrayBlockEncoding.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestInt128ArrayBlockEncoding.java index fa08cd593a07..0d2442d9d24a 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestInt128ArrayBlockEncoding.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestInt128ArrayBlockEncoding.java @@ -15,8 +15,8 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; import java.util.Random; diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestInt96ArrayBlockEncoding.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestInt96ArrayBlockEncoding.java index ade961f9b49d..68ccd8880d7f 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestInt96ArrayBlockEncoding.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestInt96ArrayBlockEncoding.java @@ -13,13 +13,13 @@ */ package io.trino.spi.block; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.Type; import java.util.Random; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_PICOS; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.TimestampType.TIMESTAMP_PICOS; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; public class TestInt96ArrayBlockEncoding extends BaseBlockEncodingTest diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestIntegerArrayBlockEncoding.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestIntegerArrayBlockEncoding.java index 747851eb4fba..96afa7fbd06d 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestIntegerArrayBlockEncoding.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestIntegerArrayBlockEncoding.java @@ -13,11 +13,11 @@ */ package io.trino.spi.block; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Random; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.IntegerType.INTEGER; public class TestIntegerArrayBlockEncoding extends BaseBlockEncodingTest diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestLongArrayBlockEncoding.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestLongArrayBlockEncoding.java index 6a5e4e836797..471b2fe5a840 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestLongArrayBlockEncoding.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestLongArrayBlockEncoding.java @@ -13,11 +13,11 @@ */ package io.trino.spi.block; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Random; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class TestLongArrayBlockEncoding extends BaseBlockEncodingTest diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestMethodHandleUtil.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestMethodHandleUtil.java index e738a8feab74..88e3c0a19cac 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestMethodHandleUtil.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestMethodHandleUtil.java @@ -20,8 +20,8 @@ import java.util.Objects; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.spi.block.MethodHandleUtil.compose; -import static io.prestosql.spi.block.MethodHandleUtil.methodHandle; +import static io.trino.spi.block.MethodHandleUtil.compose; +import static io.trino.spi.block.MethodHandleUtil.methodHandle; import static org.testng.Assert.assertEquals; public class TestMethodHandleUtil diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestShortArrayBlockEncoding.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestShortArrayBlockEncoding.java index 8af6f3044ef0..66d5e1626519 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestShortArrayBlockEncoding.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestShortArrayBlockEncoding.java @@ -13,11 +13,11 @@ */ package io.trino.spi.block; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Random; -import static io.prestosql.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.SmallintType.SMALLINT; public class TestShortArrayBlockEncoding extends BaseBlockEncodingTest diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestVariableWidthBlockBuilder.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestVariableWidthBlockBuilder.java index 38cfe77ff5cd..7b76f202d09c 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestVariableWidthBlockBuilder.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestVariableWidthBlockBuilder.java @@ -20,7 +20,7 @@ import static io.airlift.slice.SizeOf.SIZE_OF_INT; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Math.ceil; import static org.openjdk.jol.info.ClassLayout.parseClass; import static org.testng.Assert.assertEquals; diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestVariableWidthBlockEncoding.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestVariableWidthBlockEncoding.java index a759294ff6fd..62f2a8b0001b 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestVariableWidthBlockEncoding.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestVariableWidthBlockEncoding.java @@ -13,12 +13,12 @@ */ package io.trino.spi.block; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.Random; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestVariableWidthBlockEncoding extends BaseBlockEncodingTest diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestingBlockEncodingSerde.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestingBlockEncodingSerde.java index 798d7082b27f..2fc5b3b3fdc4 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestingBlockEncodingSerde.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestingBlockEncodingSerde.java @@ -15,10 +15,10 @@ import io.airlift.slice.SliceInput; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; diff --git a/core/trino-spi/src/test/java/io/trino/spi/block/TestingSession.java b/core/trino-spi/src/test/java/io/trino/spi/block/TestingSession.java index 2a21cbe5d026..9e51c14c3204 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/block/TestingSession.java +++ b/core/trino-spi/src/test/java/io/trino/spi/block/TestingSession.java @@ -13,17 +13,17 @@ */ package io.trino.spi.block; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.type.TimeZoneKey; import java.time.Instant; import java.util.Locale; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; import static java.util.Locale.ENGLISH; public final class TestingSession diff --git a/core/trino-spi/src/test/java/io/trino/spi/connector/TestConnectorViewDefinition.java b/core/trino-spi/src/test/java/io/trino/spi/connector/TestConnectorViewDefinition.java index 9deb25f61eda..90c8b33607aa 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/connector/TestConnectorViewDefinition.java +++ b/core/trino-spi/src/test/java/io/trino/spi/connector/TestConnectorViewDefinition.java @@ -18,19 +18,19 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.connector.ConnectorViewDefinition.ViewColumn; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.TestingTypeDeserializer; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorViewDefinition.ViewColumn; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.TestingTypeDeserializer; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.Comparator; import java.util.Optional; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.util.Comparator.comparing; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; diff --git a/core/trino-spi/src/test/java/io/trino/spi/function/TestScalarFunctionAdapter.java b/core/trino-spi/src/test/java/io/trino/spi/function/TestScalarFunctionAdapter.java index 2f6dae787a13..d278220f5627 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/function/TestScalarFunctionAdapter.java +++ b/core/trino-spi/src/test/java/io/trino/spi/function/TestScalarFunctionAdapter.java @@ -18,17 +18,17 @@ import com.google.common.primitives.Primitives; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention; -import io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention; -import io.prestosql.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.InvocationConvention.InvocationArgumentConvention; +import io.trino.spi.function.InvocationConvention.InvocationReturnConvention; +import io.trino.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.lang.invoke.MethodHandle; @@ -42,24 +42,24 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.block.TestingSession.SESSION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.RETURN_NULL_ON_NULL; -import static io.prestosql.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.THROW_ON_NULL; -import static io.prestosql.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.UNDEFINED_VALUE_FOR_NULL; -import static io.prestosql.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.UNSUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.block.TestingSession.SESSION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BOXED_NULLABLE; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.RETURN_NULL_ON_NULL; +import static io.trino.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.THROW_ON_NULL; +import static io.trino.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.UNDEFINED_VALUE_FOR_NULL; +import static io.trino.spi.function.ScalarFunctionAdapter.NullAdaptationPolicy.UNSUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TypeUtils.writeNativeValue; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.invoke.MethodHandles.lookup; import static java.lang.invoke.MethodType.methodType; import static java.util.Collections.nCopies; diff --git a/core/trino-spi/src/test/java/io/trino/spi/predicate/BenchmarkSortedRangeSet.java b/core/trino-spi/src/test/java/io/trino/spi/predicate/BenchmarkSortedRangeSet.java index fbeb5a7a94e5..0948f8cc2984 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/predicate/BenchmarkSortedRangeSet.java +++ b/core/trino-spi/src/test/java/io/trino/spi/predicate/BenchmarkSortedRangeSet.java @@ -35,7 +35,7 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; @Fork(1) @Warmup(iterations = 5) diff --git a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestAllOrNoneValueSet.java b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestAllOrNoneValueSet.java index c5f4fb9ef296..96a2e07ff765 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestAllOrNoneValueSet.java +++ b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestAllOrNoneValueSet.java @@ -17,13 +17,13 @@ import com.fasterxml.jackson.databind.module.SimpleModule; import io.airlift.json.ObjectMapperProvider; import io.airlift.slice.Slices; -import io.prestosql.spi.type.TestingTypeDeserializer; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.TestingTypeDeserializer; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestDomain.java b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestDomain.java index e9a8b6f25626..f404e039bb1c 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestDomain.java +++ b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestDomain.java @@ -18,21 +18,21 @@ import com.google.common.collect.ImmutableList; import io.airlift.json.ObjectMapperProvider; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.TestingBlockEncodingSerde; -import io.prestosql.spi.block.TestingBlockJsonSerde; -import io.prestosql.spi.type.TestingTypeDeserializer; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.TestingBlockEncodingSerde; +import io.trino.spi.block.TestingBlockJsonSerde; +import io.trino.spi.type.TestingTypeDeserializer; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.TestingIdType.ID; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.TestingIdType.ID; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Double.longBitsToDouble; import static java.lang.Float.floatToRawIntBits; import static org.testng.Assert.assertEquals; diff --git a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestEquatableValueSet.java b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestEquatableValueSet.java index cc39d9cfb969..9429ca6274e2 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestEquatableValueSet.java +++ b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestEquatableValueSet.java @@ -18,17 +18,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.TestingBlockEncodingSerde; -import io.prestosql.spi.block.TestingBlockJsonSerde; -import io.prestosql.spi.type.TestingTypeDeserializer; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.TestingBlockEncodingSerde; +import io.trino.spi.block.TestingBlockJsonSerde; +import io.trino.spi.type.TestingTypeDeserializer; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.Iterator; -import static io.prestosql.spi.type.TestingIdType.ID; +import static io.trino.spi.type.TestingIdType.ID; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestMarker.java b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestMarker.java index 683e55d9dbe5..902a67436f92 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestMarker.java +++ b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestMarker.java @@ -19,22 +19,22 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Ordering; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.TestingBlockEncodingSerde; -import io.prestosql.spi.block.TestingBlockJsonSerde; -import io.prestosql.spi.type.TestingTypeDeserializer; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.TestingBlockEncodingSerde; +import io.trino.spi.block.TestingBlockJsonSerde; +import io.trino.spi.type.TestingTypeDeserializer; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.Map; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Float.floatToIntBits; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestRange.java b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestRange.java index 764226b426b9..08847faa7ad7 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestRange.java +++ b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestRange.java @@ -16,19 +16,19 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.TestingBlockEncodingSerde; -import io.prestosql.spi.block.TestingBlockJsonSerde; -import io.prestosql.spi.type.TestingTypeDeserializer; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.TestingBlockEncodingSerde; +import io.trino.spi.block.TestingBlockJsonSerde; +import io.trino.spi.type.TestingTypeDeserializer; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestSortedRangeSet.java b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestSortedRangeSet.java index 9b22042032d8..a7d138023ed3 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestSortedRangeSet.java +++ b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestSortedRangeSet.java @@ -18,21 +18,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.TestingBlockEncodingSerde; -import io.prestosql.spi.block.TestingBlockJsonSerde; -import io.prestosql.spi.type.TestingTypeDeserializer; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.TestingBlockEncodingSerde; +import io.trino.spi.block.TestingBlockJsonSerde; +import io.trino.spi.type.TestingTypeDeserializer; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; import org.assertj.core.api.AssertProvider; import org.testng.annotations.Test; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Float.floatToRawIntBits; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestTupleDomain.java b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestTupleDomain.java index da388bd03aa0..1a617fd81489 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/predicate/TestTupleDomain.java +++ b/core/trino-spi/src/test/java/io/trino/spi/predicate/TestTupleDomain.java @@ -21,25 +21,25 @@ import com.fasterxml.jackson.databind.module.SimpleModule; import com.google.common.collect.ImmutableMap; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.TestingBlockEncodingSerde; -import io.prestosql.spi.block.TestingBlockJsonSerde; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.TestingColumnHandle; -import io.prestosql.spi.type.TestingTypeDeserializer; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.TestingBlockEncodingSerde; +import io.trino.spi.block.TestingBlockJsonSerde; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.TestingColumnHandle; +import io.trino.spi.type.TestingTypeDeserializer; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.io.IOException; import java.util.Map; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.predicate.TupleDomain.columnWiseUnion; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.predicate.TupleDomain.columnWiseUnion; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-spi/src/test/java/io/trino/spi/session/TestingSessionPropertyConfigurationManagerFactory.java b/core/trino-spi/src/test/java/io/trino/spi/session/TestingSessionPropertyConfigurationManagerFactory.java index b316067b56ea..c3278676c8b1 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/session/TestingSessionPropertyConfigurationManagerFactory.java +++ b/core/trino-spi/src/test/java/io/trino/spi/session/TestingSessionPropertyConfigurationManagerFactory.java @@ -13,7 +13,7 @@ */ package io.trino.spi.session; -import io.prestosql.spi.resourcegroups.SessionPropertyConfigurationManagerContext; +import io.trino.spi.resourcegroups.SessionPropertyConfigurationManagerContext; import java.util.Map; diff --git a/core/trino-spi/src/test/java/io/trino/spi/statistics/TestDoubleRange.java b/core/trino-spi/src/test/java/io/trino/spi/statistics/TestDoubleRange.java index e5e937bac6b9..b1571c27ba38 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/statistics/TestDoubleRange.java +++ b/core/trino-spi/src/test/java/io/trino/spi/statistics/TestDoubleRange.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.statistics.DoubleRange.union; +import static io.trino.spi.statistics.DoubleRange.union; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/core/trino-spi/src/test/java/io/trino/spi/transaction/TestIsolationLevel.java b/core/trino-spi/src/test/java/io/trino/spi/transaction/TestIsolationLevel.java index 18a313452092..fe6fb734a156 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/transaction/TestIsolationLevel.java +++ b/core/trino-spi/src/test/java/io/trino/spi/transaction/TestIsolationLevel.java @@ -15,10 +15,10 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.READ_UNCOMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.REPEATABLE_READ; -import static io.prestosql.spi.transaction.IsolationLevel.SERIALIZABLE; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.transaction.IsolationLevel.READ_UNCOMMITTED; +import static io.trino.spi.transaction.IsolationLevel.REPEATABLE_READ; +import static io.trino.spi.transaction.IsolationLevel.SERIALIZABLE; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestArrayType.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestArrayType.java index 445704cbd380..4896f14e25de 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestArrayType.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestArrayType.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static org.testng.Assert.assertEquals; public class TestArrayType diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestChars.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestChars.java index f3c4ab064787..080a09cd0b45 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestChars.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestChars.java @@ -19,10 +19,10 @@ import static com.google.common.base.Verify.verify; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.Chars.byteCountWithoutTrailingSpace; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.spi.type.Chars.truncateToLengthAndTrimSpaces; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.Chars.byteCountWithoutTrailingSpace; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.spi.type.Chars.truncateToLengthAndTrimSpaces; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestDecimals.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestDecimals.java index 7f9a63395220..05b49a489a88 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestDecimals.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestDecimals.java @@ -22,9 +22,9 @@ import java.math.BigInteger; import java.util.Objects; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.spi.type.Decimals.encodeShortScaledValue; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.Decimals.encodeShortScaledValue; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestLongDecimalType.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestLongDecimalType.java index 869871abc922..2b0d9510c09f 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestLongDecimalType.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestLongDecimalType.java @@ -15,18 +15,18 @@ import com.google.common.base.Throwables; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.VariableWidthBlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.VariableWidthBlockBuilder; import org.testng.annotations.Test; import java.lang.invoke.MethodHandle; import java.math.BigDecimal; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.type.Decimals.encodeScaledValue; import static java.lang.Math.signum; import static org.testng.Assert.assertEquals; diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestMapType.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestMapType.java index e14ee7824e95..979a0debc284 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestMapType.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestMapType.java @@ -15,9 +15,9 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; import static org.testng.Assert.assertEquals; public class TestMapType diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestRowType.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestRowType.java index 53e99af4f7e7..4ce847b31572 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestRowType.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestRowType.java @@ -17,9 +17,9 @@ import java.util.List; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Arrays.asList; import static org.testng.Assert.assertEquals; diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestSqlTimestamp.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestSqlTimestamp.java index d81a84f208e4..caeead8eb94d 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestSqlTimestamp.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestSqlTimestamp.java @@ -17,8 +17,8 @@ import java.time.LocalDateTime; -import static io.prestosql.spi.type.SqlTimestamp.fromMillis; -import static io.prestosql.spi.type.SqlTimestamp.newInstance; +import static io.trino.spi.type.SqlTimestamp.fromMillis; +import static io.trino.spi.type.SqlTimestamp.newInstance; import static org.assertj.core.api.Assertions.assertThat; public class TestSqlTimestamp diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestSqlTimestampWithTimeZone.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestSqlTimestampWithTimeZone.java index fdf7f3d92ffc..e6d057c187ea 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestSqlTimestampWithTimeZone.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestSqlTimestampWithTimeZone.java @@ -17,7 +17,7 @@ import java.time.ZonedDateTime; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; import static org.testng.Assert.assertEquals; public class TestSqlTimestampWithTimeZone diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestTimeZoneKey.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestTimeZoneKey.java index c3a8dd48296e..d4cbb4e2f3f4 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestTimeZoneKey.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestTimeZoneKey.java @@ -21,8 +21,8 @@ import java.nio.charset.StandardCharsets; import java.util.SortedSet; -import static io.prestosql.spi.type.TimeZoneKey.MAX_TIME_ZONE_KEY; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimeZoneKey.MAX_TIME_ZONE_KEY; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; import static java.util.Comparator.comparingInt; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestTimestamps.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestTimestamps.java index 6ad646102668..71e7f15e53fa 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestTimestamps.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestTimestamps.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.type.Timestamps.roundDiv; +import static io.trino.spi.type.Timestamps.roundDiv; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestUnscaledDecimal128Arithmetic.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestUnscaledDecimal128Arithmetic.java index dc2a1df79341..7246119af032 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestUnscaledDecimal128Arithmetic.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestUnscaledDecimal128Arithmetic.java @@ -24,28 +24,28 @@ import static io.airlift.slice.SizeOf.SIZE_OF_LONG; import static io.airlift.slice.Slices.wrappedIntArray; import static io.airlift.slice.Slices.wrappedLongArray; -import static io.prestosql.spi.type.Decimals.MAX_DECIMAL_UNSCALED_VALUE; -import static io.prestosql.spi.type.Decimals.MIN_DECIMAL_UNSCALED_VALUE; -import static io.prestosql.spi.type.Decimals.bigIntegerTenToNth; -import static io.prestosql.spi.type.Decimals.decodeUnscaledValue; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.add; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.addWithOverflow; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.compare; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.divide; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.isNegative; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.multiply; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.multiply256Destructive; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.overflows; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.rescale; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.shiftLeft; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.shiftLeftDestructive; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.shiftLeftMultiPrecision; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.shiftRight; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.shiftRightMultiPrecision; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.toUnscaledString; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToBigInteger; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToUnscaledLong; +import static io.trino.spi.type.Decimals.MAX_DECIMAL_UNSCALED_VALUE; +import static io.trino.spi.type.Decimals.MIN_DECIMAL_UNSCALED_VALUE; +import static io.trino.spi.type.Decimals.bigIntegerTenToNth; +import static io.trino.spi.type.Decimals.decodeUnscaledValue; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.add; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.addWithOverflow; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.compare; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.divide; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.isNegative; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.multiply; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.multiply256Destructive; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.overflows; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.rescale; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.shiftLeft; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.shiftLeftDestructive; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.shiftLeftMultiPrecision; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.shiftRight; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.shiftRightMultiPrecision; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.toUnscaledString; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToBigInteger; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToUnscaledLong; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestVarchars.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestVarchars.java index fa18ea57bbde..05f6edff0e7c 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestVarchars.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestVarchars.java @@ -19,9 +19,9 @@ import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.spi.type.Varchars.byteCount; -import static io.prestosql.spi.type.Varchars.truncateToLength; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.type.Varchars.byteCount; +import static io.trino.spi.type.Varchars.truncateToLength; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestingIdType.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestingIdType.java index 88ae3eb124a3..723396c57120 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestingIdType.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestingIdType.java @@ -13,8 +13,8 @@ */ package io.trino.spi.type; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; public class TestingIdType extends AbstractLongType diff --git a/core/trino-spi/src/test/java/io/trino/spi/type/TestingTypeManager.java b/core/trino-spi/src/test/java/io/trino/spi/type/TestingTypeManager.java index 1905d9067a24..c474d7e88a51 100644 --- a/core/trino-spi/src/test/java/io/trino/spi/type/TestingTypeManager.java +++ b/core/trino-spi/src/test/java/io/trino/spi/type/TestingTypeManager.java @@ -17,17 +17,17 @@ import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TestingIdType.ID; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TestingIdType.ID; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestingTypeManager implements TypeManager diff --git a/lib/trino-array/src/main/java/io/trino/array/BlockBigArray.java b/lib/trino-array/src/main/java/io/trino/array/BlockBigArray.java index 45d2a65fef4a..58fc51288a52 100644 --- a/lib/trino-array/src/main/java/io/trino/array/BlockBigArray.java +++ b/lib/trino-array/src/main/java/io/trino/array/BlockBigArray.java @@ -13,7 +13,7 @@ */ package io.trino.array; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import org.openjdk.jol.info.ClassLayout; public final class BlockBigArray diff --git a/lib/trino-array/src/main/java/io/trino/array/BooleanBigArray.java b/lib/trino-array/src/main/java/io/trino/array/BooleanBigArray.java index 73a36963b2de..d2f80ba5f42e 100644 --- a/lib/trino-array/src/main/java/io/trino/array/BooleanBigArray.java +++ b/lib/trino-array/src/main/java/io/trino/array/BooleanBigArray.java @@ -19,10 +19,10 @@ import java.util.Arrays; import static io.airlift.slice.SizeOf.sizeOfBooleanArray; -import static io.prestosql.array.BigArrays.INITIAL_SEGMENTS; -import static io.prestosql.array.BigArrays.SEGMENT_SIZE; -import static io.prestosql.array.BigArrays.offset; -import static io.prestosql.array.BigArrays.segment; +import static io.trino.array.BigArrays.INITIAL_SEGMENTS; +import static io.trino.array.BigArrays.SEGMENT_SIZE; +import static io.trino.array.BigArrays.offset; +import static io.trino.array.BigArrays.segment; // Note: this code was forked from fastutil (http://fastutil.di.unimi.it/) // Copyright (C) 2010-2013 Sebastiano Vigna diff --git a/lib/trino-array/src/main/java/io/trino/array/ByteBigArray.java b/lib/trino-array/src/main/java/io/trino/array/ByteBigArray.java index fdcda47019ab..176958b8ee66 100644 --- a/lib/trino-array/src/main/java/io/trino/array/ByteBigArray.java +++ b/lib/trino-array/src/main/java/io/trino/array/ByteBigArray.java @@ -19,10 +19,10 @@ import java.util.Arrays; import static io.airlift.slice.SizeOf.sizeOfByteArray; -import static io.prestosql.array.BigArrays.INITIAL_SEGMENTS; -import static io.prestosql.array.BigArrays.SEGMENT_SIZE; -import static io.prestosql.array.BigArrays.offset; -import static io.prestosql.array.BigArrays.segment; +import static io.trino.array.BigArrays.INITIAL_SEGMENTS; +import static io.trino.array.BigArrays.SEGMENT_SIZE; +import static io.trino.array.BigArrays.offset; +import static io.trino.array.BigArrays.segment; // Note: this code was forked from fastutil (http://fastutil.di.unimi.it/) // Copyright (C) 2010-2013 Sebastiano Vigna diff --git a/lib/trino-array/src/main/java/io/trino/array/DoubleBigArray.java b/lib/trino-array/src/main/java/io/trino/array/DoubleBigArray.java index 1dbc11868eac..b0470b5a6366 100644 --- a/lib/trino-array/src/main/java/io/trino/array/DoubleBigArray.java +++ b/lib/trino-array/src/main/java/io/trino/array/DoubleBigArray.java @@ -19,10 +19,10 @@ import java.util.Arrays; import static io.airlift.slice.SizeOf.sizeOfDoubleArray; -import static io.prestosql.array.BigArrays.INITIAL_SEGMENTS; -import static io.prestosql.array.BigArrays.SEGMENT_SIZE; -import static io.prestosql.array.BigArrays.offset; -import static io.prestosql.array.BigArrays.segment; +import static io.trino.array.BigArrays.INITIAL_SEGMENTS; +import static io.trino.array.BigArrays.SEGMENT_SIZE; +import static io.trino.array.BigArrays.offset; +import static io.trino.array.BigArrays.segment; // Note: this code was forked from fastutil (http://fastutil.di.unimi.it/) // Copyright (C) 2010-2013 Sebastiano Vigna diff --git a/lib/trino-array/src/main/java/io/trino/array/IntBigArray.java b/lib/trino-array/src/main/java/io/trino/array/IntBigArray.java index 71f9404b22a5..c55a63afab40 100644 --- a/lib/trino-array/src/main/java/io/trino/array/IntBigArray.java +++ b/lib/trino-array/src/main/java/io/trino/array/IntBigArray.java @@ -19,10 +19,10 @@ import java.util.Arrays; import static io.airlift.slice.SizeOf.sizeOfIntArray; -import static io.prestosql.array.BigArrays.INITIAL_SEGMENTS; -import static io.prestosql.array.BigArrays.SEGMENT_SIZE; -import static io.prestosql.array.BigArrays.offset; -import static io.prestosql.array.BigArrays.segment; +import static io.trino.array.BigArrays.INITIAL_SEGMENTS; +import static io.trino.array.BigArrays.SEGMENT_SIZE; +import static io.trino.array.BigArrays.offset; +import static io.trino.array.BigArrays.segment; // Note: this code was forked from fastutil (http://fastutil.di.unimi.it/) // Copyright (C) 2010-2013 Sebastiano Vigna diff --git a/lib/trino-array/src/main/java/io/trino/array/IntBigArrays.java b/lib/trino-array/src/main/java/io/trino/array/IntBigArrays.java index 81ea13fd2b16..e55b194d27b7 100644 --- a/lib/trino-array/src/main/java/io/trino/array/IntBigArrays.java +++ b/lib/trino-array/src/main/java/io/trino/array/IntBigArrays.java @@ -13,8 +13,8 @@ */ package io.trino.array; -import static io.prestosql.array.BigArrays.SEGMENT_SHIFT; -import static io.prestosql.array.BigArrays.SEGMENT_SIZE; +import static io.trino.array.BigArrays.SEGMENT_SHIFT; +import static io.trino.array.BigArrays.SEGMENT_SIZE; // Note: this code was forked from fastutil (http://fastutil.di.unimi.it/) // Copyright (C) 2010-2013 Sebastiano Vigna diff --git a/lib/trino-array/src/main/java/io/trino/array/LongBigArray.java b/lib/trino-array/src/main/java/io/trino/array/LongBigArray.java index c0a10adee34f..4ca71740f25a 100644 --- a/lib/trino-array/src/main/java/io/trino/array/LongBigArray.java +++ b/lib/trino-array/src/main/java/io/trino/array/LongBigArray.java @@ -19,10 +19,10 @@ import java.util.Arrays; import static io.airlift.slice.SizeOf.sizeOfLongArray; -import static io.prestosql.array.BigArrays.INITIAL_SEGMENTS; -import static io.prestosql.array.BigArrays.SEGMENT_SIZE; -import static io.prestosql.array.BigArrays.offset; -import static io.prestosql.array.BigArrays.segment; +import static io.trino.array.BigArrays.INITIAL_SEGMENTS; +import static io.trino.array.BigArrays.SEGMENT_SIZE; +import static io.trino.array.BigArrays.offset; +import static io.trino.array.BigArrays.segment; // Note: this code was forked from fastutil (http://fastutil.di.unimi.it/) // Copyright (C) 2010-2013 Sebastiano Vigna diff --git a/lib/trino-array/src/main/java/io/trino/array/ObjectBigArray.java b/lib/trino-array/src/main/java/io/trino/array/ObjectBigArray.java index 2edf2640e8cf..f4bf0a09e9e2 100644 --- a/lib/trino-array/src/main/java/io/trino/array/ObjectBigArray.java +++ b/lib/trino-array/src/main/java/io/trino/array/ObjectBigArray.java @@ -19,10 +19,10 @@ import java.util.Arrays; import static io.airlift.slice.SizeOf.sizeOfObjectArray; -import static io.prestosql.array.BigArrays.INITIAL_SEGMENTS; -import static io.prestosql.array.BigArrays.SEGMENT_SIZE; -import static io.prestosql.array.BigArrays.offset; -import static io.prestosql.array.BigArrays.segment; +import static io.trino.array.BigArrays.INITIAL_SEGMENTS; +import static io.trino.array.BigArrays.SEGMENT_SIZE; +import static io.trino.array.BigArrays.offset; +import static io.trino.array.BigArrays.segment; // Note: this code was forked from fastutil (http://fastutil.di.unimi.it/) // Copyright (C) 2010-2013 Sebastiano Vigna diff --git a/lib/trino-array/src/main/java/io/trino/array/ReferenceCountMap.java b/lib/trino-array/src/main/java/io/trino/array/ReferenceCountMap.java index 1f356b050292..2db513252e1b 100644 --- a/lib/trino-array/src/main/java/io/trino/array/ReferenceCountMap.java +++ b/lib/trino-array/src/main/java/io/trino/array/ReferenceCountMap.java @@ -15,8 +15,8 @@ import io.airlift.slice.SizeOf; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.MapHashTables; +import io.trino.spi.block.Block; +import io.trino.spi.block.MapHashTables; import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap; import org.openjdk.jol.info.ClassLayout; diff --git a/lib/trino-array/src/main/java/io/trino/array/ShortBigArray.java b/lib/trino-array/src/main/java/io/trino/array/ShortBigArray.java index 6cc6b274a812..1f1b3b1f0c6a 100644 --- a/lib/trino-array/src/main/java/io/trino/array/ShortBigArray.java +++ b/lib/trino-array/src/main/java/io/trino/array/ShortBigArray.java @@ -19,10 +19,10 @@ import java.util.Arrays; import static io.airlift.slice.SizeOf.sizeOfShortArray; -import static io.prestosql.array.BigArrays.INITIAL_SEGMENTS; -import static io.prestosql.array.BigArrays.SEGMENT_SIZE; -import static io.prestosql.array.BigArrays.offset; -import static io.prestosql.array.BigArrays.segment; +import static io.trino.array.BigArrays.INITIAL_SEGMENTS; +import static io.trino.array.BigArrays.SEGMENT_SIZE; +import static io.trino.array.BigArrays.offset; +import static io.trino.array.BigArrays.segment; // Note: this code was forked from fastutil (http://fastutil.di.unimi.it/) // Copyright (C) 2010-2013 Sebastiano Vigna diff --git a/lib/trino-array/src/test/java/io/trino/array/TestBlockBigArray.java b/lib/trino-array/src/test/java/io/trino/array/TestBlockBigArray.java index e32a04eeda48..b000d1cab160 100644 --- a/lib/trino-array/src/test/java/io/trino/array/TestBlockBigArray.java +++ b/lib/trino-array/src/test/java/io/trino/array/TestBlockBigArray.java @@ -13,9 +13,9 @@ */ package io.trino.array; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.IntArrayBlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.IntArrayBlockBuilder; import org.openjdk.jol.info.ClassLayout; import org.testng.annotations.Test; diff --git a/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/KdbTree.java b/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/KdbTree.java index 1d469b12f463..2fbf2717f327 100644 --- a/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/KdbTree.java +++ b/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/KdbTree.java @@ -28,8 +28,8 @@ import java.util.OptionalInt; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.geospatial.KdbTree.Node.newInternal; -import static io.prestosql.geospatial.KdbTree.Node.newLeaf; +import static io.trino.geospatial.KdbTree.Node.newInternal; +import static io.trino.geospatial.KdbTree.Node.newLeaf; import static java.util.Objects.requireNonNull; /** diff --git a/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/serde/GeometrySerde.java b/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/serde/GeometrySerde.java index de81927291f8..e4b5c4b52960 100644 --- a/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/serde/GeometrySerde.java +++ b/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/serde/GeometrySerde.java @@ -34,7 +34,7 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.SliceInput; -import io.prestosql.geospatial.GeometryType; +import io.trino.geospatial.GeometryType; import javax.annotation.Nullable; @@ -45,7 +45,7 @@ import static com.esri.core.geometry.Geometry.Type.Unknown; import static com.esri.core.geometry.GeometryEngine.geometryToEsriShape; import static com.google.common.base.Verify.verify; -import static io.prestosql.geospatial.GeometryUtils.isEsriNaN; +import static io.trino.geospatial.GeometryUtils.isEsriNaN; import static java.lang.Double.NaN; import static java.lang.Double.isNaN; import static java.lang.Math.toIntExact; diff --git a/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/serde/GeometrySerializationType.java b/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/serde/GeometrySerializationType.java index 3dfd65172fe3..81da56cd2a3c 100644 --- a/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/serde/GeometrySerializationType.java +++ b/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/serde/GeometrySerializationType.java @@ -13,7 +13,7 @@ */ package io.trino.geospatial.serde; -import io.prestosql.geospatial.GeometryType; +import io.trino.geospatial.GeometryType; public enum GeometrySerializationType { diff --git a/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/serde/JtsGeometrySerde.java b/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/serde/JtsGeometrySerde.java index 0178a1655760..b217b77cf2c7 100644 --- a/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/serde/JtsGeometrySerde.java +++ b/lib/trino-geospatial-toolkit/src/main/java/io/trino/geospatial/serde/JtsGeometrySerde.java @@ -35,7 +35,7 @@ import static com.google.common.base.Verify.verifyNotNull; import static com.google.common.collect.Iterables.getOnlyElement; import static io.airlift.slice.SizeOf.SIZE_OF_DOUBLE; -import static io.prestosql.geospatial.GeometryUtils.translateToAVNaN; +import static io.trino.geospatial.GeometryUtils.translateToAVNaN; import static java.lang.Double.NaN; import static java.lang.Double.isNaN; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/TestKdbTree.java b/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/TestKdbTree.java index b0c6a418924b..2c582c63aeeb 100644 --- a/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/TestKdbTree.java +++ b/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/TestKdbTree.java @@ -21,7 +21,7 @@ import java.util.Map; import java.util.Set; -import static io.prestosql.geospatial.KdbTree.buildKdbTree; +import static io.trino.geospatial.KdbTree.buildKdbTree; import static org.testng.Assert.assertEquals; public class TestKdbTree diff --git a/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/serde/BenchmarkGeometrySerde.java b/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/serde/BenchmarkGeometrySerde.java index f941d52abd1b..f2164ed76573 100644 --- a/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/serde/BenchmarkGeometrySerde.java +++ b/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/serde/BenchmarkGeometrySerde.java @@ -32,17 +32,17 @@ import org.openjdk.jmh.runner.options.VerboseMode; import static com.esri.core.geometry.ogc.OGCGeometry.fromText; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.GEOMETRYCOLLECTION; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.LINESTRING; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.MULTILINESTRING; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.MULTIPOINT; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.MULTIPOLYGON; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.POINT; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.POLYGON; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.readResource; -import static io.prestosql.geospatial.serde.GeometrySerde.deserialize; -import static io.prestosql.geospatial.serde.GeometrySerde.deserializeEnvelope; -import static io.prestosql.geospatial.serde.GeometrySerde.serialize; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.GEOMETRYCOLLECTION; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.LINESTRING; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.MULTILINESTRING; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.MULTIPOINT; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.MULTIPOLYGON; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.POINT; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.POLYGON; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.readResource; +import static io.trino.geospatial.serde.GeometrySerde.deserialize; +import static io.trino.geospatial.serde.GeometrySerde.deserializeEnvelope; +import static io.trino.geospatial.serde.GeometrySerde.serialize; import static java.util.concurrent.TimeUnit.SECONDS; import static org.openjdk.jmh.annotations.Mode.Throughput; diff --git a/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/serde/BenchmarkJtsGeometrySerde.java b/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/serde/BenchmarkJtsGeometrySerde.java index 0b05e692e234..e3f9b47c1667 100644 --- a/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/serde/BenchmarkJtsGeometrySerde.java +++ b/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/serde/BenchmarkJtsGeometrySerde.java @@ -33,16 +33,16 @@ import org.openjdk.jmh.runner.options.OptionsBuilder; import org.openjdk.jmh.runner.options.VerboseMode; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.GEOMETRYCOLLECTION; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.LINESTRING; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.MULTILINESTRING; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.MULTIPOINT; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.MULTIPOLYGON; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.POINT; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.POLYGON; -import static io.prestosql.geospatial.serde.BenchmarkGeometrySerializationData.readResource; -import static io.prestosql.geospatial.serde.JtsGeometrySerde.deserialize; -import static io.prestosql.geospatial.serde.JtsGeometrySerde.serialize; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.GEOMETRYCOLLECTION; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.LINESTRING; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.MULTILINESTRING; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.MULTIPOINT; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.MULTIPOLYGON; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.POINT; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.POLYGON; +import static io.trino.geospatial.serde.BenchmarkGeometrySerializationData.readResource; +import static io.trino.geospatial.serde.JtsGeometrySerde.deserialize; +import static io.trino.geospatial.serde.JtsGeometrySerde.serialize; import static java.util.concurrent.TimeUnit.SECONDS; import static org.openjdk.jmh.annotations.Mode.Throughput; diff --git a/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/serde/TestGeometrySerialization.java b/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/serde/TestGeometrySerialization.java index bf13673862d4..14bca80a0394 100644 --- a/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/serde/TestGeometrySerialization.java +++ b/lib/trino-geospatial-toolkit/src/test/java/io/trino/geospatial/serde/TestGeometrySerialization.java @@ -22,18 +22,18 @@ import org.testng.annotations.Test; import static com.esri.core.geometry.ogc.OGCGeometry.createFromEsriGeometry; -import static io.prestosql.geospatial.serde.GeometrySerde.deserialize; -import static io.prestosql.geospatial.serde.GeometrySerde.deserializeEnvelope; -import static io.prestosql.geospatial.serde.GeometrySerde.deserializeType; -import static io.prestosql.geospatial.serde.GeometrySerde.serialize; -import static io.prestosql.geospatial.serde.GeometrySerializationType.ENVELOPE; -import static io.prestosql.geospatial.serde.GeometrySerializationType.GEOMETRY_COLLECTION; -import static io.prestosql.geospatial.serde.GeometrySerializationType.LINE_STRING; -import static io.prestosql.geospatial.serde.GeometrySerializationType.MULTI_LINE_STRING; -import static io.prestosql.geospatial.serde.GeometrySerializationType.MULTI_POINT; -import static io.prestosql.geospatial.serde.GeometrySerializationType.MULTI_POLYGON; -import static io.prestosql.geospatial.serde.GeometrySerializationType.POINT; -import static io.prestosql.geospatial.serde.GeometrySerializationType.POLYGON; +import static io.trino.geospatial.serde.GeometrySerde.deserialize; +import static io.trino.geospatial.serde.GeometrySerde.deserializeEnvelope; +import static io.trino.geospatial.serde.GeometrySerde.deserializeType; +import static io.trino.geospatial.serde.GeometrySerde.serialize; +import static io.trino.geospatial.serde.GeometrySerializationType.ENVELOPE; +import static io.trino.geospatial.serde.GeometrySerializationType.GEOMETRY_COLLECTION; +import static io.trino.geospatial.serde.GeometrySerializationType.LINE_STRING; +import static io.trino.geospatial.serde.GeometrySerializationType.MULTI_LINE_STRING; +import static io.trino.geospatial.serde.GeometrySerializationType.MULTI_POINT; +import static io.trino.geospatial.serde.GeometrySerializationType.MULTI_POLYGON; +import static io.trino.geospatial.serde.GeometrySerializationType.POINT; +import static io.trino.geospatial.serde.GeometrySerializationType.POLYGON; import static org.testng.Assert.assertEquals; public class TestGeometrySerialization diff --git a/lib/trino-matching/src/main/java/io/trino/matching/DefaultPrinter.java b/lib/trino-matching/src/main/java/io/trino/matching/DefaultPrinter.java index 5fd67a93402f..581add70bb5a 100644 --- a/lib/trino-matching/src/main/java/io/trino/matching/DefaultPrinter.java +++ b/lib/trino-matching/src/main/java/io/trino/matching/DefaultPrinter.java @@ -13,11 +13,11 @@ */ package io.trino.matching; -import io.prestosql.matching.pattern.CapturePattern; -import io.prestosql.matching.pattern.EqualsPattern; -import io.prestosql.matching.pattern.FilterPattern; -import io.prestosql.matching.pattern.TypeOfPattern; -import io.prestosql.matching.pattern.WithPattern; +import io.trino.matching.pattern.CapturePattern; +import io.trino.matching.pattern.EqualsPattern; +import io.trino.matching.pattern.FilterPattern; +import io.trino.matching.pattern.TypeOfPattern; +import io.trino.matching.pattern.WithPattern; import static java.lang.String.format; diff --git a/lib/trino-matching/src/main/java/io/trino/matching/Pattern.java b/lib/trino-matching/src/main/java/io/trino/matching/Pattern.java index 0c218524fd45..fe90541d06b3 100644 --- a/lib/trino-matching/src/main/java/io/trino/matching/Pattern.java +++ b/lib/trino-matching/src/main/java/io/trino/matching/Pattern.java @@ -14,10 +14,10 @@ package io.trino.matching; import com.google.common.collect.Iterables; -import io.prestosql.matching.pattern.CapturePattern; -import io.prestosql.matching.pattern.FilterPattern; -import io.prestosql.matching.pattern.TypeOfPattern; -import io.prestosql.matching.pattern.WithPattern; +import io.trino.matching.pattern.CapturePattern; +import io.trino.matching.pattern.FilterPattern; +import io.trino.matching.pattern.TypeOfPattern; +import io.trino.matching.pattern.WithPattern; import java.util.Optional; import java.util.function.BiPredicate; diff --git a/lib/trino-matching/src/main/java/io/trino/matching/PatternVisitor.java b/lib/trino-matching/src/main/java/io/trino/matching/PatternVisitor.java index c4074d0aff4c..303799c5496d 100644 --- a/lib/trino-matching/src/main/java/io/trino/matching/PatternVisitor.java +++ b/lib/trino-matching/src/main/java/io/trino/matching/PatternVisitor.java @@ -13,11 +13,11 @@ */ package io.trino.matching; -import io.prestosql.matching.pattern.CapturePattern; -import io.prestosql.matching.pattern.EqualsPattern; -import io.prestosql.matching.pattern.FilterPattern; -import io.prestosql.matching.pattern.TypeOfPattern; -import io.prestosql.matching.pattern.WithPattern; +import io.trino.matching.pattern.CapturePattern; +import io.trino.matching.pattern.EqualsPattern; +import io.trino.matching.pattern.FilterPattern; +import io.trino.matching.pattern.TypeOfPattern; +import io.trino.matching.pattern.WithPattern; import java.util.Optional; diff --git a/lib/trino-matching/src/main/java/io/trino/matching/Property.java b/lib/trino-matching/src/main/java/io/trino/matching/Property.java index 24f6bedfa5a1..b565658f3316 100644 --- a/lib/trino-matching/src/main/java/io/trino/matching/Property.java +++ b/lib/trino-matching/src/main/java/io/trino/matching/Property.java @@ -13,8 +13,8 @@ */ package io.trino.matching; -import io.prestosql.matching.pattern.EqualsPattern; -import io.prestosql.matching.pattern.FilterPattern; +import io.trino.matching.pattern.EqualsPattern; +import io.trino.matching.pattern.FilterPattern; import java.util.Optional; import java.util.function.BiFunction; diff --git a/lib/trino-matching/src/main/java/io/trino/matching/pattern/CapturePattern.java b/lib/trino-matching/src/main/java/io/trino/matching/pattern/CapturePattern.java index 3a45eaa6b6e9..2d3e577228fe 100644 --- a/lib/trino-matching/src/main/java/io/trino/matching/pattern/CapturePattern.java +++ b/lib/trino-matching/src/main/java/io/trino/matching/pattern/CapturePattern.java @@ -13,11 +13,11 @@ */ package io.trino.matching.pattern; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Match; -import io.prestosql.matching.Pattern; -import io.prestosql.matching.PatternVisitor; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Match; +import io.trino.matching.Pattern; +import io.trino.matching.PatternVisitor; import java.util.stream.Stream; diff --git a/lib/trino-matching/src/main/java/io/trino/matching/pattern/EqualsPattern.java b/lib/trino-matching/src/main/java/io/trino/matching/pattern/EqualsPattern.java index 4cae0ccaf496..3a6c18d52abd 100644 --- a/lib/trino-matching/src/main/java/io/trino/matching/pattern/EqualsPattern.java +++ b/lib/trino-matching/src/main/java/io/trino/matching/pattern/EqualsPattern.java @@ -13,10 +13,10 @@ */ package io.trino.matching.pattern; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Match; -import io.prestosql.matching.Pattern; -import io.prestosql.matching.PatternVisitor; +import io.trino.matching.Captures; +import io.trino.matching.Match; +import io.trino.matching.Pattern; +import io.trino.matching.PatternVisitor; import java.util.Optional; import java.util.stream.Stream; diff --git a/lib/trino-matching/src/main/java/io/trino/matching/pattern/FilterPattern.java b/lib/trino-matching/src/main/java/io/trino/matching/pattern/FilterPattern.java index 76edea0d9122..0cea9186c364 100644 --- a/lib/trino-matching/src/main/java/io/trino/matching/pattern/FilterPattern.java +++ b/lib/trino-matching/src/main/java/io/trino/matching/pattern/FilterPattern.java @@ -13,10 +13,10 @@ */ package io.trino.matching.pattern; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Match; -import io.prestosql.matching.Pattern; -import io.prestosql.matching.PatternVisitor; +import io.trino.matching.Captures; +import io.trino.matching.Match; +import io.trino.matching.Pattern; +import io.trino.matching.PatternVisitor; import java.util.Optional; import java.util.function.BiPredicate; diff --git a/lib/trino-matching/src/main/java/io/trino/matching/pattern/TypeOfPattern.java b/lib/trino-matching/src/main/java/io/trino/matching/pattern/TypeOfPattern.java index e4440a11e26d..5e2efc47abe8 100644 --- a/lib/trino-matching/src/main/java/io/trino/matching/pattern/TypeOfPattern.java +++ b/lib/trino-matching/src/main/java/io/trino/matching/pattern/TypeOfPattern.java @@ -13,10 +13,10 @@ */ package io.trino.matching.pattern; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Match; -import io.prestosql.matching.Pattern; -import io.prestosql.matching.PatternVisitor; +import io.trino.matching.Captures; +import io.trino.matching.Match; +import io.trino.matching.Pattern; +import io.trino.matching.PatternVisitor; import java.util.Optional; import java.util.stream.Stream; diff --git a/lib/trino-matching/src/main/java/io/trino/matching/pattern/WithPattern.java b/lib/trino-matching/src/main/java/io/trino/matching/pattern/WithPattern.java index cc902f412950..7f8a6f7193c2 100644 --- a/lib/trino-matching/src/main/java/io/trino/matching/pattern/WithPattern.java +++ b/lib/trino-matching/src/main/java/io/trino/matching/pattern/WithPattern.java @@ -13,12 +13,12 @@ */ package io.trino.matching.pattern; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Match; -import io.prestosql.matching.Pattern; -import io.prestosql.matching.PatternVisitor; -import io.prestosql.matching.Property; -import io.prestosql.matching.PropertyPattern; +import io.trino.matching.Captures; +import io.trino.matching.Match; +import io.trino.matching.Pattern; +import io.trino.matching.PatternVisitor; +import io.trino.matching.Property; +import io.trino.matching.PropertyPattern; import java.util.Optional; import java.util.function.BiFunction; diff --git a/lib/trino-matching/src/test/java/io/trino/matching/TestMatcher.java b/lib/trino-matching/src/test/java/io/trino/matching/TestMatcher.java index 00a7a5dcd5ac..1220a8e4bf1e 100644 --- a/lib/trino-matching/src/test/java/io/trino/matching/TestMatcher.java +++ b/lib/trino-matching/src/test/java/io/trino/matching/TestMatcher.java @@ -13,11 +13,11 @@ */ package io.trino.matching; -import io.prestosql.matching.example.rel.FilterNode; -import io.prestosql.matching.example.rel.JoinNode; -import io.prestosql.matching.example.rel.ProjectNode; -import io.prestosql.matching.example.rel.RelNode; -import io.prestosql.matching.example.rel.ScanNode; +import io.trino.matching.example.rel.FilterNode; +import io.trino.matching.example.rel.JoinNode; +import io.trino.matching.example.rel.ProjectNode; +import io.trino.matching.example.rel.RelNode; +import io.trino.matching.example.rel.ScanNode; import org.testng.annotations.Test; import java.util.List; @@ -27,15 +27,15 @@ import static com.google.common.collect.MoreCollectors.onlyElement; import static com.google.common.collect.MoreCollectors.toOptional; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.matching.Pattern.any; -import static io.prestosql.matching.Pattern.typeOf; -import static io.prestosql.matching.example.rel.Patterns.filter; -import static io.prestosql.matching.example.rel.Patterns.plan; -import static io.prestosql.matching.example.rel.Patterns.project; -import static io.prestosql.matching.example.rel.Patterns.scan; -import static io.prestosql.matching.example.rel.Patterns.source; -import static io.prestosql.matching.example.rel.Patterns.tableName; +import static io.trino.matching.Capture.newCapture; +import static io.trino.matching.Pattern.any; +import static io.trino.matching.Pattern.typeOf; +import static io.trino.matching.example.rel.Patterns.filter; +import static io.trino.matching.example.rel.Patterns.plan; +import static io.trino.matching.example.rel.Patterns.project; +import static io.trino.matching.example.rel.Patterns.scan; +import static io.trino.matching.example.rel.Patterns.source; +import static io.trino.matching.example.rel.Patterns.tableName; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/lib/trino-matching/src/test/java/io/trino/matching/example/rel/Patterns.java b/lib/trino-matching/src/test/java/io/trino/matching/example/rel/Patterns.java index 353c303aa53e..054080cef989 100644 --- a/lib/trino-matching/src/test/java/io/trino/matching/example/rel/Patterns.java +++ b/lib/trino-matching/src/test/java/io/trino/matching/example/rel/Patterns.java @@ -13,11 +13,11 @@ */ package io.trino.matching.example.rel; -import io.prestosql.matching.Pattern; -import io.prestosql.matching.Property; +import io.trino.matching.Pattern; +import io.trino.matching.Property; -import static io.prestosql.matching.Pattern.typeOf; -import static io.prestosql.matching.Property.property; +import static io.trino.matching.Pattern.typeOf; +import static io.trino.matching.Property.property; public final class Patterns { diff --git a/lib/trino-memory-context/src/test/java/io/trino/memory/context/TestMemoryContexts.java b/lib/trino-memory-context/src/test/java/io/trino/memory/context/TestMemoryContexts.java index 36f04f42b095..62887633ec12 100644 --- a/lib/trino-memory-context/src/test/java/io/trino/memory/context/TestMemoryContexts.java +++ b/lib/trino-memory-context/src/test/java/io/trino/memory/context/TestMemoryContexts.java @@ -20,8 +20,8 @@ import org.testng.annotations.Test; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.memory.context.AggregatedMemoryContext.newRootAggregatedMemoryContext; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.memory.context.AggregatedMemoryContext.newRootAggregatedMemoryContext; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotEquals; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/AbstractOrcDataSource.java b/lib/trino-orc/src/main/java/io/trino/orc/AbstractOrcDataSource.java index 9c58643e437a..daa2754771a7 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/AbstractOrcDataSource.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/AbstractOrcDataSource.java @@ -16,9 +16,9 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.orc.stream.AbstractDiskOrcDataReader; -import io.prestosql.orc.stream.MemoryOrcDataReader; -import io.prestosql.orc.stream.OrcDataReader; +import io.trino.orc.stream.AbstractDiskOrcDataReader; +import io.trino.orc.stream.MemoryOrcDataReader; +import io.trino.orc.stream.OrcDataReader; import java.io.IOException; import java.io.UncheckedIOException; @@ -29,8 +29,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Verify.verify; -import static io.prestosql.orc.OrcDataSourceUtils.getDiskRangeSlice; -import static io.prestosql.orc.OrcDataSourceUtils.mergeAdjacentDiskRanges; +import static io.trino.orc.OrcDataSourceUtils.getDiskRangeSlice; +import static io.trino.orc.OrcDataSourceUtils.mergeAdjacentDiskRanges; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/CachingOrcDataSource.java b/lib/trino-orc/src/main/java/io/trino/orc/CachingOrcDataSource.java index b2a797758129..8c2f37722f78 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/CachingOrcDataSource.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/CachingOrcDataSource.java @@ -17,8 +17,8 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.orc.stream.MemoryOrcDataReader; -import io.prestosql.orc.stream.OrcDataReader; +import io.trino.orc.stream.MemoryOrcDataReader; +import io.trino.orc.stream.OrcDataReader; import java.io.IOException; import java.util.Map; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/MemoryOrcDataSource.java b/lib/trino-orc/src/main/java/io/trino/orc/MemoryOrcDataSource.java index abf5abbc4b64..4bac836d32e7 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/MemoryOrcDataSource.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/MemoryOrcDataSource.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.orc.stream.MemoryOrcDataReader; -import io.prestosql.orc.stream.OrcDataReader; +import io.trino.orc.stream.MemoryOrcDataReader; +import io.trino.orc.stream.OrcDataReader; import java.util.Map; import java.util.Map.Entry; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcBlockFactory.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcBlockFactory.java index 7156083ff1ac..e0e4ed601b28 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcBlockFactory.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcBlockFactory.java @@ -13,9 +13,9 @@ */ package io.trino.orc; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.block.LazyBlockLoader; +import io.trino.spi.block.Block; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.block.LazyBlockLoader; import java.io.IOException; import java.util.function.Function; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcColumn.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcColumn.java index b7f9262320bf..cd6c81da71d3 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcColumn.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcColumn.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.OrcType.OrcTypeKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.OrcType.OrcTypeKind; import java.util.List; import java.util.Map; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcDataSink.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcDataSink.java index 4ec63372012d..26070849981c 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcDataSink.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcDataSink.java @@ -13,7 +13,7 @@ */ package io.trino.orc; -import io.prestosql.orc.stream.OrcDataOutput; +import io.trino.orc.stream.OrcDataOutput; import java.io.Closeable; import java.io.IOException; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcDataSource.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcDataSource.java index a4f4c405e2ee..29c1796507d4 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcDataSource.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcDataSource.java @@ -14,7 +14,7 @@ package io.trino.orc; import io.airlift.slice.Slice; -import io.prestosql.orc.stream.OrcDataReader; +import io.trino.orc.stream.OrcDataReader; import java.io.Closeable; import java.io.IOException; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcDecompressor.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcDecompressor.java index 7e4ab3d76321..b45f9b652aa6 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcDecompressor.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcDecompressor.java @@ -14,12 +14,12 @@ package io.trino.orc; import io.airlift.units.DataSize; -import io.prestosql.orc.metadata.CompressionKind; +import io.trino.orc.metadata.CompressionKind; import java.util.Optional; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.CompressionKind.NONE; import static java.lang.Math.toIntExact; public interface OrcDecompressor diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcOutputBuffer.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcOutputBuffer.java index 8ab34a99376b..03053cbcb9a9 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcOutputBuffer.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcOutputBuffer.java @@ -21,8 +21,8 @@ import io.airlift.slice.SizeOf; import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.orc.checkpoint.InputStreamCheckpoint; -import io.prestosql.orc.metadata.CompressionKind; +import io.trino.orc.checkpoint.InputStreamCheckpoint; +import io.trino.orc.metadata.CompressionKind; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcPredicate.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcPredicate.java index 09818079f1ba..1ac2be6f7e70 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcPredicate.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcPredicate.java @@ -13,8 +13,8 @@ */ package io.trino.orc; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.statistics.ColumnStatistics; public interface OrcPredicate { diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcReader.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcReader.java index 75612e0d90d2..690a2c36a9c0 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcReader.java @@ -19,22 +19,22 @@ import io.airlift.log.Logger; import io.airlift.slice.Slice; import io.airlift.units.DataSize; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.ExceptionWrappingMetadataReader; -import io.prestosql.orc.metadata.Footer; -import io.prestosql.orc.metadata.Metadata; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.OrcMetadataReader; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.orc.metadata.OrcType.OrcTypeKind; -import io.prestosql.orc.metadata.PostScript; -import io.prestosql.orc.metadata.PostScript.HiveWriterVersion; -import io.prestosql.orc.stream.OrcChunkLoader; -import io.prestosql.orc.stream.OrcInputStream; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.ExceptionWrappingMetadataReader; +import io.trino.orc.metadata.Footer; +import io.trino.orc.metadata.Metadata; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.OrcMetadataReader; +import io.trino.orc.metadata.OrcType; +import io.trino.orc.metadata.OrcType.OrcTypeKind; +import io.trino.orc.metadata.PostScript; +import io.trino.orc.metadata.PostScript.HiveWriterVersion; +import io.trino.orc.stream.OrcChunkLoader; +import io.trino.orc.stream.OrcInputStream; +import io.trino.spi.Page; +import io.trino.spi.type.Type; import org.joda.time.DateTimeZone; import java.io.IOException; @@ -51,10 +51,10 @@ import static com.google.common.base.Throwables.throwIfUnchecked; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.SizeOf.SIZE_OF_BYTE; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcDecompressor.createOrcDecompressor; -import static io.prestosql.orc.metadata.OrcColumnId.ROOT_COLUMN; -import static io.prestosql.orc.metadata.PostScript.MAGIC; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcDecompressor.createOrcDecompressor; +import static io.trino.orc.metadata.OrcColumnId.ROOT_COLUMN; +import static io.trino.orc.metadata.PostScript.MAGIC; import static java.lang.Math.min; import static java.lang.Math.toIntExact; import static java.util.Locale.ENGLISH; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcRecordReader.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcRecordReader.java index 518382eb9762..c8aa12d0fa82 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcRecordReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcRecordReader.java @@ -22,24 +22,24 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.orc.OrcWriteValidation.StatisticsValidation; -import io.prestosql.orc.OrcWriteValidation.WriteChecksum; -import io.prestosql.orc.OrcWriteValidation.WriteChecksumBuilder; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.MetadataReader; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.orc.metadata.PostScript.HiveWriterVersion; -import io.prestosql.orc.metadata.StripeInformation; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.StripeStatistics; -import io.prestosql.orc.reader.ColumnReader; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.orc.OrcWriteValidation.StatisticsValidation; +import io.trino.orc.OrcWriteValidation.WriteChecksum; +import io.trino.orc.OrcWriteValidation.WriteChecksumBuilder; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.MetadataReader; +import io.trino.orc.metadata.OrcType; +import io.trino.orc.metadata.PostScript.HiveWriterVersion; +import io.trino.orc.metadata.StripeInformation; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.StripeStatistics; +import io.trino.orc.reader.ColumnReader; +import io.trino.orc.stream.InputStreamSources; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.joda.time.DateTimeZone; import org.openjdk.jol.info.ClassLayout; @@ -58,13 +58,13 @@ import java.util.stream.Collectors; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.orc.OrcDataSourceUtils.mergeAdjacentDiskRanges; -import static io.prestosql.orc.OrcReader.BATCH_SIZE_GROWTH_FACTOR; -import static io.prestosql.orc.OrcReader.MAX_BATCH_SIZE; -import static io.prestosql.orc.OrcRecordReader.LinearProbeRangeFinder.createTinyStripesRangeFinder; -import static io.prestosql.orc.OrcWriteValidation.WriteChecksumBuilder.createWriteChecksumBuilder; -import static io.prestosql.orc.reader.ColumnReaders.createColumnReader; -import static io.prestosql.spi.block.LazyBlock.listenForLoads; +import static io.trino.orc.OrcDataSourceUtils.mergeAdjacentDiskRanges; +import static io.trino.orc.OrcReader.BATCH_SIZE_GROWTH_FACTOR; +import static io.trino.orc.OrcReader.MAX_BATCH_SIZE; +import static io.trino.orc.OrcRecordReader.LinearProbeRangeFinder.createTinyStripesRangeFinder; +import static io.trino.orc.OrcWriteValidation.WriteChecksumBuilder.createWriteChecksumBuilder; +import static io.trino.orc.reader.ColumnReaders.createColumnReader; +import static io.trino.spi.block.LazyBlock.listenForLoads; import static java.lang.Math.max; import static java.lang.Math.min; import static java.lang.Math.toIntExact; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcWriteValidation.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcWriteValidation.java index f1ebe6d661f3..8889d903729e 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcWriteValidation.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcWriteValidation.java @@ -19,43 +19,43 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.slice.XxHash64; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.orc.metadata.PostScript.HiveWriterVersion; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.StripeInformation; -import io.prestosql.orc.metadata.statistics.BinaryStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.BooleanStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.DateStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.DoubleStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.IntegerStatistics; -import io.prestosql.orc.metadata.statistics.IntegerStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.LongDecimalStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.NoOpBloomFilterBuilder; -import io.prestosql.orc.metadata.statistics.ShortDecimalStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.StatisticsBuilder; -import io.prestosql.orc.metadata.statistics.StatisticsHasher; -import io.prestosql.orc.metadata.statistics.StringStatistics; -import io.prestosql.orc.metadata.statistics.StringStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.StripeStatistics; -import io.prestosql.orc.metadata.statistics.TimestampStatisticsBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ColumnarMap; -import io.prestosql.spi.block.ColumnarRow; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.OrcType; +import io.trino.orc.metadata.PostScript.HiveWriterVersion; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.StripeInformation; +import io.trino.orc.metadata.statistics.BinaryStatisticsBuilder; +import io.trino.orc.metadata.statistics.BooleanStatisticsBuilder; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.DateStatisticsBuilder; +import io.trino.orc.metadata.statistics.DoubleStatisticsBuilder; +import io.trino.orc.metadata.statistics.IntegerStatistics; +import io.trino.orc.metadata.statistics.IntegerStatisticsBuilder; +import io.trino.orc.metadata.statistics.LongDecimalStatisticsBuilder; +import io.trino.orc.metadata.statistics.NoOpBloomFilterBuilder; +import io.trino.orc.metadata.statistics.ShortDecimalStatisticsBuilder; +import io.trino.orc.metadata.statistics.StatisticsBuilder; +import io.trino.orc.metadata.statistics.StatisticsHasher; +import io.trino.orc.metadata.statistics.StringStatistics; +import io.trino.orc.metadata.statistics.StringStatisticsBuilder; +import io.trino.orc.metadata.statistics.StripeStatistics; +import io.trino.orc.metadata.statistics.TimestampStatisticsBuilder; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.ColumnarMap; +import io.trino.spi.block.ColumnarRow; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.openjdk.jol.info.ClassLayout; import java.time.ZoneId; @@ -76,32 +76,32 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode.BOTH; -import static io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode.DETAILED; -import static io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode.HASHED; -import static io.prestosql.orc.metadata.OrcColumnId.ROOT_COLUMN; -import static io.prestosql.orc.metadata.OrcMetadataReader.maxStringTruncateToValidRange; -import static io.prestosql.orc.metadata.OrcMetadataReader.minStringTruncateToValidRange; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.block.ColumnarArray.toColumnarArray; -import static io.prestosql.spi.block.ColumnarMap.toColumnarMap; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_NANOS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.orc.OrcWriteValidation.OrcWriteValidationMode.BOTH; +import static io.trino.orc.OrcWriteValidation.OrcWriteValidationMode.DETAILED; +import static io.trino.orc.OrcWriteValidation.OrcWriteValidationMode.HASHED; +import static io.trino.orc.metadata.OrcColumnId.ROOT_COLUMN; +import static io.trino.orc.metadata.OrcMetadataReader.maxStringTruncateToValidRange; +import static io.trino.orc.metadata.OrcMetadataReader.minStringTruncateToValidRange; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.block.ColumnarArray.toColumnarArray; +import static io.trino.spi.block.ColumnarMap.toColumnarMap; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_NANOS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.lang.Math.floorDiv; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcWriter.java index 9388b11278a7..f863a8a21df6 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcWriter.java @@ -18,32 +18,32 @@ import com.google.common.primitives.UnsignedBytes; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.orc.OrcWriteValidation.OrcWriteValidationBuilder; -import io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode; -import io.prestosql.orc.OrcWriterStats.FlushReason; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.Footer; -import io.prestosql.orc.metadata.Metadata; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.OrcMetadataWriter; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.StripeFooter; -import io.prestosql.orc.metadata.StripeInformation; -import io.prestosql.orc.metadata.statistics.BloomFilterBuilder; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.NoOpBloomFilterBuilder; -import io.prestosql.orc.metadata.statistics.StripeStatistics; -import io.prestosql.orc.metadata.statistics.Utf8BloomFilterBuilder; -import io.prestosql.orc.stream.OrcDataOutput; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.orc.writer.ColumnWriter; -import io.prestosql.orc.writer.SliceDictionaryColumnWriter; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; +import io.trino.orc.OrcWriteValidation.OrcWriteValidationBuilder; +import io.trino.orc.OrcWriteValidation.OrcWriteValidationMode; +import io.trino.orc.OrcWriterStats.FlushReason; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.Footer; +import io.trino.orc.metadata.Metadata; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.OrcMetadataWriter; +import io.trino.orc.metadata.OrcType; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.StripeFooter; +import io.trino.orc.metadata.StripeInformation; +import io.trino.orc.metadata.statistics.BloomFilterBuilder; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.NoOpBloomFilterBuilder; +import io.trino.orc.metadata.statistics.StripeStatistics; +import io.trino.orc.metadata.statistics.Utf8BloomFilterBuilder; +import io.trino.orc.stream.OrcDataOutput; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.orc.writer.ColumnWriter; +import io.trino.orc.writer.SliceDictionaryColumnWriter; +import io.trino.spi.Page; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -68,16 +68,16 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.orc.OrcReader.validateFile; -import static io.prestosql.orc.OrcWriterStats.FlushReason.CLOSED; -import static io.prestosql.orc.OrcWriterStats.FlushReason.DICTIONARY_FULL; -import static io.prestosql.orc.OrcWriterStats.FlushReason.MAX_BYTES; -import static io.prestosql.orc.OrcWriterStats.FlushReason.MAX_ROWS; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; -import static io.prestosql.orc.metadata.OrcColumnId.ROOT_COLUMN; -import static io.prestosql.orc.metadata.PostScript.MAGIC; -import static io.prestosql.orc.stream.OrcDataOutput.createDataOutput; -import static io.prestosql.orc.writer.ColumnWriters.createColumnWriter; +import static io.trino.orc.OrcReader.validateFile; +import static io.trino.orc.OrcWriterStats.FlushReason.CLOSED; +import static io.trino.orc.OrcWriterStats.FlushReason.DICTIONARY_FULL; +import static io.trino.orc.OrcWriterStats.FlushReason.MAX_BYTES; +import static io.trino.orc.OrcWriterStats.FlushReason.MAX_ROWS; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; +import static io.trino.orc.metadata.OrcColumnId.ROOT_COLUMN; +import static io.trino.orc.metadata.PostScript.MAGIC; +import static io.trino.orc.stream.OrcDataOutput.createDataOutput; +import static io.trino.orc.writer.ColumnWriters.createColumnWriter; import static java.lang.Integer.min; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcWriterStats.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcWriterStats.java index 3adbfc43c7bc..33ef0bcf197f 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcWriterStats.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcWriterStats.java @@ -19,10 +19,10 @@ import java.util.concurrent.atomic.AtomicLong; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.OrcWriterStats.FlushReason.CLOSED; -import static io.prestosql.orc.OrcWriterStats.FlushReason.DICTIONARY_FULL; -import static io.prestosql.orc.OrcWriterStats.FlushReason.MAX_BYTES; -import static io.prestosql.orc.OrcWriterStats.FlushReason.MAX_ROWS; +import static io.trino.orc.OrcWriterStats.FlushReason.CLOSED; +import static io.trino.orc.OrcWriterStats.FlushReason.DICTIONARY_FULL; +import static io.trino.orc.OrcWriterStats.FlushReason.MAX_BYTES; +import static io.trino.orc.OrcWriterStats.FlushReason.MAX_ROWS; public class OrcWriterStats { diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OutputStreamOrcDataSink.java b/lib/trino-orc/src/main/java/io/trino/orc/OutputStreamOrcDataSink.java index 071349f1f425..de48b3179da6 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OutputStreamOrcDataSink.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OutputStreamOrcDataSink.java @@ -14,7 +14,7 @@ package io.trino.orc; import io.airlift.slice.OutputStreamSliceOutput; -import io.prestosql.orc.stream.OrcDataOutput; +import io.trino.orc.stream.OrcDataOutput; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/RowGroup.java b/lib/trino-orc/src/main/java/io/trino/orc/RowGroup.java index 93738d1d7ce4..d46e4045a60b 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/RowGroup.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/RowGroup.java @@ -13,7 +13,7 @@ */ package io.trino.orc; -import io.prestosql.orc.stream.InputStreamSources; +import io.trino.orc.stream.InputStreamSources; import static com.google.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/StreamId.java b/lib/trino-orc/src/main/java/io/trino/orc/StreamId.java index e9c91d127d4a..3235906a3b1e 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/StreamId.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/StreamId.java @@ -13,9 +13,9 @@ */ package io.trino.orc; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; import java.util.Objects; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/Stripe.java b/lib/trino-orc/src/main/java/io/trino/orc/Stripe.java index dacec48dfa69..b4d04241500d 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/Stripe.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/Stripe.java @@ -14,9 +14,9 @@ package io.trino.orc; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.InputStreamSources; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.InputStreamSources; import java.time.ZoneId; import java.util.List; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/StripeReader.java b/lib/trino-orc/src/main/java/io/trino/orc/StripeReader.java index 6e33d4a34ce1..ebd261851040 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/StripeReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/StripeReader.java @@ -19,31 +19,31 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; import io.airlift.slice.Slice; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.checkpoint.InvalidCheckpointException; -import io.prestosql.orc.checkpoint.StreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.MetadataReader; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.orc.metadata.OrcType.OrcTypeKind; -import io.prestosql.orc.metadata.PostScript.HiveWriterVersion; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.StripeFooter; -import io.prestosql.orc.metadata.StripeInformation; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.orc.stream.OrcChunkLoader; -import io.prestosql.orc.stream.OrcDataReader; -import io.prestosql.orc.stream.OrcInputStream; -import io.prestosql.orc.stream.ValueInputStream; -import io.prestosql.orc.stream.ValueInputStreamSource; -import io.prestosql.orc.stream.ValueStreams; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.checkpoint.InvalidCheckpointException; +import io.trino.orc.checkpoint.StreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.MetadataReader; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.OrcType; +import io.trino.orc.metadata.OrcType.OrcTypeKind; +import io.trino.orc.metadata.PostScript.HiveWriterVersion; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.StripeFooter; +import io.trino.orc.metadata.StripeInformation; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.orc.stream.OrcChunkLoader; +import io.trino.orc.stream.OrcDataReader; +import io.trino.orc.stream.OrcInputStream; +import io.trino.orc.stream.ValueInputStream; +import io.trino.orc.stream.ValueInputStreamSource; +import io.trino.orc.stream.ValueStreams; import java.io.IOException; import java.io.InputStream; @@ -62,17 +62,17 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.orc.checkpoint.Checkpoints.getDictionaryStreamCheckpoint; -import static io.prestosql.orc.checkpoint.Checkpoints.getStreamCheckpoints; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY_V2; -import static io.prestosql.orc.metadata.Stream.StreamKind.BLOOM_FILTER; -import static io.prestosql.orc.metadata.Stream.StreamKind.BLOOM_FILTER_UTF8; -import static io.prestosql.orc.metadata.Stream.StreamKind.DICTIONARY_COUNT; -import static io.prestosql.orc.metadata.Stream.StreamKind.DICTIONARY_DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.LENGTH; -import static io.prestosql.orc.metadata.Stream.StreamKind.ROW_INDEX; -import static io.prestosql.orc.stream.CheckpointInputStreamSource.createCheckpointStreamSource; +import static io.trino.orc.checkpoint.Checkpoints.getDictionaryStreamCheckpoint; +import static io.trino.orc.checkpoint.Checkpoints.getStreamCheckpoints; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY_V2; +import static io.trino.orc.metadata.Stream.StreamKind.BLOOM_FILTER; +import static io.trino.orc.metadata.Stream.StreamKind.BLOOM_FILTER_UTF8; +import static io.trino.orc.metadata.Stream.StreamKind.DICTIONARY_COUNT; +import static io.trino.orc.metadata.Stream.StreamKind.DICTIONARY_DATA; +import static io.trino.orc.metadata.Stream.StreamKind.LENGTH; +import static io.trino.orc.metadata.Stream.StreamKind.ROW_INDEX; +import static io.trino.orc.stream.CheckpointInputStreamSource.createCheckpointStreamSource; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/TupleDomainOrcPredicate.java b/lib/trino-orc/src/main/java/io/trino/orc/TupleDomainOrcPredicate.java index a732545fbe0e..ece0fc37e400 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/TupleDomainOrcPredicate.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/TupleDomainOrcPredicate.java @@ -16,25 +16,25 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.orc.metadata.statistics.BooleanStatistics; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.RangeStatistics; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.Timestamps; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.BooleanStatistics; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.RangeStatistics; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.Timestamps; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import java.util.ArrayList; import java.util.Collection; @@ -43,29 +43,29 @@ import java.util.function.Function; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.Chars.truncateToLengthAndTrimSpaces; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.encodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.isLongDecimal; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.Decimals.rescale; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_NANOS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.Chars.truncateToLengthAndTrimSpaces; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.encodeUnscaledValue; +import static io.trino.spi.type.Decimals.isLongDecimal; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.Decimals.rescale; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_NANOS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.floorDiv; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/ValidationHash.java b/lib/trino-orc/src/main/java/io/trino/orc/ValidationHash.java index 08c8f77ef4b1..6af3bdcd984b 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/ValidationHash.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/ValidationHash.java @@ -13,23 +13,23 @@ */ package io.trino.orc; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.AbstractLongType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.block.Block; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.AbstractLongType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodType; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.StandardTypes.ARRAY; -import static io.prestosql.spi.type.StandardTypes.MAP; -import static io.prestosql.spi.type.StandardTypes.ROW; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.StandardTypes.ARRAY; +import static io.trino.spi.type.StandardTypes.MAP; +import static io.trino.spi.type.StandardTypes.ROW; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; import static java.lang.invoke.MethodHandles.lookup; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/BooleanStreamCheckpoint.java b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/BooleanStreamCheckpoint.java index c54f8cb90d9c..830ca37f123f 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/BooleanStreamCheckpoint.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/BooleanStreamCheckpoint.java @@ -14,7 +14,7 @@ package io.trino.orc.checkpoint; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.checkpoint.Checkpoints.ColumnPositionsList; +import io.trino.orc.checkpoint.Checkpoints.ColumnPositionsList; import java.util.List; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/ByteArrayStreamCheckpoint.java b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/ByteArrayStreamCheckpoint.java index e97651d2c18e..9d56c009459f 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/ByteArrayStreamCheckpoint.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/ByteArrayStreamCheckpoint.java @@ -13,14 +13,14 @@ */ package io.trino.orc.checkpoint; -import io.prestosql.orc.checkpoint.Checkpoints.ColumnPositionsList; +import io.trino.orc.checkpoint.Checkpoints.ColumnPositionsList; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; public final class ByteArrayStreamCheckpoint implements StreamCheckpoint diff --git a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/ByteStreamCheckpoint.java b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/ByteStreamCheckpoint.java index 75e2311e9261..15731e5dd8d8 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/ByteStreamCheckpoint.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/ByteStreamCheckpoint.java @@ -14,14 +14,14 @@ package io.trino.orc.checkpoint; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.checkpoint.Checkpoints.ColumnPositionsList; +import io.trino.orc.checkpoint.Checkpoints.ColumnPositionsList; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; public final class ByteStreamCheckpoint implements StreamCheckpoint diff --git a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/Checkpoints.java b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/Checkpoints.java index 798604ddc894..2a9f4c53e19c 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/Checkpoints.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/Checkpoints.java @@ -17,31 +17,31 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSetMultimap; import com.google.common.collect.SetMultimap; -import io.prestosql.orc.StreamId; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.orc.metadata.OrcType.OrcTypeKind; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; +import io.trino.orc.StreamId; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.OrcType; +import io.trino.orc.metadata.OrcType.OrcTypeKind; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; import java.util.List; import java.util.Map; import java.util.Set; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY_V2; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.DICTIONARY_DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.LENGTH; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.metadata.Stream.StreamKind.SECONDARY; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY_V2; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.DICTIONARY_DATA; +import static io.trino.orc.metadata.Stream.StreamKind.LENGTH; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.metadata.Stream.StreamKind.SECONDARY; import static java.util.Objects.requireNonNull; public final class Checkpoints diff --git a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/DecimalStreamCheckpoint.java b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/DecimalStreamCheckpoint.java index 9627933471be..40154e9eb920 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/DecimalStreamCheckpoint.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/DecimalStreamCheckpoint.java @@ -13,14 +13,14 @@ */ package io.trino.orc.checkpoint; -import io.prestosql.orc.checkpoint.Checkpoints.ColumnPositionsList; +import io.trino.orc.checkpoint.Checkpoints.ColumnPositionsList; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; public final class DecimalStreamCheckpoint implements StreamCheckpoint diff --git a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/DoubleStreamCheckpoint.java b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/DoubleStreamCheckpoint.java index cdcc272e0c05..ad504d9b5c64 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/DoubleStreamCheckpoint.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/DoubleStreamCheckpoint.java @@ -13,14 +13,14 @@ */ package io.trino.orc.checkpoint; -import io.prestosql.orc.checkpoint.Checkpoints.ColumnPositionsList; +import io.trino.orc.checkpoint.Checkpoints.ColumnPositionsList; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; public final class DoubleStreamCheckpoint implements StreamCheckpoint diff --git a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/FloatStreamCheckpoint.java b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/FloatStreamCheckpoint.java index 414fa1e11ef8..bd17e6d72f4e 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/FloatStreamCheckpoint.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/FloatStreamCheckpoint.java @@ -13,14 +13,14 @@ */ package io.trino.orc.checkpoint; -import io.prestosql.orc.checkpoint.Checkpoints.ColumnPositionsList; +import io.trino.orc.checkpoint.Checkpoints.ColumnPositionsList; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; public final class FloatStreamCheckpoint implements StreamCheckpoint diff --git a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/InputStreamCheckpoint.java b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/InputStreamCheckpoint.java index 147802e99bd1..bd55e12e9416 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/InputStreamCheckpoint.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/InputStreamCheckpoint.java @@ -14,7 +14,7 @@ package io.trino.orc.checkpoint; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.checkpoint.Checkpoints.ColumnPositionsList; +import io.trino.orc.checkpoint.Checkpoints.ColumnPositionsList; import java.util.List; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/LongStreamV1Checkpoint.java b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/LongStreamV1Checkpoint.java index 2577a55242d4..6e5e7f2b52c9 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/LongStreamV1Checkpoint.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/LongStreamV1Checkpoint.java @@ -14,14 +14,14 @@ package io.trino.orc.checkpoint; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.checkpoint.Checkpoints.ColumnPositionsList; +import io.trino.orc.checkpoint.Checkpoints.ColumnPositionsList; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; public class LongStreamV1Checkpoint implements LongStreamCheckpoint diff --git a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/LongStreamV2Checkpoint.java b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/LongStreamV2Checkpoint.java index 2dc86ea4276a..1ca224cf50c3 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/LongStreamV2Checkpoint.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/checkpoint/LongStreamV2Checkpoint.java @@ -14,14 +14,14 @@ package io.trino.orc.checkpoint; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.checkpoint.Checkpoints.ColumnPositionsList; +import io.trino.orc.checkpoint.Checkpoints.ColumnPositionsList; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamPositionList; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.inputStreamCheckpointToString; public final class LongStreamV2Checkpoint implements LongStreamCheckpoint diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/CompressedMetadataWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/CompressedMetadataWriter.java index 7dfeb8748495..a4b81eb96cff 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/CompressedMetadataWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/CompressedMetadataWriter.java @@ -15,8 +15,8 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcOutputBuffer; -import io.prestosql.orc.metadata.statistics.BloomFilter; +import io.trino.orc.OrcOutputBuffer; +import io.trino.orc.metadata.statistics.BloomFilter; import java.io.IOException; import java.util.List; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/ExceptionWrappingMetadataReader.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/ExceptionWrappingMetadataReader.java index cb5b6b922053..5ab3a14412db 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/ExceptionWrappingMetadataReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/ExceptionWrappingMetadataReader.java @@ -13,11 +13,11 @@ */ package io.trino.orc.metadata; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.metadata.PostScript.HiveWriterVersion; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.spi.PrestoException; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.metadata.PostScript.HiveWriterVersion; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.spi.PrestoException; import java.io.IOException; import java.io.InputStream; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/Footer.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/Footer.java index 82406f5894a3..52421cf542ca 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/Footer.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/Footer.java @@ -17,7 +17,7 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.ColumnStatistics; import java.util.List; import java.util.Map; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/Metadata.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/Metadata.java index a6e96ac3b2c1..e8717c606b27 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/Metadata.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/Metadata.java @@ -13,7 +13,7 @@ */ package io.trino.orc.metadata; -import io.prestosql.orc.metadata.statistics.StripeStatistics; +import io.trino.orc.metadata.statistics.StripeStatistics; import java.util.List; import java.util.Optional; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/MetadataReader.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/MetadataReader.java index 7c447caa16ba..01cb29a7470f 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/MetadataReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/MetadataReader.java @@ -13,8 +13,8 @@ */ package io.trino.orc.metadata; -import io.prestosql.orc.metadata.PostScript.HiveWriterVersion; -import io.prestosql.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.PostScript.HiveWriterVersion; +import io.trino.orc.metadata.statistics.BloomFilter; import java.io.IOException; import java.io.InputStream; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/MetadataWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/MetadataWriter.java index 617b4600781b..86c39adce2a1 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/MetadataWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/MetadataWriter.java @@ -14,7 +14,7 @@ package io.trino.orc.metadata; import io.airlift.slice.SliceOutput; -import io.prestosql.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.BloomFilter; import java.io.IOException; import java.util.List; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/OrcMetadataReader.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/OrcMetadataReader.java index 713c4c38a657..806c5e99e7cc 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/OrcMetadataReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/OrcMetadataReader.java @@ -20,21 +20,21 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind; -import io.prestosql.orc.metadata.OrcType.OrcTypeKind; -import io.prestosql.orc.metadata.PostScript.HiveWriterVersion; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.BinaryStatistics; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.orc.metadata.statistics.BooleanStatistics; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.DateStatistics; -import io.prestosql.orc.metadata.statistics.DecimalStatistics; -import io.prestosql.orc.metadata.statistics.DoubleStatistics; -import io.prestosql.orc.metadata.statistics.IntegerStatistics; -import io.prestosql.orc.metadata.statistics.StringStatistics; -import io.prestosql.orc.metadata.statistics.StripeStatistics; -import io.prestosql.orc.metadata.statistics.TimestampStatistics; +import io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind; +import io.trino.orc.metadata.OrcType.OrcTypeKind; +import io.trino.orc.metadata.PostScript.HiveWriterVersion; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.BinaryStatistics; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.BooleanStatistics; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.DateStatistics; +import io.trino.orc.metadata.statistics.DecimalStatistics; +import io.trino.orc.metadata.statistics.DoubleStatistics; +import io.trino.orc.metadata.statistics.IntegerStatistics; +import io.trino.orc.metadata.statistics.StringStatistics; +import io.trino.orc.metadata.statistics.StripeStatistics; +import io.trino.orc.metadata.statistics.TimestampStatistics; import io.trino.orc.proto.OrcProto; import io.trino.orc.proto.OrcProto.RowIndexEntry; import io.trino.orc.protobuf.ByteString; @@ -56,22 +56,22 @@ import static io.airlift.slice.SliceUtf8.lengthOfCodePoint; import static io.airlift.slice.SliceUtf8.tryGetCodePointAt; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.orc.metadata.CompressionKind.LZ4; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.orc.metadata.CompressionKind.SNAPPY; -import static io.prestosql.orc.metadata.CompressionKind.ZLIB; -import static io.prestosql.orc.metadata.CompressionKind.ZSTD; -import static io.prestosql.orc.metadata.PostScript.HiveWriterVersion.ORC_HIVE_8732; -import static io.prestosql.orc.metadata.PostScript.HiveWriterVersion.ORIGINAL; -import static io.prestosql.orc.metadata.statistics.BinaryStatistics.BINARY_VALUE_BYTES_OVERHEAD; -import static io.prestosql.orc.metadata.statistics.BooleanStatistics.BOOLEAN_VALUE_BYTES; -import static io.prestosql.orc.metadata.statistics.DateStatistics.DATE_VALUE_BYTES; -import static io.prestosql.orc.metadata.statistics.DecimalStatistics.DECIMAL_VALUE_BYTES_OVERHEAD; -import static io.prestosql.orc.metadata.statistics.DoubleStatistics.DOUBLE_VALUE_BYTES; -import static io.prestosql.orc.metadata.statistics.IntegerStatistics.INTEGER_VALUE_BYTES; -import static io.prestosql.orc.metadata.statistics.ShortDecimalStatisticsBuilder.SHORT_DECIMAL_VALUE_BYTES; -import static io.prestosql.orc.metadata.statistics.StringStatistics.STRING_VALUE_BYTES_OVERHEAD; -import static io.prestosql.orc.metadata.statistics.TimestampStatistics.TIMESTAMP_VALUE_BYTES; +import static io.trino.orc.metadata.CompressionKind.LZ4; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.CompressionKind.SNAPPY; +import static io.trino.orc.metadata.CompressionKind.ZLIB; +import static io.trino.orc.metadata.CompressionKind.ZSTD; +import static io.trino.orc.metadata.PostScript.HiveWriterVersion.ORC_HIVE_8732; +import static io.trino.orc.metadata.PostScript.HiveWriterVersion.ORIGINAL; +import static io.trino.orc.metadata.statistics.BinaryStatistics.BINARY_VALUE_BYTES_OVERHEAD; +import static io.trino.orc.metadata.statistics.BooleanStatistics.BOOLEAN_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.DateStatistics.DATE_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.DecimalStatistics.DECIMAL_VALUE_BYTES_OVERHEAD; +import static io.trino.orc.metadata.statistics.DoubleStatistics.DOUBLE_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.IntegerStatistics.INTEGER_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.ShortDecimalStatisticsBuilder.SHORT_DECIMAL_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.StringStatistics.STRING_VALUE_BYTES_OVERHEAD; +import static io.trino.orc.metadata.statistics.TimestampStatistics.TIMESTAMP_VALUE_BYTES; import static java.lang.Character.MIN_SUPPLEMENTARY_CODE_POINT; import static java.lang.Math.toIntExact; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/OrcMetadataWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/OrcMetadataWriter.java index c430fec4d1f4..cfabb097600d 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/OrcMetadataWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/OrcMetadataWriter.java @@ -18,12 +18,12 @@ import com.google.common.primitives.Longs; import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind; -import io.prestosql.orc.metadata.OrcType.OrcTypeKind; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.StripeStatistics; +import io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind; +import io.trino.orc.metadata.OrcType.OrcTypeKind; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.StripeStatistics; import io.trino.orc.proto.OrcProto; import io.trino.orc.proto.OrcProto.RowIndexEntry; import io.trino.orc.proto.OrcProto.Type; @@ -40,7 +40,7 @@ import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.orc.metadata.PostScript.MAGIC; +import static io.trino.orc.metadata.PostScript.MAGIC; import static java.lang.Math.toIntExact; import static java.util.stream.Collectors.toList; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/OrcType.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/OrcType.java index 477346b558e9..ec3ea945b497 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/OrcType.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/OrcType.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarcharType; import java.util.ArrayList; import java.util.List; @@ -32,22 +32,22 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_NANOS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_NANOS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/RowGroupIndex.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/RowGroupIndex.java index 265ddf73f726..e86e6d4de0a8 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/RowGroupIndex.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/RowGroupIndex.java @@ -14,7 +14,7 @@ package io.trino.orc.metadata; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.ColumnStatistics; import java.util.List; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BinaryStatistics.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BinaryStatistics.java index 5454244b103c..8b8562254344 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BinaryStatistics.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BinaryStatistics.java @@ -13,7 +13,7 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.orc.metadata.statistics.StatisticsHasher.Hashable; +import io.trino.orc.metadata.statistics.StatisticsHasher.Hashable; import org.openjdk.jol.info.ClassLayout; import static com.google.common.base.MoreObjects.toStringHelper; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BinaryStatisticsBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BinaryStatisticsBuilder.java index 829d3e711713..396360b1fb99 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BinaryStatisticsBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BinaryStatisticsBuilder.java @@ -19,7 +19,7 @@ import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.orc.metadata.statistics.BinaryStatistics.BINARY_VALUE_BYTES_OVERHEAD; +import static io.trino.orc.metadata.statistics.BinaryStatistics.BINARY_VALUE_BYTES_OVERHEAD; import static java.util.Objects.requireNonNull; public class BinaryStatisticsBuilder diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BooleanStatistics.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BooleanStatistics.java index 9ae93a2db337..45792ac3e133 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BooleanStatistics.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BooleanStatistics.java @@ -13,7 +13,7 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.orc.metadata.statistics.StatisticsHasher.Hashable; +import io.trino.orc.metadata.statistics.StatisticsHasher.Hashable; import org.openjdk.jol.info.ClassLayout; import java.util.Objects; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BooleanStatisticsBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BooleanStatisticsBuilder.java index 5a4fafda846f..7365511ebf38 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BooleanStatisticsBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/BooleanStatisticsBuilder.java @@ -13,13 +13,13 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import java.util.List; import java.util.Optional; -import static io.prestosql.orc.metadata.statistics.BooleanStatistics.BOOLEAN_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.BooleanStatistics.BOOLEAN_VALUE_BYTES; import static java.util.Objects.requireNonNull; public class BooleanStatisticsBuilder diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/ColumnStatistics.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/ColumnStatistics.java index 4be2e5cb2f0b..50985443b52c 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/ColumnStatistics.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/ColumnStatistics.java @@ -13,21 +13,21 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.orc.metadata.statistics.StatisticsHasher.Hashable; +import io.trino.orc.metadata.statistics.StatisticsHasher.Hashable; import org.openjdk.jol.info.ClassLayout; import java.util.List; import java.util.Objects; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.metadata.statistics.BinaryStatisticsBuilder.mergeBinaryStatistics; -import static io.prestosql.orc.metadata.statistics.BooleanStatisticsBuilder.mergeBooleanStatistics; -import static io.prestosql.orc.metadata.statistics.DateStatisticsBuilder.mergeDateStatistics; -import static io.prestosql.orc.metadata.statistics.DoubleStatisticsBuilder.mergeDoubleStatistics; -import static io.prestosql.orc.metadata.statistics.IntegerStatisticsBuilder.mergeIntegerStatistics; -import static io.prestosql.orc.metadata.statistics.LongDecimalStatisticsBuilder.mergeDecimalStatistics; -import static io.prestosql.orc.metadata.statistics.StringStatisticsBuilder.mergeStringStatistics; -import static io.prestosql.orc.metadata.statistics.TimestampStatisticsBuilder.mergeTimestampStatistics; +import static io.trino.orc.metadata.statistics.BinaryStatisticsBuilder.mergeBinaryStatistics; +import static io.trino.orc.metadata.statistics.BooleanStatisticsBuilder.mergeBooleanStatistics; +import static io.trino.orc.metadata.statistics.DateStatisticsBuilder.mergeDateStatistics; +import static io.trino.orc.metadata.statistics.DoubleStatisticsBuilder.mergeDoubleStatistics; +import static io.trino.orc.metadata.statistics.IntegerStatisticsBuilder.mergeIntegerStatistics; +import static io.trino.orc.metadata.statistics.LongDecimalStatisticsBuilder.mergeDecimalStatistics; +import static io.trino.orc.metadata.statistics.StringStatisticsBuilder.mergeStringStatistics; +import static io.trino.orc.metadata.statistics.TimestampStatisticsBuilder.mergeTimestampStatistics; public class ColumnStatistics implements Hashable diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DateStatistics.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DateStatistics.java index a8a32559b051..dfcb202b1b4e 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DateStatistics.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DateStatistics.java @@ -13,7 +13,7 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.orc.metadata.statistics.StatisticsHasher.Hashable; +import io.trino.orc.metadata.statistics.StatisticsHasher.Hashable; import org.openjdk.jol.info.ClassLayout; import java.util.Objects; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DateStatisticsBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DateStatisticsBuilder.java index 49ec8b05d23d..d05579f1737e 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DateStatisticsBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DateStatisticsBuilder.java @@ -16,7 +16,7 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.orc.metadata.statistics.DateStatistics.DATE_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.DateStatistics.DATE_VALUE_BYTES; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DecimalStatistics.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DecimalStatistics.java index 156ec0c6f7ad..648f9eba3ca6 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DecimalStatistics.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DecimalStatistics.java @@ -13,7 +13,7 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.orc.metadata.statistics.StatisticsHasher.Hashable; +import io.trino.orc.metadata.statistics.StatisticsHasher.Hashable; import org.openjdk.jol.info.ClassLayout; import java.math.BigDecimal; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DoubleStatistics.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DoubleStatistics.java index 0d4dfc1dc65d..473a7d6ce2f1 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DoubleStatistics.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DoubleStatistics.java @@ -13,7 +13,7 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.orc.metadata.statistics.StatisticsHasher.Hashable; +import io.trino.orc.metadata.statistics.StatisticsHasher.Hashable; import org.openjdk.jol.info.ClassLayout; import java.util.Objects; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DoubleStatisticsBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DoubleStatisticsBuilder.java index 66cbc6cdc180..9f6bd7c43162 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DoubleStatisticsBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/DoubleStatisticsBuilder.java @@ -13,14 +13,14 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.RealType; +import io.trino.spi.type.Type; import java.util.List; import java.util.Optional; -import static io.prestosql.orc.metadata.statistics.DoubleStatistics.DOUBLE_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.DoubleStatistics.DOUBLE_VALUE_BYTES; import static java.util.Objects.requireNonNull; public class DoubleStatisticsBuilder diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/IntegerStatistics.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/IntegerStatistics.java index 5906fa2b198f..48892a845028 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/IntegerStatistics.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/IntegerStatistics.java @@ -13,7 +13,7 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.orc.metadata.statistics.StatisticsHasher.Hashable; +import io.trino.orc.metadata.statistics.StatisticsHasher.Hashable; import org.openjdk.jol.info.ClassLayout; import java.util.Objects; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/IntegerStatisticsBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/IntegerStatisticsBuilder.java index e352ecdef290..ee7ca1238ea8 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/IntegerStatisticsBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/IntegerStatisticsBuilder.java @@ -16,7 +16,7 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.orc.metadata.statistics.IntegerStatistics.INTEGER_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.IntegerStatistics.INTEGER_VALUE_BYTES; import static java.lang.Math.addExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/LongDecimalStatisticsBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/LongDecimalStatisticsBuilder.java index 6203e90ef805..ab62fec5e333 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/LongDecimalStatisticsBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/LongDecimalStatisticsBuilder.java @@ -14,17 +14,17 @@ package io.trino.orc.metadata.statistics; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; import java.math.BigDecimal; import java.util.List; import java.util.Optional; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.statistics.DecimalStatistics.DECIMAL_VALUE_BYTES_OVERHEAD; +import static io.trino.orc.metadata.statistics.DecimalStatistics.DECIMAL_VALUE_BYTES_OVERHEAD; import static java.util.Objects.requireNonNull; public class LongDecimalStatisticsBuilder diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/LongValueStatisticsBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/LongValueStatisticsBuilder.java index d6ab3ed79957..40f5a0a8be8d 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/LongValueStatisticsBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/LongValueStatisticsBuilder.java @@ -13,8 +13,8 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; public interface LongValueStatisticsBuilder extends StatisticsBuilder diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/ShortDecimalStatisticsBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/ShortDecimalStatisticsBuilder.java index cb0a72a49695..7abf4a6c38da 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/ShortDecimalStatisticsBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/ShortDecimalStatisticsBuilder.java @@ -17,7 +17,7 @@ import java.math.BigInteger; import java.util.Optional; -import static io.prestosql.orc.metadata.statistics.DecimalStatistics.DECIMAL_VALUE_BYTES_OVERHEAD; +import static io.trino.orc.metadata.statistics.DecimalStatistics.DECIMAL_VALUE_BYTES_OVERHEAD; public class ShortDecimalStatisticsBuilder implements LongValueStatisticsBuilder diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/SliceColumnStatisticsBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/SliceColumnStatisticsBuilder.java index a3fa2ba74daa..3e2949e01a15 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/SliceColumnStatisticsBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/SliceColumnStatisticsBuilder.java @@ -14,8 +14,8 @@ package io.trino.orc.metadata.statistics; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; public interface SliceColumnStatisticsBuilder extends StatisticsBuilder diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StatisticsBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StatisticsBuilder.java index e77f3ff98cf0..7b78ab204c66 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StatisticsBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StatisticsBuilder.java @@ -13,8 +13,8 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; public interface StatisticsBuilder { diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StringStatistics.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StringStatistics.java index 80c1eb8c1eb1..8909244d777c 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StringStatistics.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StringStatistics.java @@ -14,7 +14,7 @@ package io.trino.orc.metadata.statistics; import io.airlift.slice.Slice; -import io.prestosql.orc.metadata.statistics.StatisticsHasher.Hashable; +import io.trino.orc.metadata.statistics.StatisticsHasher.Hashable; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StringStatisticsBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StringStatisticsBuilder.java index 94354971d049..b60907a2451e 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StringStatisticsBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StringStatisticsBuilder.java @@ -22,7 +22,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.orc.metadata.statistics.StringStatistics.STRING_VALUE_BYTES_OVERHEAD; +import static io.trino.orc.metadata.statistics.StringStatistics.STRING_VALUE_BYTES_OVERHEAD; import static java.lang.Math.addExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StripeStatistics.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StripeStatistics.java index 80cafe9bfd56..978563ca9fc9 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StripeStatistics.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/StripeStatistics.java @@ -13,7 +13,7 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.ColumnMetadata; import org.openjdk.jol.info.ClassLayout; import java.util.Objects; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/TimestampStatistics.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/TimestampStatistics.java index 4d0f1885a920..5332d58c841e 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/TimestampStatistics.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/TimestampStatistics.java @@ -13,7 +13,7 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.orc.metadata.statistics.StatisticsHasher.Hashable; +import io.trino.orc.metadata.statistics.StatisticsHasher.Hashable; import org.openjdk.jol.info.ClassLayout; import java.util.Objects; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/TimestampStatisticsBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/TimestampStatisticsBuilder.java index 430596767e09..e86906c6f55a 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/TimestampStatisticsBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/metadata/statistics/TimestampStatisticsBuilder.java @@ -13,13 +13,13 @@ */ package io.trino.orc.metadata.statistics; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import java.util.List; import java.util.Optional; -import static io.prestosql.orc.metadata.statistics.TimestampStatistics.TIMESTAMP_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.TimestampStatistics.TIMESTAMP_VALUE_BYTES; import static java.util.Objects.requireNonNull; public class TimestampStatisticsBuilder diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/BooleanColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/BooleanColumnReader.java index 21053377a1a5..d92e05ab59e6 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/BooleanColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/BooleanColumnReader.java @@ -13,19 +13,19 @@ */ package io.trino.orc.reader; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ByteArrayBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.spi.block.Block; +import io.trino.spi.block.ByteArrayBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -37,13 +37,13 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Verify.verifyNotNull; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.reader.ReaderUtils.minNonNullValueSize; -import static io.prestosql.orc.reader.ReaderUtils.unpackByteNulls; -import static io.prestosql.orc.reader.ReaderUtils.verifyStreamType; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.reader.ReaderUtils.minNonNullValueSize; +import static io.trino.orc.reader.ReaderUtils.unpackByteNulls; +import static io.trino.orc.reader.ReaderUtils.verifyStreamType; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.util.Objects.requireNonNull; public class BooleanColumnReader diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/ByteColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/ByteColumnReader.java index eb5b02cb47f4..68db4322543e 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/ByteColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/ByteColumnReader.java @@ -13,20 +13,20 @@ */ package io.trino.orc.reader; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.ByteInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ByteArrayBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.ByteInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.spi.block.Block; +import io.trino.spi.block.ByteArrayBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -38,12 +38,12 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Verify.verifyNotNull; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.reader.ReaderUtils.minNonNullValueSize; -import static io.prestosql.orc.reader.ReaderUtils.verifyStreamType; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.reader.ReaderUtils.minNonNullValueSize; +import static io.trino.orc.reader.ReaderUtils.verifyStreamType; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.util.Objects.requireNonNull; public class ByteColumnReader diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/ColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/ColumnReader.java index dc9641d04820..6c3453270131 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/ColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/ColumnReader.java @@ -13,10 +13,10 @@ */ package io.trino.orc.reader; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.spi.block.Block; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.InputStreamSources; +import io.trino.spi.block.Block; import java.io.IOException; import java.time.ZoneId; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/ColumnReaders.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/ColumnReaders.java index e42ebae3097d..15d04c568247 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/ColumnReaders.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/ColumnReaders.java @@ -13,17 +13,17 @@ */ package io.trino.orc.reader; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.OrcBlockFactory; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcReader; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.OrcBlockFactory; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcReader; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.Type; -import static io.prestosql.orc.metadata.OrcType.OrcTypeKind.LONG; -import static io.prestosql.orc.reader.ReaderUtils.invalidStreamType; -import static io.prestosql.spi.type.TimeType.TIME_MICROS; +import static io.trino.orc.metadata.OrcType.OrcTypeKind.LONG; +import static io.trino.orc.reader.ReaderUtils.invalidStreamType; +import static io.trino.spi.type.TimeType.TIME_MICROS; public final class ColumnReaders { diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/DecimalColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/DecimalColumnReader.java index fd9046d0ce38..baad8d69e679 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/DecimalColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/DecimalColumnReader.java @@ -15,24 +15,24 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.DecimalInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.orc.stream.LongInputStream; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.Int128ArrayBlock; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.UnscaledDecimal128Arithmetic; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.DecimalInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.orc.stream.LongInputStream; +import io.trino.spi.block.Block; +import io.trino.spi.block.Int128ArrayBlock; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; +import io.trino.spi.type.UnscaledDecimal128Arithmetic; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -44,15 +44,15 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Verify.verifyNotNull; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.metadata.Stream.StreamKind.SECONDARY; -import static io.prestosql.orc.reader.ReaderUtils.minNonNullValueSize; -import static io.prestosql.orc.reader.ReaderUtils.unpackInt128Nulls; -import static io.prestosql.orc.reader.ReaderUtils.unpackLongNulls; -import static io.prestosql.orc.reader.ReaderUtils.verifyStreamType; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.metadata.Stream.StreamKind.SECONDARY; +import static io.trino.orc.reader.ReaderUtils.minNonNullValueSize; +import static io.trino.orc.reader.ReaderUtils.unpackInt128Nulls; +import static io.trino.orc.reader.ReaderUtils.unpackLongNulls; +import static io.trino.orc.reader.ReaderUtils.verifyStreamType; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.util.Objects.requireNonNull; public class DecimalColumnReader diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/DoubleColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/DoubleColumnReader.java index e1e257bdaecb..28c1accf9238 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/DoubleColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/DoubleColumnReader.java @@ -13,20 +13,20 @@ */ package io.trino.orc.reader; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.DoubleInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.DoubleInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.spi.block.Block; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -38,13 +38,13 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Verify.verifyNotNull; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.reader.ReaderUtils.minNonNullValueSize; -import static io.prestosql.orc.reader.ReaderUtils.unpackLongNulls; -import static io.prestosql.orc.reader.ReaderUtils.verifyStreamType; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.reader.ReaderUtils.minNonNullValueSize; +import static io.trino.orc.reader.ReaderUtils.unpackLongNulls; +import static io.trino.orc.reader.ReaderUtils.verifyStreamType; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.util.Objects.requireNonNull; public class DoubleColumnReader diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/FloatColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/FloatColumnReader.java index 5c4c49612cbb..fa60b94512ba 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/FloatColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/FloatColumnReader.java @@ -13,20 +13,20 @@ */ package io.trino.orc.reader; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.FloatInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.IntArrayBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.FloatInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.spi.block.Block; +import io.trino.spi.block.IntArrayBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.RealType; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -38,12 +38,12 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Verify.verifyNotNull; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.reader.ReaderUtils.minNonNullValueSize; -import static io.prestosql.orc.reader.ReaderUtils.verifyStreamType; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.reader.ReaderUtils.minNonNullValueSize; +import static io.trino.orc.reader.ReaderUtils.verifyStreamType; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.spi.type.RealType.REAL; import static java.util.Objects.requireNonNull; public class FloatColumnReader diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/ListColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/ListColumnReader.java index 8a500dfdca3c..4934d7014429 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/ListColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/ListColumnReader.java @@ -14,20 +14,20 @@ package io.trino.orc.reader; import com.google.common.io.Closer; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.OrcBlockFactory; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.orc.stream.LongInputStream; -import io.prestosql.spi.block.ArrayBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.OrcBlockFactory; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.orc.stream.LongInputStream; +import io.trino.spi.block.ArrayBlock; +import io.trino.spi.block.Block; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -38,14 +38,14 @@ import java.util.Optional; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.OrcReader.ProjectedLayout.fullyProjectedLayout; -import static io.prestosql.orc.metadata.Stream.StreamKind.LENGTH; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.reader.ColumnReaders.createColumnReader; -import static io.prestosql.orc.reader.ReaderUtils.convertLengthVectorToOffsetVector; -import static io.prestosql.orc.reader.ReaderUtils.unpackLengthNulls; -import static io.prestosql.orc.reader.ReaderUtils.verifyStreamType; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.orc.OrcReader.ProjectedLayout.fullyProjectedLayout; +import static io.trino.orc.metadata.Stream.StreamKind.LENGTH; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.reader.ColumnReaders.createColumnReader; +import static io.trino.orc.reader.ReaderUtils.convertLengthVectorToOffsetVector; +import static io.trino.orc.reader.ReaderUtils.unpackLengthNulls; +import static io.trino.orc.reader.ReaderUtils.verifyStreamType; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/LongColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/LongColumnReader.java index 73a2b968c7b1..119af1ece69e 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/LongColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/LongColumnReader.java @@ -13,26 +13,26 @@ */ package io.trino.orc.reader; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.orc.stream.LongInputStream; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.IntArrayBlock; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.block.ShortArrayBlock; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.orc.stream.LongInputStream; +import io.trino.spi.block.Block; +import io.trino.spi.block.IntArrayBlock; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.block.ShortArrayBlock; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -44,14 +44,14 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Verify.verifyNotNull; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.reader.ReaderUtils.minNonNullValueSize; -import static io.prestosql.orc.reader.ReaderUtils.unpackIntNulls; -import static io.prestosql.orc.reader.ReaderUtils.unpackLongNulls; -import static io.prestosql.orc.reader.ReaderUtils.unpackShortNulls; -import static io.prestosql.orc.reader.ReaderUtils.verifyStreamType; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.reader.ReaderUtils.minNonNullValueSize; +import static io.trino.orc.reader.ReaderUtils.unpackIntNulls; +import static io.trino.orc.reader.ReaderUtils.unpackLongNulls; +import static io.trino.orc.reader.ReaderUtils.unpackShortNulls; +import static io.trino.orc.reader.ReaderUtils.verifyStreamType; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; import static java.util.Objects.requireNonNull; public class LongColumnReader diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/MapColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/MapColumnReader.java index e34748300d54..b83f45135b00 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/MapColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/MapColumnReader.java @@ -14,19 +14,19 @@ package io.trino.orc.reader; import com.google.common.io.Closer; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.OrcBlockFactory; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.orc.stream.LongInputStream; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.OrcBlockFactory; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.orc.stream.LongInputStream; +import io.trino.spi.block.Block; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; import it.unimi.dsi.fastutil.ints.IntArrayList; import org.openjdk.jol.info.ClassLayout; @@ -39,14 +39,14 @@ import java.util.Optional; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.OrcReader.ProjectedLayout.fullyProjectedLayout; -import static io.prestosql.orc.metadata.Stream.StreamKind.LENGTH; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.reader.ColumnReaders.createColumnReader; -import static io.prestosql.orc.reader.ReaderUtils.convertLengthVectorToOffsetVector; -import static io.prestosql.orc.reader.ReaderUtils.unpackLengthNulls; -import static io.prestosql.orc.reader.ReaderUtils.verifyStreamType; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.orc.OrcReader.ProjectedLayout.fullyProjectedLayout; +import static io.trino.orc.metadata.Stream.StreamKind.LENGTH; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.reader.ColumnReaders.createColumnReader; +import static io.trino.orc.reader.ReaderUtils.convertLengthVectorToOffsetVector; +import static io.trino.orc.reader.ReaderUtils.unpackLengthNulls; +import static io.trino.orc.reader.ReaderUtils.verifyStreamType; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/ReaderUtils.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/ReaderUtils.java index fa1d43080902..31c4800cdf69 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/ReaderUtils.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/ReaderUtils.java @@ -13,9 +13,9 @@ */ package io.trino.orc.reader; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.spi.type.Type; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.spi.type.Type; import java.util.function.Predicate; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/SliceColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/SliceColumnReader.java index ed3156c77455..84ddccb193a0 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/SliceColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/SliceColumnReader.java @@ -15,18 +15,18 @@ import com.google.common.io.Closer; import io.airlift.slice.Slice; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.InputStreamSources; +import io.trino.spi.block.Block; +import io.trino.spi.type.CharType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -34,13 +34,13 @@ import java.time.ZoneId; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY_V2; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; -import static io.prestosql.orc.reader.ReaderUtils.verifyStreamType; -import static io.prestosql.spi.type.Chars.byteCountWithoutTrailingSpace; -import static io.prestosql.spi.type.Varchars.byteCount; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY_V2; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; +import static io.trino.orc.reader.ReaderUtils.verifyStreamType; +import static io.trino.spi.type.Chars.byteCountWithoutTrailingSpace; +import static io.trino.spi.type.Varchars.byteCount; import static java.util.Objects.requireNonNull; public class SliceColumnReader diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/SliceDictionaryColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/SliceDictionaryColumnReader.java index d8f0efed12f0..e27ad4ed8798 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/SliceDictionaryColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/SliceDictionaryColumnReader.java @@ -14,20 +14,20 @@ package io.trino.orc.reader; import io.airlift.slice.Slice; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.ByteArrayInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.orc.stream.LongInputStream; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.block.VariableWidthBlock; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.ByteArrayInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.orc.stream.LongInputStream; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.block.VariableWidthBlock; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -42,13 +42,13 @@ import static io.airlift.slice.SizeOf.sizeOf; import static io.airlift.slice.Slices.EMPTY_SLICE; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.DICTIONARY_DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.LENGTH; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.reader.ReaderUtils.minNonNullValueSize; -import static io.prestosql.orc.reader.SliceColumnReader.computeTruncatedLength; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.DICTIONARY_DATA; +import static io.trino.orc.metadata.Stream.StreamKind.LENGTH; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.reader.ReaderUtils.minNonNullValueSize; +import static io.trino.orc.reader.SliceColumnReader.computeTruncatedLength; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; import static java.lang.Math.toIntExact; import static java.util.Arrays.fill; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/SliceDirectColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/SliceDirectColumnReader.java index 287f56f5aeeb..e544176fa1b7 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/SliceDirectColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/SliceDirectColumnReader.java @@ -16,19 +16,19 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.ByteArrayInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.orc.stream.LongInputStream; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.block.VariableWidthBlock; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.ByteArrayInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.orc.stream.LongInputStream; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.block.VariableWidthBlock; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -42,14 +42,14 @@ import static com.google.common.base.Verify.verify; import static io.airlift.slice.Slices.EMPTY_SLICE; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.LENGTH; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.reader.ReaderUtils.convertLengthVectorToOffsetVector; -import static io.prestosql.orc.reader.ReaderUtils.unpackLengthNulls; -import static io.prestosql.orc.reader.SliceColumnReader.computeTruncatedLength; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.LENGTH; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.reader.ReaderUtils.convertLengthVectorToOffsetVector; +import static io.trino.orc.reader.ReaderUtils.unpackLengthNulls; +import static io.trino.orc.reader.SliceColumnReader.computeTruncatedLength; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/StructColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/StructColumnReader.java index 9e25fadc983b..686848b9805d 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/StructColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/StructColumnReader.java @@ -16,22 +16,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.io.Closer; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.OrcBlockFactory; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcReader; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.RowBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.RowType.Field; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.OrcBlockFactory; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcReader; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.spi.block.Block; +import io.trino.spi.block.RowBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.RowType; +import io.trino.spi.type.RowType.Field; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -48,10 +48,10 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.reader.ColumnReaders.createColumnReader; -import static io.prestosql.orc.reader.ReaderUtils.verifyStreamType; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.reader.ColumnReaders.createColumnReader; +import static io.trino.orc.reader.ReaderUtils.verifyStreamType; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; import static java.util.Objects.requireNonNull; public class StructColumnReader diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/TimeColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/TimeColumnReader.java index 6c1d7193b5e2..b2b72bb91408 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/TimeColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/TimeColumnReader.java @@ -13,12 +13,12 @@ */ package io.trino.orc.reader; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.spi.type.Type; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; public class TimeColumnReader extends LongColumnReader diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/TimestampColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/TimestampColumnReader.java index 9c6a1b37a162..407f4842f3f3 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/TimestampColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/TimestampColumnReader.java @@ -14,22 +14,22 @@ package io.trino.orc.reader; import com.google.common.base.VerifyException; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.OrcType.OrcTypeKind; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.orc.stream.LongInputStream; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.Int96ArrayBlock; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.OrcType.OrcTypeKind; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.orc.stream.LongInputStream; +import io.trino.spi.block.Block; +import io.trino.spi.block.Int96ArrayBlock; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; import org.joda.time.DateTimeZone; import org.openjdk.jol.info.ClassLayout; @@ -43,25 +43,25 @@ import java.util.Optional; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.metadata.Stream.StreamKind.SECONDARY; -import static io.prestosql.orc.reader.ReaderUtils.invalidStreamType; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_NANOS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.spi.type.Timestamps.roundDiv; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.metadata.Stream.StreamKind.SECONDARY; +import static io.trino.orc.reader.ReaderUtils.invalidStreamType; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_NANOS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.spi.type.Timestamps.roundDiv; import static java.lang.Math.floorDiv; import static java.lang.Math.floorMod; import static java.lang.Math.toIntExact; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/reader/UnionColumnReader.java b/lib/trino-orc/src/main/java/io/trino/orc/reader/UnionColumnReader.java index cdca2520efad..1427310123c3 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/reader/UnionColumnReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/reader/UnionColumnReader.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.Closer; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.OrcBlockFactory; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.stream.BooleanInputStream; -import io.prestosql.orc.stream.ByteInputStream; -import io.prestosql.orc.stream.InputStreamSource; -import io.prestosql.orc.stream.InputStreamSources; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ByteArrayBlock; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.block.LazyBlockLoader; -import io.prestosql.spi.block.RowBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.OrcBlockFactory; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.stream.BooleanInputStream; +import io.trino.orc.stream.ByteInputStream; +import io.trino.orc.stream.InputStreamSource; +import io.trino.orc.stream.InputStreamSources; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ByteArrayBlock; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.block.LazyBlockLoader; +import io.trino.spi.block.RowBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -48,13 +48,13 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.orc.OrcReader.ProjectedLayout.fullyProjectedLayout; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.reader.ColumnReaders.createColumnReader; -import static io.prestosql.orc.reader.ReaderUtils.verifyStreamType; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.orc.OrcReader.ProjectedLayout.fullyProjectedLayout; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.reader.ColumnReaders.createColumnReader; +import static io.trino.orc.reader.ReaderUtils.verifyStreamType; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.util.Objects.requireNonNull; // Use row blocks to represent union objects when reading diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/AbstractDiskOrcDataReader.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/AbstractDiskOrcDataReader.java index 34b86d62689e..c9a86b440bef 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/AbstractDiskOrcDataReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/AbstractDiskOrcDataReader.java @@ -16,7 +16,7 @@ import io.airlift.slice.SizeOf; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.orc.OrcDataSourceId; +import io.trino.orc.OrcDataSourceId; import javax.annotation.Nullable; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/BooleanInputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/BooleanInputStream.java index a1a8eafb5d13..34f030fd9302 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/BooleanInputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/BooleanInputStream.java @@ -13,7 +13,7 @@ */ package io.trino.orc.stream; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; import java.io.IOException; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/BooleanOutputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/BooleanOutputStream.java index 4cb13241ecfe..023b3aa18252 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/BooleanOutputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/BooleanOutputStream.java @@ -14,11 +14,11 @@ package io.trino.orc.stream; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.OrcOutputBuffer; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.checkpoint.ByteStreamCheckpoint; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; +import io.trino.orc.OrcOutputBuffer; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.ByteStreamCheckpoint; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; import org.openjdk.jol.info.ClassLayout; import java.util.ArrayList; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteArrayInputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteArrayInputStream.java index 86a59049061a..8d61478307f0 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteArrayInputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteArrayInputStream.java @@ -13,7 +13,7 @@ */ package io.trino.orc.stream; -import io.prestosql.orc.checkpoint.ByteArrayStreamCheckpoint; +import io.trino.orc.checkpoint.ByteArrayStreamCheckpoint; import java.io.IOException; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteArrayOutputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteArrayOutputStream.java index e81e9707a7ee..a152e283fe35 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteArrayOutputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteArrayOutputStream.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcOutputBuffer; -import io.prestosql.orc.checkpoint.ByteArrayStreamCheckpoint; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; +import io.trino.orc.OrcOutputBuffer; +import io.trino.orc.checkpoint.ByteArrayStreamCheckpoint; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; import org.openjdk.jol.info.ClassLayout; import java.util.ArrayList; import java.util.List; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; import static java.lang.Math.toIntExact; /** diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteInputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteInputStream.java index 5f236f374442..3cfc71296d18 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteInputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteInputStream.java @@ -13,8 +13,8 @@ */ package io.trino.orc.stream; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.checkpoint.ByteStreamCheckpoint; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.checkpoint.ByteStreamCheckpoint; import java.io.IOException; import java.util.Arrays; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteOutputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteOutputStream.java index 72160d0b1a6e..e0dda0a804fe 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteOutputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/ByteOutputStream.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.SizeOf; -import io.prestosql.orc.OrcOutputBuffer; -import io.prestosql.orc.checkpoint.ByteStreamCheckpoint; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.Stream; +import io.trino.orc.OrcOutputBuffer; +import io.trino.orc.checkpoint.ByteStreamCheckpoint; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.Stream; import org.openjdk.jol.info.ClassLayout; import java.util.ArrayList; import java.util.List; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; import static java.lang.Math.toIntExact; public class ByteOutputStream diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/CheckpointInputStreamSource.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/CheckpointInputStreamSource.java index 284079ed934b..18fa8cef40ac 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/CheckpointInputStreamSource.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/CheckpointInputStreamSource.java @@ -13,7 +13,7 @@ */ package io.trino.orc.stream; -import io.prestosql.orc.checkpoint.StreamCheckpoint; +import io.trino.orc.checkpoint.StreamCheckpoint; import javax.annotation.Nullable; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/CompressedOrcChunkLoader.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/CompressedOrcChunkLoader.java index a05d134240bd..d8efb33c5e2b 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/CompressedOrcChunkLoader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/CompressedOrcChunkLoader.java @@ -16,21 +16,21 @@ import io.airlift.slice.FixedLengthSliceInput; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.OrcDecompressor; -import io.prestosql.orc.OrcDecompressor.OutputBuffer; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.OrcDecompressor; +import io.trino.orc.OrcDecompressor.OutputBuffer; import java.io.IOException; import java.util.Arrays; import static com.google.common.base.MoreObjects.toStringHelper; import static io.airlift.slice.Slices.EMPTY_SLICE; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.decodeCompressedBlockOffset; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.decodeDecompressedOffset; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.decodeCompressedBlockOffset; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.decodeDecompressedOffset; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/DecimalInputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/DecimalInputStream.java index cf7b2dc2d33f..8a12e27302fb 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/DecimalInputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/DecimalInputStream.java @@ -15,14 +15,14 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.checkpoint.DecimalStreamCheckpoint; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.checkpoint.DecimalStreamCheckpoint; import java.io.IOException; import static com.google.common.base.Verify.verify; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.decodeCompressedBlockOffset; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.decodeDecompressedOffset; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.decodeCompressedBlockOffset; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.decodeDecompressedOffset; public class DecimalInputStream implements ValueInputStream diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/DecimalOutputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/DecimalOutputStream.java index 19a7c3082d30..4e81879729e0 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/DecimalOutputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/DecimalOutputStream.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcOutputBuffer; -import io.prestosql.orc.checkpoint.DecimalStreamCheckpoint; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.spi.type.Decimals; +import io.trino.orc.OrcOutputBuffer; +import io.trino.orc.checkpoint.DecimalStreamCheckpoint; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.Stream; +import io.trino.spi.type.Decimals; import org.openjdk.jol.info.ClassLayout; import java.math.BigInteger; @@ -28,8 +28,8 @@ import java.util.List; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.stream.LongDecode.writeVLong; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.stream.LongDecode.writeVLong; import static java.lang.Math.toIntExact; /** diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/DoubleInputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/DoubleInputStream.java index 2d8177e678df..6b4f4082996e 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/DoubleInputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/DoubleInputStream.java @@ -15,7 +15,7 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.orc.checkpoint.DoubleStreamCheckpoint; +import io.trino.orc.checkpoint.DoubleStreamCheckpoint; import java.io.IOException; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/DoubleOutputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/DoubleOutputStream.java index a5c74052e84e..f3c1af3a8cdb 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/DoubleOutputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/DoubleOutputStream.java @@ -14,18 +14,18 @@ package io.trino.orc.stream; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.OrcOutputBuffer; -import io.prestosql.orc.checkpoint.DoubleStreamCheckpoint; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.Stream; +import io.trino.orc.OrcOutputBuffer; +import io.trino.orc.checkpoint.DoubleStreamCheckpoint; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.Stream; import org.openjdk.jol.info.ClassLayout; import java.util.ArrayList; import java.util.List; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; import static java.lang.Math.toIntExact; public class DoubleOutputStream diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/FloatInputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/FloatInputStream.java index 7e33665a7f9c..7f354cf93cc9 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/FloatInputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/FloatInputStream.java @@ -15,7 +15,7 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.orc.checkpoint.FloatStreamCheckpoint; +import io.trino.orc.checkpoint.FloatStreamCheckpoint; import java.io.IOException; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/FloatOutputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/FloatOutputStream.java index 6f09ab035107..8874ede980cd 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/FloatOutputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/FloatOutputStream.java @@ -14,18 +14,18 @@ package io.trino.orc.stream; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.OrcOutputBuffer; -import io.prestosql.orc.checkpoint.FloatStreamCheckpoint; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.Stream; +import io.trino.orc.OrcOutputBuffer; +import io.trino.orc.checkpoint.FloatStreamCheckpoint; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.Stream; import org.openjdk.jol.info.ClassLayout; import java.util.ArrayList; import java.util.List; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; import static java.lang.Math.toIntExact; public class FloatOutputStream diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/InputStreamSources.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/InputStreamSources.java index 8dc659a4ff5f..61ba85375ecc 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/InputStreamSources.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/InputStreamSources.java @@ -14,14 +14,14 @@ package io.trino.orc.stream; import com.google.common.collect.ImmutableMap; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.StreamId; -import io.prestosql.orc.metadata.Stream.StreamKind; +import io.trino.orc.OrcColumn; +import io.trino.orc.StreamId; +import io.trino.orc.metadata.Stream.StreamKind; import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.orc.stream.MissingInputStreamSource.missingStreamSource; +import static io.trino.orc.stream.MissingInputStreamSource.missingStreamSource; import static java.util.Objects.requireNonNull; public class InputStreamSources diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongDecode.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongDecode.java index 366c041aea85..dd92dd7347b4 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongDecode.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongDecode.java @@ -14,19 +14,19 @@ package io.trino.orc.stream; import io.airlift.slice.SliceOutput; -import io.prestosql.orc.OrcCorruptionException; +import io.trino.orc.OrcCorruptionException; import java.io.IOException; -import static io.prestosql.orc.stream.LongDecode.FixedBitSizes.FIFTY_SIX; -import static io.prestosql.orc.stream.LongDecode.FixedBitSizes.FORTY; -import static io.prestosql.orc.stream.LongDecode.FixedBitSizes.FORTY_EIGHT; -import static io.prestosql.orc.stream.LongDecode.FixedBitSizes.ONE; -import static io.prestosql.orc.stream.LongDecode.FixedBitSizes.THIRTY; -import static io.prestosql.orc.stream.LongDecode.FixedBitSizes.THIRTY_TWO; -import static io.prestosql.orc.stream.LongDecode.FixedBitSizes.TWENTY_EIGHT; -import static io.prestosql.orc.stream.LongDecode.FixedBitSizes.TWENTY_FOUR; -import static io.prestosql.orc.stream.LongDecode.FixedBitSizes.TWENTY_SIX; +import static io.trino.orc.stream.LongDecode.FixedBitSizes.FIFTY_SIX; +import static io.trino.orc.stream.LongDecode.FixedBitSizes.FORTY; +import static io.trino.orc.stream.LongDecode.FixedBitSizes.FORTY_EIGHT; +import static io.trino.orc.stream.LongDecode.FixedBitSizes.ONE; +import static io.trino.orc.stream.LongDecode.FixedBitSizes.THIRTY; +import static io.trino.orc.stream.LongDecode.FixedBitSizes.THIRTY_TWO; +import static io.trino.orc.stream.LongDecode.FixedBitSizes.TWENTY_EIGHT; +import static io.trino.orc.stream.LongDecode.FixedBitSizes.TWENTY_FOUR; +import static io.trino.orc.stream.LongDecode.FixedBitSizes.TWENTY_SIX; // This is based on the Apache Hive ORC code public final class LongDecode diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongInputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongInputStream.java index 60580c0cacae..d7adce9ed718 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongInputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongInputStream.java @@ -13,7 +13,7 @@ */ package io.trino.orc.stream; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.checkpoint.LongStreamCheckpoint; import java.io.IOException; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongInputStreamV1.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongInputStreamV1.java index 21d6b9eec6fc..52bf6bfb32e3 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongInputStreamV1.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongInputStreamV1.java @@ -13,9 +13,9 @@ */ package io.trino.orc.stream; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; -import io.prestosql.orc.checkpoint.LongStreamV1Checkpoint; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.checkpoint.LongStreamV1Checkpoint; import java.io.IOException; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongInputStreamV2.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongInputStreamV2.java index 37a1ad38ac2c..196147fda5b1 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongInputStreamV2.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongInputStreamV2.java @@ -13,9 +13,9 @@ */ package io.trino.orc.stream; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; -import io.prestosql.orc.checkpoint.LongStreamV2Checkpoint; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.checkpoint.LongStreamV2Checkpoint; import java.io.IOException; import java.io.InputStream; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongOutputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongOutputStream.java index cdf542b8d625..3455b3ca9459 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongOutputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongOutputStream.java @@ -13,10 +13,10 @@ */ package io.trino.orc.stream; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; -import io.prestosql.orc.metadata.CompressionKind; +import io.trino.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.metadata.CompressionKind; -import static io.prestosql.orc.metadata.Stream.StreamKind.LENGTH; +import static io.trino.orc.metadata.Stream.StreamKind.LENGTH; public interface LongOutputStream extends ValueOutputStream diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongOutputStreamV1.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongOutputStreamV1.java index 57a9917daa4e..8008f4c17407 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongOutputStreamV1.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongOutputStreamV1.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.SizeOf; -import io.prestosql.orc.OrcOutputBuffer; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; -import io.prestosql.orc.checkpoint.LongStreamV1Checkpoint; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; +import io.trino.orc.OrcOutputBuffer; +import io.trino.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.checkpoint.LongStreamV1Checkpoint; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; import org.openjdk.jol.info.ClassLayout; import java.util.ArrayList; @@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.orc.stream.LongDecode.writeVLong; +import static io.trino.orc.stream.LongDecode.writeVLong; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongOutputStreamV2.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongOutputStreamV2.java index 6c22b587f461..7246d88e0e7f 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/LongOutputStreamV2.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/LongOutputStreamV2.java @@ -16,13 +16,13 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.SizeOf; import io.airlift.slice.SliceOutput; -import io.prestosql.orc.OrcOutputBuffer; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; -import io.prestosql.orc.checkpoint.LongStreamV2Checkpoint; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; +import io.trino.orc.OrcOutputBuffer; +import io.trino.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.checkpoint.LongStreamV2Checkpoint; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; import org.openjdk.jol.info.ClassLayout; import java.util.ArrayList; @@ -30,15 +30,15 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.stream.LongOutputStreamV2.SerializationUtils.encodeBitWidth; -import static io.prestosql.orc.stream.LongOutputStreamV2.SerializationUtils.findClosestNumBits; -import static io.prestosql.orc.stream.LongOutputStreamV2.SerializationUtils.getClosestAlignedFixedBits; -import static io.prestosql.orc.stream.LongOutputStreamV2.SerializationUtils.getClosestFixedBits; -import static io.prestosql.orc.stream.LongOutputStreamV2.SerializationUtils.isSafeSubtract; -import static io.prestosql.orc.stream.LongOutputStreamV2.SerializationUtils.percentileBits; -import static io.prestosql.orc.stream.LongOutputStreamV2.SerializationUtils.writeVslong; -import static io.prestosql.orc.stream.LongOutputStreamV2.SerializationUtils.writeVulong; -import static io.prestosql.orc.stream.LongOutputStreamV2.SerializationUtils.zigzagEncode; +import static io.trino.orc.stream.LongOutputStreamV2.SerializationUtils.encodeBitWidth; +import static io.trino.orc.stream.LongOutputStreamV2.SerializationUtils.findClosestNumBits; +import static io.trino.orc.stream.LongOutputStreamV2.SerializationUtils.getClosestAlignedFixedBits; +import static io.trino.orc.stream.LongOutputStreamV2.SerializationUtils.getClosestFixedBits; +import static io.trino.orc.stream.LongOutputStreamV2.SerializationUtils.isSafeSubtract; +import static io.trino.orc.stream.LongOutputStreamV2.SerializationUtils.percentileBits; +import static io.trino.orc.stream.LongOutputStreamV2.SerializationUtils.writeVslong; +import static io.trino.orc.stream.LongOutputStreamV2.SerializationUtils.writeVulong; +import static io.trino.orc.stream.LongOutputStreamV2.SerializationUtils.zigzagEncode; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/MemoryOrcDataReader.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/MemoryOrcDataReader.java index c0f6feb4e51b..0b404ac0a68d 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/MemoryOrcDataReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/MemoryOrcDataReader.java @@ -14,7 +14,7 @@ package io.trino.orc.stream; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcDataSourceId; +import io.trino.orc.OrcDataSourceId; import static com.google.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/OrcChunkLoader.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/OrcChunkLoader.java index 098feb24c2db..ed31bdfd821a 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/OrcChunkLoader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/OrcChunkLoader.java @@ -14,9 +14,9 @@ package io.trino.orc.stream; import io.airlift.slice.Slice; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.OrcDecompressor; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.OrcDecompressor; import java.io.IOException; import java.util.Optional; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/OrcDataReader.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/OrcDataReader.java index 5ca4e3ecebd7..cfe4d34f133a 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/OrcDataReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/OrcDataReader.java @@ -14,7 +14,7 @@ package io.trino.orc.stream; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcDataSourceId; +import io.trino.orc.OrcDataSourceId; import java.io.IOException; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/OrcInputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/OrcInputStream.java index 39eed7274025..dfb5a76a1951 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/OrcInputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/OrcInputStream.java @@ -15,8 +15,8 @@ import io.airlift.slice.FixedLengthSliceInput; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDataSourceId; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDataSourceId; import javax.annotation.Nullable; @@ -25,9 +25,9 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static io.airlift.slice.Slices.EMPTY_SLICE; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.decodeCompressedBlockOffset; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.decodeDecompressedOffset; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.decodeCompressedBlockOffset; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.decodeDecompressedOffset; import static java.lang.Math.min; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/PresentOutputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/PresentOutputStream.java index 1e39427ea638..f232b7f6753b 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/PresentOutputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/PresentOutputStream.java @@ -13,11 +13,11 @@ */ package io.trino.orc.stream; -import io.prestosql.orc.OrcOutputBuffer; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.Stream; +import io.trino.orc.OrcOutputBuffer; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.Stream; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -28,7 +28,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; import static java.lang.Math.toIntExact; public class PresentOutputStream diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/StreamDataOutput.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/StreamDataOutput.java index eb8dd902b461..f9520a0829b8 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/StreamDataOutput.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/StreamDataOutput.java @@ -15,7 +15,7 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.orc.metadata.Stream; +import io.trino.orc.metadata.Stream; import java.util.function.ToLongFunction; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/UncompressedOrcChunkLoader.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/UncompressedOrcChunkLoader.java index e0181a3b9201..cf36a9b09769 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/UncompressedOrcChunkLoader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/UncompressedOrcChunkLoader.java @@ -14,17 +14,17 @@ package io.trino.orc.stream; import io.airlift.slice.Slice; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.memory.context.LocalMemoryContext; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDataSourceId; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.memory.context.LocalMemoryContext; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDataSourceId; import java.io.IOException; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.decodeCompressedBlockOffset; -import static io.prestosql.orc.checkpoint.InputStreamCheckpoint.decodeDecompressedOffset; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.decodeCompressedBlockOffset; +import static io.trino.orc.checkpoint.InputStreamCheckpoint.decodeDecompressedOffset; import static java.util.Objects.requireNonNull; public final class UncompressedOrcChunkLoader diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/ValueInputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/ValueInputStream.java index e69718055338..24e26605fbb2 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/ValueInputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/ValueInputStream.java @@ -13,7 +13,7 @@ */ package io.trino.orc.stream; -import io.prestosql.orc.checkpoint.StreamCheckpoint; +import io.trino.orc.checkpoint.StreamCheckpoint; import java.io.IOException; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/ValueOutputStream.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/ValueOutputStream.java index 0aebd0928b9a..0c5363efe7ca 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/ValueOutputStream.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/ValueOutputStream.java @@ -13,8 +13,8 @@ */ package io.trino.orc.stream; -import io.prestosql.orc.checkpoint.StreamCheckpoint; -import io.prestosql.orc.metadata.OrcColumnId; +import io.trino.orc.checkpoint.StreamCheckpoint; +import io.trino.orc.metadata.OrcColumnId; import java.util.List; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/stream/ValueStreams.java b/lib/trino-orc/src/main/java/io/trino/orc/stream/ValueStreams.java index 5afe1383bfb1..164685f50876 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/stream/ValueStreams.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/stream/ValueStreams.java @@ -13,22 +13,22 @@ */ package io.trino.orc.stream; -import io.prestosql.orc.StreamId; -import io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind; -import io.prestosql.orc.metadata.OrcType.OrcTypeKind; +import io.trino.orc.StreamId; +import io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind; +import io.trino.orc.metadata.OrcType.OrcTypeKind; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY_V2; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; -import static io.prestosql.orc.metadata.OrcType.OrcTypeKind.DECIMAL; -import static io.prestosql.orc.metadata.OrcType.OrcTypeKind.TIMESTAMP; -import static io.prestosql.orc.metadata.OrcType.OrcTypeKind.TIMESTAMP_INSTANT; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.DICTIONARY_DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.LENGTH; -import static io.prestosql.orc.metadata.Stream.StreamKind.PRESENT; -import static io.prestosql.orc.metadata.Stream.StreamKind.SECONDARY; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY_V2; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; +import static io.trino.orc.metadata.OrcType.OrcTypeKind.DECIMAL; +import static io.trino.orc.metadata.OrcType.OrcTypeKind.TIMESTAMP; +import static io.trino.orc.metadata.OrcType.OrcTypeKind.TIMESTAMP_INSTANT; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.DICTIONARY_DATA; +import static io.trino.orc.metadata.Stream.StreamKind.LENGTH; +import static io.trino.orc.metadata.Stream.StreamKind.PRESENT; +import static io.trino.orc.metadata.Stream.StreamKind.SECONDARY; import static java.lang.String.format; public final class ValueStreams diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/BooleanColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/BooleanColumnWriter.java index 13dca860e613..f76fa232fd71 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/BooleanColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/BooleanColumnWriter.java @@ -16,21 +16,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.BooleanStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.stream.BooleanOutputStream; -import io.prestosql.orc.stream.PresentOutputStream; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.BooleanStatisticsBuilder; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.stream.BooleanOutputStream; +import io.trino.orc.stream.PresentOutputStream; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -41,8 +41,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; -import static io.prestosql.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; +import static io.trino.orc.metadata.CompressionKind.NONE; import static java.util.Objects.requireNonNull; public class BooleanColumnWriter diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/ByteColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/ByteColumnWriter.java index a7de2329e4e6..ab884e701813 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/ByteColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/ByteColumnWriter.java @@ -17,22 +17,22 @@ import com.google.common.collect.ImmutableMap; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.checkpoint.ByteStreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.stream.ByteOutputStream; -import io.prestosql.orc.stream.PresentOutputStream; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.ByteStreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.stream.ByteOutputStream; +import io.trino.orc.stream.PresentOutputStream; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -45,8 +45,8 @@ 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.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; -import static io.prestosql.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; +import static io.trino.orc.metadata.CompressionKind.NONE; import static java.util.Objects.requireNonNull; public class ByteColumnWriter diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/ColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/ColumnWriter.java index 4ff9e1dc8e39..1bfe97ec4223 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/ColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/ColumnWriter.java @@ -14,12 +14,12 @@ package io.trino.orc.writer; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; import java.io.IOException; import java.util.List; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/ColumnWriters.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/ColumnWriters.java index 0d0dc3ff3d66..ff79c02c55d9 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/ColumnWriters.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/ColumnWriters.java @@ -15,24 +15,24 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.orc.metadata.statistics.BinaryStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.BloomFilterBuilder; -import io.prestosql.orc.metadata.statistics.DateStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.DoubleStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.IntegerStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.StringStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.TimestampStatisticsBuilder; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.Type; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.OrcType; +import io.trino.orc.metadata.statistics.BinaryStatisticsBuilder; +import io.trino.orc.metadata.statistics.BloomFilterBuilder; +import io.trino.orc.metadata.statistics.DateStatisticsBuilder; +import io.trino.orc.metadata.statistics.DoubleStatisticsBuilder; +import io.trino.orc.metadata.statistics.IntegerStatisticsBuilder; +import io.trino.orc.metadata.statistics.StringStatisticsBuilder; +import io.trino.orc.metadata.statistics.TimestampStatisticsBuilder; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.Type; import java.util.function.Supplier; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.orc.metadata.OrcType.OrcTypeKind.LONG; +import static io.trino.orc.metadata.OrcType.OrcTypeKind.LONG; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/DecimalColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/DecimalColumnWriter.java index b5b92cf89197..3b20ec305fc5 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/DecimalColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/DecimalColumnWriter.java @@ -16,28 +16,28 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.checkpoint.DecimalStreamCheckpoint; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.LongDecimalStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.ShortDecimalStatisticsBuilder; -import io.prestosql.orc.stream.DecimalOutputStream; -import io.prestosql.orc.stream.LongOutputStream; -import io.prestosql.orc.stream.LongOutputStreamV2; -import io.prestosql.orc.stream.PresentOutputStream; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.DecimalStreamCheckpoint; +import io.trino.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.LongDecimalStatisticsBuilder; +import io.trino.orc.metadata.statistics.ShortDecimalStatisticsBuilder; +import io.trino.orc.stream.DecimalOutputStream; +import io.trino.orc.stream.LongOutputStream; +import io.trino.orc.stream.LongOutputStreamV2; +import io.trino.orc.stream.PresentOutputStream; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -49,9 +49,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.orc.metadata.Stream.StreamKind.SECONDARY; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.Stream.StreamKind.SECONDARY; import static java.util.Objects.requireNonNull; public class DecimalColumnWriter diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/DictionaryBuilder.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/DictionaryBuilder.java index eb58a7b3be14..f3271dee01e2 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/DictionaryBuilder.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/DictionaryBuilder.java @@ -13,15 +13,15 @@ */ package io.trino.orc.writer; -import io.prestosql.array.IntBigArray; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.VariableWidthBlockBuilder; +import io.trino.array.IntBigArray; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.VariableWidthBlockBuilder; import org.openjdk.jol.info.ClassLayout; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Verify.verify; -import static io.prestosql.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; +import static io.trino.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; import static it.unimi.dsi.fastutil.HashCommon.arraySize; import static java.lang.Math.min; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/DoubleColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/DoubleColumnWriter.java index bb124ef9af03..a261d7dc9202 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/DoubleColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/DoubleColumnWriter.java @@ -16,23 +16,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.checkpoint.DoubleStreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.DoubleStatisticsBuilder; -import io.prestosql.orc.stream.DoubleOutputStream; -import io.prestosql.orc.stream.PresentOutputStream; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.DoubleStreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.DoubleStatisticsBuilder; +import io.trino.orc.stream.DoubleOutputStream; +import io.trino.orc.stream.PresentOutputStream; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -46,8 +46,8 @@ 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.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; -import static io.prestosql.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; +import static io.trino.orc.metadata.CompressionKind.NONE; import static java.util.Objects.requireNonNull; public class DoubleColumnWriter diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/FloatColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/FloatColumnWriter.java index 57bb4c5d9da8..575615949b0a 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/FloatColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/FloatColumnWriter.java @@ -16,23 +16,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.checkpoint.FloatStreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.DoubleStatisticsBuilder; -import io.prestosql.orc.stream.FloatOutputStream; -import io.prestosql.orc.stream.PresentOutputStream; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.FloatStreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.DoubleStatisticsBuilder; +import io.trino.orc.stream.FloatOutputStream; +import io.trino.orc.stream.PresentOutputStream; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -46,8 +46,8 @@ 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.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; -import static io.prestosql.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; +import static io.trino.orc.metadata.CompressionKind.NONE; import static java.lang.Float.intBitsToFloat; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/ListColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/ListColumnWriter.java index 54af2061d42b..24e9e57c2ec2 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/ListColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/ListColumnWriter.java @@ -16,21 +16,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.stream.LongOutputStream; -import io.prestosql.orc.stream.PresentOutputStream; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ColumnarArray; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.stream.LongOutputStream; +import io.trino.orc.stream.PresentOutputStream; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.ColumnarArray; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -41,10 +41,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.orc.stream.LongOutputStream.createLengthOutputStream; -import static io.prestosql.spi.block.ColumnarArray.toColumnarArray; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.stream.LongOutputStream.createLengthOutputStream; +import static io.trino.spi.block.ColumnarArray.toColumnarArray; import static java.util.Objects.requireNonNull; public class ListColumnWriter diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/LongColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/LongColumnWriter.java index 7d4a994eff47..f719bb8333b2 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/LongColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/LongColumnWriter.java @@ -16,24 +16,24 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.LongValueStatisticsBuilder; -import io.prestosql.orc.stream.LongOutputStream; -import io.prestosql.orc.stream.LongOutputStreamV2; -import io.prestosql.orc.stream.PresentOutputStream; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.LongValueStatisticsBuilder; +import io.trino.orc.stream.LongOutputStream; +import io.trino.orc.stream.LongOutputStreamV2; +import io.trino.orc.stream.PresentOutputStream; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -48,9 +48,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.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; import static java.util.Objects.requireNonNull; public class LongColumnWriter diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/MapColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/MapColumnWriter.java index c1728d982b96..6a09cce5f304 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/MapColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/MapColumnWriter.java @@ -16,21 +16,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.stream.LongOutputStream; -import io.prestosql.orc.stream.PresentOutputStream; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ColumnarMap; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.stream.LongOutputStream; +import io.trino.orc.stream.PresentOutputStream; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.ColumnarMap; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -41,10 +41,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.orc.stream.LongOutputStream.createLengthOutputStream; -import static io.prestosql.spi.block.ColumnarMap.toColumnarMap; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.stream.LongOutputStream.createLengthOutputStream; +import static io.trino.spi.block.ColumnarMap.toColumnarMap; import static java.util.Objects.requireNonNull; public class MapColumnWriter diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/SliceDictionaryColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/SliceDictionaryColumnWriter.java index 1f236574899f..898e5576bb70 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/SliceDictionaryColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/SliceDictionaryColumnWriter.java @@ -17,28 +17,28 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; import io.airlift.units.DataSize; -import io.prestosql.array.IntBigArray; -import io.prestosql.orc.DictionaryCompressionOptimizer.DictionaryColumn; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.SliceColumnStatisticsBuilder; -import io.prestosql.orc.stream.ByteArrayOutputStream; -import io.prestosql.orc.stream.LongOutputStream; -import io.prestosql.orc.stream.LongOutputStreamV2; -import io.prestosql.orc.stream.PresentOutputStream; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.type.Type; +import io.trino.array.IntBigArray; +import io.trino.orc.DictionaryCompressionOptimizer.DictionaryColumn; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.SliceColumnStatisticsBuilder; +import io.trino.orc.stream.ByteArrayOutputStream; +import io.trino.orc.stream.LongOutputStream; +import io.trino.orc.stream.LongOutputStreamV2; +import io.trino.orc.stream.PresentOutputStream; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.type.Type; import it.unimi.dsi.fastutil.ints.IntArrays; import org.openjdk.jol.info.ClassLayout; @@ -55,11 +55,11 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.orc.DictionaryCompressionOptimizer.estimateIndexBytesPerValue; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY_V2; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.stream.LongOutputStream.createLengthOutputStream; +import static io.trino.orc.DictionaryCompressionOptimizer.estimateIndexBytesPerValue; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DICTIONARY_V2; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.stream.LongOutputStream.createLengthOutputStream; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/SliceDirectColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/SliceDirectColumnWriter.java index 10d89f492f4f..349ed62281b0 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/SliceDirectColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/SliceDirectColumnWriter.java @@ -16,25 +16,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.checkpoint.ByteArrayStreamCheckpoint; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.SliceColumnStatisticsBuilder; -import io.prestosql.orc.stream.ByteArrayOutputStream; -import io.prestosql.orc.stream.LongOutputStream; -import io.prestosql.orc.stream.PresentOutputStream; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.ByteArrayStreamCheckpoint; +import io.trino.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.SliceColumnStatisticsBuilder; +import io.trino.orc.stream.ByteArrayOutputStream; +import io.trino.orc.stream.LongOutputStream; +import io.trino.orc.stream.PresentOutputStream; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -48,9 +48,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.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.orc.stream.LongOutputStream.createLengthOutputStream; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.stream.LongOutputStream.createLengthOutputStream; import static java.util.Objects.requireNonNull; public class SliceDirectColumnWriter diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/StructColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/StructColumnWriter.java index 182b2b576f24..ad2a6e63ef91 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/StructColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/StructColumnWriter.java @@ -16,19 +16,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.stream.PresentOutputStream; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ColumnarRow; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.stream.PresentOutputStream; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.ColumnarRow; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -39,9 +39,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.spi.block.ColumnarRow.toColumnarRow; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.spi.block.ColumnarRow.toColumnarRow; import static java.util.Objects.requireNonNull; public class StructColumnWriter diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/TimeColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/TimeColumnWriter.java index 22328327dd22..eeb550f8c36e 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/TimeColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/TimeColumnWriter.java @@ -13,14 +13,14 @@ */ package io.trino.orc.writer; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.statistics.LongValueStatisticsBuilder; -import io.prestosql.spi.type.Type; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.statistics.LongValueStatisticsBuilder; +import io.trino.spi.type.Type; import java.util.function.Supplier; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; public class TimeColumnWriter extends LongColumnWriter diff --git a/lib/trino-orc/src/main/java/io/trino/orc/writer/TimestampColumnWriter.java b/lib/trino-orc/src/main/java/io/trino/orc/writer/TimestampColumnWriter.java index 44074eb6d9f3..86becf95411e 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/writer/TimestampColumnWriter.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/writer/TimestampColumnWriter.java @@ -16,26 +16,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; -import io.prestosql.orc.metadata.ColumnEncoding; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.RowGroupIndex; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.LongValueStatisticsBuilder; -import io.prestosql.orc.metadata.statistics.TimestampStatisticsBuilder; -import io.prestosql.orc.stream.LongOutputStream; -import io.prestosql.orc.stream.LongOutputStreamV2; -import io.prestosql.orc.stream.PresentOutputStream; -import io.prestosql.orc.stream.StreamDataOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.Type; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.metadata.ColumnEncoding; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.RowGroupIndex; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.LongValueStatisticsBuilder; +import io.trino.orc.metadata.statistics.TimestampStatisticsBuilder; +import io.trino.orc.stream.LongOutputStream; +import io.trino.orc.stream.LongOutputStreamV2; +import io.trino.orc.stream.PresentOutputStream; +import io.trino.orc.stream.StreamDataOutput; +import io.trino.spi.block.Block; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -48,23 +48,23 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; -import static io.prestosql.orc.metadata.Stream.StreamKind.SECONDARY; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_NANOS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.MILLISECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.orc.metadata.ColumnEncoding.ColumnEncodingKind.DIRECT_V2; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.orc.metadata.Stream.StreamKind.SECONDARY; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_NANOS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.MILLISECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; import static java.lang.Math.floorDiv; import static java.lang.Math.floorMod; import static java.time.ZoneOffset.UTC; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/AbstractTestOrcReader.java b/lib/trino-orc/src/test/java/io/trino/orc/AbstractTestOrcReader.java index 8c1196c7a5e5..184c0ad5c376 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/AbstractTestOrcReader.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/AbstractTestOrcReader.java @@ -19,13 +19,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Range; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.SqlVarbinary; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.SqlVarbinary; import org.joda.time.DateTimeZone; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -42,27 +42,27 @@ import static com.google.common.collect.Iterables.cycle; import static com.google.common.collect.Iterables.limit; import static com.google.common.collect.Lists.newArrayList; -import static io.prestosql.orc.OrcTester.HIVE_STORAGE_TIME_ZONE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_NANOS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.orc.OrcTester.HIVE_STORAGE_TIME_ZONE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_NANOS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Collections.nCopies; import static java.util.stream.Collectors.toList; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/BenchmarkColumnReaders.java b/lib/trino-orc/src/test/java/io/trino/orc/BenchmarkColumnReaders.java index babb7bb097e9..73ba498fefed 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/BenchmarkColumnReaders.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/BenchmarkColumnReaders.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.Type; +import io.trino.orc.metadata.CompressionKind; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.Type; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -53,23 +53,23 @@ 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.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.orc.OrcReader.INITIAL_BATCH_SIZE; -import static io.prestosql.orc.OrcTester.writeOrcColumnPresto; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.plugin.tpch.TpchTables.getTableColumns; -import static io.prestosql.plugin.tpch.TpchTables.getTablePages; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.orc.OrcReader.INITIAL_BATCH_SIZE; +import static io.trino.orc.OrcTester.writeOrcColumnPresto; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.plugin.tpch.TpchTables.getTableColumns; +import static io.trino.plugin.tpch.TpchTables.getTablePages; +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.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.nio.file.Files.readAllBytes; import static java.util.UUID.randomUUID; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/BenchmarkOrcDecimalReader.java b/lib/trino-orc/src/test/java/io/trino/orc/BenchmarkOrcDecimalReader.java index a8b2bf23333c..0ecb38d74e96 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/BenchmarkOrcDecimalReader.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/BenchmarkOrcDecimalReader.java @@ -14,10 +14,10 @@ package io.trino.orc; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDecimal; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDecimal; import org.joda.time.DateTimeZone; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; @@ -47,13 +47,13 @@ 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.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcReader.INITIAL_BATCH_SIZE; -import static io.prestosql.orc.OrcTester.Format.ORC_12; -import static io.prestosql.orc.OrcTester.READER_OPTIONS; -import static io.prestosql.orc.OrcTester.writeOrcColumnHive; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcReader.INITIAL_BATCH_SIZE; +import static io.trino.orc.OrcTester.Format.ORC_12; +import static io.trino.orc.OrcTester.READER_OPTIONS; +import static io.trino.orc.OrcTester.writeOrcColumnHive; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.spi.type.DecimalType.createDecimalType; import static java.util.UUID.randomUUID; @SuppressWarnings("MethodMayBeStatic") diff --git a/lib/trino-orc/src/test/java/io/trino/orc/OrcTester.java b/lib/trino-orc/src/test/java/io/trino/orc/OrcTester.java index 8fb978826288..14ab9ceb6cce 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/OrcTester.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/OrcTester.java @@ -22,33 +22,33 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.metadata.Metadata; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.RowFieldName; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.metadata.Metadata; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcType; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.MapType; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.RowFieldName; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.common.type.Date; @@ -113,46 +113,46 @@ import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.units.DataSize.Unit.MEGABYTE; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.orc.OrcReader.MAX_BATCH_SIZE; -import static io.prestosql.orc.OrcTester.Format.ORC_11; -import static io.prestosql.orc.OrcTester.Format.ORC_12; -import static io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode.BOTH; -import static io.prestosql.orc.TestingOrcPredicate.createOrcPredicate; -import static io.prestosql.orc.metadata.CompressionKind.LZ4; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.orc.metadata.CompressionKind.SNAPPY; -import static io.prestosql.orc.metadata.CompressionKind.ZLIB; -import static io.prestosql.orc.metadata.CompressionKind.ZSTD; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.Chars.truncateToLengthAndTrimSpaces; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.rescale; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_NANOS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.spi.type.Timestamps.roundDiv; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.Varchars.truncateToLength; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.orc.OrcReader.MAX_BATCH_SIZE; +import static io.trino.orc.OrcTester.Format.ORC_11; +import static io.trino.orc.OrcTester.Format.ORC_12; +import static io.trino.orc.OrcWriteValidation.OrcWriteValidationMode.BOTH; +import static io.trino.orc.TestingOrcPredicate.createOrcPredicate; +import static io.trino.orc.metadata.CompressionKind.LZ4; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.CompressionKind.SNAPPY; +import static io.trino.orc.metadata.CompressionKind.ZLIB; +import static io.trino.orc.metadata.CompressionKind.ZSTD; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.Chars.truncateToLengthAndTrimSpaces; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.rescale; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_NANOS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.spi.type.Timestamps.roundDiv; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.Varchars.truncateToLength; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.util.Arrays.asList; import static java.util.stream.Collectors.toList; import static org.apache.hadoop.hive.serde2.ColumnProjectionUtils.READ_ALL_COLUMNS; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestCachingOrcDataSource.java b/lib/trino-orc/src/test/java/io/trino/orc/TestCachingOrcDataSource.java index d0ce303464bf..ea03634a8b8e 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestCachingOrcDataSource.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestCachingOrcDataSource.java @@ -18,12 +18,12 @@ import io.airlift.slice.Slices; import io.airlift.units.DataSize; import io.airlift.units.DataSize.Unit; -import io.prestosql.orc.OrcTester.Format; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.StripeInformation; -import io.prestosql.orc.stream.OrcDataReader; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; +import io.trino.orc.OrcTester.Format; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.StripeInformation; +import io.trino.orc.stream.OrcDataReader; +import io.trino.spi.Page; +import io.trino.spi.block.Block; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.ql.exec.FileSinkOperator; import org.apache.hadoop.hive.ql.io.IOConstants; @@ -47,17 +47,17 @@ import static io.airlift.testing.Assertions.assertGreaterThanOrEqual; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcReader.INITIAL_BATCH_SIZE; -import static io.prestosql.orc.OrcRecordReader.LinearProbeRangeFinder.createTinyStripesRangeFinder; -import static io.prestosql.orc.OrcRecordReader.wrapWithCacheIfTinyStripes; -import static io.prestosql.orc.OrcTester.Format.ORC_12; -import static io.prestosql.orc.OrcTester.HIVE_STORAGE_TIME_ZONE; -import static io.prestosql.orc.OrcTester.READER_OPTIONS; -import static io.prestosql.orc.OrcTester.writeOrcFileColumnHive; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.orc.metadata.CompressionKind.ZLIB; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcReader.INITIAL_BATCH_SIZE; +import static io.trino.orc.OrcRecordReader.LinearProbeRangeFinder.createTinyStripesRangeFinder; +import static io.trino.orc.OrcRecordReader.wrapWithCacheIfTinyStripes; +import static io.trino.orc.OrcTester.Format.ORC_12; +import static io.trino.orc.OrcTester.HIVE_STORAGE_TIME_ZONE; +import static io.trino.orc.OrcTester.READER_OPTIONS; +import static io.trino.orc.OrcTester.writeOrcFileColumnHive; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.CompressionKind.ZLIB; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory.javaStringObjectInspector; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestDictionaryBuilder.java b/lib/trino-orc/src/test/java/io/trino/orc/TestDictionaryBuilder.java index a6f8d8417bde..e486503fe60f 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestDictionaryBuilder.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestDictionaryBuilder.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.orc.writer.DictionaryBuilder; -import io.prestosql.spi.block.VariableWidthBlock; +import io.trino.orc.writer.DictionaryBuilder; +import io.trino.spi.block.VariableWidthBlock; import org.testng.annotations.Test; import java.util.HashSet; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestDictionaryCompressionOptimizer.java b/lib/trino-orc/src/test/java/io/trino/orc/TestDictionaryCompressionOptimizer.java index 4ffe8465d186..0745eb0e5635 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestDictionaryCompressionOptimizer.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestDictionaryCompressionOptimizer.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; import io.airlift.units.DataSize.Unit; -import io.prestosql.orc.DictionaryCompressionOptimizer.DictionaryColumn; +import io.trino.orc.DictionaryCompressionOptimizer.DictionaryColumn; import org.testng.annotations.Test; import java.util.List; @@ -27,8 +27,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.testing.Assertions.assertGreaterThanOrEqual; import static io.airlift.testing.Assertions.assertLessThan; -import static io.prestosql.orc.DictionaryCompressionOptimizer.DICTIONARY_MEMORY_MAX_RANGE; -import static io.prestosql.orc.DictionaryCompressionOptimizer.estimateIndexBytesPerValue; +import static io.trino.orc.DictionaryCompressionOptimizer.DICTIONARY_MEMORY_MAX_RANGE; +import static io.trino.orc.DictionaryCompressionOptimizer.estimateIndexBytesPerValue; import static java.lang.Math.min; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcBloomFilters.java b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcBloomFilters.java index d0e885d79853..222c38acc801 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcBloomFilters.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcBloomFilters.java @@ -17,20 +17,20 @@ import com.google.common.collect.ImmutableMap; import com.google.common.primitives.Longs; import io.airlift.slice.Slice; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.CompressedMetadataWriter; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcMetadataReader; -import io.prestosql.orc.metadata.OrcMetadataWriter; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.IntegerStatistics; -import io.prestosql.orc.metadata.statistics.Utf8BloomFilterBuilder; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.Type; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.CompressedMetadataWriter; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcMetadataReader; +import io.trino.orc.metadata.OrcMetadataWriter; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.IntegerStatistics; +import io.trino.orc.metadata.statistics.Utf8BloomFilterBuilder; import io.trino.orc.proto.OrcProto; import io.trino.orc.protobuf.CodedInputStream; +import io.trino.spi.predicate.Domain; +import io.trino.spi.type.RealType; +import io.trino.spi.type.Type; import org.apache.orc.util.Murmur3; import org.testng.annotations.Test; @@ -43,18 +43,18 @@ import java.util.concurrent.ThreadLocalRandom; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.orc.TupleDomainOrcPredicate.checkInBloomFilter; -import static io.prestosql.orc.metadata.OrcColumnId.ROOT_COLUMN; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.orc.TupleDomainOrcPredicate.checkInBloomFilter; +import static io.trino.orc.metadata.OrcColumnId.ROOT_COLUMN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Float.floatToIntBits; import static java.lang.Float.intBitsToFloat; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcDataSourceUtils.java b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcDataSourceUtils.java index adb754414be5..b388fb179e9d 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcDataSourceUtils.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcDataSourceUtils.java @@ -20,7 +20,7 @@ import java.util.List; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.orc.OrcDataSourceUtils.mergeAdjacentDiskRanges; +import static io.trino.orc.OrcDataSourceUtils.mergeAdjacentDiskRanges; import static org.testng.Assert.assertEquals; public class TestOrcDataSourceUtils diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcLz4.java b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcLz4.java index 5d79cb8094a5..1456b177384c 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcLz4.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcLz4.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; +import io.trino.spi.Page; +import io.trino.spi.block.Block; import org.joda.time.DateTimeZone; import org.testng.annotations.Test; import static com.google.common.io.Resources.getResource; import static com.google.common.io.Resources.toByteArray; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcReader.INITIAL_BATCH_SIZE; -import static io.prestosql.orc.metadata.CompressionKind.LZ4; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcReader.INITIAL_BATCH_SIZE; +import static io.trino.orc.metadata.CompressionKind.LZ4; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; import static org.testng.Assert.assertEquals; public class TestOrcLz4 diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcOutputBuffer.java b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcOutputBuffer.java index 384c99a9b422..1db84d468981 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcOutputBuffer.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcOutputBuffer.java @@ -14,7 +14,7 @@ package io.trino.orc; import io.airlift.slice.DynamicSliceOutput; -import io.prestosql.orc.metadata.CompressionKind; +import io.trino.orc.metadata.CompressionKind; import org.testng.annotations.Test; import java.util.Arrays; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcReader.java b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcReader.java index fafa9e657ed1..45ff1efa514a 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcReader.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcReader.java @@ -15,8 +15,8 @@ import org.testng.annotations.Test; -import static io.prestosql.orc.OrcTester.fullOrcTester; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.orc.OrcTester.fullOrcTester; +import static io.trino.spi.type.DoubleType.DOUBLE; @Test public class TestOrcReader diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcReaderMemoryUsage.java b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcReaderMemoryUsage.java index 9833de2d8d6e..bdd4816e41ec 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcReaderMemoryUsage.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcReaderMemoryUsage.java @@ -13,13 +13,13 @@ */ package io.trino.orc; -import io.prestosql.metadata.Metadata; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.metadata.Metadata; +import io.trino.orc.metadata.CompressionKind; +import io.trino.spi.Page; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import org.apache.hadoop.hive.ql.exec.FileSinkOperator; import org.apache.hadoop.hive.ql.io.orc.OrcSerde; import org.apache.hadoop.hive.serde2.SerDeException; @@ -33,15 +33,15 @@ import java.util.HashMap; import static io.airlift.testing.Assertions.assertGreaterThan; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.orc.OrcReader.INITIAL_BATCH_SIZE; -import static io.prestosql.orc.OrcReader.MAX_BATCH_SIZE; -import static io.prestosql.orc.OrcTester.Format.ORC_12; -import static io.prestosql.orc.OrcTester.createCustomOrcRecordReader; -import static io.prestosql.orc.OrcTester.createOrcRecordWriter; -import static io.prestosql.orc.OrcTester.createSettableStructObjectInspector; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.orc.OrcReader.INITIAL_BATCH_SIZE; +import static io.trino.orc.OrcReader.MAX_BATCH_SIZE; +import static io.trino.orc.OrcTester.Format.ORC_12; +import static io.trino.orc.OrcTester.createCustomOrcRecordReader; +import static io.trino.orc.OrcTester.createOrcRecordWriter; +import static io.trino.orc.OrcTester.createSettableStructObjectInspector; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; public class TestOrcReaderMemoryUsage diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcReaderPositions.java b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcReaderPositions.java index d5b83eddefb6..cf546e722e1a 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcReaderPositions.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcReaderPositions.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import io.airlift.slice.Slice; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.Footer; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.statistics.IntegerStatistics; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.Footer; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.statistics.IntegerStatistics; +import io.trino.spi.Page; +import io.trino.spi.block.Block; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.ql.exec.FileSinkOperator; @@ -43,16 +43,16 @@ import java.nio.ByteBuffer; import java.util.Map; -import static io.prestosql.orc.OrcReader.BATCH_SIZE_GROWTH_FACTOR; -import static io.prestosql.orc.OrcReader.INITIAL_BATCH_SIZE; -import static io.prestosql.orc.OrcReader.MAX_BATCH_SIZE; -import static io.prestosql.orc.OrcTester.Format.ORC_12; -import static io.prestosql.orc.OrcTester.READER_OPTIONS; -import static io.prestosql.orc.OrcTester.createCustomOrcRecordReader; -import static io.prestosql.orc.OrcTester.createOrcRecordWriter; -import static io.prestosql.orc.OrcTester.createSettableStructObjectInspector; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.orc.OrcReader.BATCH_SIZE_GROWTH_FACTOR; +import static io.trino.orc.OrcReader.INITIAL_BATCH_SIZE; +import static io.trino.orc.OrcReader.MAX_BATCH_SIZE; +import static io.trino.orc.OrcTester.Format.ORC_12; +import static io.trino.orc.OrcTester.READER_OPTIONS; +import static io.trino.orc.OrcTester.createCustomOrcRecordReader; +import static io.trino.orc.OrcTester.createOrcRecordWriter; +import static io.trino.orc.OrcTester.createSettableStructObjectInspector; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Math.min; import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.hadoop.hive.ql.io.orc.CompressionKind.SNAPPY; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcWithoutRowGroupInfo.java b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcWithoutRowGroupInfo.java index b4131cb06e95..b29c51c199e9 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcWithoutRowGroupInfo.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcWithoutRowGroupInfo.java @@ -14,11 +14,11 @@ package io.trino.orc; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.type.RowType; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.predicate.Domain; +import io.trino.spi.type.RowType; import org.joda.time.DateTimeZone; import org.testng.annotations.Test; @@ -27,11 +27,11 @@ import java.util.OptionalInt; import static com.google.common.io.Resources.getResource; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcReader.INITIAL_BATCH_SIZE; -import static io.prestosql.orc.OrcReader.createOrcReader; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcReader.INITIAL_BATCH_SIZE; +import static io.trino.orc.OrcReader.createOrcReader; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; import static org.testng.Assert.assertEquals; public class TestOrcWithoutRowGroupInfo diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcWriter.java b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcWriter.java index ac735a7edc8c..0c3c0c16cf39 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestOrcWriter.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestOrcWriter.java @@ -19,19 +19,19 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode; -import io.prestosql.orc.metadata.Footer; -import io.prestosql.orc.metadata.OrcMetadataReader; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.StripeFooter; -import io.prestosql.orc.metadata.StripeInformation; -import io.prestosql.orc.stream.OrcChunkLoader; -import io.prestosql.orc.stream.OrcInputStream; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.orc.OrcWriteValidation.OrcWriteValidationMode; +import io.trino.orc.metadata.Footer; +import io.trino.orc.metadata.OrcMetadataReader; +import io.trino.orc.metadata.OrcType; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.StripeFooter; +import io.trino.orc.metadata.StripeInformation; +import io.trino.orc.stream.OrcChunkLoader; +import io.trino.orc.stream.OrcInputStream; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.io.FileOutputStream; @@ -43,13 +43,13 @@ import static io.airlift.testing.Assertions.assertGreaterThanOrEqual; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcTester.READER_OPTIONS; -import static io.prestosql.orc.StripeReader.isIndexStream; -import static io.prestosql.orc.TestingOrcPredicate.ORC_ROW_GROUP_SIZE; -import static io.prestosql.orc.TestingOrcPredicate.ORC_STRIPE_SIZE; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcTester.READER_OPTIONS; +import static io.trino.orc.StripeReader.isIndexStream; +import static io.trino.orc.TestingOrcPredicate.ORC_ROW_GROUP_SIZE; +import static io.trino.orc.TestingOrcPredicate.ORC_STRIPE_SIZE; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Math.toIntExact; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertFalse; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestReadBloomFilter.java b/lib/trino-orc/src/test/java/io/trino/orc/TestReadBloomFilter.java index de150a10dbe7..18f2fe8c1493 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestReadBloomFilter.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestReadBloomFilter.java @@ -14,12 +14,12 @@ package io.trino.orc; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.Type; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.spi.predicate.Domain; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.io.IOException; @@ -30,23 +30,23 @@ import static com.google.common.collect.Iterables.limit; import static com.google.common.collect.Lists.newArrayList; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcReader.MAX_BATCH_SIZE; -import static io.prestosql.orc.OrcTester.Format.ORC_12; -import static io.prestosql.orc.OrcTester.HIVE_STORAGE_TIME_ZONE; -import static io.prestosql.orc.OrcTester.READER_OPTIONS; -import static io.prestosql.orc.OrcTester.writeOrcColumnHive; -import static io.prestosql.orc.metadata.CompressionKind.LZ4; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcReader.MAX_BATCH_SIZE; +import static io.trino.orc.OrcTester.Format.ORC_12; +import static io.trino.orc.OrcTester.HIVE_STORAGE_TIME_ZONE; +import static io.trino.orc.OrcTester.READER_OPTIONS; +import static io.trino.orc.OrcTester.writeOrcColumnHive; +import static io.trino.orc.metadata.CompressionKind.LZ4; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Float.floatToIntBits; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestSliceDictionaryColumnWriter.java b/lib/trino-orc/src/test/java/io/trino/orc/TestSliceDictionaryColumnWriter.java index e173c2e6c41a..217f5d290721 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestSliceDictionaryColumnWriter.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestSliceDictionaryColumnWriter.java @@ -15,21 +15,21 @@ import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.statistics.NoOpBloomFilterBuilder; -import io.prestosql.orc.metadata.statistics.StringStatisticsBuilder; -import io.prestosql.orc.writer.SliceDictionaryColumnWriter; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.RunLengthEncodedBlock; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.statistics.NoOpBloomFilterBuilder; +import io.trino.orc.metadata.statistics.StringStatisticsBuilder; +import io.trino.orc.writer.SliceDictionaryColumnWriter; +import io.trino.spi.block.Block; +import io.trino.spi.block.RunLengthEncodedBlock; import org.testng.annotations.Test; import java.util.concurrent.ThreadLocalRandom; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.orc.OrcWriterOptions.DEFAULT_MAX_COMPRESSION_BUFFER_SIZE; -import static io.prestosql.orc.OrcWriterOptions.DEFAULT_MAX_STRING_STATISTICS_LIMIT; -import static io.prestosql.orc.metadata.OrcColumnId.ROOT_COLUMN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.orc.OrcWriterOptions.DEFAULT_MAX_COMPRESSION_BUFFER_SIZE; +import static io.trino.orc.OrcWriterOptions.DEFAULT_MAX_STRING_STATISTICS_LIMIT; +import static io.trino.orc.metadata.OrcColumnId.ROOT_COLUMN; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Math.toIntExact; import static org.testng.Assert.assertFalse; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestStructColumnReader.java b/lib/trino-orc/src/test/java/io/trino/orc/TestStructColumnReader.java index 8a0757e4a572..bb5f135c1416 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestStructColumnReader.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestStructColumnReader.java @@ -18,18 +18,18 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.metadata.Metadata; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RowBlock; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.RowFieldName; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.metadata.Metadata; +import io.trino.orc.metadata.OrcType; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RowBlock; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.RowFieldName; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.testing.TestingConnectorSession; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -42,14 +42,14 @@ import java.util.Optional; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.orc.OrcTester.READER_OPTIONS; -import static io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode.BOTH; -import static io.prestosql.orc.TestingOrcPredicate.ORC_ROW_GROUP_SIZE; -import static io.prestosql.orc.TestingOrcPredicate.ORC_STRIPE_SIZE; -import static io.prestosql.orc.metadata.CompressionKind.NONE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.orc.OrcTester.READER_OPTIONS; +import static io.trino.orc.OrcWriteValidation.OrcWriteValidationMode.BOTH; +import static io.trino.orc.TestingOrcPredicate.ORC_ROW_GROUP_SIZE; +import static io.trino.orc.TestingOrcPredicate.ORC_STRIPE_SIZE; +import static io.trino.orc.metadata.CompressionKind.NONE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.nio.charset.StandardCharsets.UTF_8; import static org.joda.time.DateTimeZone.UTC; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestTupleDomainOrcPredicate.java b/lib/trino-orc/src/test/java/io/trino/orc/TestTupleDomainOrcPredicate.java index 76d8da99793a..e3e81e1d057b 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestTupleDomainOrcPredicate.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestTupleDomainOrcPredicate.java @@ -14,54 +14,54 @@ package io.trino.orc; import io.airlift.slice.Slice; -import io.prestosql.orc.metadata.statistics.BinaryStatistics; -import io.prestosql.orc.metadata.statistics.BooleanStatistics; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.DateStatistics; -import io.prestosql.orc.metadata.statistics.DecimalStatistics; -import io.prestosql.orc.metadata.statistics.DoubleStatistics; -import io.prestosql.orc.metadata.statistics.IntegerStatistics; -import io.prestosql.orc.metadata.statistics.StringStatistics; -import io.prestosql.orc.metadata.statistics.TimestampStatistics; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.Type; +import io.trino.orc.metadata.statistics.BinaryStatistics; +import io.trino.orc.metadata.statistics.BooleanStatistics; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.DateStatistics; +import io.trino.orc.metadata.statistics.DecimalStatistics; +import io.trino.orc.metadata.statistics.DoubleStatistics; +import io.trino.orc.metadata.statistics.IntegerStatistics; +import io.trino.orc.metadata.statistics.StringStatistics; +import io.trino.orc.metadata.statistics.TimestampStatistics; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.math.BigDecimal; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.orc.TupleDomainOrcPredicate.getDomain; -import static io.prestosql.orc.metadata.statistics.ShortDecimalStatisticsBuilder.SHORT_DECIMAL_VALUE_BYTES; -import static io.prestosql.spi.predicate.Domain.all; -import static io.prestosql.spi.predicate.Domain.create; -import static io.prestosql.spi.predicate.Domain.none; -import static io.prestosql.spi.predicate.Domain.notNull; -import static io.prestosql.spi.predicate.Domain.onlyNull; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.predicate.Range.greaterThanOrEqual; -import static io.prestosql.spi.predicate.Range.lessThanOrEqual; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_NANOS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.orc.TupleDomainOrcPredicate.getDomain; +import static io.trino.orc.metadata.statistics.ShortDecimalStatisticsBuilder.SHORT_DECIMAL_VALUE_BYTES; +import static io.trino.spi.predicate.Domain.all; +import static io.trino.spi.predicate.Domain.create; +import static io.trino.spi.predicate.Domain.none; +import static io.trino.spi.predicate.Domain.notNull; +import static io.trino.spi.predicate.Domain.onlyNull; +import static io.trino.spi.predicate.Domain.singleValue; +import static io.trino.spi.predicate.Range.greaterThanOrEqual; +import static io.trino.spi.predicate.Range.lessThanOrEqual; +import static io.trino.spi.predicate.Range.range; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_NANOS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Float.floatToRawIntBits; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestingOrcDataSource.java b/lib/trino-orc/src/test/java/io/trino/orc/TestingOrcDataSource.java index ba74e9a9a6f5..fa06f4bad8f8 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestingOrcDataSource.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestingOrcDataSource.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.orc.stream.OrcDataReader; +import io.trino.orc.stream.OrcDataReader; import java.io.IOException; import java.util.List; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestingOrcPredicate.java b/lib/trino-orc/src/test/java/io/trino/orc/TestingOrcPredicate.java index 68d649ac4456..ce6665bec29d 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestingOrcPredicate.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestingOrcPredicate.java @@ -16,24 +16,24 @@ import com.google.common.collect.Ordering; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.statistics.BloomFilter; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.statistics.BloomFilter; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import java.util.ArrayList; import java.util.Collections; @@ -43,22 +43,22 @@ import java.util.function.Function; import static com.google.common.collect.Lists.newArrayList; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_NANOS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_NANOS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.util.stream.Collectors.toList; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/metadata/TestOrcMetadataReader.java b/lib/trino-orc/src/test/java/io/trino/orc/metadata/TestOrcMetadataReader.java index fa50f0c0ecc0..3efc08b44c8a 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/metadata/TestOrcMetadataReader.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/metadata/TestOrcMetadataReader.java @@ -17,8 +17,8 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.orc.metadata.PostScript.HiveWriterVersion; -import io.prestosql.orc.metadata.statistics.StringStatistics; +import io.trino.orc.metadata.PostScript.HiveWriterVersion; +import io.trino.orc.metadata.statistics.StringStatistics; import io.trino.orc.proto.OrcProto; import io.trino.orc.protobuf.ByteString; import org.testng.annotations.Test; @@ -30,11 +30,11 @@ import static io.airlift.slice.Slices.EMPTY_SLICE; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.orc.metadata.OrcMetadataReader.findStringStatisticTruncationPositionForOriginalOrcWriter; -import static io.prestosql.orc.metadata.OrcMetadataReader.maxStringTruncateToValidRange; -import static io.prestosql.orc.metadata.OrcMetadataReader.minStringTruncateToValidRange; -import static io.prestosql.orc.metadata.PostScript.HiveWriterVersion.ORC_HIVE_8732; -import static io.prestosql.orc.metadata.PostScript.HiveWriterVersion.ORIGINAL; +import static io.trino.orc.metadata.OrcMetadataReader.findStringStatisticTruncationPositionForOriginalOrcWriter; +import static io.trino.orc.metadata.OrcMetadataReader.maxStringTruncateToValidRange; +import static io.trino.orc.metadata.OrcMetadataReader.minStringTruncateToValidRange; +import static io.trino.orc.metadata.PostScript.HiveWriterVersion.ORC_HIVE_8732; +import static io.trino.orc.metadata.PostScript.HiveWriterVersion.ORIGINAL; import static java.lang.Character.MAX_CODE_POINT; import static java.lang.Character.MAX_SURROGATE; import static java.lang.Character.MIN_CODE_POINT; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/AbstractStatisticsBuilderTest.java b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/AbstractStatisticsBuilderTest.java index 02ebda31dfb9..2a60f4366a7c 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/AbstractStatisticsBuilderTest.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/AbstractStatisticsBuilderTest.java @@ -25,7 +25,7 @@ import java.util.function.BiConsumer; import java.util.function.Supplier; -import static io.prestosql.orc.metadata.statistics.ColumnStatistics.mergeColumnStatistics; +import static io.trino.orc.metadata.statistics.ColumnStatistics.mergeColumnStatistics; import static java.lang.Math.min; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestBinaryStatisticsBuilder.java b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestBinaryStatisticsBuilder.java index c9ce26bb14aa..3268d4dbb480 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestBinaryStatisticsBuilder.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestBinaryStatisticsBuilder.java @@ -22,9 +22,9 @@ import static io.airlift.slice.Slices.EMPTY_SLICE; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.NONE; -import static io.prestosql.orc.metadata.statistics.BinaryStatistics.BINARY_VALUE_BYTES_OVERHEAD; -import static io.prestosql.orc.metadata.statistics.ColumnStatistics.mergeColumnStatistics; +import static io.trino.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.NONE; +import static io.trino.orc.metadata.statistics.BinaryStatistics.BINARY_VALUE_BYTES_OVERHEAD; +import static io.trino.orc.metadata.statistics.ColumnStatistics.mergeColumnStatistics; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestBooleanStatisticsBuilder.java b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestBooleanStatisticsBuilder.java index 2719d1c7bd1c..5e6a1755f2d7 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestBooleanStatisticsBuilder.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestBooleanStatisticsBuilder.java @@ -19,9 +19,9 @@ import java.util.ArrayList; import java.util.List; -import static io.prestosql.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.BOOLEAN; -import static io.prestosql.orc.metadata.statistics.BooleanStatistics.BOOLEAN_VALUE_BYTES; -import static io.prestosql.orc.metadata.statistics.ColumnStatistics.mergeColumnStatistics; +import static io.trino.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.BOOLEAN; +import static io.trino.orc.metadata.statistics.BooleanStatistics.BOOLEAN_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.ColumnStatistics.mergeColumnStatistics; import static org.testng.Assert.assertEquals; public class TestBooleanStatisticsBuilder diff --git a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestDateStatisticsBuilder.java b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestDateStatisticsBuilder.java index 0f165009aa6d..a8fbe87d0391 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestDateStatisticsBuilder.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestDateStatisticsBuilder.java @@ -19,8 +19,8 @@ import com.google.common.collect.Range; import org.testng.annotations.Test; -import static io.prestosql.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.DATE; -import static io.prestosql.orc.metadata.statistics.DateStatistics.DATE_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.DATE; +import static io.trino.orc.metadata.statistics.DateStatistics.DATE_VALUE_BYTES; import static java.lang.Integer.MAX_VALUE; import static java.lang.Integer.MIN_VALUE; import static org.testng.Assert.assertFalse; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestDecimalStatistics.java b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestDecimalStatistics.java index 1ee524a8e97b..bf2bd292163c 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestDecimalStatistics.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestDecimalStatistics.java @@ -20,7 +20,7 @@ import java.math.BigInteger; import static io.airlift.slice.SizeOf.sizeOf; -import static io.prestosql.orc.metadata.statistics.LongDecimalStatisticsBuilder.LONG_DECIMAL_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.LongDecimalStatisticsBuilder.LONG_DECIMAL_VALUE_BYTES; import static java.math.BigDecimal.ZERO; public class TestDecimalStatistics diff --git a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestDoubleStatisticsBuilder.java b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestDoubleStatisticsBuilder.java index 071ecec7bd2b..cece5b3a7d6b 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestDoubleStatisticsBuilder.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestDoubleStatisticsBuilder.java @@ -21,8 +21,8 @@ import java.util.stream.Stream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.DOUBLE; -import static io.prestosql.orc.metadata.statistics.DoubleStatistics.DOUBLE_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.DOUBLE; +import static io.trino.orc.metadata.statistics.DoubleStatistics.DOUBLE_VALUE_BYTES; import static java.lang.Double.NEGATIVE_INFINITY; import static java.lang.Double.NaN; import static java.lang.Double.POSITIVE_INFINITY; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestIntegerStatisticsBuilder.java b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestIntegerStatisticsBuilder.java index ecce58cb82d5..6bb7471ac208 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestIntegerStatisticsBuilder.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestIntegerStatisticsBuilder.java @@ -22,9 +22,9 @@ import java.util.ArrayList; import java.util.List; -import static io.prestosql.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.INTEGER; -import static io.prestosql.orc.metadata.statistics.ColumnStatistics.mergeColumnStatistics; -import static io.prestosql.orc.metadata.statistics.IntegerStatistics.INTEGER_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.INTEGER; +import static io.trino.orc.metadata.statistics.ColumnStatistics.mergeColumnStatistics; +import static io.trino.orc.metadata.statistics.IntegerStatistics.INTEGER_VALUE_BYTES; import static java.lang.Long.MAX_VALUE; import static java.lang.Long.MIN_VALUE; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestLongDecimalStatisticsBuilder.java b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestLongDecimalStatisticsBuilder.java index e3065fb84cb0..7d81c4a1578e 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestLongDecimalStatisticsBuilder.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestLongDecimalStatisticsBuilder.java @@ -24,9 +24,9 @@ import java.util.stream.Stream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.DECIMAL; -import static io.prestosql.orc.metadata.statistics.DecimalStatistics.DECIMAL_VALUE_BYTES_OVERHEAD; -import static io.prestosql.orc.metadata.statistics.LongDecimalStatisticsBuilder.LONG_DECIMAL_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.DECIMAL; +import static io.trino.orc.metadata.statistics.DecimalStatistics.DECIMAL_VALUE_BYTES_OVERHEAD; +import static io.trino.orc.metadata.statistics.LongDecimalStatisticsBuilder.LONG_DECIMAL_VALUE_BYTES; import static java.math.BigDecimal.ZERO; public class TestLongDecimalStatisticsBuilder diff --git a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestShortDecimalStatisticsBuilder.java b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestShortDecimalStatisticsBuilder.java index 729a398721b4..3109953cb166 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestShortDecimalStatisticsBuilder.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestShortDecimalStatisticsBuilder.java @@ -22,9 +22,9 @@ import java.math.BigDecimal; import java.math.BigInteger; -import static io.prestosql.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.DECIMAL; -import static io.prestosql.orc.metadata.statistics.DecimalStatistics.DECIMAL_VALUE_BYTES_OVERHEAD; -import static io.prestosql.orc.metadata.statistics.ShortDecimalStatisticsBuilder.SHORT_DECIMAL_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.DECIMAL; +import static io.trino.orc.metadata.statistics.DecimalStatistics.DECIMAL_VALUE_BYTES_OVERHEAD; +import static io.trino.orc.metadata.statistics.ShortDecimalStatisticsBuilder.SHORT_DECIMAL_VALUE_BYTES; import static java.lang.Long.MAX_VALUE; import static java.lang.Long.MIN_VALUE; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestStringStatisticsBuilder.java b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestStringStatisticsBuilder.java index 6d9c152acfec..50e115562f9d 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestStringStatisticsBuilder.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestStringStatisticsBuilder.java @@ -24,9 +24,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.Slices.EMPTY_SLICE; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.STRING; -import static io.prestosql.orc.metadata.statistics.ColumnStatistics.mergeColumnStatistics; -import static io.prestosql.orc.metadata.statistics.StringStatistics.STRING_VALUE_BYTES_OVERHEAD; +import static io.trino.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.STRING; +import static io.trino.orc.metadata.statistics.ColumnStatistics.mergeColumnStatistics; +import static io.trino.orc.metadata.statistics.StringStatistics.STRING_VALUE_BYTES_OVERHEAD; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestTimestampStatisticsBuilder.java b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestTimestampStatisticsBuilder.java index 27ce198c9357..9645ea7d24b8 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestTimestampStatisticsBuilder.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/metadata/statistics/TestTimestampStatisticsBuilder.java @@ -19,8 +19,8 @@ import com.google.common.collect.Range; import org.testng.annotations.Test; -import static io.prestosql.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.TIMESTAMP; -import static io.prestosql.orc.metadata.statistics.TimestampStatistics.TIMESTAMP_VALUE_BYTES; +import static io.trino.orc.metadata.statistics.AbstractStatisticsBuilderTest.StatisticsType.TIMESTAMP; +import static io.trino.orc.metadata.statistics.TimestampStatistics.TIMESTAMP_VALUE_BYTES; import static java.lang.Long.MAX_VALUE; import static java.lang.Long.MIN_VALUE; import static org.testng.Assert.assertFalse; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/AbstractTestValueStream.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/AbstractTestValueStream.java index e209132462b6..4f6a13f598e5 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/AbstractTestValueStream.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/AbstractTestValueStream.java @@ -15,12 +15,12 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.checkpoint.StreamCheckpoint; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.checkpoint.StreamCheckpoint; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; import java.io.IOException; import java.util.List; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/BenchmarkLongBitPacker.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/BenchmarkLongBitPacker.java index 233a0cb434f9..f4db50272cd2 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/BenchmarkLongBitPacker.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/BenchmarkLongBitPacker.java @@ -35,7 +35,7 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import static io.prestosql.orc.stream.TestingBitPackingUtils.unpackGeneric; +import static io.trino.orc.stream.TestingBitPackingUtils.unpackGeneric; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Thread) diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestBooleanOutputStream.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestBooleanOutputStream.java index eeac23a6508c..2e03c6389712 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestBooleanOutputStream.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestBooleanOutputStream.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcOutputBuffer; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.checkpoint.ByteStreamCheckpoint; +import io.trino.orc.OrcOutputBuffer; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.checkpoint.ByteStreamCheckpoint; import org.testng.annotations.Test; import java.util.List; -import static io.prestosql.orc.metadata.CompressionKind.NONE; +import static io.trino.orc.metadata.CompressionKind.NONE; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestBooleanStream.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestBooleanStream.java index 275ba637416a..7aaedd90e27e 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestBooleanStream.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestBooleanStream.java @@ -15,12 +15,12 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDecompressor; -import io.prestosql.orc.checkpoint.BooleanStreamCheckpoint; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.Stream; -import io.prestosql.orc.metadata.Stream.StreamKind; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDecompressor; +import io.trino.orc.checkpoint.BooleanStreamCheckpoint; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.Stream; +import io.trino.orc.metadata.Stream.StreamKind; import it.unimi.dsi.fastutil.booleans.BooleanArrayList; import it.unimi.dsi.fastutil.booleans.BooleanList; import org.testng.annotations.Test; @@ -31,9 +31,9 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcDecompressor.createOrcDecompressor; -import static io.prestosql.orc.metadata.CompressionKind.SNAPPY; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcDecompressor.createOrcDecompressor; +import static io.trino.orc.metadata.CompressionKind.SNAPPY; import static org.testng.Assert.assertEquals; public class TestBooleanStream diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestByteArrayStream.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestByteArrayStream.java index a832903d8c48..ffa54ec1c014 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestByteArrayStream.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestByteArrayStream.java @@ -16,9 +16,9 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDecompressor; -import io.prestosql.orc.checkpoint.ByteArrayStreamCheckpoint; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDecompressor; +import io.trino.orc.checkpoint.ByteArrayStreamCheckpoint; import org.testng.annotations.Test; import java.io.IOException; @@ -26,9 +26,9 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcDecompressor.createOrcDecompressor; -import static io.prestosql.orc.metadata.CompressionKind.SNAPPY; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcDecompressor.createOrcDecompressor; +import static io.trino.orc.metadata.CompressionKind.SNAPPY; public class TestByteArrayStream extends AbstractTestValueStream diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestByteStream.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestByteStream.java index 632d0d42b416..2306a981f1c7 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestByteStream.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestByteStream.java @@ -14,9 +14,9 @@ package io.trino.orc.stream; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDecompressor; -import io.prestosql.orc.checkpoint.ByteStreamCheckpoint; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDecompressor; +import io.trino.orc.checkpoint.ByteStreamCheckpoint; import org.testng.annotations.Test; import java.io.IOException; @@ -24,9 +24,9 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcDecompressor.createOrcDecompressor; -import static io.prestosql.orc.metadata.CompressionKind.SNAPPY; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcDecompressor.createOrcDecompressor; +import static io.trino.orc.metadata.CompressionKind.SNAPPY; public class TestByteStream extends AbstractTestValueStream diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestDecimalStream.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestDecimalStream.java index a42b189169d9..a9a8ed1413c6 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestDecimalStream.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestDecimalStream.java @@ -17,8 +17,8 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDataSourceId; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDataSourceId; import org.testng.annotations.Test; import java.io.ByteArrayOutputStream; @@ -29,10 +29,10 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.spi.type.Decimals.MAX_DECIMAL_UNSCALED_VALUE; -import static io.prestosql.spi.type.Decimals.MIN_DECIMAL_UNSCALED_VALUE; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToBigInteger; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.spi.type.Decimals.MAX_DECIMAL_UNSCALED_VALUE; +import static io.trino.spi.type.Decimals.MIN_DECIMAL_UNSCALED_VALUE; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimalToBigInteger; import static java.math.BigInteger.ONE; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestDoubleStream.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestDoubleStream.java index 6e6123580061..68aa2690b947 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestDoubleStream.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestDoubleStream.java @@ -14,9 +14,9 @@ package io.trino.orc.stream; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDecompressor; -import io.prestosql.orc.checkpoint.DoubleStreamCheckpoint; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDecompressor; +import io.trino.orc.checkpoint.DoubleStreamCheckpoint; import org.testng.annotations.Test; import java.io.IOException; @@ -24,9 +24,9 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcDecompressor.createOrcDecompressor; -import static io.prestosql.orc.metadata.CompressionKind.SNAPPY; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcDecompressor.createOrcDecompressor; +import static io.trino.orc.metadata.CompressionKind.SNAPPY; public class TestDoubleStream extends AbstractTestValueStream diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestFloatStream.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestFloatStream.java index 8ca5dbd4451d..d5b55f59d6d0 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestFloatStream.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestFloatStream.java @@ -14,9 +14,9 @@ package io.trino.orc.stream; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDecompressor; -import io.prestosql.orc.checkpoint.FloatStreamCheckpoint; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDecompressor; +import io.trino.orc.checkpoint.FloatStreamCheckpoint; import org.testng.annotations.Test; import java.io.IOException; @@ -24,9 +24,9 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcDecompressor.createOrcDecompressor; -import static io.prestosql.orc.metadata.CompressionKind.SNAPPY; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcDecompressor.createOrcDecompressor; +import static io.trino.orc.metadata.CompressionKind.SNAPPY; public class TestFloatStream extends AbstractTestValueStream diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongBitPacker.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongBitPacker.java index 7022f873edb9..208d0ee7c978 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongBitPacker.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongBitPacker.java @@ -19,7 +19,7 @@ import java.io.InputStream; import java.util.Random; -import static io.prestosql.orc.stream.TestingBitPackingUtils.unpackGeneric; +import static io.trino.orc.stream.TestingBitPackingUtils.unpackGeneric; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongDecimalStream.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongDecimalStream.java index f9695bf6397e..50cf0addb5b5 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongDecimalStream.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongDecimalStream.java @@ -15,9 +15,9 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDecompressor; -import io.prestosql.orc.checkpoint.DecimalStreamCheckpoint; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDecompressor; +import io.trino.orc.checkpoint.DecimalStreamCheckpoint; import org.testng.annotations.Test; import java.io.IOException; @@ -27,10 +27,10 @@ import java.util.Optional; import java.util.Random; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcDecompressor.createOrcDecompressor; -import static io.prestosql.orc.metadata.CompressionKind.SNAPPY; -import static io.prestosql.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcDecompressor.createOrcDecompressor; +import static io.trino.orc.metadata.CompressionKind.SNAPPY; +import static io.trino.spi.type.UnscaledDecimal128Arithmetic.unscaledDecimal; public class TestLongDecimalStream extends AbstractTestValueStream diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongDecode.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongDecode.java index 8574caa5e5df..4e88a40a540d 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongDecode.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongDecode.java @@ -16,7 +16,7 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.orc.OrcDataSourceId; +import io.trino.orc.OrcDataSourceId; import org.testng.annotations.Test; import java.io.EOFException; @@ -25,9 +25,9 @@ import java.io.OutputStream; import java.util.Optional; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.stream.LongDecode.readVInt; -import static io.prestosql.orc.stream.LongDecode.writeVLong; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.stream.LongDecode.readVInt; +import static io.trino.orc.stream.LongDecode.writeVLong; import static org.testng.Assert.assertEquals; public class TestLongDecode diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongStreamV1.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongStreamV1.java index 4abfa36358c4..5145f137b637 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongStreamV1.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongStreamV1.java @@ -14,9 +14,9 @@ package io.trino.orc.stream; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDecompressor; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDecompressor; +import io.trino.orc.checkpoint.LongStreamCheckpoint; import org.testng.annotations.Test; import java.io.IOException; @@ -25,10 +25,10 @@ import java.util.Optional; import java.util.Random; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcDecompressor.createOrcDecompressor; -import static io.prestosql.orc.metadata.CompressionKind.SNAPPY; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcDecompressor.createOrcDecompressor; +import static io.trino.orc.metadata.CompressionKind.SNAPPY; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; public class TestLongStreamV1 extends AbstractTestValueStream diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongStreamV2.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongStreamV2.java index c90e8301443d..0596ed8e8a56 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongStreamV2.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestLongStreamV2.java @@ -14,9 +14,9 @@ package io.trino.orc.stream; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDecompressor; -import io.prestosql.orc.checkpoint.LongStreamCheckpoint; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDecompressor; +import io.trino.orc.checkpoint.LongStreamCheckpoint; import org.testng.annotations.Test; import java.io.IOException; @@ -24,10 +24,10 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcDecompressor.createOrcDecompressor; -import static io.prestosql.orc.metadata.CompressionKind.SNAPPY; -import static io.prestosql.orc.metadata.Stream.StreamKind.DATA; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcDecompressor.createOrcDecompressor; +import static io.trino.orc.metadata.CompressionKind.SNAPPY; +import static io.trino.orc.metadata.Stream.StreamKind.DATA; public class TestLongStreamV2 extends AbstractTestValueStream diff --git a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestShortDecimalStream.java b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestShortDecimalStream.java index aa353eb921ff..49bca8d24f6e 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/stream/TestShortDecimalStream.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/stream/TestShortDecimalStream.java @@ -14,10 +14,10 @@ package io.trino.orc.stream; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDecompressor; -import io.prestosql.orc.checkpoint.DecimalStreamCheckpoint; -import io.prestosql.spi.type.Decimals; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDecompressor; +import io.trino.orc.checkpoint.DecimalStreamCheckpoint; +import io.trino.spi.type.Decimals; import org.testng.annotations.Test; import java.io.IOException; @@ -26,9 +26,9 @@ import java.util.Optional; import java.util.Random; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcDecompressor.createOrcDecompressor; -import static io.prestosql.orc.metadata.CompressionKind.SNAPPY; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcDecompressor.createOrcDecompressor; +import static io.trino.orc.metadata.CompressionKind.SNAPPY; public class TestShortDecimalStream extends AbstractTestValueStream diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/Field.java b/lib/trino-parquet/src/main/java/io/trino/parquet/Field.java index 58a6692d05c9..570939cd8a3e 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/Field.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/Field.java @@ -13,7 +13,7 @@ */ package io.trino.parquet; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/GroupField.java b/lib/trino-parquet/src/main/java/io/trino/parquet/GroupField.java index 5a2f47db6d3c..9a006d8adad2 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/GroupField.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/GroupField.java @@ -14,7 +14,7 @@ package io.trino.parquet; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; import java.util.Optional; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetEncoding.java b/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetEncoding.java index 899fa802818c..341e4def602a 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetEncoding.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetEncoding.java @@ -13,13 +13,13 @@ */ package io.trino.parquet; -import io.prestosql.parquet.dictionary.BinaryDictionary; -import io.prestosql.parquet.dictionary.Dictionary; -import io.prestosql.parquet.dictionary.DictionaryReader; -import io.prestosql.parquet.dictionary.DoubleDictionary; -import io.prestosql.parquet.dictionary.FloatDictionary; -import io.prestosql.parquet.dictionary.IntegerDictionary; -import io.prestosql.parquet.dictionary.LongDictionary; +import io.trino.parquet.dictionary.BinaryDictionary; +import io.trino.parquet.dictionary.Dictionary; +import io.trino.parquet.dictionary.DictionaryReader; +import io.trino.parquet.dictionary.DoubleDictionary; +import io.trino.parquet.dictionary.FloatDictionary; +import io.trino.parquet.dictionary.IntegerDictionary; +import io.trino.parquet.dictionary.LongDictionary; import org.apache.parquet.bytes.BytesUtils; import org.apache.parquet.column.ColumnDescriptor; import org.apache.parquet.column.values.ValuesReader; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetTimestampUtils.java b/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetTimestampUtils.java index 41b16c5ac2b0..dddda2a748b0 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetTimestampUtils.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetTimestampUtils.java @@ -16,15 +16,15 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; -import io.prestosql.plugin.base.type.DecodedTimestamp; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.base.type.DecodedTimestamp; +import io.trino.spi.PrestoException; import org.apache.parquet.io.api.Binary; import static com.google.common.base.Verify.verify; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_DAY; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.SECONDS_PER_DAY; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_DAY; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.SECONDS_PER_DAY; /** * Utility class for decoding INT96 encoded parquet timestamp to timestamp millis in GMT. diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetTypeUtils.java b/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetTypeUtils.java index 968edf88a3fd..30736c938930 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetTypeUtils.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/ParquetTypeUtils.java @@ -13,7 +13,7 @@ */ package io.trino.parquet; -import io.prestosql.spi.type.DecimalType; +import io.trino.spi.type.DecimalType; import org.apache.parquet.column.Encoding; import org.apache.parquet.io.ColumnIO; import org.apache.parquet.io.ColumnIOFactory; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/PrimitiveField.java b/lib/trino-parquet/src/main/java/io/trino/parquet/PrimitiveField.java index 79e7ee3d1c3b..1ebfd661061b 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/PrimitiveField.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/PrimitiveField.java @@ -13,7 +13,7 @@ */ package io.trino.parquet; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import static com.google.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/BinaryDictionary.java b/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/BinaryDictionary.java index 18fafa1606a8..83153e39bd23 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/BinaryDictionary.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/BinaryDictionary.java @@ -14,7 +14,7 @@ package io.trino.parquet.dictionary; import io.airlift.slice.Slice; -import io.prestosql.parquet.DictionaryPage; +import io.trino.parquet.DictionaryPage; import org.apache.parquet.io.api.Binary; import java.io.IOException; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/Dictionary.java b/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/Dictionary.java index a1f239b5d61a..1293df7d520c 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/Dictionary.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/Dictionary.java @@ -13,7 +13,7 @@ */ package io.trino.parquet.dictionary; -import io.prestosql.parquet.ParquetEncoding; +import io.trino.parquet.ParquetEncoding; import org.apache.parquet.io.api.Binary; import static com.google.common.base.Preconditions.checkArgument; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/DoubleDictionary.java b/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/DoubleDictionary.java index 63aca67a8682..45591bbe5f7b 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/DoubleDictionary.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/DoubleDictionary.java @@ -13,13 +13,13 @@ */ package io.trino.parquet.dictionary; -import io.prestosql.parquet.DictionaryPage; +import io.trino.parquet.DictionaryPage; import org.apache.parquet.column.values.plain.PlainValuesReader.DoublePlainValuesReader; import java.io.IOException; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.parquet.ParquetReaderUtils.toInputStream; +import static io.trino.parquet.ParquetReaderUtils.toInputStream; public class DoubleDictionary extends Dictionary diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/FloatDictionary.java b/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/FloatDictionary.java index 8d4bcd557d6e..712808fa8a0d 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/FloatDictionary.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/FloatDictionary.java @@ -13,13 +13,13 @@ */ package io.trino.parquet.dictionary; -import io.prestosql.parquet.DictionaryPage; +import io.trino.parquet.DictionaryPage; import org.apache.parquet.column.values.plain.PlainValuesReader.FloatPlainValuesReader; import java.io.IOException; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.parquet.ParquetReaderUtils.toInputStream; +import static io.trino.parquet.ParquetReaderUtils.toInputStream; public class FloatDictionary extends Dictionary diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/IntegerDictionary.java b/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/IntegerDictionary.java index 5ef11bc72bd4..db59b362cb79 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/IntegerDictionary.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/IntegerDictionary.java @@ -13,13 +13,13 @@ */ package io.trino.parquet.dictionary; -import io.prestosql.parquet.DictionaryPage; +import io.trino.parquet.DictionaryPage; import org.apache.parquet.column.values.plain.PlainValuesReader.IntegerPlainValuesReader; import java.io.IOException; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.parquet.ParquetReaderUtils.toInputStream; +import static io.trino.parquet.ParquetReaderUtils.toInputStream; public class IntegerDictionary extends Dictionary diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/LongDictionary.java b/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/LongDictionary.java index e5370baf9a91..d998f63b082a 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/LongDictionary.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/dictionary/LongDictionary.java @@ -13,13 +13,13 @@ */ package io.trino.parquet.dictionary; -import io.prestosql.parquet.DictionaryPage; +import io.trino.parquet.DictionaryPage; import org.apache.parquet.column.values.plain.PlainValuesReader.LongPlainValuesReader; import java.io.IOException; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.parquet.ParquetReaderUtils.toInputStream; +import static io.trino.parquet.ParquetReaderUtils.toInputStream; public class LongDictionary extends Dictionary diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/DictionaryDescriptor.java b/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/DictionaryDescriptor.java index 81dbf97f35c0..6c1d00042d59 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/DictionaryDescriptor.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/DictionaryDescriptor.java @@ -13,7 +13,7 @@ */ package io.trino.parquet.predicate; -import io.prestosql.parquet.DictionaryPage; +import io.trino.parquet.DictionaryPage; import org.apache.parquet.column.ColumnDescriptor; import java.util.Optional; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/Predicate.java b/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/Predicate.java index b15425f650c6..bc5c182bcd3b 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/Predicate.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/Predicate.java @@ -13,8 +13,8 @@ */ package io.trino.parquet.predicate; -import io.prestosql.parquet.ParquetCorruptionException; -import io.prestosql.parquet.ParquetDataSourceId; +import io.trino.parquet.ParquetCorruptionException; +import io.trino.parquet.ParquetDataSourceId; import org.apache.parquet.column.ColumnDescriptor; import org.apache.parquet.column.statistics.Statistics; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/PredicateUtils.java b/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/PredicateUtils.java index eab35c81fb18..c8489ae91ae2 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/PredicateUtils.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/PredicateUtils.java @@ -20,14 +20,14 @@ import com.google.common.collect.Sets; import io.airlift.slice.Slice; import io.airlift.slice.SliceInput; -import io.prestosql.parquet.DictionaryPage; -import io.prestosql.parquet.ParquetCorruptionException; -import io.prestosql.parquet.ParquetDataSource; -import io.prestosql.parquet.ParquetEncoding; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; +import io.trino.parquet.DictionaryPage; +import io.trino.parquet.ParquetCorruptionException; +import io.trino.parquet.ParquetDataSource; +import io.trino.parquet.ParquetEncoding; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; import org.apache.parquet.column.ColumnDescriptor; import org.apache.parquet.column.Encoding; import org.apache.parquet.column.EncodingStats; @@ -51,12 +51,12 @@ import java.util.Set; import static com.google.common.base.Verify.verify; -import static io.prestosql.parquet.ParquetCompressionUtils.decompress; -import static io.prestosql.parquet.ParquetTypeUtils.getParquetEncoding; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.parquet.ParquetCompressionUtils.decompress; +import static io.trino.parquet.ParquetTypeUtils.getParquetEncoding; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static org.apache.parquet.column.Encoding.BIT_PACKED; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/TupleDomainParquetPredicate.java b/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/TupleDomainParquetPredicate.java index 4ecde01fcef5..c34617997f60 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/TupleDomainParquetPredicate.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/predicate/TupleDomainParquetPredicate.java @@ -18,19 +18,19 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.parquet.DictionaryPage; -import io.prestosql.parquet.ParquetCorruptionException; -import io.prestosql.parquet.ParquetDataSourceId; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.parquet.dictionary.Dictionary; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.parquet.DictionaryPage; +import io.trino.parquet.ParquetCorruptionException; +import io.trino.parquet.ParquetDataSourceId; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.parquet.dictionary.Dictionary; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.parquet.column.ColumnDescriptor; import org.apache.parquet.column.statistics.BinaryStatistics; import org.apache.parquet.column.statistics.BooleanStatistics; @@ -49,18 +49,18 @@ import java.util.Optional; import java.util.function.Function; -import static io.prestosql.parquet.ParquetTimestampUtils.decode; -import static io.prestosql.parquet.predicate.PredicateUtils.isStatisticsOverflow; -import static io.prestosql.plugin.base.type.PrestoTimestampEncoderFactory.createTimestampEncoder; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.parquet.ParquetTimestampUtils.decode; +import static io.trino.parquet.predicate.PredicateUtils.isStatisticsOverflow; +import static io.trino.plugin.base.type.PrestoTimestampEncoderFactory.createTimestampEncoder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Float.floatToRawIntBits; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/BinaryColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/BinaryColumnReader.java index 339f376508de..f5c33438c1af 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/BinaryColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/BinaryColumnReader.java @@ -14,17 +14,17 @@ package io.trino.parquet.reader; import io.airlift.slice.Slice; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.CharType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.parquet.io.api.Binary; import static io.airlift.slice.Slices.EMPTY_SLICE; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.spi.type.Chars.truncateToLengthAndTrimSpaces; -import static io.prestosql.spi.type.Varchars.truncateToLength; +import static io.trino.spi.type.Chars.truncateToLengthAndTrimSpaces; +import static io.trino.spi.type.Varchars.truncateToLength; public class BinaryColumnReader extends PrimitiveColumnReader diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/BooleanColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/BooleanColumnReader.java index 25218598878f..99d5e40fc6e8 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/BooleanColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/BooleanColumnReader.java @@ -13,9 +13,9 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public class BooleanColumnReader extends PrimitiveColumnReader diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ColumnChunk.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ColumnChunk.java index 33fbb2562de5..0d15b3a1461f 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ColumnChunk.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ColumnChunk.java @@ -13,7 +13,7 @@ */ package io.trino.parquet.reader; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/DecimalColumnReaderFactory.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/DecimalColumnReaderFactory.java index f20f84c14108..c56ad0986362 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/DecimalColumnReaderFactory.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/DecimalColumnReaderFactory.java @@ -13,8 +13,8 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.type.DecimalType; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.type.DecimalType; public final class DecimalColumnReaderFactory { diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/DoubleColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/DoubleColumnReader.java index c08338516bd2..c7bcc9a405f1 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/DoubleColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/DoubleColumnReader.java @@ -13,9 +13,9 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public class DoubleColumnReader extends PrimitiveColumnReader diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/FloatColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/FloatColumnReader.java index 18585bccc850..98dcc2b66e3e 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/FloatColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/FloatColumnReader.java @@ -13,9 +13,9 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import static java.lang.Float.floatToRawIntBits; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/Int64TimestampMillisColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/Int64TimestampMillisColumnReader.java index 2f6e2b30a3cc..f7716c4e0d32 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/Int64TimestampMillisColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/Int64TimestampMillisColumnReader.java @@ -13,14 +13,14 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; public class Int64TimestampMillisColumnReader extends PrimitiveColumnReader diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/IntColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/IntColumnReader.java index 1bdfc86404f1..4f83c1a423b8 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/IntColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/IntColumnReader.java @@ -13,9 +13,9 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public class IntColumnReader extends PrimitiveColumnReader diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ListColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ListColumnReader.java index a8a264d5a866..592bf304bfc8 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ListColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ListColumnReader.java @@ -13,8 +13,8 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.Field; -import io.prestosql.parquet.ParquetTypeUtils; +import io.trino.parquet.Field; +import io.trino.parquet.ParquetTypeUtils; import it.unimi.dsi.fastutil.booleans.BooleanList; import it.unimi.dsi.fastutil.ints.IntList; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/LongColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/LongColumnReader.java index c1cf02069687..b97f92f8d2c5 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/LongColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/LongColumnReader.java @@ -13,9 +13,9 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public class LongColumnReader extends PrimitiveColumnReader diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/LongDecimalColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/LongDecimalColumnReader.java index 15532fbc01be..73f982160a7a 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/LongDecimalColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/LongDecimalColumnReader.java @@ -14,18 +14,18 @@ package io.trino.parquet.reader; import io.airlift.slice.Slice; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; import org.apache.parquet.io.ParquetDecodingException; import org.apache.parquet.io.api.Binary; import java.math.BigInteger; -import static io.prestosql.spi.type.DecimalConversions.longToLongCast; -import static io.prestosql.spi.type.DecimalConversions.longToShortCast; +import static io.trino.spi.type.DecimalConversions.longToLongCast; +import static io.trino.spi.type.DecimalConversions.longToShortCast; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/MetadataReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/MetadataReader.java index 67dffc2f8c78..18049143c60b 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/MetadataReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/MetadataReader.java @@ -15,7 +15,7 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.parquet.ParquetDataSource; +import io.trino.parquet.ParquetDataSource; import org.apache.parquet.CorruptStatistics; import org.apache.parquet.column.statistics.BinaryStatistics; import org.apache.parquet.format.ColumnChunk; @@ -54,7 +54,7 @@ import java.util.Optional; import java.util.Set; -import static io.prestosql.parquet.ParquetValidationUtils.validateParquet; +import static io.trino.parquet.ParquetValidationUtils.validateParquet; import static java.lang.Boolean.FALSE; import static java.lang.Boolean.TRUE; import static java.lang.Math.min; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/PageReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/PageReader.java index 49a321e9dbec..c7f6ab6e5108 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/PageReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/PageReader.java @@ -13,17 +13,17 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.DataPage; -import io.prestosql.parquet.DataPageV1; -import io.prestosql.parquet.DataPageV2; -import io.prestosql.parquet.DictionaryPage; +import io.trino.parquet.DataPage; +import io.trino.parquet.DataPageV1; +import io.trino.parquet.DataPageV2; +import io.trino.parquet.DictionaryPage; import org.apache.parquet.hadoop.metadata.CompressionCodecName; import java.io.IOException; import java.util.LinkedList; import java.util.List; -import static io.prestosql.parquet.ParquetCompressionUtils.decompress; +import static io.trino.parquet.ParquetCompressionUtils.decompress; class PageReader { diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ParquetColumnChunk.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ParquetColumnChunk.java index fa78e2bccc90..770a8a679861 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ParquetColumnChunk.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ParquetColumnChunk.java @@ -15,11 +15,11 @@ import io.airlift.slice.BasicSliceInput; import io.airlift.slice.Slice; -import io.prestosql.parquet.DataPage; -import io.prestosql.parquet.DataPageV1; -import io.prestosql.parquet.DataPageV2; -import io.prestosql.parquet.DictionaryPage; -import io.prestosql.parquet.ParquetCorruptionException; +import io.trino.parquet.DataPage; +import io.trino.parquet.DataPageV1; +import io.trino.parquet.DataPageV2; +import io.trino.parquet.DictionaryPage; +import io.trino.parquet.ParquetCorruptionException; import org.apache.parquet.column.Encoding; import org.apache.parquet.format.DataPageHeader; import org.apache.parquet.format.DataPageHeaderV2; @@ -32,7 +32,7 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.parquet.ParquetTypeUtils.getParquetEncoding; +import static io.trino.parquet.ParquetTypeUtils.getParquetEncoding; import static java.util.Objects.requireNonNull; public class ParquetColumnChunk diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ParquetReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ParquetReader.java index a5381f7f883b..5e7b4fe5ad7b 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ParquetReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ParquetReader.java @@ -14,26 +14,26 @@ package io.trino.parquet.reader; import io.airlift.slice.Slice; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.parquet.ChunkKey; -import io.prestosql.parquet.ChunkReader; -import io.prestosql.parquet.DiskRange; -import io.prestosql.parquet.Field; -import io.prestosql.parquet.GroupField; -import io.prestosql.parquet.ParquetCorruptionException; -import io.prestosql.parquet.ParquetDataSource; -import io.prestosql.parquet.ParquetReaderOptions; -import io.prestosql.parquet.PrimitiveField; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.block.ArrayBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.RowBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.parquet.ChunkKey; +import io.trino.parquet.ChunkReader; +import io.trino.parquet.DiskRange; +import io.trino.parquet.Field; +import io.trino.parquet.GroupField; +import io.trino.parquet.ParquetCorruptionException; +import io.trino.parquet.ParquetDataSource; +import io.trino.parquet.ParquetReaderOptions; +import io.trino.parquet.PrimitiveField; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.block.ArrayBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.RowBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; import it.unimi.dsi.fastutil.booleans.BooleanArrayList; import it.unimi.dsi.fastutil.booleans.BooleanList; import it.unimi.dsi.fastutil.ints.IntArrayList; @@ -55,8 +55,8 @@ import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.parquet.ParquetValidationUtils.validateParquet; -import static io.prestosql.parquet.reader.ListColumnReader.calculateCollectionOffsets; +import static io.trino.parquet.ParquetValidationUtils.validateParquet; +import static io.trino.parquet.reader.ListColumnReader.calculateCollectionOffsets; import static java.lang.Math.max; import static java.lang.Math.min; import static java.lang.Math.toIntExact; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/PrimitiveColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/PrimitiveColumnReader.java index a7738cf5b9c8..cbd9ff4a45e9 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/PrimitiveColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/PrimitiveColumnReader.java @@ -14,18 +14,18 @@ package io.trino.parquet.reader; import io.airlift.slice.Slice; -import io.prestosql.parquet.DataPage; -import io.prestosql.parquet.DataPageV1; -import io.prestosql.parquet.DataPageV2; -import io.prestosql.parquet.DictionaryPage; -import io.prestosql.parquet.Field; -import io.prestosql.parquet.ParquetEncoding; -import io.prestosql.parquet.ParquetTypeUtils; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.parquet.dictionary.Dictionary; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.parquet.DataPage; +import io.trino.parquet.DataPageV1; +import io.trino.parquet.DataPageV2; +import io.trino.parquet.DictionaryPage; +import io.trino.parquet.Field; +import io.trino.parquet.ParquetEncoding; +import io.trino.parquet.ParquetTypeUtils; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.parquet.dictionary.Dictionary; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntList; import org.apache.parquet.bytes.ByteBufferInputStream; @@ -41,12 +41,12 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Verify.verify; -import static io.prestosql.parquet.ParquetReaderUtils.toInputStream; -import static io.prestosql.parquet.ParquetTypeUtils.createDecimalType; -import static io.prestosql.parquet.ValuesType.DEFINITION_LEVEL; -import static io.prestosql.parquet.ValuesType.REPETITION_LEVEL; -import static io.prestosql.parquet.ValuesType.VALUES; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.parquet.ParquetReaderUtils.toInputStream; +import static io.trino.parquet.ParquetTypeUtils.createDecimalType; +import static io.trino.parquet.ValuesType.DEFINITION_LEVEL; +import static io.trino.parquet.ValuesType.REPETITION_LEVEL; +import static io.trino.parquet.ValuesType.VALUES; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.util.Objects.requireNonNull; public abstract class PrimitiveColumnReader diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ShortDecimalColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ShortDecimalColumnReader.java index 999e426d8f50..04afd080a9dc 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ShortDecimalColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/ShortDecimalColumnReader.java @@ -13,24 +13,24 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; import org.apache.parquet.io.ParquetDecodingException; -import static io.prestosql.parquet.ParquetTypeUtils.getShortDecimalValue; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DecimalConversions.shortToLongCast; -import static io.prestosql.spi.type.DecimalConversions.shortToShortCast; -import static io.prestosql.spi.type.Decimals.isLongDecimal; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.Decimals.longTenToNth; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.parquet.ParquetTypeUtils.getShortDecimalValue; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DecimalConversions.shortToLongCast; +import static io.trino.spi.type.DecimalConversions.shortToShortCast; +import static io.trino.spi.type.Decimals.isLongDecimal; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.Decimals.longTenToNth; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName.INT32; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/StructColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/StructColumnReader.java index 8073d1bf7237..77d1e82d4b8d 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/StructColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/StructColumnReader.java @@ -13,11 +13,11 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.Field; +import io.trino.parquet.Field; import it.unimi.dsi.fastutil.booleans.BooleanArrayList; import it.unimi.dsi.fastutil.booleans.BooleanList; -import static io.prestosql.parquet.ParquetTypeUtils.isValueNull; +import static io.trino.parquet.ParquetTypeUtils.isValueNull; public final class StructColumnReader { diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/TimeMicrosColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/TimeMicrosColumnReader.java index 7814b085dbf8..b85d93b01e9b 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/TimeMicrosColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/TimeMicrosColumnReader.java @@ -13,10 +13,10 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Timestamps; -import io.prestosql.spi.type.Type; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Timestamps; +import io.trino.spi.type.Type; public class TimeMicrosColumnReader extends PrimitiveColumnReader diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/TimestampColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/TimestampColumnReader.java index f8d5f4b1f7fe..a9423403eed8 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/TimestampColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/TimestampColumnReader.java @@ -13,21 +13,21 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.plugin.base.type.DecodedTimestamp; -import io.prestosql.plugin.base.type.PrestoTimestampEncoder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.plugin.base.type.DecodedTimestamp; +import io.trino.plugin.base.type.PrestoTimestampEncoder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; import org.joda.time.DateTimeZone; -import static io.prestosql.parquet.ParquetTimestampUtils.decode; -import static io.prestosql.plugin.base.type.PrestoTimestampEncoderFactory.createTimestampEncoder; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.Timestamps.MILLISECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; +import static io.trino.parquet.ParquetTimestampUtils.decode; +import static io.trino.plugin.base.type.PrestoTimestampEncoderFactory.createTimestampEncoder; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.Timestamps.MILLISECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; import static java.util.Objects.requireNonNull; public class TimestampColumnReader diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/TimestampMicrosColumnReader.java b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/TimestampMicrosColumnReader.java index e138dacc5cba..e1880536be05 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/reader/TimestampMicrosColumnReader.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/reader/TimestampMicrosColumnReader.java @@ -13,23 +13,23 @@ */ package io.trino.parquet.reader; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.Timestamps; -import io.prestosql.spi.type.Type; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.Timestamps; +import io.trino.spi.type.Type; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_NANOS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_NANOS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_NANOS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; import static java.lang.Math.floorDiv; import static java.lang.Math.toIntExact; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ArrayColumnWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ArrayColumnWriter.java index a34500d2afaf..275540dea9fe 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ArrayColumnWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ArrayColumnWriter.java @@ -14,11 +14,11 @@ package io.trino.parquet.writer; import com.google.common.collect.ImmutableList; -import io.prestosql.parquet.writer.repdef.DefLevelIterable; -import io.prestosql.parquet.writer.repdef.DefLevelIterables; -import io.prestosql.parquet.writer.repdef.RepLevelIterable; -import io.prestosql.parquet.writer.repdef.RepLevelIterables; -import io.prestosql.spi.block.ColumnarArray; +import io.trino.parquet.writer.repdef.DefLevelIterable; +import io.trino.parquet.writer.repdef.DefLevelIterables; +import io.trino.parquet.writer.repdef.RepLevelIterable; +import io.trino.parquet.writer.repdef.RepLevelIterables; +import io.trino.spi.block.ColumnarArray; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ColumnChunk.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ColumnChunk.java index d24c82cf629a..463e68028864 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ColumnChunk.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ColumnChunk.java @@ -14,9 +14,9 @@ package io.trino.parquet.writer; import com.google.common.collect.ImmutableList; -import io.prestosql.parquet.writer.repdef.DefLevelIterable; -import io.prestosql.parquet.writer.repdef.RepLevelIterable; -import io.prestosql.spi.block.Block; +import io.trino.parquet.writer.repdef.DefLevelIterable; +import io.trino.parquet.writer.repdef.RepLevelIterable; +import io.trino.spi.block.Block; import java.util.List; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/MapColumnWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/MapColumnWriter.java index cdc6f9e87ab2..016bb00c04f8 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/MapColumnWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/MapColumnWriter.java @@ -14,11 +14,11 @@ package io.trino.parquet.writer; import com.google.common.collect.ImmutableList; -import io.prestosql.parquet.writer.repdef.DefLevelIterable; -import io.prestosql.parquet.writer.repdef.DefLevelIterables; -import io.prestosql.parquet.writer.repdef.RepLevelIterable; -import io.prestosql.parquet.writer.repdef.RepLevelIterables; -import io.prestosql.spi.block.ColumnarMap; +import io.trino.parquet.writer.repdef.DefLevelIterable; +import io.trino.parquet.writer.repdef.DefLevelIterables; +import io.trino.parquet.writer.repdef.RepLevelIterable; +import io.trino.parquet.writer.repdef.RepLevelIterables; +import io.trino.spi.block.ColumnarMap; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetCompressor.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetCompressor.java index d325c500e90b..35533dc3c701 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetCompressor.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetCompressor.java @@ -24,7 +24,7 @@ import java.io.IOException; import java.util.zip.GZIPOutputStream; -import static io.prestosql.parquet.writer.ParquetDataOutput.createDataOutput; +import static io.trino.parquet.writer.ParquetDataOutput.createDataOutput; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetSchemaConverter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetSchemaConverter.java index ba59e14a9899..66477765e830 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetSchemaConverter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetSchemaConverter.java @@ -14,17 +14,17 @@ package io.trino.parquet.writer; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.parquet.schema.GroupType; import org.apache.parquet.schema.MessageType; import org.apache.parquet.schema.OriginalType; @@ -36,17 +36,17 @@ import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.StandardTypes.ARRAY; -import static io.prestosql.spi.type.StandardTypes.MAP; -import static io.prestosql.spi.type.StandardTypes.ROW; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.StandardTypes.ARRAY; +import static io.trino.spi.type.StandardTypes.MAP; +import static io.trino.spi.type.StandardTypes.ROW; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.apache.parquet.schema.OriginalType.TIMESTAMP_MICROS; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetWriter.java index 06de6604cc46..68b82467a9b2 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetWriter.java @@ -19,9 +19,9 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.parquet.writer.ColumnWriter.BufferData; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; +import io.trino.parquet.writer.ColumnWriter.BufferData; +import io.trino.spi.Page; +import io.trino.spi.type.Type; import org.apache.parquet.column.ParquetProperties; import org.apache.parquet.format.ColumnMetaData; import org.apache.parquet.format.FileMetaData; @@ -43,7 +43,7 @@ import static io.airlift.slice.SizeOf.SIZE_OF_INT; import static io.airlift.slice.Slices.wrappedBuffer; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.parquet.writer.ParquetDataOutput.createDataOutput; +import static io.trino.parquet.writer.ParquetDataOutput.createDataOutput; import static java.lang.Math.max; import static java.lang.Math.min; import static java.lang.Math.toIntExact; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetWriters.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetWriters.java index 75da4e95f66e..453d3b6fadb9 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetWriters.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/ParquetWriters.java @@ -14,25 +14,25 @@ package io.trino.parquet.writer; import com.google.common.collect.ImmutableList; -import io.prestosql.parquet.writer.valuewriter.BigintValueWriter; -import io.prestosql.parquet.writer.valuewriter.BooleanValueWriter; -import io.prestosql.parquet.writer.valuewriter.CharValueWriter; -import io.prestosql.parquet.writer.valuewriter.DateValueWriter; -import io.prestosql.parquet.writer.valuewriter.DecimalValueWriter; -import io.prestosql.parquet.writer.valuewriter.DoubleValueWriter; -import io.prestosql.parquet.writer.valuewriter.IntegerValueWriter; -import io.prestosql.parquet.writer.valuewriter.PrimitiveValueWriter; -import io.prestosql.parquet.writer.valuewriter.RealValueWriter; -import io.prestosql.parquet.writer.valuewriter.TimeMicrosValueWriter; -import io.prestosql.parquet.writer.valuewriter.TimestampMillisValueWriter; -import io.prestosql.parquet.writer.valuewriter.TimestampTzMicrosValueWriter; -import io.prestosql.parquet.writer.valuewriter.TimestampTzMillisValueWriter; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.parquet.writer.valuewriter.BigintValueWriter; +import io.trino.parquet.writer.valuewriter.BooleanValueWriter; +import io.trino.parquet.writer.valuewriter.CharValueWriter; +import io.trino.parquet.writer.valuewriter.DateValueWriter; +import io.trino.parquet.writer.valuewriter.DecimalValueWriter; +import io.trino.parquet.writer.valuewriter.DoubleValueWriter; +import io.trino.parquet.writer.valuewriter.IntegerValueWriter; +import io.trino.parquet.writer.valuewriter.PrimitiveValueWriter; +import io.trino.parquet.writer.valuewriter.RealValueWriter; +import io.trino.parquet.writer.valuewriter.TimeMicrosValueWriter; +import io.trino.parquet.writer.valuewriter.TimestampMillisValueWriter; +import io.trino.parquet.writer.valuewriter.TimestampTzMicrosValueWriter; +import io.trino.parquet.writer.valuewriter.TimestampTzMillisValueWriter; +import io.trino.spi.PrestoException; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.parquet.column.ColumnDescriptor; import org.apache.parquet.column.ParquetProperties; import org.apache.parquet.column.values.ValuesWriter; @@ -47,20 +47,20 @@ import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/PrimitiveColumnWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/PrimitiveColumnWriter.java index ec5342377858..5c58a1694c34 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/PrimitiveColumnWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/PrimitiveColumnWriter.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.parquet.writer.repdef.DefLevelIterable; -import io.prestosql.parquet.writer.repdef.DefLevelIterables; -import io.prestosql.parquet.writer.repdef.RepLevelIterable; -import io.prestosql.parquet.writer.repdef.RepLevelIterables; -import io.prestosql.parquet.writer.valuewriter.PrimitiveValueWriter; +import io.trino.parquet.writer.repdef.DefLevelIterable; +import io.trino.parquet.writer.repdef.DefLevelIterables; +import io.trino.parquet.writer.repdef.RepLevelIterable; +import io.trino.parquet.writer.repdef.RepLevelIterables; +import io.trino.parquet.writer.valuewriter.PrimitiveValueWriter; import org.apache.parquet.bytes.BytesInput; import org.apache.parquet.column.ColumnDescriptor; import org.apache.parquet.column.Encoding; @@ -43,9 +43,9 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.parquet.writer.ParquetCompressor.getCompressor; -import static io.prestosql.parquet.writer.ParquetDataOutput.createDataOutput; -import static io.prestosql.parquet.writer.repdef.RepLevelIterables.getIterator; +import static io.trino.parquet.writer.ParquetCompressor.getCompressor; +import static io.trino.parquet.writer.ParquetDataOutput.createDataOutput; +import static io.trino.parquet.writer.repdef.RepLevelIterables.getIterator; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; import static org.apache.parquet.bytes.BytesInput.copy; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/StructColumnWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/StructColumnWriter.java index 82213a4171aa..53860c85679e 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/StructColumnWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/StructColumnWriter.java @@ -14,18 +14,18 @@ package io.trino.parquet.writer; import com.google.common.collect.ImmutableList; -import io.prestosql.parquet.writer.repdef.DefLevelIterable; -import io.prestosql.parquet.writer.repdef.DefLevelIterables; -import io.prestosql.parquet.writer.repdef.RepLevelIterable; -import io.prestosql.parquet.writer.repdef.RepLevelIterables; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ColumnarRow; +import io.trino.parquet.writer.repdef.DefLevelIterable; +import io.trino.parquet.writer.repdef.DefLevelIterables; +import io.trino.parquet.writer.repdef.RepLevelIterable; +import io.trino.parquet.writer.repdef.RepLevelIterables; +import io.trino.spi.block.Block; +import io.trino.spi.block.ColumnarRow; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; import java.util.List; -import static io.prestosql.spi.block.ColumnarRow.toColumnarRow; +import static io.trino.spi.block.ColumnarRow.toColumnarRow; import static java.util.Objects.requireNonNull; import static org.apache.parquet.Preconditions.checkArgument; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/repdef/DefLevelIterables.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/repdef/DefLevelIterables.java index 3bb6d45e1aae..3710a43c9307 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/repdef/DefLevelIterables.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/repdef/DefLevelIterables.java @@ -14,11 +14,11 @@ package io.trino.parquet.writer.repdef; import com.google.common.collect.AbstractIterator; -import io.prestosql.parquet.writer.repdef.DefLevelIterable.DefLevelIterator; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ColumnarArray; -import io.prestosql.spi.block.ColumnarMap; -import io.prestosql.spi.block.ColumnarRow; +import io.trino.parquet.writer.repdef.DefLevelIterable.DefLevelIterator; +import io.trino.spi.block.Block; +import io.trino.spi.block.ColumnarArray; +import io.trino.spi.block.ColumnarMap; +import io.trino.spi.block.ColumnarRow; import java.util.Iterator; import java.util.List; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/repdef/RepLevelIterables.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/repdef/RepLevelIterables.java index 5cc82c941cc6..921628922adc 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/repdef/RepLevelIterables.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/repdef/RepLevelIterables.java @@ -14,11 +14,11 @@ package io.trino.parquet.writer.repdef; import com.google.common.collect.AbstractIterator; -import io.prestosql.parquet.writer.repdef.RepLevelIterable.RepValueIterator; -import io.prestosql.parquet.writer.repdef.RepLevelIterable.RepetitionLevel; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ColumnarArray; -import io.prestosql.spi.block.ColumnarMap; +import io.trino.parquet.writer.repdef.RepLevelIterable.RepValueIterator; +import io.trino.parquet.writer.repdef.RepLevelIterable.RepetitionLevel; +import io.trino.spi.block.Block; +import io.trino.spi.block.ColumnarArray; +import io.trino.spi.block.ColumnarMap; import java.util.Iterator; import java.util.List; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/BigintValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/BigintValueWriter.java index 4a5b9f95f01c..59a6653b2264 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/BigintValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/BigintValueWriter.java @@ -13,8 +13,8 @@ */ package io.trino.parquet.writer.valuewriter; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.parquet.column.values.ValuesWriter; import org.apache.parquet.schema.PrimitiveType; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/BooleanValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/BooleanValueWriter.java index 78e25a30c1d2..683824bd8139 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/BooleanValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/BooleanValueWriter.java @@ -13,11 +13,11 @@ */ package io.trino.parquet.writer.valuewriter; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import org.apache.parquet.column.values.ValuesWriter; import org.apache.parquet.schema.PrimitiveType; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.util.Objects.requireNonNull; public class BooleanValueWriter diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/CharValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/CharValueWriter.java index 5d22de646a41..6bbcf3d57483 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/CharValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/CharValueWriter.java @@ -14,8 +14,8 @@ package io.trino.parquet.writer.valuewriter; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.parquet.column.values.ValuesWriter; import org.apache.parquet.io.api.Binary; import org.apache.parquet.schema.PrimitiveType; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/DateValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/DateValueWriter.java index ac3223077770..02ff365024ea 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/DateValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/DateValueWriter.java @@ -13,11 +13,11 @@ */ package io.trino.parquet.writer.valuewriter; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import org.apache.parquet.column.values.ValuesWriter; import org.apache.parquet.schema.PrimitiveType; -import static io.prestosql.spi.type.DateType.DATE; +import static io.trino.spi.type.DateType.DATE; import static java.util.Objects.requireNonNull; public class DateValueWriter diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/DecimalValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/DecimalValueWriter.java index d18137768678..791dd1844ec1 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/DecimalValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/DecimalValueWriter.java @@ -14,10 +14,10 @@ package io.trino.parquet.writer.valuewriter; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; import org.apache.parquet.column.values.ValuesWriter; import org.apache.parquet.io.api.Binary; import org.apache.parquet.schema.PrimitiveType; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/DoubleValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/DoubleValueWriter.java index 77e86e875d6d..80a8fed6cf43 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/DoubleValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/DoubleValueWriter.java @@ -13,11 +13,11 @@ */ package io.trino.parquet.writer.valuewriter; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import org.apache.parquet.column.values.ValuesWriter; import org.apache.parquet.schema.PrimitiveType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.util.Objects.requireNonNull; public class DoubleValueWriter diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/IntegerValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/IntegerValueWriter.java index 287c1b77fc14..a9d13f3718e1 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/IntegerValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/IntegerValueWriter.java @@ -13,8 +13,8 @@ */ package io.trino.parquet.writer.valuewriter; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.parquet.column.values.ValuesWriter; import org.apache.parquet.schema.PrimitiveType; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/PrimitiveValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/PrimitiveValueWriter.java index 4bf67634bf9c..db6ae10f7f0f 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/PrimitiveValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/PrimitiveValueWriter.java @@ -13,7 +13,7 @@ */ package io.trino.parquet.writer.valuewriter; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import org.apache.parquet.bytes.BytesInput; import org.apache.parquet.column.Encoding; import org.apache.parquet.column.page.DictionaryPage; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/RealValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/RealValueWriter.java index acf74842c2a3..fe3850a2ddf4 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/RealValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/RealValueWriter.java @@ -13,11 +13,11 @@ */ package io.trino.parquet.writer.valuewriter; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import org.apache.parquet.column.values.ValuesWriter; import org.apache.parquet.schema.PrimitiveType; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimeMicrosValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimeMicrosValueWriter.java index 8048c6db256c..6217ba87d088 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimeMicrosValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimeMicrosValueWriter.java @@ -13,12 +13,12 @@ */ package io.trino.parquet.writer.valuewriter; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import org.apache.parquet.column.values.ValuesWriter; import org.apache.parquet.schema.PrimitiveType; -import static io.prestosql.spi.type.TimeType.TIME_MICROS; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.TimeType.TIME_MICROS; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; public class TimeMicrosValueWriter extends PrimitiveValueWriter diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimestampMillisValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimestampMillisValueWriter.java index 23047c72aeb9..06193d21ae4e 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimestampMillisValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimestampMillisValueWriter.java @@ -13,12 +13,12 @@ */ package io.trino.parquet.writer.valuewriter; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.parquet.column.values.ValuesWriter; import org.apache.parquet.schema.PrimitiveType; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; import static java.lang.Math.floorDiv; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimestampTzMicrosValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimestampTzMicrosValueWriter.java index 26c3366c974a..e7fea865b2b6 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimestampTzMicrosValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimestampTzMicrosValueWriter.java @@ -13,15 +13,15 @@ */ package io.trino.parquet.writer.valuewriter; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.block.Block; +import io.trino.spi.type.LongTimestampWithTimeZone; import org.apache.parquet.column.values.ValuesWriter; import org.apache.parquet.schema.PrimitiveType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.roundDiv; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.roundDiv; public class TimestampTzMicrosValueWriter extends PrimitiveValueWriter diff --git a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimestampTzMillisValueWriter.java b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimestampTzMillisValueWriter.java index ddf5896647c6..41f9adec76be 100644 --- a/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimestampTzMillisValueWriter.java +++ b/lib/trino-parquet/src/main/java/io/trino/parquet/writer/valuewriter/TimestampTzMillisValueWriter.java @@ -13,12 +13,12 @@ */ package io.trino.parquet.writer.valuewriter; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import org.apache.parquet.column.values.ValuesWriter; import org.apache.parquet.schema.PrimitiveType; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; public class TimestampTzMillisValueWriter extends PrimitiveValueWriter diff --git a/lib/trino-parquet/src/test/java/io/trino/parquet/TestParquetTimestampUtils.java b/lib/trino-parquet/src/test/java/io/trino/parquet/TestParquetTimestampUtils.java index 8e1f9a5e215b..aaab1bc72280 100644 --- a/lib/trino-parquet/src/test/java/io/trino/parquet/TestParquetTimestampUtils.java +++ b/lib/trino-parquet/src/test/java/io/trino/parquet/TestParquetTimestampUtils.java @@ -13,16 +13,16 @@ */ package io.trino.parquet; -import io.prestosql.plugin.base.type.DecodedTimestamp; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.base.type.DecodedTimestamp; +import io.trino.spi.PrestoException; import org.apache.hadoop.hive.common.type.Timestamp; import org.apache.parquet.io.api.Binary; import org.testng.annotations.Test; import java.time.LocalDateTime; -import static io.prestosql.parquet.ParquetTimestampUtils.decode; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.parquet.ParquetTimestampUtils.decode; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.time.ZoneOffset.UTC; import static org.apache.hadoop.hive.ql.io.parquet.timestamp.NanoTimeUtils.getNanoTime; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-parquet/src/test/java/io/trino/parquet/TestTupleDomainParquetPredicate.java b/lib/trino-parquet/src/test/java/io/trino/parquet/TestTupleDomainParquetPredicate.java index 97df35566562..4943727f0d5b 100644 --- a/lib/trino-parquet/src/test/java/io/trino/parquet/TestTupleDomainParquetPredicate.java +++ b/lib/trino-parquet/src/test/java/io/trino/parquet/TestTupleDomainParquetPredicate.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.parquet.predicate.DictionaryDescriptor; -import io.prestosql.parquet.predicate.TupleDomainParquetPredicate; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.parquet.predicate.DictionaryDescriptor; +import io.trino.parquet.predicate.TupleDomainParquetPredicate; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.parquet.bytes.LittleEndianDataOutputStream; import org.apache.parquet.column.ColumnDescriptor; import org.apache.parquet.column.statistics.BinaryStatistics; @@ -50,34 +50,34 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.Slices.EMPTY_SLICE; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.parquet.ParquetEncoding.PLAIN_DICTIONARY; -import static io.prestosql.parquet.ParquetTimestampUtils.JULIAN_EPOCH_OFFSET_DAYS; -import static io.prestosql.parquet.predicate.TupleDomainParquetPredicate.getDomain; -import static io.prestosql.spi.predicate.Domain.all; -import static io.prestosql.spi.predicate.Domain.create; -import static io.prestosql.spi.predicate.Domain.notNull; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.spi.predicate.TupleDomain.withColumnDomains; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.MAX_SHORT_PRECISION; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.spi.type.Timestamps.round; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.parquet.ParquetEncoding.PLAIN_DICTIONARY; +import static io.trino.parquet.ParquetTimestampUtils.JULIAN_EPOCH_OFFSET_DAYS; +import static io.trino.parquet.predicate.TupleDomainParquetPredicate.getDomain; +import static io.trino.spi.predicate.Domain.all; +import static io.trino.spi.predicate.Domain.create; +import static io.trino.spi.predicate.Domain.notNull; +import static io.trino.spi.predicate.Domain.singleValue; +import static io.trino.spi.predicate.Range.range; +import static io.trino.spi.predicate.TupleDomain.withColumnDomains; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.MAX_SHORT_PRECISION; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.spi.type.Timestamps.round; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.Float.NaN; import static java.lang.Float.floatToRawIntBits; import static java.lang.Math.toIntExact; diff --git a/lib/trino-parquet/src/test/java/io/trino/parquet/predicate/TestPredicateUtils.java b/lib/trino-parquet/src/test/java/io/trino/parquet/predicate/TestPredicateUtils.java index 333c13c70139..40aa59b2393c 100644 --- a/lib/trino-parquet/src/test/java/io/trino/parquet/predicate/TestPredicateUtils.java +++ b/lib/trino-parquet/src/test/java/io/trino/parquet/predicate/TestPredicateUtils.java @@ -23,12 +23,12 @@ import java.util.Set; import static com.google.common.collect.Sets.union; -import static io.prestosql.parquet.predicate.PredicateUtils.isOnlyDictionaryEncodingPages; -import static io.prestosql.parquet.predicate.PredicateUtils.isStatisticsOverflow; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.parquet.predicate.PredicateUtils.isOnlyDictionaryEncodingPages; +import static io.trino.parquet.predicate.PredicateUtils.isStatisticsOverflow; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static org.apache.parquet.column.Encoding.BIT_PACKED; import static org.apache.parquet.column.Encoding.PLAIN; import static org.apache.parquet.column.Encoding.PLAIN_DICTIONARY; diff --git a/lib/trino-parquet/src/test/java/io/trino/parquet/reader/TestMetadataReader.java b/lib/trino-parquet/src/test/java/io/trino/parquet/reader/TestMetadataReader.java index c34032ea4cd4..75815369e29c 100644 --- a/lib/trino-parquet/src/test/java/io/trino/parquet/reader/TestMetadataReader.java +++ b/lib/trino-parquet/src/test/java/io/trino/parquet/reader/TestMetadataReader.java @@ -25,7 +25,7 @@ import java.util.Optional; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName.BINARY; import static org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName.INT32; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/authentication/CachingKerberosAuthentication.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/authentication/CachingKerberosAuthentication.java index a240b83bf7e9..61571ab7efe0 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/authentication/CachingKerberosAuthentication.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/authentication/CachingKerberosAuthentication.java @@ -17,7 +17,7 @@ import javax.security.auth.Subject; import javax.security.auth.kerberos.KerberosTicket; -import static io.prestosql.plugin.base.authentication.KerberosTicketUtils.getTicketGrantingTicket; +import static io.trino.plugin.base.authentication.KerberosTicketUtils.getTicketGrantingTicket; import static java.util.Objects.requireNonNull; public class CachingKerberosAuthentication diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorAccessControl.java index 2430edf938c5..eb7582d8e442 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorAccessControl.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.base.classloader; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.SchemaRoutineName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.SchemaRoutineName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import javax.inject.Inject; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorMetadata.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorMetadata.java index 6a66f28ff54e..1240fca79e2a 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorMetadata.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorMetadata.java @@ -14,49 +14,49 @@ package io.trino.plugin.base.classloader; import io.airlift.slice.Slice; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.AggregationApplicationResult; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMaterializedViewDefinition; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorResolvedIndex; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayout; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutResult; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.LimitApplicationResult; -import io.prestosql.spi.connector.MaterializedViewFreshness; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SampleType; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.SortItem; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.connector.TopNApplicationResult; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.GrantInfo; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.statistics.TableStatisticsMetadata; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.AggregationApplicationResult; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMaterializedViewDefinition; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorResolvedIndex; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayout; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTableLayoutResult; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.LimitApplicationResult; +import io.trino.spi.connector.MaterializedViewFreshness; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SampleType; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.SortItem; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.connector.TopNApplicationResult; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.GrantInfo; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.statistics.TableStatisticsMetadata; import javax.inject.Inject; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorPageSink.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorPageSink.java index 02713c70271c..06d5ed8b7ab1 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorPageSink.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorPageSink.java @@ -14,9 +14,9 @@ package io.trino.plugin.base.classloader; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ConnectorPageSink; +import io.trino.spi.Page; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ConnectorPageSink; import javax.inject.Inject; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorPageSinkProvider.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorPageSinkProvider.java index dfdf6b58b42e..4898cf8da4f1 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorPageSinkProvider.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorPageSinkProvider.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.base.classloader; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import javax.inject.Inject; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorPageSourceProvider.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorPageSourceProvider.java index 5f9d640e3c64..65b0bab1dace 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorPageSourceProvider.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorPageSourceProvider.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.base.classloader; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorRecordSetProvider.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorRecordSetProvider.java index 4344a7b9a231..da66239f7d30 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorRecordSetProvider.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorRecordSetProvider.java @@ -14,14 +14,14 @@ package io.trino.plugin.base.classloader; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import javax.inject.Inject; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorSplitManager.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorSplitManager.java index 8a5254811f7a..6610fa230f6f 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorSplitManager.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorSplitManager.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.base.classloader; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorSplitSource.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorSplitSource.java index 535bc0d66244..1ced4adb6954 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorSplitSource.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorSplitSource.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.base.classloader; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorSplitSource; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorSplitSource; import javax.inject.Inject; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeEventListener.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeEventListener.java index 82e56782b3ed..025f752acffc 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeEventListener.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeEventListener.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.base.classloader; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.eventlistener.QueryCompletedEvent; -import io.prestosql.spi.eventlistener.QueryCreatedEvent; -import io.prestosql.spi.eventlistener.SplitCompletedEvent; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.eventlistener.QueryCompletedEvent; +import io.trino.spi.eventlistener.QueryCreatedEvent; +import io.trino.spi.eventlistener.SplitCompletedEvent; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeNodePartitioningProvider.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeNodePartitioningProvider.java index d10fc8ae1b3f..01b1c3993ea9 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeNodePartitioningProvider.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeNodePartitioningProvider.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.base.classloader; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.connector.ConnectorBucketNodeMap; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.connector.ConnectorBucketNodeMap; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.type.Type; import javax.inject.Inject; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeRecordSet.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeRecordSet.java index ebf220dd93d1..d6c024920189 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeRecordSet.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeRecordSet.java @@ -14,10 +14,10 @@ package io.trino.plugin.base.classloader; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import javax.inject.Inject; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeSystemTable.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeSystemTable.java index 33044d8546d9..e6205ab8d356 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeSystemTable.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeSystemTable.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.base.classloader; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllAccessControl.java index 13ab0025f2cc..b7a7e245d0d1 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllAccessControl.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.base.security; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.SchemaRoutineName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.SchemaRoutineName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import java.util.Optional; import java.util.Set; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllAccessControlModule.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllAccessControlModule.java index 511eb28877fc..9cc38c716588 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllAccessControlModule.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllAccessControlModule.java @@ -16,7 +16,7 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorAccessControl; public class AllowAllAccessControlModule implements Module diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllSystemAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllSystemAccessControl.java index 43bc5737847c..94379e7cfaeb 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllSystemAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllSystemAccessControl.java @@ -14,18 +14,18 @@ package io.trino.plugin.base.security; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaRoutineName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.SystemAccessControl; -import io.prestosql.spi.security.SystemAccessControlFactory; -import io.prestosql.spi.security.SystemSecurityContext; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaRoutineName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.SystemAccessControl; +import io.trino.spi.security.SystemAccessControlFactory; +import io.trino.spi.security.SystemSecurityContext; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import java.security.Principal; import java.util.Map; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/CatalogAccessControlRule.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/CatalogAccessControlRule.java index 4a9062bb37c1..4647194488a9 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/CatalogAccessControlRule.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/CatalogAccessControlRule.java @@ -25,7 +25,7 @@ import java.util.Set; import java.util.regex.Pattern; -import static io.prestosql.plugin.base.security.CatalogAccessControlRule.AccessMode.ALL; +import static io.trino.plugin.base.security.CatalogAccessControlRule.AccessMode.ALL; import static java.util.Objects.requireNonNull; public class CatalogAccessControlRule diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/CatalogSchemaAccessControlRule.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/CatalogSchemaAccessControlRule.java index 849ed1aa8cf5..a352642aad31 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/CatalogSchemaAccessControlRule.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/CatalogSchemaAccessControlRule.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaName; import java.util.Optional; import java.util.Set; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/CatalogTableAccessControlRule.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/CatalogTableAccessControlRule.java index 2783e9a66ec2..33fd6183ea96 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/CatalogTableAccessControlRule.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/CatalogTableAccessControlRule.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.security.ViewExpression; +import io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.security.ViewExpression; import java.util.List; import java.util.Optional; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/DefaultSystemAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/DefaultSystemAccessControl.java index 6236d05b48e2..3b9edee5f2e9 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/DefaultSystemAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/DefaultSystemAccessControl.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.base.security; -import io.prestosql.spi.security.SystemAccessControl; -import io.prestosql.spi.security.SystemAccessControlFactory; -import io.prestosql.spi.security.SystemSecurityContext; +import io.trino.spi.security.SystemAccessControl; +import io.trino.spi.security.SystemAccessControlFactory; +import io.trino.spi.security.SystemSecurityContext; import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.security.AccessDeniedException.denyImpersonateUser; +import static io.trino.spi.security.AccessDeniedException.denyImpersonateUser; import static java.util.Objects.requireNonNull; /** diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControl.java index e796dc649260..c9eb8d6e271b 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControl.java @@ -14,16 +14,16 @@ package io.trino.plugin.base.security; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.SchemaRoutineName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.SchemaRoutineName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import java.nio.file.Paths; import java.util.List; @@ -33,47 +33,47 @@ import java.util.function.Predicate; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege.DELETE; -import static io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege.GRANT_SELECT; -import static io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege.INSERT; -import static io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege.OWNERSHIP; -import static io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege.SELECT; -import static io.prestosql.plugin.base.util.JsonUtils.parseJson; -import static io.prestosql.spi.security.AccessDeniedException.denyAddColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateRole; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateView; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateViewWithSelect; -import static io.prestosql.spi.security.AccessDeniedException.denyDeleteTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyDropRole; -import static io.prestosql.spi.security.AccessDeniedException.denyDropSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyDropTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropView; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantSchemaPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyInsertTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameView; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeSchemaPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denySelectTable; -import static io.prestosql.spi.security.AccessDeniedException.denySetCatalogSessionProperty; -import static io.prestosql.spi.security.AccessDeniedException.denySetRole; -import static io.prestosql.spi.security.AccessDeniedException.denySetSchemaAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denySetTableAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denySetViewAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denyShowColumns; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyShowTables; +import static io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege.DELETE; +import static io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege.GRANT_SELECT; +import static io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege.INSERT; +import static io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege.OWNERSHIP; +import static io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege.SELECT; +import static io.trino.plugin.base.util.JsonUtils.parseJson; +import static io.trino.spi.security.AccessDeniedException.denyAddColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateRole; +import static io.trino.spi.security.AccessDeniedException.denyCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateView; +import static io.trino.spi.security.AccessDeniedException.denyCreateViewWithSelect; +import static io.trino.spi.security.AccessDeniedException.denyDeleteTable; +import static io.trino.spi.security.AccessDeniedException.denyDropColumn; +import static io.trino.spi.security.AccessDeniedException.denyDropRole; +import static io.trino.spi.security.AccessDeniedException.denyDropSchema; +import static io.trino.spi.security.AccessDeniedException.denyDropTable; +import static io.trino.spi.security.AccessDeniedException.denyDropView; +import static io.trino.spi.security.AccessDeniedException.denyGrantRoles; +import static io.trino.spi.security.AccessDeniedException.denyGrantSchemaPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyGrantTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denyInsertTable; +import static io.trino.spi.security.AccessDeniedException.denyRenameColumn; +import static io.trino.spi.security.AccessDeniedException.denyRenameSchema; +import static io.trino.spi.security.AccessDeniedException.denyRenameTable; +import static io.trino.spi.security.AccessDeniedException.denyRenameView; +import static io.trino.spi.security.AccessDeniedException.denyRevokeRoles; +import static io.trino.spi.security.AccessDeniedException.denyRevokeSchemaPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyRevokeTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denySelectTable; +import static io.trino.spi.security.AccessDeniedException.denySetCatalogSessionProperty; +import static io.trino.spi.security.AccessDeniedException.denySetRole; +import static io.trino.spi.security.AccessDeniedException.denySetSchemaAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetTableAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetViewAuthorization; +import static io.trino.spi.security.AccessDeniedException.denyShowColumns; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyShowTables; import static java.util.Objects.requireNonNull; public class FileBasedAccessControl diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControlModule.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControlModule.java index 80a27410343c..46057adf7138 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControlModule.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControlModule.java @@ -18,7 +18,7 @@ import com.google.inject.Module; import com.google.inject.Provides; import io.airlift.log.Logger; -import io.prestosql.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorAccessControl; import static com.google.common.base.Suppliers.memoizeWithExpiration; import static io.airlift.configuration.ConfigBinder.configBinder; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedSystemAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedSystemAccessControl.java index 9b6d9b7dfa02..f9927d0cdb10 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedSystemAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedSystemAccessControl.java @@ -19,22 +19,22 @@ import io.airlift.bootstrap.Bootstrap; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.plugin.base.security.CatalogAccessControlRule.AccessMode; -import io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaRoutineName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.SystemAccessControl; -import io.prestosql.spi.security.SystemAccessControlFactory; -import io.prestosql.spi.security.SystemSecurityContext; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.plugin.base.security.CatalogAccessControlRule.AccessMode; +import io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaRoutineName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.SystemAccessControl; +import io.trino.spi.security.SystemAccessControlFactory; +import io.trino.spi.security.SystemSecurityContext; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import java.nio.file.Paths; import java.security.Principal; @@ -49,54 +49,54 @@ import static com.google.common.base.Suppliers.memoizeWithExpiration; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static io.airlift.configuration.ConfigBinder.configBinder; -import static io.prestosql.plugin.base.security.CatalogAccessControlRule.AccessMode.ALL; -import static io.prestosql.plugin.base.security.CatalogAccessControlRule.AccessMode.READ_ONLY; -import static io.prestosql.plugin.base.security.FileBasedAccessControlConfig.SECURITY_REFRESH_PERIOD; -import static io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege.DELETE; -import static io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege.GRANT_SELECT; -import static io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege.INSERT; -import static io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege.OWNERSHIP; -import static io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege.SELECT; -import static io.prestosql.plugin.base.util.JsonUtils.parseJson; -import static io.prestosql.spi.StandardErrorCode.CONFIGURATION_INVALID; -import static io.prestosql.spi.security.AccessDeniedException.denyAddColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCatalogAccess; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateView; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateViewWithSelect; -import static io.prestosql.spi.security.AccessDeniedException.denyDeleteTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyDropSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyDropTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropView; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantSchemaPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyImpersonateUser; -import static io.prestosql.spi.security.AccessDeniedException.denyInsertTable; -import static io.prestosql.spi.security.AccessDeniedException.denyReadSystemInformationAccess; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameView; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeSchemaPrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denySelectTable; -import static io.prestosql.spi.security.AccessDeniedException.denySetCatalogSessionProperty; -import static io.prestosql.spi.security.AccessDeniedException.denySetSchemaAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denySetSystemSessionProperty; -import static io.prestosql.spi.security.AccessDeniedException.denySetTableAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denySetUser; -import static io.prestosql.spi.security.AccessDeniedException.denySetViewAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denyShowColumns; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyShowSchemas; -import static io.prestosql.spi.security.AccessDeniedException.denyShowTables; -import static io.prestosql.spi.security.AccessDeniedException.denyViewQuery; -import static io.prestosql.spi.security.AccessDeniedException.denyWriteSystemInformationAccess; +import static io.trino.plugin.base.security.CatalogAccessControlRule.AccessMode.ALL; +import static io.trino.plugin.base.security.CatalogAccessControlRule.AccessMode.READ_ONLY; +import static io.trino.plugin.base.security.FileBasedAccessControlConfig.SECURITY_REFRESH_PERIOD; +import static io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege.DELETE; +import static io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege.GRANT_SELECT; +import static io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege.INSERT; +import static io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege.OWNERSHIP; +import static io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege.SELECT; +import static io.trino.plugin.base.util.JsonUtils.parseJson; +import static io.trino.spi.StandardErrorCode.CONFIGURATION_INVALID; +import static io.trino.spi.security.AccessDeniedException.denyAddColumn; +import static io.trino.spi.security.AccessDeniedException.denyCatalogAccess; +import static io.trino.spi.security.AccessDeniedException.denyCommentColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateView; +import static io.trino.spi.security.AccessDeniedException.denyCreateViewWithSelect; +import static io.trino.spi.security.AccessDeniedException.denyDeleteTable; +import static io.trino.spi.security.AccessDeniedException.denyDropColumn; +import static io.trino.spi.security.AccessDeniedException.denyDropSchema; +import static io.trino.spi.security.AccessDeniedException.denyDropTable; +import static io.trino.spi.security.AccessDeniedException.denyDropView; +import static io.trino.spi.security.AccessDeniedException.denyGrantSchemaPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyGrantTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denyImpersonateUser; +import static io.trino.spi.security.AccessDeniedException.denyInsertTable; +import static io.trino.spi.security.AccessDeniedException.denyReadSystemInformationAccess; +import static io.trino.spi.security.AccessDeniedException.denyRenameColumn; +import static io.trino.spi.security.AccessDeniedException.denyRenameSchema; +import static io.trino.spi.security.AccessDeniedException.denyRenameTable; +import static io.trino.spi.security.AccessDeniedException.denyRenameView; +import static io.trino.spi.security.AccessDeniedException.denyRevokeSchemaPrivilege; +import static io.trino.spi.security.AccessDeniedException.denyRevokeTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denySelectTable; +import static io.trino.spi.security.AccessDeniedException.denySetCatalogSessionProperty; +import static io.trino.spi.security.AccessDeniedException.denySetSchemaAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetSystemSessionProperty; +import static io.trino.spi.security.AccessDeniedException.denySetTableAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetUser; +import static io.trino.spi.security.AccessDeniedException.denySetViewAuthorization; +import static io.trino.spi.security.AccessDeniedException.denyShowColumns; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyShowSchemas; +import static io.trino.spi.security.AccessDeniedException.denyShowTables; +import static io.trino.spi.security.AccessDeniedException.denyViewQuery; +import static io.trino.spi.security.AccessDeniedException.denyWriteSystemInformationAccess; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingConnectorAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingConnectorAccessControl.java index 5c994c827d2d..a0d0d9f65b94 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingConnectorAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingConnectorAccessControl.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.base.security; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.SchemaRoutineName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.SchemaRoutineName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import java.util.Optional; import java.util.Set; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingSystemAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingSystemAccessControl.java index 927e9e87b59d..37042e96d30a 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingSystemAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingSystemAccessControl.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.base.security; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaRoutineName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.SystemAccessControl; -import io.prestosql.spi.security.SystemSecurityContext; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaRoutineName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.SystemAccessControl; +import io.trino.spi.security.SystemSecurityContext; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import java.security.Principal; import java.util.Optional; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ReadOnlyAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ReadOnlyAccessControl.java index 6045f5e14b5c..5664624a206b 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ReadOnlyAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ReadOnlyAccessControl.java @@ -13,29 +13,29 @@ */ package io.trino.plugin.base.security; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; import java.util.Set; -import static io.prestosql.spi.security.AccessDeniedException.denyAddColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateView; -import static io.prestosql.spi.security.AccessDeniedException.denyDeleteTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyDropTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropView; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyInsertTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameView; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denyAddColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateView; +import static io.trino.spi.security.AccessDeniedException.denyDeleteTable; +import static io.trino.spi.security.AccessDeniedException.denyDropColumn; +import static io.trino.spi.security.AccessDeniedException.denyDropTable; +import static io.trino.spi.security.AccessDeniedException.denyDropView; +import static io.trino.spi.security.AccessDeniedException.denyGrantTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denyInsertTable; +import static io.trino.spi.security.AccessDeniedException.denyRenameColumn; +import static io.trino.spi.security.AccessDeniedException.denyRenameTable; +import static io.trino.spi.security.AccessDeniedException.denyRenameView; +import static io.trino.spi.security.AccessDeniedException.denyRevokeTablePrivilege; public class ReadOnlyAccessControl implements ConnectorAccessControl diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ReadOnlySecurityModule.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ReadOnlySecurityModule.java index 0d0139b84a13..304f87f8407b 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ReadOnlySecurityModule.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ReadOnlySecurityModule.java @@ -16,7 +16,7 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorAccessControl; public class ReadOnlySecurityModule implements Module diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ReadOnlySystemAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ReadOnlySystemAccessControl.java index d2b4667ea161..a8e3d96f8135 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ReadOnlySystemAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ReadOnlySystemAccessControl.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.base.security; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.SystemAccessControl; -import io.prestosql.spi.security.SystemAccessControlFactory; -import io.prestosql.spi.security.SystemSecurityContext; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.SystemAccessControl; +import io.trino.spi.security.SystemAccessControlFactory; +import io.trino.spi.security.SystemSecurityContext; import java.security.Principal; import java.util.Map; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/TableAccessControlRule.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/TableAccessControlRule.java index f53d59fb0cc5..008cf0715833 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/TableAccessControlRule.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/TableAccessControlRule.java @@ -18,8 +18,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.ViewExpression; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.ViewExpression; import java.util.List; import java.util.Map; @@ -28,8 +28,8 @@ import java.util.regex.Pattern; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege.GRANT_SELECT; -import static io.prestosql.plugin.base.security.TableAccessControlRule.TablePrivilege.SELECT; +import static io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege.GRANT_SELECT; +import static io.trino.plugin.base.security.TableAccessControlRule.TablePrivilege.SELECT; import static java.util.Objects.requireNonNull; public class TableAccessControlRule diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/session/PropertyMetadataUtil.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/session/PropertyMetadataUtil.java index cead005ce42d..2f139416421e 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/session/PropertyMetadataUtil.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/session/PropertyMetadataUtil.java @@ -15,11 +15,11 @@ import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.session.PropertyMetadata; import java.util.function.Consumer; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; public final class PropertyMetadataUtil { diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/AbstractPrestoTimestampEncoder.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/AbstractPrestoTimestampEncoder.java index 8e71b0cc07bc..4c2def36c667 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/AbstractPrestoTimestampEncoder.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/AbstractPrestoTimestampEncoder.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.base.type; -import io.prestosql.spi.type.TimestampType; +import io.trino.spi.type.TimestampType; import org.joda.time.DateTimeZone; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/LongTimestampEncoder.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/LongTimestampEncoder.java index e526bff9ec0e..7bd55e2fbfa0 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/LongTimestampEncoder.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/LongTimestampEncoder.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.base.type; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.TimestampType; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.TimestampType; import org.joda.time.DateTimeZone; -import static io.prestosql.plugin.base.type.PrestoTimestampEncoderFactory.longTimestamp; -import static io.prestosql.spi.type.Timestamps.MILLISECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.spi.type.Timestamps.round; +import static io.trino.plugin.base.type.PrestoTimestampEncoderFactory.longTimestamp; +import static io.trino.spi.type.Timestamps.MILLISECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.spi.type.Timestamps.round; class LongTimestampEncoder extends AbstractPrestoTimestampEncoder diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/PrestoTimestampEncoder.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/PrestoTimestampEncoder.java index 5b5f6f0bd65f..d11d10da71b9 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/PrestoTimestampEncoder.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/PrestoTimestampEncoder.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.base.type; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.TimestampType; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.TimestampType; public interface PrestoTimestampEncoder { diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/PrestoTimestampEncoderFactory.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/PrestoTimestampEncoderFactory.java index 5cf4d97d62db..57da57d7ee2b 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/PrestoTimestampEncoderFactory.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/PrestoTimestampEncoderFactory.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.base.type; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.TimestampType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.TimestampType; import org.joda.time.DateTimeZone; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; import static java.lang.Math.multiplyExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/ShortTimestampEncoder.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/ShortTimestampEncoder.java index b65732902662..869579f4e348 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/ShortTimestampEncoder.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/type/ShortTimestampEncoder.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.base.type; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.TimestampType; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.TimestampType; import org.joda.time.DateTimeZone; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.MILLISECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.round; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.MILLISECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.round; class ShortTimestampEncoder extends AbstractPrestoTimestampEncoder diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/util/JsonTypeUtil.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/util/JsonTypeUtil.java index 4f0cc9f34eec..7f7974958aaf 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/util/JsonTypeUtil.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/util/JsonTypeUtil.java @@ -22,7 +22,7 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.io.IOException; import java.io.InputStreamReader; @@ -30,7 +30,7 @@ import static com.fasterxml.jackson.core.JsonFactory.Feature.CANONICALIZE_FIELD_NAMES; import static com.fasterxml.jackson.databind.SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/classloader/TestClassLoaderSafeWrappers.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/classloader/TestClassLoaderSafeWrappers.java index 128d5088f003..39c17fa663b9 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/classloader/TestClassLoaderSafeWrappers.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/classloader/TestClassLoaderSafeWrappers.java @@ -13,21 +13,21 @@ */ package io.trino.plugin.base.classloader; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.eventlistener.EventListener; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.eventlistener.EventListener; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; public class TestClassLoaderSafeWrappers { diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestAllowAllAccessControl.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestAllowAllAccessControl.java index a2be1f567099..5ba6e98a7570 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestAllowAllAccessControl.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestAllowAllAccessControl.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.base.security; -import io.prestosql.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorAccessControl; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; public class TestAllowAllAccessControl { diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestAllowAllSystemAccessControl.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestAllowAllSystemAccessControl.java index 78368d2070ac..aafcd9b63e30 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestAllowAllSystemAccessControl.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestAllowAllSystemAccessControl.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.base.security; -import io.prestosql.spi.security.SystemAccessControl; +import io.trino.spi.security.SystemAccessControl; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; public class TestAllowAllSystemAccessControl { diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedAccessControl.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedAccessControl.java index 5d3b62de8d47..759c685f1964 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedAccessControl.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedAccessControl.java @@ -14,16 +14,16 @@ package io.trino.plugin.base.security; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.spi.security.Privilege; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.PrincipalType; +import io.trino.spi.security.Privilege; import org.testng.Assert.ThrowingRunnable; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -34,7 +34,7 @@ import java.util.stream.Stream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedAccessControlConfig.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedAccessControlConfig.java index 84c93eb276db..972b9d0808ab 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedAccessControlConfig.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedAccessControlConfig.java @@ -28,8 +28,8 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertFullMapping; import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; -import static io.prestosql.plugin.base.security.FileBasedAccessControlConfig.SECURITY_CONFIG_FILE; -import static io.prestosql.plugin.base.security.FileBasedAccessControlConfig.SECURITY_REFRESH_PERIOD; +import static io.trino.plugin.base.security.FileBasedAccessControlConfig.SECURITY_CONFIG_FILE; +import static io.trino.plugin.base.security.FileBasedAccessControlConfig.SECURITY_REFRESH_PERIOD; import static org.assertj.core.api.Assertions.assertThatThrownBy; public class TestFileBasedAccessControlConfig diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedSystemAccessControl.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedSystemAccessControl.java index 2bb6436c07a0..04050f238ba8 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedSystemAccessControl.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedSystemAccessControl.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.SystemAccessControl; -import io.prestosql.spi.security.SystemSecurityContext; -import io.prestosql.spi.security.ViewExpression; +import io.trino.spi.QueryId; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.PrincipalType; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.SystemAccessControl; +import io.trino.spi.security.SystemSecurityContext; +import io.trino.spi.security.ViewExpression; import org.assertj.core.api.ThrowableAssert.ThrowingCallable; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -42,10 +42,10 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.io.Files.copy; -import static io.prestosql.plugin.base.security.FileBasedAccessControlConfig.SECURITY_CONFIG_FILE; -import static io.prestosql.plugin.base.security.FileBasedAccessControlConfig.SECURITY_REFRESH_PERIOD; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.base.security.FileBasedAccessControlConfig.SECURITY_CONFIG_FILE; +import static io.trino.plugin.base.security.FileBasedAccessControlConfig.SECURITY_REFRESH_PERIOD; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.lang.Thread.sleep; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestForwardingConnectorAccessControl.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestForwardingConnectorAccessControl.java index 251c27cba13a..0a7276d3c068 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestForwardingConnectorAccessControl.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestForwardingConnectorAccessControl.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.base.security; -import io.prestosql.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorAccessControl; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertProperForwardingMethodsAreCalled; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertProperForwardingMethodsAreCalled; public class TestForwardingConnectorAccessControl { diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestForwardingSystemAccessControl.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestForwardingSystemAccessControl.java index 002eb4e534b2..7b999e44c1bb 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestForwardingSystemAccessControl.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestForwardingSystemAccessControl.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.base.security; -import io.prestosql.spi.security.SystemAccessControl; +import io.trino.spi.security.SystemAccessControl; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; public class TestForwardingSystemAccessControl { diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/util/TestJsonUtils.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/util/TestJsonUtils.java index f533caf17432..e746e288dfbe 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/util/TestJsonUtils.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/util/TestJsonUtils.java @@ -18,8 +18,8 @@ import java.io.IOException; -import static io.prestosql.plugin.base.util.JsonUtils.parseJson; -import static io.prestosql.plugin.base.util.TestJsonUtils.TestEnum.OPTION_A; +import static io.trino.plugin.base.util.JsonUtils.parseJson; +import static io.trino.plugin.base.util.TestJsonUtils.TestEnum.OPTION_A; import static java.nio.charset.StandardCharsets.US_ASCII; import static org.assertj.core.api.Assertions.assertThat; diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/util/TestLoggingInvocationHandler.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/util/TestLoggingInvocationHandler.java index b442e75f88f3..1ee7a739e0c5 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/util/TestLoggingInvocationHandler.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/util/TestLoggingInvocationHandler.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.base.util; -import io.prestosql.plugin.base.util.LoggingInvocationHandler.ReflectiveParameterNamesProvider; +import io.trino.plugin.base.util.LoggingInvocationHandler.ReflectiveParameterNamesProvider; import org.testng.annotations.Test; import java.lang.reflect.InvocationHandler; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/ColumnEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/ColumnEncoding.java index f29510dcccca..a12846cea8d7 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/ColumnEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/ColumnEncoding.java @@ -14,7 +14,7 @@ package io.trino.rcfile; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; public interface ColumnEncoding { diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/PageSplitterUtil.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/PageSplitterUtil.java index d0bc8c02c4c4..323b59084d56 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/PageSplitterUtil.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/PageSplitterUtil.java @@ -14,7 +14,7 @@ package io.trino.rcfile; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.List; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileDecoderUtils.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileDecoderUtils.java index 15e5517d8b70..d7d41bf25ea1 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileDecoderUtils.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileDecoderUtils.java @@ -17,9 +17,9 @@ import io.airlift.slice.SliceInput; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.io.IOException; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileEncoding.java index 2a48d0e77b19..5d81edf5bda9 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileEncoding.java @@ -13,28 +13,28 @@ */ package io.trino.rcfile; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.util.List; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.util.stream.Collectors.toList; public interface RcFileEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileReader.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileReader.java index ea3b2967113c..4275b67f3931 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileReader.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileReader.java @@ -23,12 +23,12 @@ import io.airlift.slice.Slices; import io.airlift.units.DataSize; import io.airlift.units.DataSize.Unit; -import io.prestosql.rcfile.RcFileWriteValidation.WriteChecksum; -import io.prestosql.rcfile.RcFileWriteValidation.WriteChecksumBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.RcFileWriteValidation.WriteChecksum; +import io.trino.rcfile.RcFileWriteValidation.WriteChecksumBuilder; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.Type; import java.io.Closeable; import java.io.IOException; @@ -44,9 +44,9 @@ import static com.google.common.io.ByteStreams.skipFully; import static io.airlift.slice.SizeOf.SIZE_OF_INT; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; -import static io.prestosql.rcfile.RcFileDecoderUtils.findFirstSyncPosition; -import static io.prestosql.rcfile.RcFileDecoderUtils.readVInt; -import static io.prestosql.rcfile.RcFileWriteValidation.WriteChecksumBuilder.createWriteChecksumBuilder; +import static io.trino.rcfile.RcFileDecoderUtils.findFirstSyncPosition; +import static io.trino.rcfile.RcFileDecoderUtils.readVInt; +import static io.trino.rcfile.RcFileWriteValidation.WriteChecksumBuilder.createWriteChecksumBuilder; import static java.lang.Math.min; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileWriteValidation.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileWriteValidation.java index ef787b0d1b18..2776f568c609 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileWriteValidation.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileWriteValidation.java @@ -18,9 +18,9 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.slice.XxHash64; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import java.util.HashMap; import java.util.List; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileWriter.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileWriter.java index 256e1ab32ad0..6d4491091cd1 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileWriter.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/RcFileWriter.java @@ -18,11 +18,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.units.DataSize; -import io.prestosql.rcfile.RcFileCompressor.CompressedSliceOutput; -import io.prestosql.rcfile.RcFileWriteValidation.RcFileWriteValidationBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.RcFileCompressor.CompressedSliceOutput; +import io.trino.rcfile.RcFileWriteValidation.RcFileWriteValidationBuilder; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import javax.annotation.Nullable; @@ -41,10 +41,10 @@ import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.units.DataSize.Unit.KILOBYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.rcfile.PageSplitterUtil.splitPage; -import static io.prestosql.rcfile.RcFileDecoderUtils.writeLengthPrefixedString; -import static io.prestosql.rcfile.RcFileDecoderUtils.writeVInt; -import static io.prestosql.rcfile.RcFileReader.validateFile; +import static io.trino.rcfile.PageSplitterUtil.splitPage; +import static io.trino.rcfile.RcFileDecoderUtils.writeLengthPrefixedString; +import static io.trino.rcfile.RcFileDecoderUtils.writeVInt; +import static io.trino.rcfile.RcFileReader.validateFile; import static java.lang.StrictMath.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/TimestampHolder.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/TimestampHolder.java index ec592327245e..2de0ba8a891b 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/TimestampHolder.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/TimestampHolder.java @@ -13,17 +13,17 @@ */ package io.trino.rcfile; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.TimestampType; +import io.trino.spi.block.Block; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.TimestampType; import java.time.LocalDateTime; import java.time.ZoneOffset; import java.util.function.BiFunction; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; import static java.lang.Math.floorDiv; import static java.lang.Math.floorMod; import static java.lang.Math.toIntExact; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/ValidationHash.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/ValidationHash.java index 1f58559428c8..2f90bf94dfbd 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/ValidationHash.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/ValidationHash.java @@ -13,20 +13,20 @@ */ package io.trino.rcfile; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.InvocationConvention; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.block.Block; +import io.trino.spi.function.InvocationConvention; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodType; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.StandardTypes.ARRAY; -import static io.prestosql.spi.type.StandardTypes.MAP; -import static io.prestosql.spi.type.StandardTypes.ROW; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.StandardTypes.ARRAY; +import static io.trino.spi.type.StandardTypes.MAP; +import static io.trino.spi.type.StandardTypes.ROW; import static java.lang.invoke.MethodHandles.lookup; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BinaryColumnEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BinaryColumnEncoding.java index fb95a502ebb9..2ef66e228c70 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BinaryColumnEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BinaryColumnEncoding.java @@ -15,9 +15,9 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnEncoding; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.rcfile.ColumnEncoding; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; public interface BinaryColumnEncoding extends ColumnEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BinaryEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BinaryEncoding.java index 89c1ce1df61c..1e4033f5a258 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BinaryEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BinaryEncoding.java @@ -15,15 +15,15 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; -import static io.prestosql.rcfile.RcFileDecoderUtils.decodeVIntSize; -import static io.prestosql.rcfile.RcFileDecoderUtils.readVInt; -import static io.prestosql.rcfile.RcFileDecoderUtils.writeVInt; +import static io.trino.rcfile.RcFileDecoderUtils.decodeVIntSize; +import static io.trino.rcfile.RcFileDecoderUtils.readVInt; +import static io.trino.rcfile.RcFileDecoderUtils.writeVInt; import static java.lang.Math.toIntExact; public class BinaryEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BinaryRcFileEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BinaryRcFileEncoding.java index 83228cb090d9..ac085212816f 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BinaryRcFileEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BinaryRcFileEncoding.java @@ -13,10 +13,10 @@ */ package io.trino.rcfile.binary; -import io.prestosql.rcfile.ColumnEncoding; -import io.prestosql.rcfile.RcFileEncoding; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnEncoding; +import io.trino.rcfile.RcFileEncoding; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; import org.joda.time.DateTimeZone; import java.util.List; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BlockEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BlockEncoding.java index 4c55e14a40d3..0327dfc39852 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BlockEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BlockEncoding.java @@ -16,11 +16,11 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import static io.airlift.slice.SizeOf.SIZE_OF_INT; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BooleanEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BooleanEncoding.java index f8007cbe2511..fa1b0e3fb9df 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BooleanEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/BooleanEncoding.java @@ -15,11 +15,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.SizeOf.SIZE_OF_BYTE; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/ByteEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/ByteEncoding.java index 5a5086187e00..4e78a098d6cf 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/ByteEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/ByteEncoding.java @@ -15,11 +15,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.SizeOf.SIZE_OF_BYTE; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/DateEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/DateEncoding.java index a1569c06d4aa..78f0528239e1 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/DateEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/DateEncoding.java @@ -15,15 +15,15 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; -import static io.prestosql.rcfile.RcFileDecoderUtils.decodeVIntSize; -import static io.prestosql.rcfile.RcFileDecoderUtils.readVInt; -import static io.prestosql.rcfile.RcFileDecoderUtils.writeVInt; +import static io.trino.rcfile.RcFileDecoderUtils.decodeVIntSize; +import static io.trino.rcfile.RcFileDecoderUtils.readVInt; +import static io.trino.rcfile.RcFileDecoderUtils.writeVInt; import static java.lang.Math.toIntExact; public class DateEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/DecimalEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/DecimalEncoding.java index e3e57ffe9dd4..97ea6a5f48d9 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/DecimalEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/DecimalEncoding.java @@ -16,22 +16,22 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; import java.math.BigInteger; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.rcfile.RcFileDecoderUtils.decodeVIntSize; -import static io.prestosql.rcfile.RcFileDecoderUtils.readVInt; -import static io.prestosql.rcfile.RcFileDecoderUtils.writeVInt; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.Decimals.rescale; +import static io.trino.rcfile.RcFileDecoderUtils.decodeVIntSize; +import static io.trino.rcfile.RcFileDecoderUtils.readVInt; +import static io.trino.rcfile.RcFileDecoderUtils.writeVInt; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.Decimals.rescale; import static java.lang.Math.toIntExact; public class DecimalEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/DoubleEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/DoubleEncoding.java index b1de317539b8..338b67b3939b 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/DoubleEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/DoubleEncoding.java @@ -15,11 +15,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.SizeOf.SIZE_OF_DOUBLE; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/FloatEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/FloatEncoding.java index f5e5e3dc7ec8..b3ff029ed84f 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/FloatEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/FloatEncoding.java @@ -15,11 +15,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.SizeOf.SIZE_OF_FLOAT; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/ListEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/ListEncoding.java index e303f00b4711..0cd8690ee523 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/ListEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/ListEncoding.java @@ -15,13 +15,13 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; -import static io.prestosql.rcfile.RcFileDecoderUtils.decodeVIntSize; -import static io.prestosql.rcfile.RcFileDecoderUtils.readVInt; -import static io.prestosql.rcfile.RcFileDecoderUtils.writeVInt; +import static io.trino.rcfile.RcFileDecoderUtils.decodeVIntSize; +import static io.trino.rcfile.RcFileDecoderUtils.readVInt; +import static io.trino.rcfile.RcFileDecoderUtils.writeVInt; import static java.lang.Math.toIntExact; public class ListEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/LongEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/LongEncoding.java index ec3325c1ce45..622bf0d5592d 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/LongEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/LongEncoding.java @@ -15,15 +15,15 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; -import static io.prestosql.rcfile.RcFileDecoderUtils.decodeVIntSize; -import static io.prestosql.rcfile.RcFileDecoderUtils.readVInt; -import static io.prestosql.rcfile.RcFileDecoderUtils.writeVLong; +import static io.trino.rcfile.RcFileDecoderUtils.decodeVIntSize; +import static io.trino.rcfile.RcFileDecoderUtils.readVInt; +import static io.trino.rcfile.RcFileDecoderUtils.writeVLong; public class LongEncoding implements BinaryColumnEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/MapEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/MapEncoding.java index 5cb7c7230ce8..cf518fb08c94 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/MapEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/MapEncoding.java @@ -15,15 +15,15 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; - -import static io.prestosql.rcfile.RcFileDecoderUtils.decodeVIntSize; -import static io.prestosql.rcfile.RcFileDecoderUtils.readVInt; -import static io.prestosql.rcfile.RcFileDecoderUtils.writeVInt; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; + +import static io.trino.rcfile.RcFileDecoderUtils.decodeVIntSize; +import static io.trino.rcfile.RcFileDecoderUtils.readVInt; +import static io.trino.rcfile.RcFileDecoderUtils.writeVInt; import static java.lang.Math.toIntExact; public class MapEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/ShortEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/ShortEncoding.java index 6ba24c56f837..7269e942afd4 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/ShortEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/ShortEncoding.java @@ -15,11 +15,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.SizeOf.SIZE_OF_SHORT; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/StringEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/StringEncoding.java index b2ac3822bbbc..edb2b387caba 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/StringEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/StringEncoding.java @@ -15,17 +15,17 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import static io.airlift.slice.Slices.EMPTY_SLICE; -import static io.prestosql.rcfile.RcFileDecoderUtils.calculateTruncationLength; -import static io.prestosql.rcfile.RcFileDecoderUtils.decodeVIntSize; -import static io.prestosql.rcfile.RcFileDecoderUtils.readVInt; -import static io.prestosql.rcfile.RcFileDecoderUtils.writeVInt; +import static io.trino.rcfile.RcFileDecoderUtils.calculateTruncationLength; +import static io.trino.rcfile.RcFileDecoderUtils.decodeVIntSize; +import static io.trino.rcfile.RcFileDecoderUtils.readVInt; +import static io.trino.rcfile.RcFileDecoderUtils.writeVInt; import static java.lang.Math.toIntExact; public class StringEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/StructEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/StructEncoding.java index 10cd01e0d4aa..9f7d48145fc9 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/StructEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/StructEncoding.java @@ -16,9 +16,9 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/TimestampEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/TimestampEncoding.java index 176e3bc0b9b6..21187d32b568 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/TimestampEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/binary/TimestampEncoding.java @@ -15,25 +15,25 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.plugin.base.type.DecodedTimestamp; -import io.prestosql.plugin.base.type.PrestoTimestampEncoder; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.rcfile.TimestampHolder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.TimestampType; +import io.trino.plugin.base.type.DecodedTimestamp; +import io.trino.plugin.base.type.PrestoTimestampEncoder; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.rcfile.TimestampHolder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.TimestampType; import org.joda.time.DateTimeZone; import java.util.function.BiFunction; import static io.airlift.slice.SizeOf.SIZE_OF_INT; -import static io.prestosql.plugin.base.type.PrestoTimestampEncoderFactory.createTimestampEncoder; -import static io.prestosql.rcfile.RcFileDecoderUtils.decodeVIntSize; -import static io.prestosql.rcfile.RcFileDecoderUtils.isNegativeVInt; -import static io.prestosql.rcfile.RcFileDecoderUtils.readVInt; -import static io.prestosql.rcfile.RcFileDecoderUtils.writeVInt; -import static io.prestosql.spi.type.Timestamps.MILLISECONDS_PER_SECOND; +import static io.trino.plugin.base.type.PrestoTimestampEncoderFactory.createTimestampEncoder; +import static io.trino.rcfile.RcFileDecoderUtils.decodeVIntSize; +import static io.trino.rcfile.RcFileDecoderUtils.isNegativeVInt; +import static io.trino.rcfile.RcFileDecoderUtils.readVInt; +import static io.trino.rcfile.RcFileDecoderUtils.writeVInt; +import static io.trino.spi.type.Timestamps.MILLISECONDS_PER_SECOND; import static java.util.Objects.requireNonNull; public class TimestampEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/BinaryEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/BinaryEncoding.java index fafe4322a9e9..dba5c0912aea 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/BinaryEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/BinaryEncoding.java @@ -16,11 +16,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.Base64; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/BlockEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/BlockEncoding.java index a7a3cf58db90..e4c9b486dd90 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/BlockEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/BlockEncoding.java @@ -15,12 +15,12 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.rcfile.RcFileCorruptionException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.rcfile.RcFileCorruptionException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public abstract class BlockEncoding implements TextColumnEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/BooleanEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/BooleanEncoding.java index c02ef39f433c..b540ff0b39d0 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/BooleanEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/BooleanEncoding.java @@ -16,11 +16,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public class BooleanEncoding implements TextColumnEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/DateEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/DateEncoding.java index ec5d6b2e8d03..8ede2e33cd6d 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/DateEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/DateEncoding.java @@ -15,11 +15,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.ISODateTimeFormat; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/DecimalEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/DecimalEncoding.java index 1bcafaa451a6..bc811e7d7f96 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/DecimalEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/DecimalEncoding.java @@ -15,21 +15,21 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; import java.math.BigDecimal; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.type.Decimals.encodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.Decimals.encodeUnscaledValue; +import static io.trino.spi.type.Decimals.isShortDecimal; import static java.math.RoundingMode.HALF_UP; public class DecimalEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/DoubleEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/DoubleEncoding.java index c26f54b227cd..18eda352b42c 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/DoubleEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/DoubleEncoding.java @@ -15,12 +15,12 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.rcfile.RcFileCorruptionException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.rcfile.RcFileCorruptionException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public class DoubleEncoding implements TextColumnEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/FloatEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/FloatEncoding.java index 7baed157389f..6f64f52d5503 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/FloatEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/FloatEncoding.java @@ -15,12 +15,12 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.rcfile.RcFileCorruptionException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.rcfile.RcFileCorruptionException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public class FloatEncoding implements TextColumnEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/ListEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/ListEncoding.java index 3bb62bc0a862..140a445633ab 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/ListEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/ListEncoding.java @@ -15,10 +15,10 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.RcFileCorruptionException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.RcFileCorruptionException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public class ListEncoding extends BlockEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/LongEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/LongEncoding.java index fad162eebe60..280064a3f496 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/LongEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/LongEncoding.java @@ -16,11 +16,11 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public class LongEncoding implements TextColumnEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/MapEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/MapEncoding.java index b1dd3c18b89c..53dd9f7bf0e9 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/MapEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/MapEncoding.java @@ -15,12 +15,12 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.RcFileCorruptionException; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.RcFileCorruptionException; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public class MapEncoding extends BlockEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/StringEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/StringEncoding.java index 3e752cfb3295..be7a1a8bf427 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/StringEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/StringEncoding.java @@ -16,13 +16,13 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; -import static io.prestosql.rcfile.RcFileDecoderUtils.calculateTruncationLength; +import static io.trino.rcfile.RcFileDecoderUtils.calculateTruncationLength; public class StringEncoding implements TextColumnEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/StructEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/StructEncoding.java index 5c5baa9f78fa..d70941058fc8 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/StructEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/StructEncoding.java @@ -15,10 +15,10 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.RcFileCorruptionException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.RcFileCorruptionException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/TextColumnEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/TextColumnEncoding.java index f20b475b44af..91d2890bead5 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/TextColumnEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/TextColumnEncoding.java @@ -15,10 +15,10 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.rcfile.ColumnEncoding; -import io.prestosql.rcfile.RcFileCorruptionException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.rcfile.ColumnEncoding; +import io.trino.rcfile.RcFileCorruptionException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; public interface TextColumnEncoding extends ColumnEncoding diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/TextRcFileEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/TextRcFileEncoding.java index cb2b40cbc3fc..c6639e62cc3e 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/TextRcFileEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/TextRcFileEncoding.java @@ -15,10 +15,10 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.rcfile.ColumnEncoding; -import io.prestosql.rcfile.RcFileEncoding; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.ColumnEncoding; +import io.trino.rcfile.RcFileEncoding; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; import java.util.List; import java.util.stream.Collectors; diff --git a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/TimestampEncoding.java b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/TimestampEncoding.java index e36fd28c59fc..932e593fe9f2 100644 --- a/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/TimestampEncoding.java +++ b/lib/trino-rcfile/src/main/java/io/trino/rcfile/text/TimestampEncoding.java @@ -15,14 +15,14 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; -import io.prestosql.plugin.base.type.DecodedTimestamp; -import io.prestosql.plugin.base.type.PrestoTimestampEncoder; -import io.prestosql.rcfile.ColumnData; -import io.prestosql.rcfile.EncodeOutput; -import io.prestosql.rcfile.TimestampHolder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.TimestampType; +import io.trino.plugin.base.type.DecodedTimestamp; +import io.trino.plugin.base.type.PrestoTimestampEncoder; +import io.trino.rcfile.ColumnData; +import io.trino.rcfile.EncodeOutput; +import io.trino.rcfile.TimestampHolder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.TimestampType; import java.time.LocalDateTime; import java.time.ZoneOffset; @@ -31,7 +31,7 @@ import java.time.temporal.ChronoField; import java.util.function.BiFunction; -import static io.prestosql.plugin.base.type.PrestoTimestampEncoderFactory.createTimestampEncoder; +import static io.trino.plugin.base.type.PrestoTimestampEncoderFactory.createTimestampEncoder; import static java.nio.charset.StandardCharsets.US_ASCII; import static java.util.Objects.requireNonNull; import static org.joda.time.DateTimeZone.UTC; diff --git a/lib/trino-rcfile/src/test/java/io/trino/rcfile/AbstractTestRcFileReader.java b/lib/trino-rcfile/src/test/java/io/trino/rcfile/AbstractTestRcFileReader.java index d040284c991a..4aec0b4b75b9 100644 --- a/lib/trino-rcfile/src/test/java/io/trino/rcfile/AbstractTestRcFileReader.java +++ b/lib/trino-rcfile/src/test/java/io/trino/rcfile/AbstractTestRcFileReader.java @@ -17,10 +17,10 @@ import com.google.common.collect.DiscreteDomain; import com.google.common.collect.ImmutableList; import com.google.common.collect.Range; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.SqlVarbinary; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.SqlVarbinary; import org.joda.time.DateTimeZone; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -32,19 +32,19 @@ import static com.google.common.collect.Iterables.cycle; import static com.google.common.collect.Iterables.limit; -import static io.prestosql.rcfile.RcFileTester.Format.BINARY; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.rcfile.RcFileTester.Format.BINARY; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Collections.nCopies; import static java.util.stream.Collectors.toList; diff --git a/lib/trino-rcfile/src/test/java/io/trino/rcfile/RcFileTester.java b/lib/trino-rcfile/src/test/java/io/trino/rcfile/RcFileTester.java index 50a8fb2a0fd0..61b033cf1258 100644 --- a/lib/trino-rcfile/src/test/java/io/trino/rcfile/RcFileTester.java +++ b/lib/trino-rcfile/src/test/java/io/trino/rcfile/RcFileTester.java @@ -24,25 +24,25 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.metadata.Metadata; -import io.prestosql.rcfile.binary.BinaryRcFileEncoding; -import io.prestosql.rcfile.text.TextRcFileEncoding; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarcharType; import io.trino.hadoop.HadoopNative; +import io.trino.metadata.Metadata; +import io.trino.rcfile.binary.BinaryRcFileEncoding; +import io.trino.rcfile.text.TextRcFileEncoding; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.common.type.Date; @@ -124,31 +124,31 @@ import static io.airlift.slice.SizeOf.SIZE_OF_LONG; import static io.airlift.units.DataSize.Unit.KILOBYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.rcfile.RcFileDecoderUtils.findFirstSyncPosition; -import static io.prestosql.rcfile.RcFileTester.Compression.BZIP2; -import static io.prestosql.rcfile.RcFileTester.Compression.LZ4; -import static io.prestosql.rcfile.RcFileTester.Compression.NONE; -import static io.prestosql.rcfile.RcFileTester.Compression.SNAPPY; -import static io.prestosql.rcfile.RcFileTester.Compression.ZLIB; -import static io.prestosql.rcfile.RcFileWriter.PRESTO_RCFILE_WRITER_VERSION; -import static io.prestosql.rcfile.RcFileWriter.PRESTO_RCFILE_WRITER_VERSION_METADATA_KEY; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.rescale; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.StandardTypes.MAP; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_MILLISECOND; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.rcfile.RcFileDecoderUtils.findFirstSyncPosition; +import static io.trino.rcfile.RcFileTester.Compression.BZIP2; +import static io.trino.rcfile.RcFileTester.Compression.LZ4; +import static io.trino.rcfile.RcFileTester.Compression.NONE; +import static io.trino.rcfile.RcFileTester.Compression.SNAPPY; +import static io.trino.rcfile.RcFileTester.Compression.ZLIB; +import static io.trino.rcfile.RcFileWriter.PRESTO_RCFILE_WRITER_VERSION; +import static io.trino.rcfile.RcFileWriter.PRESTO_RCFILE_WRITER_VERSION_METADATA_KEY; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.rescale; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.StandardTypes.MAP; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.type.DateTimes.MICROSECONDS_PER_MILLISECOND; import static java.lang.Math.toIntExact; import static java.util.Collections.nCopies; import static java.util.stream.Collectors.toList; diff --git a/lib/trino-rcfile/src/test/java/io/trino/rcfile/TestRcFileReaderManual.java b/lib/trino-rcfile/src/test/java/io/trino/rcfile/TestRcFileReaderManual.java index a2db44aa3dd6..588254526b8d 100644 --- a/lib/trino-rcfile/src/test/java/io/trino/rcfile/TestRcFileReaderManual.java +++ b/lib/trino-rcfile/src/test/java/io/trino/rcfile/TestRcFileReaderManual.java @@ -19,8 +19,8 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.units.DataSize; -import io.prestosql.rcfile.binary.BinaryRcFileEncoding; -import io.prestosql.spi.block.Block; +import io.trino.rcfile.binary.BinaryRcFileEncoding; +import io.trino.spi.block.Block; import org.joda.time.DateTimeZone; import org.testng.annotations.Test; @@ -30,7 +30,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.SmallintType.SMALLINT; import static java.util.stream.Collectors.toList; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/DecoderColumnHandle.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/DecoderColumnHandle.java index b6300f943854..16342819a2ea 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/DecoderColumnHandle.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/DecoderColumnHandle.java @@ -13,8 +13,8 @@ */ package io.trino.decoder; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.type.Type; // Connectors that have rows that can be decoded into // columns using io.prestosql.decoder diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/DecoderErrorCode.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/DecoderErrorCode.java index f03ff54d97b9..057a79fc1e64 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/DecoderErrorCode.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/DecoderErrorCode.java @@ -13,11 +13,11 @@ */ package io.trino.decoder; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.EXTERNAL; public enum DecoderErrorCode implements ErrorCodeSupplier diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/DecoderModule.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/DecoderModule.java index f63863541105..0811664bec47 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/DecoderModule.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/DecoderModule.java @@ -16,15 +16,15 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.multibindings.MapBinder; -import io.prestosql.decoder.avro.AvroDecoderModule; -import io.prestosql.decoder.csv.CsvRowDecoder; -import io.prestosql.decoder.csv.CsvRowDecoderFactory; -import io.prestosql.decoder.dummy.DummyRowDecoder; -import io.prestosql.decoder.dummy.DummyRowDecoderFactory; -import io.prestosql.decoder.json.JsonRowDecoder; -import io.prestosql.decoder.json.JsonRowDecoderFactory; -import io.prestosql.decoder.raw.RawRowDecoder; -import io.prestosql.decoder.raw.RawRowDecoderFactory; +import io.trino.decoder.avro.AvroDecoderModule; +import io.trino.decoder.csv.CsvRowDecoder; +import io.trino.decoder.csv.CsvRowDecoderFactory; +import io.trino.decoder.dummy.DummyRowDecoder; +import io.trino.decoder.dummy.DummyRowDecoderFactory; +import io.trino.decoder.json.JsonRowDecoder; +import io.trino.decoder.json.JsonRowDecoderFactory; +import io.trino.decoder.raw.RawRowDecoder; +import io.trino.decoder.raw.RawRowDecoderFactory; import static com.google.inject.Scopes.SINGLETON; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/FieldValueProvider.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/FieldValueProvider.java index b5a70bbcfb02..1bdf7501c25c 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/FieldValueProvider.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/FieldValueProvider.java @@ -14,8 +14,8 @@ package io.trino.decoder; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; /** * Base class for all providers that return values for a selected column. diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroBytesDeserializer.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroBytesDeserializer.java index 47b5b3347548..b9f5d274c0d1 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroBytesDeserializer.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroBytesDeserializer.java @@ -13,7 +13,7 @@ */ package io.trino.decoder.avro; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import org.apache.avro.io.BinaryDecoder; import org.apache.avro.io.DatumReader; import org.apache.avro.io.DecoderFactory; @@ -21,7 +21,7 @@ import java.io.IOException; import java.nio.ByteBuffer; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.util.Objects.requireNonNull; public class AvroBytesDeserializer diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroColumnDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroColumnDecoder.java index d167a1eb4de5..67ce12881179 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroColumnDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroColumnDecoder.java @@ -17,25 +17,25 @@ import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.RowType.Field; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.RowType.Field; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.avro.generic.GenericEnumSymbol; import org.apache.avro.generic.GenericFixed; import org.apache.avro.generic.GenericRecord; @@ -48,9 +48,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.GENERIC_USER_ERROR; -import static io.prestosql.spi.type.Varchars.truncateToLength; +import static io.trino.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.GENERIC_USER_ERROR; +import static io.trino.spi.type.Varchars.truncateToLength; import static java.lang.Float.floatToIntBits; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroDecoderModule.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroDecoderModule.java index 6c43d36d85d0..f709e23b9763 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroDecoderModule.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroDecoderModule.java @@ -16,7 +16,7 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.decoder.RowDecoderFactory; +import io.trino.decoder.RowDecoderFactory; import static com.google.inject.multibindings.MapBinder.newMapBinder; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroFileDeserializer.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroFileDeserializer.java index 67cca88d3b0d..d1e3251858ac 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroFileDeserializer.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroFileDeserializer.java @@ -13,7 +13,7 @@ */ package io.trino.decoder.avro; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import org.apache.avro.AvroRuntimeException; import org.apache.avro.file.DataFileStream; import org.apache.avro.io.DatumReader; @@ -22,7 +22,7 @@ import java.io.IOException; import java.nio.ByteBuffer; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.util.Objects.requireNonNull; public class AvroFileDeserializer diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroRowDecoderFactory.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroRowDecoderFactory.java index fc49072ea111..a872ac532ccb 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroRowDecoderFactory.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/AvroRowDecoderFactory.java @@ -13,10 +13,10 @@ */ package io.trino.decoder.avro; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.decoder.RowDecoderFactory; -import io.prestosql.decoder.dummy.DummyRowDecoderFactory; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.RowDecoder; +import io.trino.decoder.RowDecoderFactory; +import io.trino.decoder.dummy.DummyRowDecoderFactory; import org.apache.avro.Schema; import org.apache.avro.generic.GenericRecord; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/GenericRecordRowDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/GenericRecordRowDecoder.java index 020cd13aa6d2..cbc57687cb94 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/GenericRecordRowDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/GenericRecordRowDecoder.java @@ -13,9 +13,9 @@ */ package io.trino.decoder.avro; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; import org.apache.avro.generic.GenericRecord; import java.util.AbstractMap; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/SingleValueRowDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/SingleValueRowDecoder.java index 06c3583e95a4..1480587d1987 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/SingleValueRowDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/avro/SingleValueRowDecoder.java @@ -14,9 +14,9 @@ package io.trino.decoder.avro; import com.google.common.collect.ImmutableMap; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; import java.util.Map; import java.util.Optional; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/csv/CsvColumnDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/csv/CsvColumnDecoder.java index 9c693cd12156..1d780824d144 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/csv/CsvColumnDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/csv/CsvColumnDecoder.java @@ -15,24 +15,24 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; -import static io.prestosql.decoder.FieldValueProviders.nullValueProvider; -import static io.prestosql.spi.StandardErrorCode.GENERIC_USER_ERROR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.Varchars.truncateToLength; +import static io.trino.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; +import static io.trino.decoder.FieldValueProviders.nullValueProvider; +import static io.trino.spi.StandardErrorCode.GENERIC_USER_ERROR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.Varchars.truncateToLength; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/csv/CsvRowDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/csv/CsvRowDecoder.java index 76e0e089eb30..14293accd5aa 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/csv/CsvRowDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/csv/CsvRowDecoder.java @@ -14,9 +14,9 @@ package io.trino.decoder.csv; import au.com.bytecode.opencsv.CSVParser; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; import java.nio.charset.StandardCharsets; import java.util.Map; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/csv/CsvRowDecoderFactory.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/csv/CsvRowDecoderFactory.java index 8d8fa3063cb9..fd8674f54e90 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/csv/CsvRowDecoderFactory.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/csv/CsvRowDecoderFactory.java @@ -13,9 +13,9 @@ */ package io.trino.decoder.csv; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.decoder.RowDecoderFactory; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.RowDecoder; +import io.trino.decoder.RowDecoderFactory; import java.util.Map; import java.util.Set; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/dummy/DummyRowDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/dummy/DummyRowDecoder.java index 39f0c9dc62cf..22c9b4bd5d8d 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/dummy/DummyRowDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/dummy/DummyRowDecoder.java @@ -14,9 +14,9 @@ package io.trino.decoder.dummy; import com.google.common.collect.ImmutableMap; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; import java.util.Map; import java.util.Optional; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/dummy/DummyRowDecoderFactory.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/dummy/DummyRowDecoderFactory.java index f815b2dc9097..9b27428cdbc6 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/dummy/DummyRowDecoderFactory.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/dummy/DummyRowDecoderFactory.java @@ -13,9 +13,9 @@ */ package io.trino.decoder.dummy; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.decoder.RowDecoderFactory; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.RowDecoder; +import io.trino.decoder.RowDecoderFactory; import java.util.Map; import java.util.Set; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/AbstractDateTimeJsonValueProvider.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/AbstractDateTimeJsonValueProvider.java index 22584ce26735..6ca9b6863cc2 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/AbstractDateTimeJsonValueProvider.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/AbstractDateTimeJsonValueProvider.java @@ -14,27 +14,27 @@ package io.trino.decoder.json; import com.fasterxml.jackson.databind.JsonNode; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.spi.PrestoException; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; import java.time.Instant; import java.util.concurrent.TimeUnit; -import static io.prestosql.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.MILLISECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; +import static io.trino.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.MILLISECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; import static java.lang.String.format; public abstract class AbstractDateTimeJsonValueProvider diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/CustomDateTimeJsonFieldDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/CustomDateTimeJsonFieldDecoder.java index 0433db4b7121..3129b20a61d2 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/CustomDateTimeJsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/CustomDateTimeJsonFieldDecoder.java @@ -15,11 +15,11 @@ import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.ImmutableSet; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.spi.PrestoException; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; import org.joda.time.chrono.ISOChronology; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; @@ -28,15 +28,15 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; -import static io.prestosql.decoder.json.JsonRowDecoderFactory.throwUnsupportedColumnType; -import static io.prestosql.spi.StandardErrorCode.GENERIC_USER_ERROR; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; +import static io.trino.decoder.json.JsonRowDecoderFactory.throwUnsupportedColumnType; +import static io.trino.spi.StandardErrorCode.GENERIC_USER_ERROR; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/DefaultJsonFieldDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/DefaultJsonFieldDecoder.java index f7f2cdbe7d02..1ff3e0ca1ad9 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/DefaultJsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/DefaultJsonFieldDecoder.java @@ -16,21 +16,21 @@ import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.Varchars.truncateToLength; +import static io.trino.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.Varchars.truncateToLength; import static java.lang.Double.parseDouble; import static java.lang.Long.parseLong; import static java.lang.String.format; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/ISO8601JsonFieldDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/ISO8601JsonFieldDecoder.java index 7046c6774fb1..4ae05bd6271b 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/ISO8601JsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/ISO8601JsonFieldDecoder.java @@ -15,10 +15,10 @@ import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.ImmutableSet; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Type; import java.time.ZoneId; import java.time.ZoneOffset; @@ -27,18 +27,18 @@ import java.util.Set; import java.util.concurrent.TimeUnit; -import static io.prestosql.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; -import static io.prestosql.decoder.json.JsonRowDecoderFactory.throwUnsupportedColumnType; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; +import static io.trino.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; +import static io.trino.decoder.json.JsonRowDecoderFactory.throwUnsupportedColumnType; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; import static java.lang.String.format; import static java.time.format.DateTimeFormatter.ISO_DATE; import static java.time.format.DateTimeFormatter.ISO_DATE_TIME; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/JsonFieldDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/JsonFieldDecoder.java index 9f07da84cc2d..8c1197414361 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/JsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/JsonFieldDecoder.java @@ -14,7 +14,7 @@ package io.trino.decoder.json; import com.fasterxml.jackson.databind.JsonNode; -import io.prestosql.decoder.FieldValueProvider; +import io.trino.decoder.FieldValueProvider; public interface JsonFieldDecoder { diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/JsonRowDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/JsonRowDecoder.java index ee7b7c22fae1..15c9035bb0d5 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/JsonRowDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/JsonRowDecoder.java @@ -18,9 +18,9 @@ import com.fasterxml.jackson.databind.node.MissingNode; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableMap; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; import java.util.HashMap; import java.util.Map; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/JsonRowDecoderFactory.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/JsonRowDecoderFactory.java index e61869ca7a52..1173dc1ae45e 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/JsonRowDecoderFactory.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/JsonRowDecoderFactory.java @@ -14,10 +14,10 @@ package io.trino.decoder.json; import com.fasterxml.jackson.databind.ObjectMapper; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.decoder.RowDecoderFactory; -import io.prestosql.spi.PrestoException; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.RowDecoder; +import io.trino.decoder.RowDecoderFactory; +import io.trino.spi.PrestoException; import javax.inject.Inject; @@ -27,7 +27,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.spi.StandardErrorCode.GENERIC_USER_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_USER_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.function.Function.identity; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/MillisecondsSinceEpochJsonFieldDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/MillisecondsSinceEpochJsonFieldDecoder.java index b24fdd59f58e..a938c1825b82 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/MillisecondsSinceEpochJsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/MillisecondsSinceEpochJsonFieldDecoder.java @@ -15,20 +15,20 @@ import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.ImmutableSet; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.spi.PrestoException; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; import java.util.Set; -import static io.prestosql.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; -import static io.prestosql.decoder.json.JsonRowDecoderFactory.throwUnsupportedColumnType; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; +import static io.trino.decoder.json.JsonRowDecoderFactory.throwUnsupportedColumnType; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; import static java.lang.Long.parseLong; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/RFC2822JsonFieldDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/RFC2822JsonFieldDecoder.java index 7244a1ad36fc..d3b284a14383 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/RFC2822JsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/RFC2822JsonFieldDecoder.java @@ -15,11 +15,11 @@ import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.ImmutableSet; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.spi.PrestoException; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; import org.joda.time.chrono.ISOChronology; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; @@ -27,11 +27,11 @@ import java.util.Locale; import java.util.Set; -import static io.prestosql.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; -import static io.prestosql.decoder.json.JsonRowDecoderFactory.throwUnsupportedColumnType; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; +import static io.trino.decoder.json.JsonRowDecoderFactory.throwUnsupportedColumnType; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/SecondsSinceEpochJsonFieldDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/SecondsSinceEpochJsonFieldDecoder.java index e21fd77d6898..c16824e8d4a7 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/SecondsSinceEpochJsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/json/SecondsSinceEpochJsonFieldDecoder.java @@ -15,21 +15,21 @@ import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.ImmutableSet; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.spi.PrestoException; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; import java.util.Set; -import static io.prestosql.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; -import static io.prestosql.decoder.json.JsonRowDecoderFactory.throwUnsupportedColumnType; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; +import static io.trino.decoder.json.JsonRowDecoderFactory.throwUnsupportedColumnType; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; import static java.lang.Long.parseLong; import static java.lang.Math.multiplyExact; import static java.lang.String.format; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/raw/RawColumnDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/raw/RawColumnDecoder.java index 19bbfcbd0a21..b9baa9d75b9c 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/raw/RawColumnDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/raw/RawColumnDecoder.java @@ -17,13 +17,13 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.spi.type.Varchars; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.spi.type.Varchars; import java.nio.ByteBuffer; import java.util.Arrays; @@ -35,13 +35,13 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.decoder.DecoderErrorCode.DECODER_CONVERSION_NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Integer.parseInt; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/raw/RawRowDecoder.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/raw/RawRowDecoder.java index fefcdddd55d3..5c4961579299 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/raw/RawRowDecoder.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/raw/RawRowDecoder.java @@ -13,9 +13,9 @@ */ package io.trino.decoder.raw; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; import java.util.Map; import java.util.Optional; diff --git a/lib/trino-record-decoder/src/main/java/io/trino/decoder/raw/RawRowDecoderFactory.java b/lib/trino-record-decoder/src/main/java/io/trino/decoder/raw/RawRowDecoderFactory.java index 2468245ea36f..05188f7230d1 100644 --- a/lib/trino-record-decoder/src/main/java/io/trino/decoder/raw/RawRowDecoderFactory.java +++ b/lib/trino-record-decoder/src/main/java/io/trino/decoder/raw/RawRowDecoderFactory.java @@ -13,9 +13,9 @@ */ package io.trino.decoder.raw; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.decoder.RowDecoderFactory; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.RowDecoder; +import io.trino.decoder.RowDecoderFactory; import java.util.Map; import java.util.Set; diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/DecoderTestColumnHandle.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/DecoderTestColumnHandle.java index 67d376629a16..b236ca7ddc55 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/DecoderTestColumnHandle.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/DecoderTestColumnHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/avro/AvroDecoderTestUtil.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/avro/AvroDecoderTestUtil.java index c9b9ba75b191..cd35beba3b51 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/avro/AvroDecoderTestUtil.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/avro/AvroDecoderTestUtil.java @@ -13,13 +13,13 @@ */ package io.trino.decoder.avro; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.block.Block; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.avro.generic.GenericEnumSymbol; import org.apache.avro.generic.GenericFixed; import org.apache.avro.generic.GenericRecord; @@ -28,8 +28,8 @@ import java.util.List; import java.util.Map; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/avro/TestAvroDecoder.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/avro/TestAvroDecoder.java index e19a7fc4fecd..e2e94c16d5c3 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/avro/TestAvroDecoder.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/avro/TestAvroDecoder.java @@ -17,21 +17,21 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slices; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.DecoderTestColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.DecoderTestColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; +import io.trino.metadata.Metadata; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; import org.apache.avro.AvroTypeException; import org.apache.avro.Schema; import org.apache.avro.SchemaBuilder; @@ -58,24 +58,24 @@ import java.util.Map; import java.util.Set; -import static io.prestosql.decoder.avro.AvroDecoderTestUtil.checkArrayValues; -import static io.prestosql.decoder.avro.AvroDecoderTestUtil.checkMapValues; -import static io.prestosql.decoder.avro.AvroDecoderTestUtil.checkRowValues; -import static io.prestosql.decoder.util.DecoderTestUtil.checkIsNull; -import static io.prestosql.decoder.util.DecoderTestUtil.checkValue; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.decoder.avro.AvroDecoderTestUtil.checkArrayValues; +import static io.trino.decoder.avro.AvroDecoderTestUtil.checkMapValues; +import static io.trino.decoder.avro.AvroDecoderTestUtil.checkRowValues; +import static io.trino.decoder.util.DecoderTestUtil.checkIsNull; +import static io.trino.decoder.util.DecoderTestUtil.checkValue; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +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 java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/csv/TestCsvDecoder.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/csv/TestCsvDecoder.java index 1973dc69b3a9..177de9022f23 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/csv/TestCsvDecoder.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/csv/TestCsvDecoder.java @@ -14,21 +14,21 @@ package io.trino.decoder.csv; import com.google.common.collect.ImmutableSet; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.DecoderTestColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.DecoderTestColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; +import io.trino.spi.PrestoException; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; import org.assertj.core.api.ThrowableAssert; import org.testng.annotations.Test; @@ -36,10 +36,10 @@ import java.util.Map; import java.util.Set; -import static io.prestosql.decoder.util.DecoderTestUtil.checkIsNull; -import static io.prestosql.decoder.util.DecoderTestUtil.checkValue; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.decoder.util.DecoderTestUtil.checkIsNull; +import static io.trino.decoder.util.DecoderTestUtil.checkValue; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.util.Collections.emptyMap; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/JsonFieldDecoderTester.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/JsonFieldDecoderTester.java index fc092b9737de..eed1dd1629a8 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/JsonFieldDecoderTester.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/JsonFieldDecoderTester.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableSet; import io.airlift.json.ObjectMapperProvider; import io.airlift.slice.Slice; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.DecoderTestColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.DecoderTestColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Type; import java.util.Map; import java.util.Optional; diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestCustomDateTimeJsonFieldDecoder.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestCustomDateTimeJsonFieldDecoder.java index caa72ce261a7..57a5c44266a8 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestCustomDateTimeJsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestCustomDateTimeJsonFieldDecoder.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableSet; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.decoder.DecoderTestColumnHandle; -import io.prestosql.spi.PrestoException; +import io.trino.decoder.DecoderTestColumnHandle; +import io.trino.spi.PrestoException; import org.testng.annotations.Test; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; import static java.util.Collections.emptyMap; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestDefaultJsonFieldDecoder.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestDefaultJsonFieldDecoder.java index a96ec1c3e50f..8326c3d44e9d 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestDefaultJsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestDefaultJsonFieldDecoder.java @@ -13,17 +13,17 @@ */ package io.trino.decoder.json; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.math.BigInteger; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.util.Arrays.asList; public class TestDefaultJsonFieldDecoder diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestISO8601JsonFieldDecoder.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestISO8601JsonFieldDecoder.java index 77f48fbcf46c..77036c7579e3 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestISO8601JsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestISO8601JsonFieldDecoder.java @@ -13,17 +13,17 @@ */ package io.trino.decoder.json; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.testng.annotations.Test; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; import static java.util.Arrays.asList; public class TestISO8601JsonFieldDecoder diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestJsonDecoder.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestJsonDecoder.java index 066ce730589e..5ab2bd42733c 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestJsonDecoder.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestJsonDecoder.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableSet; import com.google.common.io.ByteStreams; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.DecoderTestColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.DecoderTestColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Type; import org.assertj.core.api.ThrowableAssert.ThrowingCallable; import org.testng.annotations.Test; @@ -30,24 +30,24 @@ import java.util.Optional; import java.util.Set; -import static io.prestosql.decoder.util.DecoderTestUtil.checkIsNull; -import static io.prestosql.decoder.util.DecoderTestUtil.checkValue; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.decoder.util.DecoderTestUtil.checkIsNull; +import static io.trino.decoder.util.DecoderTestUtil.checkValue; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.util.Arrays.asList; import static java.util.Collections.emptyMap; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestMillisecondsSinceEpochJsonFieldDecoder.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestMillisecondsSinceEpochJsonFieldDecoder.java index 97f81830b242..d936ee72aba8 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestMillisecondsSinceEpochJsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestMillisecondsSinceEpochJsonFieldDecoder.java @@ -13,18 +13,18 @@ */ package io.trino.decoder.json; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; import static java.util.Arrays.asList; public class TestMillisecondsSinceEpochJsonFieldDecoder diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestRFC2822JsonFieldDecoder.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestRFC2822JsonFieldDecoder.java index af02047cc8c3..590f179d5096 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestRFC2822JsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestRFC2822JsonFieldDecoder.java @@ -13,14 +13,14 @@ */ package io.trino.decoder.json; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.testng.annotations.Test; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeyForOffset; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; import static java.util.Arrays.asList; public class TestRFC2822JsonFieldDecoder diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestSecondsSinceEpochJsonFieldDecoder.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestSecondsSinceEpochJsonFieldDecoder.java index fb8d90ef2027..e9ef023bdf02 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestSecondsSinceEpochJsonFieldDecoder.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/json/TestSecondsSinceEpochJsonFieldDecoder.java @@ -13,18 +13,18 @@ */ package io.trino.decoder.json; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.packTimeWithTimeZone; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; import static java.util.Arrays.asList; public class TestSecondsSinceEpochJsonFieldDecoder diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/raw/TestRawDecoder.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/raw/TestRawDecoder.java index 62eb5eb8f05a..2604d4abe0bd 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/raw/TestRawDecoder.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/raw/TestRawDecoder.java @@ -14,22 +14,22 @@ package io.trino.decoder.raw; import com.google.common.collect.ImmutableSet; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.DecoderTestColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.DecoderTestColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; +import io.trino.spi.PrestoException; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.assertj.core.api.ThrowableAssert; import org.testng.annotations.Test; @@ -38,11 +38,11 @@ import java.util.Map; import java.util.Set; -import static io.prestosql.decoder.util.DecoderTestUtil.checkIsNull; -import static io.prestosql.decoder.util.DecoderTestUtil.checkValue; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.decoder.util.DecoderTestUtil.checkIsNull; +import static io.trino.decoder.util.DecoderTestUtil.checkValue; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.util.Collections.emptyMap; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/util/DecoderTestUtil.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/util/DecoderTestUtil.java index 2125bb974152..8ec8fe29ee60 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/util/DecoderTestUtil.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/util/DecoderTestUtil.java @@ -14,8 +14,8 @@ package io.trino.decoder.util; import io.airlift.slice.Slice; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; import java.util.Map; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloClient.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloClient.java index 0093426e5e21..9b9f0fdc4a20 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloClient.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloClient.java @@ -19,28 +19,28 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import io.airlift.log.Logger; -import io.prestosql.plugin.accumulo.conf.AccumuloConfig; -import io.prestosql.plugin.accumulo.conf.AccumuloSessionProperties; -import io.prestosql.plugin.accumulo.conf.AccumuloTableProperties; -import io.prestosql.plugin.accumulo.index.IndexLookup; -import io.prestosql.plugin.accumulo.index.Indexer; -import io.prestosql.plugin.accumulo.io.AccumuloPageSink; -import io.prestosql.plugin.accumulo.metadata.AccumuloTable; -import io.prestosql.plugin.accumulo.metadata.AccumuloView; -import io.prestosql.plugin.accumulo.metadata.ZooKeeperMetadataManager; -import io.prestosql.plugin.accumulo.model.AccumuloColumnConstraint; -import io.prestosql.plugin.accumulo.model.AccumuloColumnHandle; -import io.prestosql.plugin.accumulo.model.TabletSplitMetadata; -import io.prestosql.plugin.accumulo.serializers.AccumuloRowSerializer; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Marker.Bound; -import io.prestosql.spi.type.TimestampType; +import io.trino.plugin.accumulo.conf.AccumuloConfig; +import io.trino.plugin.accumulo.conf.AccumuloSessionProperties; +import io.trino.plugin.accumulo.conf.AccumuloTableProperties; +import io.trino.plugin.accumulo.index.IndexLookup; +import io.trino.plugin.accumulo.index.Indexer; +import io.trino.plugin.accumulo.io.AccumuloPageSink; +import io.trino.plugin.accumulo.metadata.AccumuloTable; +import io.trino.plugin.accumulo.metadata.AccumuloView; +import io.trino.plugin.accumulo.metadata.ZooKeeperMetadataManager; +import io.trino.plugin.accumulo.model.AccumuloColumnConstraint; +import io.trino.plugin.accumulo.model.AccumuloColumnHandle; +import io.trino.plugin.accumulo.model.TabletSplitMetadata; +import io.trino.plugin.accumulo.serializers.AccumuloRowSerializer; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Marker.Bound; +import io.trino.spi.type.TimestampType; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.Connector; @@ -69,14 +69,14 @@ import java.util.Set; import java.util.stream.Collectors; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_DNE; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_EXISTS; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; -import static io.prestosql.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_DNE; +import static io.trino.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_EXISTS; +import static io.trino.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; +import static io.trino.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloConnector.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloConnector.java index f822058343ad..c4492aa97104 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloConnector.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloConnector.java @@ -14,18 +14,18 @@ package io.trino.plugin.accumulo; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.plugin.accumulo.conf.AccumuloSessionProperties; -import io.prestosql.plugin.accumulo.conf.AccumuloTableProperties; -import io.prestosql.plugin.accumulo.io.AccumuloPageSinkProvider; -import io.prestosql.plugin.accumulo.io.AccumuloRecordSetProvider; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.plugin.accumulo.conf.AccumuloSessionProperties; +import io.trino.plugin.accumulo.conf.AccumuloTableProperties; +import io.trino.plugin.accumulo.io.AccumuloPageSinkProvider; +import io.trino.plugin.accumulo.io.AccumuloRecordSetProvider; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; @@ -34,8 +34,8 @@ import java.util.concurrent.ConcurrentMap; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.transaction.IsolationLevel.READ_UNCOMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.transaction.IsolationLevel.READ_UNCOMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; /** diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloConnectorFactory.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloConnectorFactory.java index 880690d19a54..fb1e41e36d44 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloConnectorFactory.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloConnectorFactory.java @@ -16,10 +16,10 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import java.util.Map; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloErrorCode.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloErrorCode.java index d50e1ffc87fb..25c6f8d0a80d 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloErrorCode.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloErrorCode.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.accumulo; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.EXTERNAL; public enum AccumuloErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloHandleResolver.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloHandleResolver.java index 94819598f5f7..aa86e4eefae2 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloHandleResolver.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloHandleResolver.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.accumulo; -import io.prestosql.plugin.accumulo.model.AccumuloColumnHandle; -import io.prestosql.plugin.accumulo.model.AccumuloSplit; -import io.prestosql.plugin.accumulo.model.AccumuloTableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.plugin.accumulo.model.AccumuloColumnHandle; +import io.trino.plugin.accumulo.model.AccumuloSplit; +import io.trino.plugin.accumulo.model.AccumuloTableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class AccumuloHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloMetadata.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloMetadata.java index 804835961207..2f609ea7b795 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloMetadata.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloMetadata.java @@ -20,29 +20,29 @@ import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; import io.airlift.slice.Slice; -import io.prestosql.plugin.accumulo.metadata.AccumuloTable; -import io.prestosql.plugin.accumulo.model.AccumuloColumnHandle; -import io.prestosql.plugin.accumulo.model.AccumuloTableHandle; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.ComputedStatistics; +import io.trino.plugin.accumulo.metadata.AccumuloTable; +import io.trino.plugin.accumulo.model.AccumuloColumnHandle; +import io.trino.plugin.accumulo.model.AccumuloTableHandle; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.ComputedStatistics; import javax.inject.Inject; @@ -55,8 +55,8 @@ import java.util.concurrent.atomic.AtomicReference; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_EXISTS; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_EXISTS; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloModule.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloModule.java index 31ad337f1332..2677243d6f1a 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloModule.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloModule.java @@ -20,19 +20,19 @@ import com.google.inject.Scopes; import io.airlift.json.JsonCodec; import io.airlift.log.Logger; -import io.prestosql.plugin.accumulo.conf.AccumuloConfig; -import io.prestosql.plugin.accumulo.conf.AccumuloSessionProperties; -import io.prestosql.plugin.accumulo.conf.AccumuloTableProperties; -import io.prestosql.plugin.accumulo.index.ColumnCardinalityCache; -import io.prestosql.plugin.accumulo.index.IndexLookup; -import io.prestosql.plugin.accumulo.io.AccumuloPageSinkProvider; -import io.prestosql.plugin.accumulo.io.AccumuloRecordSetProvider; -import io.prestosql.plugin.accumulo.metadata.AccumuloTable; -import io.prestosql.plugin.accumulo.metadata.ZooKeeperMetadataManager; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.accumulo.conf.AccumuloConfig; +import io.trino.plugin.accumulo.conf.AccumuloSessionProperties; +import io.trino.plugin.accumulo.conf.AccumuloTableProperties; +import io.trino.plugin.accumulo.index.ColumnCardinalityCache; +import io.trino.plugin.accumulo.index.IndexLookup; +import io.trino.plugin.accumulo.io.AccumuloPageSinkProvider; +import io.trino.plugin.accumulo.io.AccumuloRecordSetProvider; +import io.trino.plugin.accumulo.metadata.AccumuloTable; +import io.trino.plugin.accumulo.metadata.ZooKeeperMetadataManager; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.Connector; @@ -49,7 +49,7 @@ import static io.airlift.configuration.ConfigBinder.configBinder; import static io.airlift.json.JsonBinder.jsonBinder; import static io.airlift.json.JsonCodecBinder.jsonCodecBinder; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; +import static io.trino.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloPlugin.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloPlugin.java index 83c6d04755ba..886aee388cdb 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloPlugin.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.accumulo; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class AccumuloPlugin implements Plugin diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloSplitManager.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloSplitManager.java index 6c60fef8afd8..b195aafeb365 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloSplitManager.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloSplitManager.java @@ -14,24 +14,24 @@ package io.trino.plugin.accumulo; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.accumulo.model.AccumuloColumnConstraint; -import io.prestosql.plugin.accumulo.model.AccumuloColumnHandle; -import io.prestosql.plugin.accumulo.model.AccumuloSplit; -import io.prestosql.plugin.accumulo.model.AccumuloTableHandle; -import io.prestosql.plugin.accumulo.model.TabletSplitMetadata; -import io.prestosql.plugin.accumulo.model.WrappedRange; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.TupleDomain.ColumnDomain; +import io.trino.plugin.accumulo.model.AccumuloColumnConstraint; +import io.trino.plugin.accumulo.model.AccumuloColumnHandle; +import io.trino.plugin.accumulo.model.AccumuloSplit; +import io.trino.plugin.accumulo.model.AccumuloTableHandle; +import io.trino.plugin.accumulo.model.TabletSplitMetadata; +import io.trino.plugin.accumulo.model.WrappedRange; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain.ColumnDomain; import javax.inject.Inject; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloTableManager.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloTableManager.java index e5c13823e3e8..9c2d1d36a458 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloTableManager.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloTableManager.java @@ -14,7 +14,7 @@ package io.trino.plugin.accumulo; import io.airlift.log.Logger; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.Connector; @@ -31,9 +31,9 @@ import java.util.Map; import java.util.Set; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_DNE; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_EXISTS; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; +import static io.trino.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_DNE; +import static io.trino.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_EXISTS; +import static io.trino.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; import static java.util.Objects.requireNonNull; /** diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloTransactionHandle.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloTransactionHandle.java index bee546db5531..e7dff2f1f43e 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloTransactionHandle.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/AccumuloTransactionHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Objects; import java.util.UUID; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/Types.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/Types.java index b443fad15efc..cb5a8ddbf836 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/Types.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/Types.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.accumulo; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; /** * Utility class for Presto Type-related functionality. diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/conf/AccumuloSessionProperties.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/conf/AccumuloSessionProperties.java index a30e84e0a7c0..988ec3eca877 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/conf/AccumuloSessionProperties.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/conf/AccumuloSessionProperties.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.Duration; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; import java.util.List; -import static io.prestosql.plugin.base.session.PropertyMetadataUtil.durationProperty; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.doubleProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; +import static io.trino.plugin.base.session.PropertyMetadataUtil.durationProperty; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.doubleProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; import static java.util.concurrent.TimeUnit.MILLISECONDS; /** diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/conf/AccumuloTableProperties.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/conf/AccumuloTableProperties.java index d58dfef07d00..1b3b949abbf1 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/conf/AccumuloTableProperties.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/conf/AccumuloTableProperties.java @@ -18,12 +18,12 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import io.prestosql.plugin.accumulo.serializers.AccumuloRowSerializer; -import io.prestosql.plugin.accumulo.serializers.LexicoderRowSerializer; -import io.prestosql.plugin.accumulo.serializers.StringRowSerializer; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.accumulo.serializers.AccumuloRowSerializer; +import io.trino.plugin.accumulo.serializers.LexicoderRowSerializer; +import io.trino.plugin.accumulo.serializers.StringRowSerializer; +import io.trino.spi.PrestoException; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.VarcharType; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; @@ -35,9 +35,9 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; import static java.util.Objects.requireNonNull; /** diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/index/ColumnCardinalityCache.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/index/ColumnCardinalityCache.java index 1d4a53f52e24..70dff9ddce56 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/index/ColumnCardinalityCache.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/index/ColumnCardinalityCache.java @@ -25,9 +25,9 @@ import io.airlift.concurrent.BoundedExecutor; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.plugin.accumulo.conf.AccumuloConfig; -import io.prestosql.plugin.accumulo.model.AccumuloColumnConstraint; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.accumulo.conf.AccumuloConfig; +import io.trino.plugin.accumulo.model.AccumuloColumnConstraint; +import io.trino.spi.PrestoException; import org.apache.accumulo.core.client.BatchScanner; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.TableNotFoundException; @@ -59,11 +59,11 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.collect.Streams.stream; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; -import static io.prestosql.plugin.accumulo.index.Indexer.CARDINALITY_CQ_AS_TEXT; -import static io.prestosql.plugin.accumulo.index.Indexer.getIndexColumnFamily; -import static io.prestosql.plugin.accumulo.index.Indexer.getMetricsTableName; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; +import static io.trino.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; +import static io.trino.plugin.accumulo.index.Indexer.CARDINALITY_CQ_AS_TEXT; +import static io.trino.plugin.accumulo.index.Indexer.getIndexColumnFamily; +import static io.trino.plugin.accumulo.index.Indexer.getMetricsTableName; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; import static java.lang.Long.parseLong; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/index/IndexLookup.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/index/IndexLookup.java index b814b0af4940..c9a1920dd0b8 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/index/IndexLookup.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/index/IndexLookup.java @@ -20,11 +20,11 @@ import io.airlift.concurrent.BoundedExecutor; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.plugin.accumulo.model.AccumuloColumnConstraint; -import io.prestosql.plugin.accumulo.model.TabletSplitMetadata; -import io.prestosql.plugin.accumulo.serializers.AccumuloRowSerializer; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.accumulo.model.AccumuloColumnConstraint; +import io.trino.plugin.accumulo.model.TabletSplitMetadata; +import io.trino.plugin.accumulo.serializers.AccumuloRowSerializer; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; import org.apache.accumulo.core.client.BatchScanner; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.Scanner; @@ -54,21 +54,21 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.accumulo.AccumuloClient.getRangesFromDomain; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; -import static io.prestosql.plugin.accumulo.conf.AccumuloSessionProperties.getIndexCardinalityCachePollingDuration; -import static io.prestosql.plugin.accumulo.conf.AccumuloSessionProperties.getIndexSmallCardThreshold; -import static io.prestosql.plugin.accumulo.conf.AccumuloSessionProperties.getIndexThreshold; -import static io.prestosql.plugin.accumulo.conf.AccumuloSessionProperties.getNumIndexRowsPerSplit; -import static io.prestosql.plugin.accumulo.conf.AccumuloSessionProperties.isIndexMetricsEnabled; -import static io.prestosql.plugin.accumulo.conf.AccumuloSessionProperties.isIndexShortCircuitEnabled; -import static io.prestosql.plugin.accumulo.conf.AccumuloSessionProperties.isOptimizeIndexEnabled; -import static io.prestosql.plugin.accumulo.index.Indexer.CARDINALITY_CQ_AS_TEXT; -import static io.prestosql.plugin.accumulo.index.Indexer.METRICS_TABLE_ROWID_AS_TEXT; -import static io.prestosql.plugin.accumulo.index.Indexer.METRICS_TABLE_ROWS_CF_AS_TEXT; -import static io.prestosql.plugin.accumulo.index.Indexer.getIndexTableName; -import static io.prestosql.plugin.accumulo.index.Indexer.getMetricsTableName; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; +import static io.trino.plugin.accumulo.AccumuloClient.getRangesFromDomain; +import static io.trino.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; +import static io.trino.plugin.accumulo.conf.AccumuloSessionProperties.getIndexCardinalityCachePollingDuration; +import static io.trino.plugin.accumulo.conf.AccumuloSessionProperties.getIndexSmallCardThreshold; +import static io.trino.plugin.accumulo.conf.AccumuloSessionProperties.getIndexThreshold; +import static io.trino.plugin.accumulo.conf.AccumuloSessionProperties.getNumIndexRowsPerSplit; +import static io.trino.plugin.accumulo.conf.AccumuloSessionProperties.isIndexMetricsEnabled; +import static io.trino.plugin.accumulo.conf.AccumuloSessionProperties.isIndexShortCircuitEnabled; +import static io.trino.plugin.accumulo.conf.AccumuloSessionProperties.isOptimizeIndexEnabled; +import static io.trino.plugin.accumulo.index.Indexer.CARDINALITY_CQ_AS_TEXT; +import static io.trino.plugin.accumulo.index.Indexer.METRICS_TABLE_ROWID_AS_TEXT; +import static io.trino.plugin.accumulo.index.Indexer.METRICS_TABLE_ROWS_CF_AS_TEXT; +import static io.trino.plugin.accumulo.index.Indexer.getIndexTableName; +import static io.trino.plugin.accumulo.index.Indexer.getMetricsTableName; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/index/Indexer.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/index/Indexer.java index f28bf66b8a8e..87c0ecd3a204 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/index/Indexer.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/index/Indexer.java @@ -19,15 +19,15 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Multimap; import com.google.common.primitives.UnsignedBytes; -import io.prestosql.plugin.accumulo.Types; -import io.prestosql.plugin.accumulo.iterators.MaxByteArrayCombiner; -import io.prestosql.plugin.accumulo.iterators.MinByteArrayCombiner; -import io.prestosql.plugin.accumulo.metadata.AccumuloTable; -import io.prestosql.plugin.accumulo.model.AccumuloColumnHandle; -import io.prestosql.plugin.accumulo.serializers.AccumuloRowSerializer; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Type; +import io.trino.plugin.accumulo.Types; +import io.trino.plugin.accumulo.iterators.MaxByteArrayCombiner; +import io.trino.plugin.accumulo.iterators.MinByteArrayCombiner; +import io.trino.plugin.accumulo.metadata.AccumuloTable; +import io.trino.plugin.accumulo.model.AccumuloColumnHandle; +import io.trino.plugin.accumulo.serializers.AccumuloRowSerializer; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Type; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; @@ -65,9 +65,9 @@ import java.util.stream.Collectors; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_DNE; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_DNE; +import static io.trino.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.nio.ByteBuffer.wrap; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloPageSink.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloPageSink.java index 2597242ea8c8..2eb453256731 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloPageSink.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloPageSink.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.plugin.accumulo.Types; -import io.prestosql.plugin.accumulo.index.Indexer; -import io.prestosql.plugin.accumulo.metadata.AccumuloTable; -import io.prestosql.plugin.accumulo.model.AccumuloColumnHandle; -import io.prestosql.plugin.accumulo.model.Field; -import io.prestosql.plugin.accumulo.model.Row; -import io.prestosql.plugin.accumulo.serializers.AccumuloRowSerializer; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeUtils; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.accumulo.Types; +import io.trino.plugin.accumulo.index.Indexer; +import io.trino.plugin.accumulo.metadata.AccumuloTable; +import io.trino.plugin.accumulo.model.AccumuloColumnHandle; +import io.trino.plugin.accumulo.model.Field; +import io.trino.plugin.accumulo.model.Row; +import io.trino.plugin.accumulo.serializers.AccumuloRowSerializer; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeUtils; +import io.trino.spi.type.VarcharType; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchWriter; @@ -45,21 +45,21 @@ import java.util.concurrent.CompletableFuture; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_DNE; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; -import static io.prestosql.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.plugin.accumulo.AccumuloErrorCode.ACCUMULO_TABLE_DNE; +import static io.trino.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; +import static io.trino.spi.StandardErrorCode.FUNCTION_IMPLEMENTATION_ERROR; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.util.Objects.requireNonNull; import static java.util.concurrent.CompletableFuture.completedFuture; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloPageSinkProvider.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloPageSinkProvider.java index b88af319ce32..d9c322ba04cc 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloPageSinkProvider.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloPageSinkProvider.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.accumulo.io; -import io.prestosql.plugin.accumulo.AccumuloClient; -import io.prestosql.plugin.accumulo.conf.AccumuloConfig; -import io.prestosql.plugin.accumulo.model.AccumuloTableHandle; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.plugin.accumulo.AccumuloClient; +import io.trino.plugin.accumulo.conf.AccumuloConfig; +import io.trino.plugin.accumulo.model.AccumuloTableHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import org.apache.accumulo.core.client.Connector; import javax.inject.Inject; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloRecordCursor.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloRecordCursor.java index 0e47970596b9..c4343d44cc7e 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloRecordCursor.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloRecordCursor.java @@ -15,14 +15,14 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.plugin.accumulo.Types; -import io.prestosql.plugin.accumulo.model.AccumuloColumnHandle; -import io.prestosql.plugin.accumulo.serializers.AccumuloRowSerializer; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.accumulo.Types; +import io.trino.plugin.accumulo.model.AccumuloColumnHandle; +import io.trino.plugin.accumulo.serializers.AccumuloRowSerializer; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.accumulo.core.client.BatchScanner; import org.apache.accumulo.core.client.IteratorSetting; import org.apache.accumulo.core.data.Key; @@ -38,20 +38,20 @@ import java.util.Map.Entry; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.IO_ERROR; -import static io.prestosql.plugin.accumulo.io.AccumuloPageSink.ROW_ID_COLUMN; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.plugin.accumulo.AccumuloErrorCode.IO_ERROR; +import static io.trino.plugin.accumulo.io.AccumuloPageSink.ROW_ID_COLUMN; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloRecordSet.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloRecordSet.java index f529281083b7..885bdd7a4607 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloRecordSet.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloRecordSet.java @@ -17,16 +17,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import io.airlift.log.Logger; -import io.prestosql.plugin.accumulo.conf.AccumuloSessionProperties; -import io.prestosql.plugin.accumulo.model.AccumuloColumnHandle; -import io.prestosql.plugin.accumulo.model.AccumuloSplit; -import io.prestosql.plugin.accumulo.model.AccumuloTableHandle; -import io.prestosql.plugin.accumulo.serializers.AccumuloRowSerializer; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.plugin.accumulo.conf.AccumuloSessionProperties; +import io.trino.plugin.accumulo.model.AccumuloColumnHandle; +import io.trino.plugin.accumulo.model.AccumuloSplit; +import io.trino.plugin.accumulo.model.AccumuloTableHandle; +import io.trino.plugin.accumulo.serializers.AccumuloRowSerializer; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchScanner; @@ -36,7 +36,7 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; +import static io.trino.plugin.accumulo.AccumuloErrorCode.UNEXPECTED_ACCUMULO_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloRecordSetProvider.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloRecordSetProvider.java index e631aa9cd954..ada0efe1aaa0 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloRecordSetProvider.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/io/AccumuloRecordSetProvider.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.accumulo.io; -import io.prestosql.plugin.accumulo.conf.AccumuloConfig; -import io.prestosql.plugin.accumulo.model.AccumuloColumnHandle; -import io.prestosql.plugin.accumulo.model.AccumuloSplit; -import io.prestosql.plugin.accumulo.model.AccumuloTableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.plugin.accumulo.conf.AccumuloConfig; +import io.trino.plugin.accumulo.model.AccumuloColumnHandle; +import io.trino.plugin.accumulo.model.AccumuloSplit; +import io.trino.plugin.accumulo.model.AccumuloTableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import org.apache.accumulo.core.client.Connector; import javax.inject.Inject; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/metadata/AccumuloTable.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/metadata/AccumuloTable.java index e77e41f7c537..3df5a6c97be8 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/metadata/AccumuloTable.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/metadata/AccumuloTable.java @@ -17,19 +17,19 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.accumulo.index.Indexer; -import io.prestosql.plugin.accumulo.model.AccumuloColumnHandle; -import io.prestosql.plugin.accumulo.serializers.AccumuloRowSerializer; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.accumulo.index.Indexer; +import io.trino.plugin.accumulo.model.AccumuloColumnHandle; +import io.trino.plugin.accumulo.serializers.AccumuloRowSerializer; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.SchemaTableName; import java.lang.reflect.InvocationTargetException; import java.util.List; import java.util.Optional; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; import static java.util.Objects.requireNonNull; /** diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/metadata/AccumuloView.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/metadata/AccumuloView.java index bcb8ad763a8a..06b211455156 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/metadata/AccumuloView.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/metadata/AccumuloView.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import java.util.Objects; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/metadata/ZooKeeperMetadataManager.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/metadata/ZooKeeperMetadataManager.java index dc744fecacd1..81483be1a41f 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/metadata/ZooKeeperMetadataManager.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/metadata/ZooKeeperMetadataManager.java @@ -17,12 +17,12 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.plugin.accumulo.AccumuloModule; -import io.prestosql.plugin.accumulo.conf.AccumuloConfig; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.accumulo.AccumuloModule; +import io.trino.plugin.accumulo.conf.AccumuloConfig; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFactory; import org.apache.curator.retry.RetryForever; @@ -36,7 +36,7 @@ import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.accumulo.AccumuloErrorCode.ZOOKEEPER_ERROR; +import static io.trino.plugin.accumulo.AccumuloErrorCode.ZOOKEEPER_ERROR; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloColumnConstraint.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloColumnConstraint.java index a8b5289ed080..bd4b1839890f 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloColumnConstraint.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloColumnConstraint.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.predicate.Domain; +import io.trino.spi.predicate.Domain; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloColumnHandle.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloColumnHandle.java index ddeae8f24bd6..142e4b8324ab 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloColumnHandle.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloColumnHandle.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloSplit.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloSplit.java index f4efddbbc336..1a43238bfba4 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloSplit.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloSplit.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import org.apache.accumulo.core.data.Range; import java.util.List; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloTableHandle.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloTableHandle.java index a35d4e68895f..37f1c30b16f9 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloTableHandle.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/AccumuloTableHandle.java @@ -16,21 +16,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.plugin.accumulo.metadata.AccumuloTable; -import io.prestosql.plugin.accumulo.serializers.AccumuloRowSerializer; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.accumulo.metadata.AccumuloTable; +import io.trino.plugin.accumulo.serializers.AccumuloRowSerializer; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.Objects; import java.util.Optional; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; import static java.util.Objects.requireNonNull; public final class AccumuloTableHandle diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/Field.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/Field.java index 5eab7a4ef35a..9229c12b0767 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/Field.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/Field.java @@ -17,12 +17,12 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.plugin.accumulo.Types; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.ArrayBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.accumulo.Types; +import io.trino.spi.PrestoException; +import io.trino.spi.block.ArrayBlock; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.sql.Date; import java.sql.Time; @@ -33,20 +33,20 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.floorDiv; import static java.lang.Math.toIntExact; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/Row.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/Row.java index 12584c9a2756..bf43b5b60484 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/Row.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/Row.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.accumulo.model; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/RowSchema.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/RowSchema.java index 331b4f92a688..93b93ff63bb5 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/RowSchema.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/model/RowSchema.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.accumulo.model; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.List; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; import static java.lang.String.format; public class RowSchema diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/serializers/AccumuloRowSerializer.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/serializers/AccumuloRowSerializer.java index 316131e22afc..7e5dd3234c2b 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/serializers/AccumuloRowSerializer.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/serializers/AccumuloRowSerializer.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.plugin.accumulo.Types; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeUtils; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.accumulo.Types; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeUtils; +import io.trino.spi.type.VarcharType; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Value; import org.apache.hadoop.io.Text; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/serializers/LexicoderRowSerializer.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/serializers/LexicoderRowSerializer.java index e48ccefbb3a0..fd2cb032171c 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/serializers/LexicoderRowSerializer.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/serializers/LexicoderRowSerializer.java @@ -14,11 +14,11 @@ package io.trino.plugin.accumulo.serializers; import io.airlift.slice.Slice; -import io.prestosql.plugin.accumulo.Types; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.accumulo.Types; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.accumulo.core.client.lexicoder.BytesLexicoder; import org.apache.accumulo.core.client.lexicoder.DoubleLexicoder; import org.apache.accumulo.core.client.lexicoder.Lexicoder; @@ -36,20 +36,20 @@ import java.util.Map; import java.util.Map.Entry; -import static io.prestosql.plugin.accumulo.io.AccumuloPageSink.ROW_ID_COLUMN; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.accumulo.io.AccumuloPageSink.ROW_ID_COLUMN; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/serializers/StringRowSerializer.java b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/serializers/StringRowSerializer.java index 8150dae65018..786d1d29f4c7 100644 --- a/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/serializers/StringRowSerializer.java +++ b/plugin/trino-accumulo/src/main/java/io/trino/plugin/accumulo/serializers/StringRowSerializer.java @@ -14,10 +14,10 @@ package io.trino.plugin.accumulo.serializers; import io.airlift.slice.Slice; -import io.prestosql.plugin.accumulo.Types; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.plugin.accumulo.Types; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Value; import org.apache.hadoop.io.Text; @@ -29,20 +29,20 @@ import java.util.Map; import java.util.Map.Entry; -import static io.prestosql.plugin.accumulo.io.AccumuloPageSink.ROW_ID_COLUMN; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.accumulo.io.AccumuloPageSink.ROW_ID_COLUMN; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.concurrent.TimeUnit.DAYS; diff --git a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/AccumuloQueryRunner.java b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/AccumuloQueryRunner.java index 7a5b4ebae38f..4e30a63e6abd 100644 --- a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/AccumuloQueryRunner.java +++ b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/AccumuloQueryRunner.java @@ -17,13 +17,13 @@ import com.google.common.collect.ImmutableSortedSet; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.plugin.accumulo.conf.AccumuloConfig; -import io.prestosql.plugin.accumulo.serializers.LexicoderRowSerializer; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.metadata.QualifiedObjectName; +import io.trino.plugin.accumulo.conf.AccumuloConfig; +import io.trino.plugin.accumulo.serializers.LexicoderRowSerializer; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import org.apache.hadoop.io.Text; import org.intellij.lang.annotations.Language; @@ -31,9 +31,9 @@ import java.util.Map; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestAccumuloClient.java b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestAccumuloClient.java index c3527877e692..b573d38e0cf1 100644 --- a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestAccumuloClient.java +++ b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestAccumuloClient.java @@ -14,17 +14,17 @@ package io.trino.plugin.accumulo; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.accumulo.conf.AccumuloConfig; -import io.prestosql.plugin.accumulo.conf.AccumuloTableProperties; -import io.prestosql.plugin.accumulo.index.ColumnCardinalityCache; -import io.prestosql.plugin.accumulo.index.IndexLookup; -import io.prestosql.plugin.accumulo.metadata.AccumuloTable; -import io.prestosql.plugin.accumulo.metadata.ZooKeeperMetadataManager; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.InternalTypeManager; +import io.trino.plugin.accumulo.conf.AccumuloConfig; +import io.trino.plugin.accumulo.conf.AccumuloTableProperties; +import io.trino.plugin.accumulo.index.ColumnCardinalityCache; +import io.trino.plugin.accumulo.index.IndexLookup; +import io.trino.plugin.accumulo.metadata.AccumuloTable; +import io.trino.plugin.accumulo.metadata.ZooKeeperMetadataManager; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.TypeOperators; +import io.trino.type.InternalTypeManager; import org.apache.accumulo.core.client.Connector; import org.testng.annotations.Test; @@ -32,8 +32,8 @@ import java.util.List; import java.util.Map; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertNotNull; public class TestAccumuloClient diff --git a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestAccumuloDistributedQueries.java b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestAccumuloDistributedQueries.java index d0903ce8d3af..3fe666fe4ce9 100644 --- a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestAccumuloDistributedQueries.java +++ b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestAccumuloDistributedQueries.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.TestTable; import org.intellij.lang.annotations.Language; import org.testng.SkipException; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.accumulo.AccumuloQueryRunner.createAccumuloQueryRunner; +import static io.trino.plugin.accumulo.AccumuloQueryRunner.createAccumuloQueryRunner; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestAccumuloIntegrationSmokeTest.java b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestAccumuloIntegrationSmokeTest.java index dc8b1c03e209..d5c5bb2c8cf3 100644 --- a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestAccumuloIntegrationSmokeTest.java +++ b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestAccumuloIntegrationSmokeTest.java @@ -14,15 +14,15 @@ package io.trino.plugin.accumulo; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; -import static io.prestosql.plugin.accumulo.AccumuloQueryRunner.createAccumuloQueryRunner; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.accumulo.AccumuloQueryRunner.createAccumuloQueryRunner; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; import static org.assertj.core.api.Assertions.assertThat; public class TestAccumuloIntegrationSmokeTest diff --git a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/index/TestIndexer.java b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/index/TestIndexer.java index 7d559db61a60..7bdf1b2665e4 100644 --- a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/index/TestIndexer.java +++ b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/index/TestIndexer.java @@ -14,12 +14,12 @@ package io.trino.plugin.accumulo.index; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.accumulo.metadata.AccumuloTable; -import io.prestosql.plugin.accumulo.model.AccumuloColumnHandle; -import io.prestosql.plugin.accumulo.serializers.AccumuloRowSerializer; -import io.prestosql.plugin.accumulo.serializers.LexicoderRowSerializer; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.accumulo.metadata.AccumuloTable; +import io.trino.plugin.accumulo.model.AccumuloColumnHandle; +import io.trino.plugin.accumulo.serializers.AccumuloRowSerializer; +import io.trino.plugin.accumulo.serializers.LexicoderRowSerializer; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.Instance; @@ -40,8 +40,8 @@ import java.util.Map.Entry; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/model/TestField.java b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/model/TestField.java index ec4845b1fb44..6f655dc7791a 100644 --- a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/model/TestField.java +++ b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/model/TestField.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slices; -import io.prestosql.plugin.accumulo.serializers.AccumuloRowSerializer; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.plugin.accumulo.serializers.AccumuloRowSerializer; +import io.trino.spi.block.Block; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; import org.testng.annotations.Test; import java.sql.Date; @@ -30,19 +30,19 @@ import java.util.GregorianCalendar; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Float.floatToIntBits; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/model/TestRow.java b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/model/TestRow.java index 05a560f0bc34..df5e088339be 100644 --- a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/model/TestRow.java +++ b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/model/TestRow.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.plugin.accumulo.serializers.AccumuloRowSerializer; -import io.prestosql.spi.type.ArrayType; +import io.trino.plugin.accumulo.serializers.AccumuloRowSerializer; +import io.trino.spi.type.ArrayType; import org.testng.annotations.Test; import java.sql.Timestamp; @@ -24,18 +24,18 @@ import java.util.GregorianCalendar; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Float.floatToIntBits; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/serializers/AbstractTestAccumuloRowSerializer.java b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/serializers/AbstractTestAccumuloRowSerializer.java index febe7698d370..14f6ca59681c 100644 --- a/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/serializers/AbstractTestAccumuloRowSerializer.java +++ b/plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/serializers/AbstractTestAccumuloRowSerializer.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.Value; @@ -34,19 +34,19 @@ import java.util.Map; import java.util.UUID; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopColumnHandle.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopColumnHandle.java index 61228ec3e0d0..2e62245d2126 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopColumnHandle.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopColumnHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnHandle; import java.util.Objects; diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopConnector.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopConnector.java index 5a5ef035e1aa..ef05b06828d9 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopConnector.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopConnector.java @@ -14,13 +14,13 @@ package io.trino.plugin.atop; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopConnectorFactory.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopConnectorFactory.java index 906f05f4af2b..e881791b554a 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopConnectorFactory.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopConnectorFactory.java @@ -16,14 +16,14 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.plugin.atop.AtopConnectorConfig.AtopSecurity; -import io.prestosql.plugin.base.security.AllowAllAccessControlModule; -import io.prestosql.plugin.base.security.FileBasedAccessControlModule; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.plugin.atop.AtopConnectorConfig.AtopSecurity; +import io.trino.plugin.base.security.AllowAllAccessControlModule; +import io.trino.plugin.base.security.FileBasedAccessControlModule; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import java.util.Map; diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopErrorCode.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopErrorCode.java index 62b2abee1d92..6d725b7c1b29 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopErrorCode.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopErrorCode.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.atop; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.EXTERNAL; public enum AtopErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopHandleResolver.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopHandleResolver.java index a817fb213c8d..754539e1bdf7 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopHandleResolver.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.atop; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class AtopHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopMetadata.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopMetadata.java index b77392f25bd6..22bb247fd359 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopMetadata.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopMetadata.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.atop.AtopTable.AtopColumn; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ColumnNotFoundException; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.atop.AtopTable.AtopColumn; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ColumnNotFoundException; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.predicate.Domain; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; @@ -39,8 +39,8 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import static io.prestosql.plugin.atop.AtopTable.AtopColumn.END_TIME; -import static io.prestosql.plugin.atop.AtopTable.AtopColumn.START_TIME; +import static io.trino.plugin.atop.AtopTable.AtopColumn.END_TIME; +import static io.trino.plugin.atop.AtopTable.AtopColumn.START_TIME; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopModule.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopModule.java index e91dc4d8066f..028401e8e4d4 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopModule.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopModule.java @@ -16,9 +16,9 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.CatalogName; +import io.trino.spi.NodeManager; +import io.trino.spi.type.TypeManager; import static io.airlift.configuration.ConfigBinder.configBinder; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopPageSource.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopPageSource.java index 51af8a6778e1..0afe9687329b 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopPageSource.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopPageSource.java @@ -16,12 +16,12 @@ import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.plugin.atop.AtopTable.AtopColumn; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.plugin.atop.AtopTable.AtopColumn; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import javax.annotation.Nullable; diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopPageSourceProvider.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopPageSourceProvider.java index bd89d29b1925..d4ede2906ead 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopPageSourceProvider.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopPageSourceProvider.java @@ -14,17 +14,17 @@ package io.trino.plugin.atop; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.atop.AtopTable.AtopColumn; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.atop.AtopTable.AtopColumn; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopPlugin.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopPlugin.java index c9a960b8d1d4..5482b4abf6ef 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopPlugin.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.atop; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class AtopPlugin implements Plugin diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopProcessFactory.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopProcessFactory.java index 6f4ca6af6210..558808ccb65b 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopProcessFactory.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopProcessFactory.java @@ -17,8 +17,8 @@ import com.google.common.util.concurrent.TimeLimiter; import com.google.common.util.concurrent.UncheckedTimeoutException; import io.airlift.units.Duration; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.base.CatalogName; +import io.trino.spi.PrestoException; import javax.annotation.PreDestroy; import javax.inject.Inject; @@ -35,8 +35,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.atop.AtopErrorCode.ATOP_CANNOT_START_PROCESS_ERROR; -import static io.prestosql.plugin.atop.AtopErrorCode.ATOP_READ_TIMEOUT; +import static io.trino.plugin.atop.AtopErrorCode.ATOP_CANNOT_START_PROCESS_ERROR; +import static io.trino.plugin.atop.AtopErrorCode.ATOP_READ_TIMEOUT; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newFixedThreadPool; diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopSplit.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopSplit.java index 50cc48b5302a..f0638ea4c17a 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopSplit.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.time.ZoneId; import java.time.ZonedDateTime; diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopSplitManager.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopSplitManager.java index b3a48a879b6a..196405361919 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopSplitManager.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopSplitManager.java @@ -13,19 +13,19 @@ */ package io.trino.plugin.atop; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.ValueSet; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.ValueSet; import javax.inject.Inject; @@ -34,9 +34,9 @@ import java.util.ArrayList; import java.util.List; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; import static java.util.Objects.requireNonNull; public class AtopSplitManager diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopTable.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopTable.java index f07a4672aae2..71b388ee916d 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopTable.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopTable.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; import java.util.Arrays; import java.util.List; @@ -26,17 +26,17 @@ import java.util.function.Function; import java.util.stream.Collectors; -import static io.prestosql.plugin.atop.AtopTable.AtopColumn.END_TIME; -import static io.prestosql.plugin.atop.AtopTable.AtopColumn.HOST_IP; -import static io.prestosql.plugin.atop.AtopTable.AtopColumn.START_TIME; -import static io.prestosql.plugin.atop.AtopTable.AtopColumnParser.bigintParser; -import static io.prestosql.plugin.atop.AtopTable.AtopColumnParser.varcharParser; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.StandardTypes.INTERVAL_DAY_TO_SECOND; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.atop.AtopTable.AtopColumn.END_TIME; +import static io.trino.plugin.atop.AtopTable.AtopColumn.HOST_IP; +import static io.trino.plugin.atop.AtopTable.AtopColumn.START_TIME; +import static io.trino.plugin.atop.AtopTable.AtopColumnParser.bigintParser; +import static io.trino.plugin.atop.AtopTable.AtopColumnParser.varcharParser; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.StandardTypes.INTERVAL_DAY_TO_SECOND; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; public enum AtopTable diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopTableHandle.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopTableHandle.java index 759f1bc324a5..59b491f7a796 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopTableHandle.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopTableHandle.java @@ -15,12 +15,12 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.predicate.Domain; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.predicate.Domain; import java.util.Objects; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; import static java.util.Objects.requireNonNull; public class AtopTableHandle diff --git a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopTransactionHandle.java b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopTransactionHandle.java index 49ca3b328c60..a94b567926d3 100644 --- a/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopTransactionHandle.java +++ b/plugin/trino-atop/src/main/java/io/trino/plugin/atop/AtopTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.atop; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum AtopTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/LocalAtopQueryRunner.java b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/LocalAtopQueryRunner.java index 871c11dd7382..feaa19a9112c 100644 --- a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/LocalAtopQueryRunner.java +++ b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/LocalAtopQueryRunner.java @@ -14,15 +14,15 @@ package io.trino.plugin.atop; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.spi.type.TimeZoneKey; +import io.trino.testing.LocalQueryRunner; import java.util.Map; import java.util.TimeZone; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class LocalAtopQueryRunner { diff --git a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopConnectorConfig.java b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopConnectorConfig.java index 76b7fec33d48..e39c7da20cfe 100644 --- a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopConnectorConfig.java +++ b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopConnectorConfig.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableMap; import io.airlift.units.Duration; -import io.prestosql.plugin.atop.AtopConnectorConfig.AtopSecurity; +import io.trino.plugin.atop.AtopConnectorConfig.AtopSecurity; import org.testng.annotations.Test; import java.io.IOException; diff --git a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopHang.java b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopHang.java index 2f31da274a69..258cfc6cc293 100644 --- a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopHang.java +++ b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopHang.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.Resources; -import io.prestosql.spi.PrestoException; -import io.prestosql.testing.QueryRunner; +import io.trino.spi.PrestoException; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -28,8 +28,8 @@ import static com.google.common.io.Files.createTempDir; import static com.google.common.io.Resources.toByteArray; -import static io.prestosql.plugin.atop.AtopErrorCode.ATOP_READ_TIMEOUT; -import static io.prestosql.plugin.atop.LocalAtopQueryRunner.createQueryRunner; +import static io.trino.plugin.atop.AtopErrorCode.ATOP_READ_TIMEOUT; +import static io.trino.plugin.atop.LocalAtopQueryRunner.createQueryRunner; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopSecurity.java b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopSecurity.java index 0dbfdf089a52..cb588f3909de 100644 --- a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopSecurity.java +++ b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopSecurity.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.Resources; -import io.prestosql.Session; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.Identity; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.Identity; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -27,8 +27,8 @@ import java.nio.file.Files; import java.nio.file.Path; -import static io.prestosql.plugin.atop.LocalAtopQueryRunner.createQueryRunner; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.atop.LocalAtopQueryRunner.createQueryRunner; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestAtopSecurity { diff --git a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopSmoke.java b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopSmoke.java index 0763183512d1..c5e3e4db66e4 100644 --- a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopSmoke.java +++ b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopSmoke.java @@ -14,15 +14,15 @@ package io.trino.plugin.atop; import com.google.common.collect.Iterables; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.plugin.atop.LocalAtopQueryRunner.createQueryRunner; +import static io.trino.plugin.atop.LocalAtopQueryRunner.createQueryRunner; import static org.testng.Assert.assertEquals; public class TestAtopSmoke diff --git a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopSplit.java b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopSplit.java index 26817dcdcee7..8b7d0891c000 100644 --- a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopSplit.java +++ b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopSplit.java @@ -14,7 +14,7 @@ package io.trino.plugin.atop; import io.airlift.json.JsonCodec; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import org.testng.annotations.Test; import java.time.ZoneId; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/BaseJdbcClient.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/BaseJdbcClient.java index af6629fb6c7b..7b8375cc5d9a 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/BaseJdbcClient.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/BaseJdbcClient.java @@ -23,21 +23,21 @@ import com.google.common.collect.ImmutableSortedSet; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.FixedSplitSource; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.FixedSplitSource; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import javax.annotation.Nullable; @@ -68,38 +68,38 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.booleanWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.charWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.dateWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.doubleWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.jdbcTypeToPrestoType; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.longDecimalWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.realWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.shortDecimalWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varbinaryWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharReadFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; -import static io.prestosql.plugin.jdbc.TypeHandlingJdbcSessionProperties.getUnsupportedTypeHandling; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.IGNORE; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; +import static io.trino.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.booleanWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.charWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.dateWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.doubleWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.jdbcTypeToPrestoType; +import static io.trino.plugin.jdbc.StandardColumnMappings.longDecimalWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.realWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.shortDecimalWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varbinaryWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharReadFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; +import static io.trino.plugin.jdbc.TypeHandlingJdbcSessionProperties.getUnsupportedTypeHandling; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.IGNORE; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.lang.String.CASE_INSENSITIVE_ORDER; import static java.lang.String.format; import static java.lang.String.join; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/CachingJdbcClient.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/CachingJdbcClient.java index efd11bd9bd5a..fd41031a62ed 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/CachingJdbcClient.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/CachingJdbcClient.java @@ -20,20 +20,20 @@ import com.google.common.collect.ImmutableMap; import com.google.common.util.concurrent.UncheckedExecutionException; import io.airlift.units.Duration; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.Type; import javax.inject.Inject; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/ColumnMapping.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/ColumnMapping.java index 934e375b9774..fc8b0ae2e7f2 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/ColumnMapping.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/ColumnMapping.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.FULL_PUSHDOWN; +import static io.trino.plugin.jdbc.PredicatePushdownController.FULL_PUSHDOWN; import static java.util.Objects.requireNonNull; public final class ColumnMapping diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/ConnectionFactory.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/ConnectionFactory.java index 57f080908a27..825d41854c02 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/ConnectionFactory.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/ConnectionFactory.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSession; import javax.annotation.PreDestroy; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DecimalConfig.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DecimalConfig.java index 0a39400e140c..115873879f00 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DecimalConfig.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DecimalConfig.java @@ -22,7 +22,7 @@ import java.math.RoundingMode; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_MAPPING; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_MAPPING; import static java.math.RoundingMode.UNNECESSARY; public class DecimalConfig diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DecimalModule.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DecimalModule.java index 650fcef2d0a2..7ddf5a217f8f 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DecimalModule.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DecimalModule.java @@ -17,7 +17,7 @@ import com.google.inject.Module; import static io.airlift.configuration.ConfigBinder.configBinder; -import static io.prestosql.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider; +import static io.trino.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider; public class DecimalModule implements Module diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DecimalSessionSessionProperties.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DecimalSessionSessionProperties.java index e0d4a4658560..39706f98dcc6 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DecimalSessionSessionProperties.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DecimalSessionSessionProperties.java @@ -14,17 +14,17 @@ package io.trino.plugin.jdbc; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; import java.math.RoundingMode; import java.util.List; -import static io.prestosql.plugin.jdbc.DecimalConfig.DecimalMapping; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; +import static io.trino.plugin.jdbc.DecimalConfig.DecimalMapping; +import static io.trino.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; public class DecimalSessionSessionProperties implements SessionPropertiesProvider diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DriverConnectionFactory.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DriverConnectionFactory.java index 488f37ec77c1..8fb5fe42131e 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DriverConnectionFactory.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DriverConnectionFactory.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.plugin.jdbc.credential.CredentialPropertiesProvider; -import io.prestosql.plugin.jdbc.credential.CredentialProvider; -import io.prestosql.plugin.jdbc.credential.DefaultCredentialPropertiesProvider; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.jdbc.credential.CredentialPropertiesProvider; +import io.trino.plugin.jdbc.credential.CredentialProvider; +import io.trino.plugin.jdbc.credential.DefaultCredentialPropertiesProvider; +import io.trino.spi.connector.ConnectorSession; import java.sql.Connection; import java.sql.Driver; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/ForwardingJdbcClient.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/ForwardingJdbcClient.java index 8afad94d2526..1f7a72d61e8a 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/ForwardingJdbcClient.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/ForwardingJdbcClient.java @@ -13,18 +13,18 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.Type; import java.sql.Connection; import java.sql.PreparedStatement; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcClient.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcClient.java index 75141d9411a1..f79ce5b14d14 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcClient.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcClient.java @@ -13,19 +13,19 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.Type; import java.sql.Connection; import java.sql.PreparedStatement; @@ -35,7 +35,7 @@ import java.util.Optional; import java.util.Set; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; public interface JdbcClient { diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcColumnHandle.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcColumnHandle.java index 27aa8804710d..1f74e888930a 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcColumnHandle.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcColumnHandle.java @@ -17,9 +17,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Joiner; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnector.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnector.java index 008a0c41034d..c6e958929e5d 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnector.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnector.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableSet; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorCapabilities; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorCapabilities; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; @@ -38,9 +38,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Sets.immutableEnumSet; -import static io.prestosql.spi.connector.ConnectorCapabilities.NOT_NULL_COLUMN_CONSTRAINT; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.connector.ConnectorCapabilities.NOT_NULL_COLUMN_CONSTRAINT; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; public class JdbcConnector diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnectorFactory.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnectorFactory.java index e4635e0e5691..b0e452085cec 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnectorFactory.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnectorFactory.java @@ -16,13 +16,13 @@ import com.google.inject.Injector; import com.google.inject.Module; import io.airlift.bootstrap.Bootstrap; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.VersionEmbedder; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.NodeManager; +import io.trino.spi.VersionEmbedder; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.type.TypeManager; import java.util.Map; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcDiagnosticModule.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcDiagnosticModule.java index 857400d6c704..302db6491740 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcDiagnosticModule.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcDiagnosticModule.java @@ -20,12 +20,12 @@ import com.google.inject.Provides; import com.google.inject.Singleton; import io.airlift.log.Logger; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.base.jmx.MBeanServerModule; -import io.prestosql.plugin.base.util.LoggingInvocationHandler; -import io.prestosql.plugin.base.util.LoggingInvocationHandler.ReflectiveParameterNamesProvider; -import io.prestosql.plugin.jdbc.jmx.StatisticsAwareConnectionFactory; -import io.prestosql.plugin.jdbc.jmx.StatisticsAwareJdbcClient; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.base.jmx.MBeanServerModule; +import io.trino.plugin.base.util.LoggingInvocationHandler; +import io.trino.plugin.base.util.LoggingInvocationHandler.ReflectiveParameterNamesProvider; +import io.trino.plugin.jdbc.jmx.StatisticsAwareConnectionFactory; +import io.trino.plugin.jdbc.jmx.StatisticsAwareJdbcClient; import org.weakref.jmx.guice.MBeanModule; import static com.google.common.reflect.Reflection.newProxy; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcErrorCode.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcErrorCode.java index 29f10971e1c3..66cd4e761bd9 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcErrorCode.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcErrorCode.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.EXTERNAL; public enum JdbcErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcHandleResolver.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcHandleResolver.java index 30f18a74ddbb..ca5ac133ad26 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcHandleResolver.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcHandleResolver.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class JdbcHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcIdentity.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcIdentity.java index 5988652952c0..1a334ecf2307 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcIdentity.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcIdentity.java @@ -14,7 +14,7 @@ package io.trino.plugin.jdbc; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSession; import java.security.Principal; import java.util.Map; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcMetadata.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcMetadata.java index 0ddc6a9f3584..4c2576084294 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcMetadata.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcMetadata.java @@ -17,38 +17,38 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.plugin.jdbc.PredicatePushdownController.DomainPushdownResult; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.AggregationApplicationResult; -import io.prestosql.spi.connector.Assignment; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.LimitApplicationResult; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.statistics.TableStatistics; +import io.trino.plugin.jdbc.PredicatePushdownController.DomainPushdownResult; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.AggregationApplicationResult; +import io.trino.spi.connector.Assignment; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.LimitApplicationResult; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Variable; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.statistics.TableStatistics; import java.util.Collection; import java.util.HashMap; @@ -64,8 +64,8 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.plugin.jdbc.JdbcMetadataSessionProperties.isAggregationPushdownEnabled; -import static io.prestosql.spi.StandardErrorCode.PERMISSION_DENIED; +import static io.trino.plugin.jdbc.JdbcMetadataSessionProperties.isAggregationPushdownEnabled; +import static io.trino.spi.StandardErrorCode.PERMISSION_DENIED; import static java.util.Objects.requireNonNull; public class JdbcMetadata diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcMetadataSessionProperties.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcMetadataSessionProperties.java index 369ad239499f..8f614b94dfb7 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcMetadataSessionProperties.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcMetadataSessionProperties.java @@ -14,18 +14,18 @@ package io.trino.plugin.jdbc; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; import java.util.List; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; import static java.lang.String.format; public class JdbcMetadataSessionProperties diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcModule.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcModule.java index e540663b5ec3..73270944dc5a 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcModule.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcModule.java @@ -18,12 +18,12 @@ import com.google.inject.Module; import com.google.inject.Scopes; import com.google.inject.multibindings.Multibinder; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.procedure.Procedure; +import io.trino.plugin.base.CatalogName; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.procedure.Procedure; import javax.inject.Provider; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcOutputTableHandle.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcOutputTableHandle.java index f5b044d47549..ed0286134aa0 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcOutputTableHandle.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcOutputTableHandle.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.type.Type; import javax.annotation.Nullable; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSink.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSink.java index 7164b822bbaf..45ac32921db6 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSink.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSink.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import java.sql.Connection; import java.sql.PreparedStatement; @@ -33,9 +33,9 @@ import static com.google.common.base.MoreObjects.firstNonNull; import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; -import static io.prestosql.plugin.jdbc.JdbcErrorCode.JDBC_NON_TRANSIENT_ERROR; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; +import static io.trino.plugin.jdbc.JdbcErrorCode.JDBC_NON_TRANSIENT_ERROR; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.util.concurrent.CompletableFuture.completedFuture; public class JdbcPageSink diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSinkProvider.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSinkProvider.java index 730b81537956..b4d842e4374d 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSinkProvider.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPageSinkProvider.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import javax.inject.Inject; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPlugin.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPlugin.java index 1e9e41cd0f3f..6a755cf6da58 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPlugin.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcPlugin.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Module; -import io.prestosql.plugin.jdbc.credential.CredentialProviderModule; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.plugin.jdbc.credential.CredentialProviderModule; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Strings.isNullOrEmpty; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcRecordCursor.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcRecordCursor.java index 2719e13286c2..2543c7f36f3e 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcRecordCursor.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcRecordCursor.java @@ -16,10 +16,10 @@ import com.google.common.base.VerifyException; import io.airlift.log.Logger; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.Type; import java.sql.Connection; import java.sql.PreparedStatement; @@ -31,7 +31,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; +import static io.trino.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; import static java.util.Objects.requireNonNull; public class JdbcRecordCursor diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcRecordSet.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcRecordSet.java index 85a2ac33f203..670b09baeac4 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcRecordSet.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcRecordSet.java @@ -14,10 +14,10 @@ package io.trino.plugin.jdbc; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcRecordSetProvider.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcRecordSetProvider.java index b43b2eb233c2..e5c48fa07934 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcRecordSetProvider.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcRecordSetProvider.java @@ -14,13 +14,13 @@ package io.trino.plugin.jdbc; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import javax.inject.Inject; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcSplit.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcSplit.java index 2b59091b6f20..9c70ba36982c 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcSplit.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; import java.util.Optional; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcSplitManager.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcSplitManager.java index 8c502cfb9890..9c1335484c7b 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcSplitManager.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcSplitManager.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; import javax.inject.Inject; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcTableHandle.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcTableHandle.java index fe590ffa7b26..5b3ee7f5e4e0 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcTableHandle.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcTableHandle.java @@ -17,10 +17,10 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import javax.annotation.Nullable; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcTransactionHandle.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcTransactionHandle.java index fa01d634d84e..4d8bccf6c50f 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcTransactionHandle.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcTransactionHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Objects; import java.util.UUID; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/PredicatePushdownController.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/PredicatePushdownController.java index a60edd094057..2f864b041e4c 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/PredicatePushdownController.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/PredicatePushdownController.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.predicate.DiscreteValues; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Ranges; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.predicate.DiscreteValues; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Ranges; -import static io.prestosql.plugin.jdbc.JdbcMetadataSessionProperties.getDomainCompactionThreshold; +import static io.trino.plugin.jdbc.JdbcMetadataSessionProperties.getDomainCompactionThreshold; import static java.util.Objects.requireNonNull; public interface PredicatePushdownController diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/QueryBuilder.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/QueryBuilder.java index 27ed59dab886..5839fc0a5c19 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/QueryBuilder.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/QueryBuilder.java @@ -18,12 +18,12 @@ import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; import io.airlift.slice.Slice; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; import java.sql.Connection; import java.sql.PreparedStatement; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/RetryingConnectionFactory.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/RetryingConnectionFactory.java index bd8fed11bffe..bd1d2393e895 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/RetryingConnectionFactory.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/RetryingConnectionFactory.java @@ -14,8 +14,8 @@ package io.trino.plugin.jdbc; import com.google.common.base.Throwables; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; import net.jodah.failsafe.Failsafe; import net.jodah.failsafe.FailsafeException; import net.jodah.failsafe.RetryPolicy; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/SessionPropertiesProvider.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/SessionPropertiesProvider.java index ad04d9a92dc9..0e644ccb670d 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/SessionPropertiesProvider.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/SessionPropertiesProvider.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.session.PropertyMetadata; import java.util.List; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/StandardColumnMappings.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/StandardColumnMappings.java index 88237b4229d1..123c062c28eb 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/StandardColumnMappings.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/StandardColumnMappings.java @@ -17,13 +17,13 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.joda.time.DateTimeZone; import org.joda.time.chrono.ISOChronology; @@ -48,33 +48,33 @@ import static io.airlift.slice.SliceUtf8.countCodePoints; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.Decimals.decodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.spi.type.Decimals.encodeShortScaledValue; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.MAX_SHORT_PRECISION; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_DAY; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_DAY; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.spi.type.Timestamps.round; -import static io.prestosql.spi.type.Timestamps.roundDiv; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.Decimals.decodeUnscaledValue; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.Decimals.encodeShortScaledValue; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.MAX_SHORT_PRECISION; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_DAY; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_DAY; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.spi.type.Timestamps.round; +import static io.trino.spi.type.Timestamps.roundDiv; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.floorDiv; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/TablePropertiesProvider.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/TablePropertiesProvider.java index 2678cc7add02..c0c7b54a6576 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/TablePropertiesProvider.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/TablePropertiesProvider.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.session.PropertyMetadata; import java.util.List; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/TransactionCachingJdbcClient.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/TransactionCachingJdbcClient.java index c8857d30d315..1e1c88f5487c 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/TransactionCachingJdbcClient.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/TransactionCachingJdbcClient.java @@ -16,10 +16,10 @@ import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import io.airlift.units.Duration; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.TableStatistics; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.TableStatistics; import java.util.Objects; import java.util.Set; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/TypeHandlingJdbcSessionProperties.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/TypeHandlingJdbcSessionProperties.java index ab91341f6801..3266b0e5a31f 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/TypeHandlingJdbcSessionProperties.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/TypeHandlingJdbcSessionProperties.java @@ -14,14 +14,14 @@ package io.trino.plugin.jdbc; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; import java.util.List; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.enumProperty; public class TypeHandlingJdbcSessionProperties implements SessionPropertiesProvider diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialPropertiesProvider.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialPropertiesProvider.java index d3d290df3c5a..05a0769a1e03 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialPropertiesProvider.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialPropertiesProvider.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.jdbc.credential; -import io.prestosql.plugin.jdbc.JdbcIdentity; +import io.trino.plugin.jdbc.JdbcIdentity; import java.util.Map; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialProvider.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialProvider.java index 2849abdbe548..08b26c99443f 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialProvider.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialProvider.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.jdbc.credential; -import io.prestosql.plugin.jdbc.JdbcIdentity; +import io.trino.plugin.jdbc.JdbcIdentity; import java.util.Optional; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialProviderModule.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialProviderModule.java index 3e5c62085ddd..2318ec2f48ac 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialProviderModule.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialProviderModule.java @@ -18,8 +18,8 @@ import com.google.inject.Provides; import io.airlift.configuration.AbstractConfigurationAwareModule; import io.airlift.configuration.ConfigurationFactory; -import io.prestosql.plugin.jdbc.credential.file.ConfigFileBasedCredentialProviderConfig; -import io.prestosql.plugin.jdbc.credential.keystore.KeyStoreBasedCredentialProviderConfig; +import io.trino.plugin.jdbc.credential.file.ConfigFileBasedCredentialProviderConfig; +import io.trino.plugin.jdbc.credential.keystore.KeyStoreBasedCredentialProviderConfig; import javax.inject.Singleton; @@ -33,11 +33,11 @@ import static io.airlift.configuration.ConditionalModule.installModuleIf; import static io.airlift.configuration.ConfigBinder.configBinder; import static io.airlift.configuration.ConfigurationLoader.loadPropertiesFrom; -import static io.prestosql.plugin.jdbc.credential.CredentialProviderType.FILE; -import static io.prestosql.plugin.jdbc.credential.CredentialProviderType.INLINE; -import static io.prestosql.plugin.jdbc.credential.CredentialProviderType.KEYSTORE; -import static io.prestosql.plugin.jdbc.credential.keystore.KeyStoreUtils.loadKeyStore; -import static io.prestosql.plugin.jdbc.credential.keystore.KeyStoreUtils.readEntity; +import static io.trino.plugin.jdbc.credential.CredentialProviderType.FILE; +import static io.trino.plugin.jdbc.credential.CredentialProviderType.INLINE; +import static io.trino.plugin.jdbc.credential.CredentialProviderType.KEYSTORE; +import static io.trino.plugin.jdbc.credential.keystore.KeyStoreUtils.loadKeyStore; +import static io.trino.plugin.jdbc.credential.keystore.KeyStoreUtils.readEntity; public class CredentialProviderModule extends AbstractConfigurationAwareModule diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialProviderTypeConfig.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialProviderTypeConfig.java index 47ed1ea55e64..df0ae78e1728 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialProviderTypeConfig.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/CredentialProviderTypeConfig.java @@ -17,7 +17,7 @@ import javax.validation.constraints.NotNull; -import static io.prestosql.plugin.jdbc.credential.CredentialProviderType.INLINE; +import static io.trino.plugin.jdbc.credential.CredentialProviderType.INLINE; import static java.util.Objects.requireNonNull; public class CredentialProviderTypeConfig diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/DefaultCredentialPropertiesProvider.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/DefaultCredentialPropertiesProvider.java index 572f1ded1e15..4572733925eb 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/DefaultCredentialPropertiesProvider.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/DefaultCredentialPropertiesProvider.java @@ -14,7 +14,7 @@ package io.trino.plugin.jdbc.credential; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.jdbc.JdbcIdentity; +import io.trino.plugin.jdbc.JdbcIdentity; import java.util.Map; import java.util.Optional; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/EmptyCredentialProvider.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/EmptyCredentialProvider.java index 3495f6ffd1ac..d0785aeaefdc 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/EmptyCredentialProvider.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/EmptyCredentialProvider.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.jdbc.credential; -import io.prestosql.plugin.jdbc.JdbcIdentity; +import io.trino.plugin.jdbc.JdbcIdentity; import java.util.Optional; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/ExtraCredentialProvider.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/ExtraCredentialProvider.java index 25900417a185..890a55b9c096 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/ExtraCredentialProvider.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/ExtraCredentialProvider.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.jdbc.credential; -import io.prestosql.plugin.jdbc.JdbcIdentity; +import io.trino.plugin.jdbc.JdbcIdentity; import javax.inject.Inject; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/StaticCredentialProvider.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/StaticCredentialProvider.java index 7e92a753ff69..4e0e0ab1cac4 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/StaticCredentialProvider.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/credential/StaticCredentialProvider.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.jdbc.credential; -import io.prestosql.plugin.jdbc.JdbcIdentity; +import io.trino.plugin.jdbc.JdbcIdentity; import java.util.Optional; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/AggregateFunctionPatterns.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/AggregateFunctionPatterns.java index 0b7c4bc99242..e04d83114365 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/AggregateFunctionPatterns.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/AggregateFunctionPatterns.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.jdbc.expression; -import io.prestosql.matching.Pattern; -import io.prestosql.matching.Property; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.type.Type; +import io.trino.matching.Pattern; +import io.trino.matching.Property; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Variable; +import io.trino.spi.type.Type; import java.util.List; import java.util.Optional; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/AggregateFunctionRewriter.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/AggregateFunctionRewriter.java index 3c31ae5ca66d..adf020404c1f 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/AggregateFunctionRewriter.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/AggregateFunctionRewriter.java @@ -14,12 +14,12 @@ package io.trino.plugin.jdbc.expression; import com.google.common.collect.ImmutableSet; -import io.prestosql.matching.Match; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRule.RewriteContext; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.matching.Match; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.expression.AggregateFunctionRule.RewriteContext; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; import java.util.Iterator; import java.util.Map; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/AggregateFunctionRule.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/AggregateFunctionRule.java index 238ef080423d..98935293a7a1 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/AggregateFunctionRule.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/AggregateFunctionRule.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.jdbc.expression; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; import java.util.Map; import java.util.Optional; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementAvgDecimal.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementAvgDecimal.java index b31820a844ff..988232c717cf 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementAvgDecimal.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementAvgDecimal.java @@ -13,24 +13,24 @@ */ package io.trino.plugin.jdbc.expression; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.type.DecimalType; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.Variable; +import io.trino.spi.type.DecimalType; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.variable; +import static io.trino.matching.Capture.newCapture; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.variable; import static java.lang.String.format; /** diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementAvgFloatingPoint.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementAvgFloatingPoint.java index 0205952f9068..0d10361a10a1 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementAvgFloatingPoint.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementAvgFloatingPoint.java @@ -13,25 +13,25 @@ */ package io.trino.plugin.jdbc.expression; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.Variable; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.Variable; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.variable; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.matching.Capture.newCapture; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.variable; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; import static java.lang.String.format; /** diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementCount.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementCount.java index 8ce4df313520..bca82327ff56 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementCount.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementCount.java @@ -13,26 +13,26 @@ */ package io.trino.plugin.jdbc.expression; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.type.BigintType; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.Variable; +import io.trino.spi.type.BigintType; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.variable; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.matching.Capture.newCapture; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.variable; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementCountAll.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementCountAll.java index 492bd1bbb689..75b1a377f470 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementCountAll.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementCountAll.java @@ -13,22 +13,22 @@ */ package io.trino.plugin.jdbc.expression; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.type.BigintType; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.type.BigintType; import java.util.List; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.inputs; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.inputs; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; /** diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementMinMax.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementMinMax.java index f3d9a3fccec3..705f80e5772f 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementMinMax.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementMinMax.java @@ -13,23 +13,23 @@ */ package io.trino.plugin.jdbc.expression; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.Variable; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.Variable; import java.util.Optional; import java.util.Set; import static com.google.common.base.Verify.verify; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.variable; +import static io.trino.matching.Capture.newCapture; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.variable; import static java.lang.String.format; /** diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementSum.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementSum.java index 2993388c7042..7bfb3860cdc7 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementSum.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementSum.java @@ -13,24 +13,24 @@ */ package io.trino.plugin.jdbc.expression; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.type.DecimalType; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.Variable; +import io.trino.spi.type.DecimalType; import java.util.Optional; import java.util.function.Function; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.variable; +import static io.trino.matching.Capture.newCapture; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.variable; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/jmx/StatisticsAwareConnectionFactory.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/jmx/StatisticsAwareConnectionFactory.java index ca6a71dd0425..6c9153997a06 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/jmx/StatisticsAwareConnectionFactory.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/jmx/StatisticsAwareConnectionFactory.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.jdbc.jmx; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.spi.connector.ConnectorSession; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/jmx/StatisticsAwareJdbcClient.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/jmx/StatisticsAwareJdbcClient.java index dc24a6a224bb..0ed2e199692d 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/jmx/StatisticsAwareJdbcClient.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/jmx/StatisticsAwareJdbcClient.java @@ -13,29 +13,29 @@ */ package io.trino.plugin.jdbc.jmx; -import io.prestosql.plugin.jdbc.ColumnMapping; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcOutputTableHandle; -import io.prestosql.plugin.jdbc.JdbcSplit; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.plugin.jdbc.RemoteTableName; -import io.prestosql.plugin.jdbc.WriteFunction; -import io.prestosql.plugin.jdbc.WriteMapping; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.Type; +import io.trino.plugin.jdbc.ColumnMapping; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcOutputTableHandle; +import io.trino.plugin.jdbc.JdbcSplit; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.plugin.jdbc.RemoteTableName; +import io.trino.plugin.jdbc.WriteFunction; +import io.trino.plugin.jdbc.WriteMapping; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.Type; import org.weakref.jmx.Flatten; import org.weakref.jmx.Managed; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/H2QueryRunner.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/H2QueryRunner.java index 711d13c2cce0..485e73acb13f 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/H2QueryRunner.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/H2QueryRunner.java @@ -14,9 +14,9 @@ package io.trino.plugin.jdbc; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; import io.trino.tpch.TpchTable; import java.sql.Connection; @@ -26,9 +26,9 @@ import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class H2QueryRunner { diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/MetadataUtil.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/MetadataUtil.java index 9f1fba3640dd..6a51d7cb49dc 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/MetadataUtil.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/MetadataUtil.java @@ -19,14 +19,14 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Locale.ENGLISH; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestCachingJdbcClient.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestCachingJdbcClient.java index aa5ef98c449b..daf4bd8712d8 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestCachingJdbcClient.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestCachingJdbcClient.java @@ -18,13 +18,13 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.units.Duration; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.session.PropertyMetadata; +import io.trino.testing.TestingConnectorSession; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -34,10 +34,10 @@ import java.util.Optional; import java.util.Set; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.testing.TestingConnectorSession.builder; +import static io.trino.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.testing.TestingConnectorSession.builder; import static java.util.Collections.emptyList; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestCredentialProviderTypeConfig.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestCredentialProviderTypeConfig.java index dce54290a61f..d7ff15d137a3 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestCredentialProviderTypeConfig.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestCredentialProviderTypeConfig.java @@ -14,7 +14,7 @@ package io.trino.plugin.jdbc; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.jdbc.credential.CredentialProviderTypeConfig; +import io.trino.plugin.jdbc.credential.CredentialProviderTypeConfig; import org.testng.annotations.Test; import java.util.Map; @@ -22,8 +22,8 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertFullMapping; import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; -import static io.prestosql.plugin.jdbc.credential.CredentialProviderType.FILE; -import static io.prestosql.plugin.jdbc.credential.CredentialProviderType.INLINE; +import static io.trino.plugin.jdbc.credential.CredentialProviderType.FILE; +import static io.trino.plugin.jdbc.credential.CredentialProviderType.INLINE; public class TestCredentialProviderTypeConfig { diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestDecimalConfig.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestDecimalConfig.java index 37de8956b2e8..e6a1d6ba339f 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestDecimalConfig.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestDecimalConfig.java @@ -21,8 +21,8 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertFullMapping; import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; -import static io.prestosql.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; -import static io.prestosql.plugin.jdbc.DecimalConfig.DecimalMapping.STRICT; +import static io.trino.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; +import static io.trino.plugin.jdbc.DecimalConfig.DecimalMapping.STRICT; import static java.math.RoundingMode.HALF_UP; import static java.math.RoundingMode.UNNECESSARY; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestForwardingJdbcClient.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestForwardingJdbcClient.java index df0d9e5209f9..5b6b3344f7f5 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestForwardingJdbcClient.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestForwardingJdbcClient.java @@ -15,8 +15,8 @@ import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertProperForwardingMethodsAreCalled; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertProperForwardingMethodsAreCalled; public class TestForwardingJdbcClient { diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcClient.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcClient.java index 31b631a0e041..b5df050af628 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcClient.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcClient.java @@ -15,24 +15,24 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_BIGINT; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_DOUBLE; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_REAL; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_VARCHAR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_BIGINT; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_DOUBLE; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_REAL; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Locale.ENGLISH; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcColumnHandle.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcColumnHandle.java index fbdbd4474d97..d0b2c6ffeac1 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcColumnHandle.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcColumnHandle.java @@ -18,12 +18,12 @@ import java.util.Optional; -import static io.prestosql.plugin.jdbc.MetadataUtil.COLUMN_CODEC; -import static io.prestosql.plugin.jdbc.MetadataUtil.assertJsonRoundTrip; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_BIGINT; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_VARCHAR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.jdbc.MetadataUtil.COLUMN_CODEC; +import static io.trino.plugin.jdbc.MetadataUtil.assertJsonRoundTrip; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_BIGINT; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestJdbcColumnHandle { diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcConnectorFactory.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcConnectorFactory.java index 1420dd503b7a..203cf9abb746 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcConnectorFactory.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcConnectorFactory.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.plugin.jdbc.credential.CredentialProviderModule; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.plugin.jdbc.credential.CredentialProviderModule; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import static io.airlift.configuration.ConfigurationAwareModule.combine; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcDistributedQueries.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcDistributedQueries.java index 0305eb6c9c3e..2840c97cc0b2 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcDistributedQueries.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcDistributedQueries.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.testing.AbstractTestQueries; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueries; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; -import static io.prestosql.plugin.jdbc.H2QueryRunner.createH2QueryRunner; +import static io.trino.plugin.jdbc.H2QueryRunner.createH2QueryRunner; public class TestJdbcDistributedQueries extends AbstractTestQueries diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcIntegrationSmokeTest.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcIntegrationSmokeTest.java index 746d1bfe22f3..7a806363b864 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcIntegrationSmokeTest.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcIntegrationSmokeTest.java @@ -14,21 +14,21 @@ package io.trino.plugin.jdbc; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.JdbcSqlExecutor; -import io.prestosql.testing.sql.TestTable; +import io.trino.Session; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.JdbcSqlExecutor; +import io.trino.testing.sql.TestTable; import io.trino.tpch.TpchTable; import org.testng.annotations.Test; import java.util.Map; import java.util.Properties; -import static io.prestosql.plugin.jdbc.H2QueryRunner.createH2QueryRunner; -import static io.prestosql.plugin.jdbc.TypeHandlingJdbcSessionProperties.UNSUPPORTED_TYPE_HANDLING; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.IGNORE; +import static io.trino.plugin.jdbc.H2QueryRunner.createH2QueryRunner; +import static io.trino.plugin.jdbc.TypeHandlingJdbcSessionProperties.UNSUPPORTED_TYPE_HANDLING; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.IGNORE; import static java.lang.String.format; public class TestJdbcIntegrationSmokeTest diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcMetadata.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcMetadata.java index b8531c4704cc..cd6861252133 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcMetadata.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcMetadata.java @@ -16,21 +16,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.AggregationApplicationResult; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.AggregationApplicationResult; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.testing.TestingConnectorSession; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -40,14 +40,14 @@ import java.util.Optional; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_BIGINT; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_VARCHAR; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.PERMISSION_DENIED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_BIGINT; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_VARCHAR; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.PERMISSION_DENIED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.util.Collections.emptyMap; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcOutputTableHandle.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcOutputTableHandle.java index 8e41db60a0c6..83c6b379234a 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcOutputTableHandle.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcOutputTableHandle.java @@ -18,10 +18,10 @@ import java.util.Optional; -import static io.prestosql.plugin.jdbc.MetadataUtil.OUTPUT_TABLE_CODEC; -import static io.prestosql.plugin.jdbc.MetadataUtil.assertJsonRoundTrip; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_VARCHAR; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.jdbc.MetadataUtil.OUTPUT_TABLE_CODEC; +import static io.trino.plugin.jdbc.MetadataUtil.assertJsonRoundTrip; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestJdbcOutputTableHandle { diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcQueryBuilder.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcQueryBuilder.java index c3213bc8e66b..ad90b3c1a0ce 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcQueryBuilder.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcQueryBuilder.java @@ -18,16 +18,16 @@ import com.google.common.collect.ImmutableMultiset; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Multiset; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.SortedRangeSet; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.SortedRangeSet; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.CharType; +import io.trino.spi.type.SqlTime; +import io.trino.testing.TestingConnectorSession; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -52,32 +52,32 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.testing.Assertions.assertContains; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_BIGINT; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_BOOLEAN; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_CHAR; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_DATE; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_DOUBLE; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_INTEGER; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_REAL; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_SMALLINT; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_TIME; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_TIMESTAMP; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_TINYINT; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_VARCHAR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimeOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_MILLISECOND; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_BIGINT; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_BOOLEAN; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_CHAR; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_DATE; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_DOUBLE; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_INTEGER; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_REAL; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_SMALLINT; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_TIME; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_TIMESTAMP; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_TINYINT; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.DateTimeTestingUtils.sqlTimeOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.type.DateTimes.MICROSECONDS_PER_MILLISECOND; import static java.lang.Float.floatToRawIntBits; import static java.lang.String.format; import static java.time.temporal.ChronoUnit.DAYS; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcRecordSet.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcRecordSet.java index a2a6f0040d6e..01da3d85ad74 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcRecordSet.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcRecordSet.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.connector.SchemaTableName; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -26,12 +26,12 @@ import java.util.List; import java.util.Map; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_BIGINT; -import static io.prestosql.plugin.jdbc.TestingJdbcTypeHandle.JDBC_VARCHAR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_BIGINT; +import static io.trino.plugin.jdbc.TestingJdbcTypeHandle.JDBC_VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcRecordSetProvider.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcRecordSetProvider.java index 8c39f6bfaa9c..30faa3b9bdea 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcRecordSetProvider.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcRecordSetProvider.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.testing.TestingConnectorSession; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -40,11 +40,11 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcTableHandle.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcTableHandle.java index b80f8a6d4e21..8acee1488bcc 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcTableHandle.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJdbcTableHandle.java @@ -14,11 +14,11 @@ package io.trino.plugin.jdbc; import io.airlift.testing.EquivalenceTester; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import org.testng.annotations.Test; -import static io.prestosql.plugin.jdbc.MetadataUtil.TABLE_CODEC; -import static io.prestosql.plugin.jdbc.MetadataUtil.assertJsonRoundTrip; +import static io.trino.plugin.jdbc.MetadataUtil.TABLE_CODEC; +import static io.trino.plugin.jdbc.MetadataUtil.assertJsonRoundTrip; public class TestJdbcTableHandle { diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJmxStats.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJmxStats.java index f145a17ae5c5..9b8aa05b053e 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJmxStats.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJmxStats.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import javax.management.MBeanInfo; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestRetryingConnectionFactory.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestRetryingConnectionFactory.java index ccb530de147e..aa9020143183 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestRetryingConnectionFactory.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestRetryingConnectionFactory.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.connector.ConnectorSession; import org.testng.annotations.Test; import java.sql.Connection; @@ -26,14 +26,14 @@ import java.util.stream.Stream; import static com.google.common.reflect.Reflection.newProxy; -import static io.prestosql.plugin.jdbc.TestRetryingConnectionFactory.MockConnectorFactory.Action.RETURN; -import static io.prestosql.plugin.jdbc.TestRetryingConnectionFactory.MockConnectorFactory.Action.THROW_NPE; -import static io.prestosql.plugin.jdbc.TestRetryingConnectionFactory.MockConnectorFactory.Action.THROW_PRESTO_EXCEPTION; -import static io.prestosql.plugin.jdbc.TestRetryingConnectionFactory.MockConnectorFactory.Action.THROW_SQL_EXCEPTION; -import static io.prestosql.plugin.jdbc.TestRetryingConnectionFactory.MockConnectorFactory.Action.THROW_SQL_RECOVERABLE_EXCEPTION; -import static io.prestosql.plugin.jdbc.TestRetryingConnectionFactory.MockConnectorFactory.Action.THROW_WRAPPED_SQL_RECOVERABLE_EXCEPTION; -import static io.prestosql.spi.block.TestingSession.SESSION; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.plugin.jdbc.TestRetryingConnectionFactory.MockConnectorFactory.Action.RETURN; +import static io.trino.plugin.jdbc.TestRetryingConnectionFactory.MockConnectorFactory.Action.THROW_NPE; +import static io.trino.plugin.jdbc.TestRetryingConnectionFactory.MockConnectorFactory.Action.THROW_PRESTO_EXCEPTION; +import static io.trino.plugin.jdbc.TestRetryingConnectionFactory.MockConnectorFactory.Action.THROW_SQL_EXCEPTION; +import static io.trino.plugin.jdbc.TestRetryingConnectionFactory.MockConnectorFactory.Action.THROW_SQL_RECOVERABLE_EXCEPTION; +import static io.trino.plugin.jdbc.TestRetryingConnectionFactory.MockConnectorFactory.Action.THROW_WRAPPED_SQL_RECOVERABLE_EXCEPTION; +import static io.trino.spi.block.TestingSession.SESSION; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; import static java.util.Objects.requireNonNull; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestStatisticsAwareJdbcClient.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestStatisticsAwareJdbcClient.java index 16b108a6913f..e27f67fa9cb1 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestStatisticsAwareJdbcClient.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestStatisticsAwareJdbcClient.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.plugin.jdbc.jmx.StatisticsAwareJdbcClient; +import io.trino.plugin.jdbc.jmx.StatisticsAwareJdbcClient; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertProperForwardingMethodsAreCalled; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertProperForwardingMethodsAreCalled; public class TestStatisticsAwareJdbcClient { diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingDatabase.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingDatabase.java index 35a02e38374c..b734fc300cd6 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingDatabase.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingDatabase.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.jdbc; -import io.prestosql.plugin.jdbc.credential.EmptyCredentialProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.jdbc.credential.EmptyCredentialProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.SchemaTableName; import org.h2.Driver; import java.sql.Connection; @@ -29,7 +29,7 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.Iterables.getOnlyElement; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; import static java.util.function.Function.identity; final class TestingDatabase diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingH2JdbcClient.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingH2JdbcClient.java index 6fb4b5b68bbe..6e5ba284534f 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingH2JdbcClient.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingH2JdbcClient.java @@ -14,52 +14,52 @@ package io.trino.plugin.jdbc; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRewriter; -import io.prestosql.plugin.jdbc.expression.ImplementCountAll; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.jdbc.expression.AggregateFunctionRewriter; +import io.trino.plugin.jdbc.expression.ImplementCountAll; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.sql.Connection; import java.sql.Types; import java.util.Map; import java.util.Optional; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.booleanColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.dateColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.dateWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.defaultCharColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.defaultVarcharColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.doubleColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.doubleWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.realColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.realWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.timeColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.timestampColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.tinyintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; -import static io.prestosql.plugin.jdbc.TypeHandlingJdbcSessionProperties.getUnsupportedTypeHandling; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.booleanColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.dateColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.dateWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.defaultCharColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.defaultVarcharColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.doubleColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.doubleWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.realColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.realWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.timeColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.timestampColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.tinyintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; +import static io.trino.plugin.jdbc.TypeHandlingJdbcSessionProperties.getUnsupportedTypeHandling; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; class TestingH2JdbcClient extends BaseJdbcClient diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingH2JdbcModule.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingH2JdbcModule.java index eba66d198ea5..70bfa71b0d74 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingH2JdbcModule.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingH2JdbcModule.java @@ -18,7 +18,7 @@ import com.google.inject.Module; import com.google.inject.Provides; import com.google.inject.Singleton; -import io.prestosql.plugin.jdbc.credential.CredentialProvider; +import io.trino.plugin.jdbc.credential.CredentialProvider; import org.h2.Driver; import java.util.Map; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/credential/TestExtraCredentialProvider.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/credential/TestExtraCredentialProvider.java index 7b3b5b52dc8e..4bd67a13eac7 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/credential/TestExtraCredentialProvider.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/credential/TestExtraCredentialProvider.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableMap; import io.airlift.bootstrap.Bootstrap; -import io.prestosql.plugin.jdbc.JdbcIdentity; +import io.trino.plugin.jdbc.JdbcIdentity; import org.testng.annotations.Test; import java.util.Map; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/jmx/TestStatisticsAwareConnectionFactory.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/jmx/TestStatisticsAwareConnectionFactory.java index 3d1ac5a0a800..4753d56c5512 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/jmx/TestStatisticsAwareConnectionFactory.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/jmx/TestStatisticsAwareConnectionFactory.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.jdbc.jmx; -import io.prestosql.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.ConnectionFactory; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; public class TestStatisticsAwareConnectionFactory { diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryColumnHandle.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryColumnHandle.java index 8d85ff25a194..28aca3e2f10a 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryColumnHandle.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryColumnHandle.java @@ -18,8 +18,8 @@ import com.google.cloud.bigquery.Field; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; import java.util.List; import java.util.Map; diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnector.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnector.java index 52e9fe040c9f..fc8fc1f6b170 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnector.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnector.java @@ -14,17 +14,17 @@ package io.trino.plugin.bigquery; import io.airlift.log.Logger; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; public class BigQueryConnector diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnectorFactory.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnectorFactory.java index ae2e07e5fb30..84e229b06806 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnectorFactory.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnectorFactory.java @@ -16,12 +16,12 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.type.TypeManager; import java.util.Map; diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnectorModule.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnectorModule.java index f1c679d8cf18..29ba33fb894f 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnectorModule.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnectorModule.java @@ -23,7 +23,7 @@ import com.google.inject.Provides; import com.google.inject.Scopes; import com.google.inject.Singleton; -import io.prestosql.spi.NodeManager; +import io.trino.spi.NodeManager; import java.util.Optional; diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryEmptyProjectionPageSource.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryEmptyProjectionPageSource.java index 87e2f430592c..5d110ab38b1b 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryEmptyProjectionPageSource.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryEmptyProjectionPageSource.java @@ -14,9 +14,9 @@ package io.trino.plugin.bigquery; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.connector.ConnectorPageSource; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.connector.ConnectorPageSource; public class BigQueryEmptyProjectionPageSource implements ConnectorPageSource diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryErrorCode.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryErrorCode.java index a70eeeef78c3..04a6da5befd7 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryErrorCode.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryErrorCode.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.bigquery; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.EXTERNAL; public enum BigQueryErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryFilterQueryBuilder.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryFilterQueryBuilder.java index 37ec900e15f3..566d975059e2 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryFilterQueryBuilder.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryFilterQueryBuilder.java @@ -14,10 +14,10 @@ package io.trino.plugin.bigquery; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; import java.util.ArrayList; import java.util.List; diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryHandleResolver.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryHandleResolver.java index 702a63dbea86..900a4775b84d 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryHandleResolver.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.bigquery; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class BigQueryHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryMetadata.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryMetadata.java index 1a487d5e6167..c1bb97201550 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryMetadata.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryMetadata.java @@ -25,24 +25,24 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Streams; import io.airlift.log.Logger; -import io.prestosql.spi.connector.Assignment; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.LimitApplicationResult; -import io.prestosql.spi.connector.NotFoundException; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.Assignment; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.LimitApplicationResult; +import io.trino.spi.connector.NotFoundException; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryPageSourceProvider.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryPageSourceProvider.java index e6e9baa70a7c..d70e1b7ef125 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryPageSourceProvider.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryPageSourceProvider.java @@ -14,14 +14,14 @@ package io.trino.plugin.bigquery; import io.airlift.log.Logger; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryPlugin.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryPlugin.java index 8de45f96bfbe..e50b586b16b5 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryPlugin.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.bigquery; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class BigQueryPlugin implements Plugin diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryResultPageSource.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryResultPageSource.java index 0ce2a24c360b..0a5004795259 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryResultPageSource.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryResultPageSource.java @@ -18,22 +18,22 @@ import io.airlift.log.Logger; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.DateTimeEncoding; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.DateTimeEncoding; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.avro.Conversions.DecimalConversion; import org.apache.avro.Schema; import org.apache.avro.generic.GenericDatumReader; @@ -54,16 +54,16 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.bigquery.BigQueryMetadata.NUMERIC_DATA_TYPE_PRECISION; -import static io.prestosql.plugin.bigquery.BigQueryMetadata.NUMERIC_DATA_TYPE_SCALE; -import static io.prestosql.plugin.bigquery.BigQueryType.toPrestoTimestamp; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.plugin.bigquery.BigQueryMetadata.NUMERIC_DATA_TYPE_PRECISION; +import static io.trino.plugin.bigquery.BigQueryMetadata.NUMERIC_DATA_TYPE_SCALE; +import static io.trino.plugin.bigquery.BigQueryType.toPrestoTimestamp; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQuerySplit.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQuerySplit.java index f08465b5bd45..86ef38409389 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQuerySplit.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQuerySplit.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQuerySplitManager.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQuerySplitManager.java index 3727e898a5d3..e1881bb99cd4 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQuerySplitManager.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQuerySplitManager.java @@ -20,17 +20,17 @@ import com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession; import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.NodeManager; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; @@ -41,8 +41,8 @@ import static com.google.cloud.bigquery.TableDefinition.Type.TABLE; import static com.google.cloud.bigquery.TableDefinition.Type.VIEW; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.bigquery.BigQueryErrorCode.BIGQUERY_FAILED_TO_EXECUTE_QUERY; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.bigquery.BigQueryErrorCode.BIGQUERY_FAILED_TO_EXECUTE_QUERY; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; import static java.util.stream.IntStream.range; diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryTableHandle.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryTableHandle.java index ebe79db221ba..71df834cb428 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryTableHandle.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryTableHandle.java @@ -17,9 +17,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.cloud.bigquery.TableId; import com.google.cloud.bigquery.TableInfo; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.predicate.TupleDomain; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryTransactionHandle.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryTransactionHandle.java index 4bfa278b799e..cddd3bb7e92f 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryTransactionHandle.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.bigquery; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum BigQueryTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryType.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryType.java index 7f41bac60108..5fdb0084ad2b 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryType.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryType.java @@ -15,21 +15,21 @@ import com.google.cloud.bigquery.Field; import io.airlift.slice.Slice; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateTimeEncoding; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateTimeEncoding; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import java.time.Instant; import java.time.LocalDate; @@ -43,10 +43,10 @@ import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.bigquery.BigQueryMetadata.NUMERIC_DATA_TYPE_PRECISION; -import static io.prestosql.plugin.bigquery.BigQueryMetadata.NUMERIC_DATA_TYPE_SCALE; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.bigquery.BigQueryMetadata.NUMERIC_DATA_TYPE_PRECISION; +import static io.trino.plugin.bigquery.BigQueryMetadata.NUMERIC_DATA_TYPE_SCALE; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.lang.Integer.parseInt; import static java.lang.String.format; import static java.time.ZoneOffset.UTC; diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/Conversions.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/Conversions.java index d5b155dbd29d..c941998498b3 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/Conversions.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/Conversions.java @@ -16,7 +16,7 @@ import com.google.cloud.bigquery.Field; import com.google.cloud.bigquery.FieldList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ColumnMetadata; import java.util.Collections; import java.util.List; diff --git a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/ReadSessionCreator.java b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/ReadSessionCreator.java index 0c81e5e18674..f17a1ba15217 100644 --- a/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/ReadSessionCreator.java +++ b/plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/ReadSessionCreator.java @@ -29,7 +29,7 @@ import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import io.airlift.log.Logger; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.util.List; import java.util.Optional; @@ -37,9 +37,9 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; -import static io.prestosql.plugin.bigquery.BigQueryErrorCode.BIGQUERY_VIEW_DESTINATION_TABLE_CREATION_FAILED; -import static io.prestosql.plugin.bigquery.BigQueryUtil.convertToBigQueryException; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.bigquery.BigQueryErrorCode.BIGQUERY_VIEW_DESTINATION_TABLE_CREATION_FAILED; +import static io.trino.plugin.bigquery.BigQueryUtil.convertToBigQueryException; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BigQueryQueryRunner.java b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BigQueryQueryRunner.java index ee7975ec4ad4..7613221e57eb 100644 --- a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BigQueryQueryRunner.java +++ b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BigQueryQueryRunner.java @@ -19,9 +19,9 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -31,7 +31,7 @@ import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; public class BigQueryQueryRunner { diff --git a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryIntegrationSmokeTest.java b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryIntegrationSmokeTest.java index 918bd31bf9f1..971142775821 100644 --- a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryIntegrationSmokeTest.java +++ b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryIntegrationSmokeTest.java @@ -19,15 +19,15 @@ import com.google.cloud.bigquery.JobInfo; import com.google.cloud.bigquery.QueryJobConfiguration; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; -import static io.prestosql.plugin.bigquery.BigQueryQueryRunner.createBigQueryClient; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.bigquery.BigQueryQueryRunner.createBigQueryClient; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.String.format; @Test diff --git a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryPlugin.java b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryPlugin.java index 306fb4733236..7b94582b1590 100644 --- a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryPlugin.java +++ b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryPlugin.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.bigquery; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorFactory; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; diff --git a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryType.java b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryType.java index cc6c0d210c92..fe4eac0eb00b 100644 --- a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryType.java +++ b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryType.java @@ -17,7 +17,7 @@ import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.Decimals.encodeScaledValue; import static java.math.BigDecimal.ONE; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestTypeConversions.java b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestTypeConversions.java index fd2286383c8b..27b2ce85a939 100644 --- a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestTypeConversions.java +++ b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestTypeConversions.java @@ -16,25 +16,25 @@ import com.google.cloud.bigquery.Field; import com.google.cloud.bigquery.LegacySQLTypeName; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.testng.annotations.Test; import java.time.LocalDateTime; -import static io.prestosql.plugin.bigquery.BigQueryType.toLocalDateTime; +import static io.trino.plugin.bigquery.BigQueryType.toLocalDateTime; import static java.time.Month.APRIL; import static java.time.Month.FEBRUARY; import static java.time.Month.JANUARY; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleColumnHandle.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleColumnHandle.java index 4b3c1d8a8e4a..576fa171b082 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleColumnHandle.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleColumnHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleConnector.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleConnector.java index 545458c3ed92..fad1ad05af4f 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleConnector.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleConnector.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.Duration; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeSignatureParameter; import java.util.List; import java.util.concurrent.ExecutorService; -import static io.prestosql.plugin.base.session.PropertyMetadataUtil.durationProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; -import static io.prestosql.spi.type.StandardTypes.ARRAY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.base.session.PropertyMetadataUtil.durationProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.type.StandardTypes.ARRAY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Locale.ENGLISH; import static java.util.concurrent.TimeUnit.SECONDS; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleConnectorFactory.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleConnectorFactory.java index 0ac4a3220d4f..31fe471fc408 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleConnectorFactory.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleConnectorFactory.java @@ -14,10 +14,10 @@ package io.trino.plugin.blackhole; import com.google.common.util.concurrent.ListeningScheduledExecutorService; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import java.util.Map; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleHandleResolver.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleHandleResolver.java index 4a19af080af0..962010551f8e 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleHandleResolver.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleHandleResolver.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.blackhole; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public final class BlackHoleHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleInsertTableHandle.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleInsertTableHandle.java index 7adc53129236..9787238b8450 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleInsertTableHandle.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleInsertTableHandle.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import io.airlift.units.Duration; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleMetadata.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleMetadata.java index f9bb08f845e6..49ef8cb9e783 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleMetadata.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleMetadata.java @@ -19,31 +19,31 @@ import com.google.common.collect.Sets; import io.airlift.slice.Slice; import io.airlift.units.Duration; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.statistics.ColumnStatistics; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.statistics.DoubleRange; -import io.prestosql.spi.statistics.Estimate; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.statistics.TableStatisticsMetadata; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.statistics.ColumnStatistics; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.statistics.DoubleRange; +import io.trino.spi.statistics.Estimate; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.statistics.TableStatisticsMetadata; import java.util.ArrayList; import java.util.Collection; @@ -53,16 +53,16 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import static io.prestosql.plugin.blackhole.BlackHoleConnector.DISTRIBUTED_ON; -import static io.prestosql.plugin.blackhole.BlackHoleConnector.FIELD_LENGTH_PROPERTY; -import static io.prestosql.plugin.blackhole.BlackHoleConnector.PAGES_PER_SPLIT_PROPERTY; -import static io.prestosql.plugin.blackhole.BlackHoleConnector.PAGE_PROCESSING_DELAY; -import static io.prestosql.plugin.blackhole.BlackHoleConnector.ROWS_PER_PAGE_PROPERTY; -import static io.prestosql.plugin.blackhole.BlackHoleConnector.SPLIT_COUNT_PROPERTY; -import static io.prestosql.plugin.blackhole.BlackHolePageSourceProvider.isNumericType; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.blackhole.BlackHoleConnector.DISTRIBUTED_ON; +import static io.trino.plugin.blackhole.BlackHoleConnector.FIELD_LENGTH_PROPERTY; +import static io.trino.plugin.blackhole.BlackHoleConnector.PAGES_PER_SPLIT_PROPERTY; +import static io.trino.plugin.blackhole.BlackHoleConnector.PAGE_PROCESSING_DELAY; +import static io.trino.plugin.blackhole.BlackHoleConnector.ROWS_PER_PAGE_PROPERTY; +import static io.trino.plugin.blackhole.BlackHoleConnector.SPLIT_COUNT_PROPERTY; +import static io.trino.plugin.blackhole.BlackHolePageSourceProvider.isNumericType; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.String.format; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toMap; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleNodePartitioningProvider.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleNodePartitioningProvider.java index d794db645126..fac18aec75d1 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleNodePartitioningProvider.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleNodePartitioningProvider.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.blackhole; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.connector.ConnectorBucketNodeMap; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.NodeManager; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.connector.ConnectorBucketNodeMap; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import java.lang.invoke.MethodHandle; import java.util.List; @@ -31,11 +31,11 @@ import static com.google.common.base.Throwables.throwIfUnchecked; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.connector.ConnectorBucketNodeMap.createBucketNodeMap; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.connector.ConnectorBucketNodeMap.createBucketNodeMap; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; import static java.util.Objects.requireNonNull; public class BlackHoleNodePartitioningProvider diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleOutputTableHandle.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleOutputTableHandle.java index 1308afe634aa..3c6e85d57eb6 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleOutputTableHandle.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleOutputTableHandle.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import io.airlift.units.Duration; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSink.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSink.java index d56cde1a2e87..cbfe9b11ed70 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSink.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSink.java @@ -17,8 +17,8 @@ import com.google.common.util.concurrent.ListeningScheduledExecutorService; import io.airlift.slice.Slice; import io.airlift.units.Duration; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorPageSink; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorPageSink; import java.util.Collection; import java.util.concurrent.Callable; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSinkProvider.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSinkProvider.java index 34d291b6810e..95a56b4fd8f6 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSinkProvider.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSinkProvider.java @@ -14,12 +14,12 @@ package io.trino.plugin.blackhole; import com.google.common.util.concurrent.ListeningScheduledExecutorService; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSource.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSource.java index 0b581b968833..772faf723f6a 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSource.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSource.java @@ -15,8 +15,8 @@ import com.google.common.util.concurrent.ListeningScheduledExecutorService; import io.airlift.units.Duration; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorPageSource; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorPageSource; import java.util.concurrent.CompletableFuture; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSourceProvider.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSourceProvider.java index 3edb54eb5155..399d2a8ebbf3 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSourceProvider.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePageSourceProvider.java @@ -17,38 +17,38 @@ import com.google.common.util.concurrent.ListeningScheduledExecutorService; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.FixedWidthType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.FixedWidthType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import java.util.Arrays; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.spi.type.Decimals.isLongDecimal; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.Decimals.isLongDecimal; import static java.math.BigDecimal.ZERO; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePartitioningHandle.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePartitioningHandle.java index 086eca118d17..19bd98642c6f 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePartitioningHandle.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePartitioningHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.blackhole; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; public enum BlackHolePartitioningHandle implements ConnectorPartitioningHandle diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePlugin.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePlugin.java index 700ff8ca96c6..c78e6a6e7e33 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePlugin.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHolePlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.blackhole; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public final class BlackHolePlugin implements Plugin diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleSplit.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleSplit.java index 2ced643ee5bf..ff796c5a8e32 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleSplit.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleSplit.java @@ -14,8 +14,8 @@ package io.trino.plugin.blackhole; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleSplitManager.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleSplitManager.java index b5ce221fd551..7d5ad677a792 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleSplitManager.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleSplitManager.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.blackhole; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import static java.util.Collections.nCopies; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleTableHandle.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleTableHandle.java index f284dc841eb7..ff4a23dc4220 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleTableHandle.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleTableHandle.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import io.airlift.units.Duration; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleTransactionHandle.java b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleTransactionHandle.java index 30c167b29030..0cb9735e3120 100644 --- a/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleTransactionHandle.java +++ b/plugin/trino-blackhole/src/main/java/io/trino/plugin/blackhole/BlackHoleTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.blackhole; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum BlackHoleTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-blackhole/src/test/java/io/trino/plugin/blackhole/BlackHoleQueryRunner.java b/plugin/trino-blackhole/src/test/java/io/trino/plugin/blackhole/BlackHoleQueryRunner.java index fd6a8dacd579..be018bbb4d2d 100644 --- a/plugin/trino-blackhole/src/test/java/io/trino/plugin/blackhole/BlackHoleQueryRunner.java +++ b/plugin/trino-blackhole/src/test/java/io/trino/plugin/blackhole/BlackHoleQueryRunner.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class BlackHoleQueryRunner { diff --git a/plugin/trino-blackhole/src/test/java/io/trino/plugin/blackhole/TestBlackHoleMetadata.java b/plugin/trino-blackhole/src/test/java/io/trino/plugin/blackhole/TestBlackHoleMetadata.java index 273cee75c1ed..55c82df3286b 100644 --- a/plugin/trino-blackhole/src/test/java/io/trino/plugin/blackhole/TestBlackHoleMetadata.java +++ b/plugin/trino-blackhole/src/test/java/io/trino/plugin/blackhole/TestBlackHoleMetadata.java @@ -16,20 +16,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.units.Duration; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrestoPrincipal; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrestoPrincipal; import org.testng.annotations.Test; import java.util.List; import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.util.concurrent.TimeUnit.SECONDS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/plugin/trino-blackhole/src/test/java/io/trino/plugin/blackhole/TestBlackHoleSmoke.java b/plugin/trino-blackhole/src/test/java/io/trino/plugin/blackhole/TestBlackHoleSmoke.java index 4e210892a034..3a88b7c1f46b 100644 --- a/plugin/trino-blackhole/src/test/java/io/trino/plugin/blackhole/TestBlackHoleSmoke.java +++ b/plugin/trino-blackhole/src/test/java/io/trino/plugin/blackhole/TestBlackHoleSmoke.java @@ -16,11 +16,11 @@ import com.google.common.base.Stopwatch; import com.google.common.collect.Iterables; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.metadata.QualifiedObjectName; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; @@ -31,13 +31,13 @@ import java.util.List; import static io.airlift.testing.Assertions.assertGreaterThan; -import static io.prestosql.plugin.blackhole.BlackHoleConnector.FIELD_LENGTH_PROPERTY; -import static io.prestosql.plugin.blackhole.BlackHoleConnector.PAGES_PER_SPLIT_PROPERTY; -import static io.prestosql.plugin.blackhole.BlackHoleConnector.PAGE_PROCESSING_DELAY; -import static io.prestosql.plugin.blackhole.BlackHoleConnector.ROWS_PER_PAGE_PROPERTY; -import static io.prestosql.plugin.blackhole.BlackHoleConnector.SPLIT_COUNT_PROPERTY; -import static io.prestosql.plugin.blackhole.BlackHoleQueryRunner.createQueryRunner; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.blackhole.BlackHoleConnector.FIELD_LENGTH_PROPERTY; +import static io.trino.plugin.blackhole.BlackHoleConnector.PAGES_PER_SPLIT_PROPERTY; +import static io.trino.plugin.blackhole.BlackHoleConnector.PAGE_PROCESSING_DELAY; +import static io.trino.plugin.blackhole.BlackHoleConnector.ROWS_PER_PAGE_PROPERTY; +import static io.trino.plugin.blackhole.BlackHoleConnector.SPLIT_COUNT_PROPERTY; +import static io.trino.plugin.blackhole.BlackHoleQueryRunner.createQueryRunner; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraClientModule.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraClientModule.java index d91426c4429a..aba52f01164b 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraClientModule.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraClientModule.java @@ -30,7 +30,7 @@ import com.google.inject.Scopes; import io.airlift.json.JsonCodec; import io.airlift.security.pem.PemReader; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import javax.inject.Singleton; import javax.net.ssl.KeyManager; @@ -60,7 +60,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.configuration.ConfigBinder.configBinder; import static io.airlift.json.JsonCodecBinder.jsonCodecBinder; -import static io.prestosql.plugin.cassandra.CassandraErrorCode.CASSANDRA_SSL_INITIALIZATION_FAILURE; +import static io.trino.plugin.cassandra.CassandraErrorCode.CASSANDRA_SSL_INITIALIZATION_FAILURE; import static java.lang.Math.toIntExact; import static java.util.Collections.list; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraClusteringPredicatesExtractor.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraClusteringPredicatesExtractor.java index 51cf5ab43b8a..44794896d19a 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraClusteringPredicatesExtractor.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraClusteringPredicatesExtractor.java @@ -18,11 +18,11 @@ import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.cassandra.util.CassandraCqlUtils; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.cassandra.util.CassandraCqlUtils; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; import java.util.ArrayList; import java.util.List; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraColumnHandle.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraColumnHandle.java index 670412a29e45..5e94a0a60292 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraColumnHandle.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraColumnHandle.java @@ -16,10 +16,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.MoreObjects.ToStringHelper; -import io.prestosql.plugin.cassandra.util.CassandraCqlUtils; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.plugin.cassandra.util.CassandraCqlUtils; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraConnector.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraConnector.java index e484196641ec..0103d4db3748 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraConnector.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraConnector.java @@ -14,21 +14,21 @@ package io.trino.plugin.cassandra; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; import java.util.List; -import static io.prestosql.spi.transaction.IsolationLevel.READ_UNCOMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.transaction.IsolationLevel.READ_UNCOMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; public class CassandraConnector diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraConnectorFactory.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraConnectorFactory.java index c1b248fdbebf..88513a4e2e04 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraConnectorFactory.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraConnectorFactory.java @@ -16,11 +16,11 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.plugin.base.jmx.MBeanServerModule; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.plugin.base.jmx.MBeanServerModule; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import org.weakref.jmx.guice.MBeanModule; import java.util.Map; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraErrorCode.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraErrorCode.java index 10f54d91009b..cda4f941c0b2 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraErrorCode.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraErrorCode.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.cassandra; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.EXTERNAL; public enum CassandraErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraHandleResolver.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraHandleResolver.java index 4fc3842f2093..2fe11f1fb979 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraHandleResolver.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraHandleResolver.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.cassandra; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class CassandraHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraInsertTableHandle.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraInsertTableHandle.java index 032271f50475..e1f1ed096b92 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraInsertTableHandle.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraInsertTableHandle.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraMetadata.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraMetadata.java index 3bf68d503e9b..2acfc861ca0b 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraMetadata.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraMetadata.java @@ -17,29 +17,29 @@ import com.google.common.collect.ImmutableMap; import io.airlift.json.JsonCodec; import io.airlift.slice.Slice; -import io.prestosql.plugin.cassandra.util.CassandraCqlUtils; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.NotFoundException; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.type.Type; +import io.trino.plugin.cassandra.util.CassandraCqlUtils; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.NotFoundException; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.type.Type; import javax.inject.Inject; @@ -53,13 +53,13 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.MoreCollectors.toOptional; -import static io.prestosql.plugin.cassandra.CassandraType.toCassandraType; -import static io.prestosql.plugin.cassandra.util.CassandraCqlUtils.ID_COLUMN_NAME; -import static io.prestosql.plugin.cassandra.util.CassandraCqlUtils.cqlNameToSqlName; -import static io.prestosql.plugin.cassandra.util.CassandraCqlUtils.quoteStringLiteral; -import static io.prestosql.plugin.cassandra.util.CassandraCqlUtils.validColumnName; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.PERMISSION_DENIED; +import static io.trino.plugin.cassandra.CassandraType.toCassandraType; +import static io.trino.plugin.cassandra.util.CassandraCqlUtils.ID_COLUMN_NAME; +import static io.trino.plugin.cassandra.util.CassandraCqlUtils.cqlNameToSqlName; +import static io.trino.plugin.cassandra.util.CassandraCqlUtils.quoteStringLiteral; +import static io.trino.plugin.cassandra.util.CassandraCqlUtils.validColumnName; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.PERMISSION_DENIED; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraOutputTableHandle.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraOutputTableHandle.java index 1a5a908e343f..c1d18d80b4b4 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraOutputTableHandle.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraOutputTableHandle.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPageSink.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPageSink.java index 2d357ceed18f..849ae5f343cf 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPageSink.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPageSink.java @@ -22,12 +22,12 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.ISODateTimeFormat; @@ -43,22 +43,22 @@ import static com.datastax.driver.core.querybuilder.QueryBuilder.bindMarker; import static com.datastax.driver.core.querybuilder.QueryBuilder.insertInto; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.cassandra.util.CassandraCqlUtils.ID_COLUMN_NAME; -import static io.prestosql.plugin.cassandra.util.CassandraCqlUtils.validColumnName; -import static io.prestosql.plugin.cassandra.util.CassandraCqlUtils.validSchemaName; -import static io.prestosql.plugin.cassandra.util.CassandraCqlUtils.validTableName; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.plugin.cassandra.util.CassandraCqlUtils.ID_COLUMN_NAME; +import static io.trino.plugin.cassandra.util.CassandraCqlUtils.validColumnName; +import static io.trino.plugin.cassandra.util.CassandraCqlUtils.validSchemaName; +import static io.trino.plugin.cassandra.util.CassandraCqlUtils.validTableName; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPageSinkProvider.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPageSinkProvider.java index 562c2f8eb229..c53912ba9285 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPageSinkProvider.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPageSinkProvider.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.cassandra; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import javax.inject.Inject; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPartition.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPartition.java index a0267d6f37a9..5c84362b4471 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPartition.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPartition.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.TupleDomain; import java.nio.ByteBuffer; import java.util.Arrays; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPartitionManager.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPartitionManager.java index 6fb65fc3a5d9..72b321190d39 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPartitionManager.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPartitionManager.java @@ -18,11 +18,11 @@ import com.google.common.collect.Maps; import com.google.common.collect.Sets; import io.airlift.log.Logger; -import io.prestosql.plugin.cassandra.util.CassandraCqlUtils; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.cassandra.util.CassandraCqlUtils; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPartitionResult.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPartitionResult.java index 1ee8e988e27c..ad19d0c82dd7 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPartitionResult.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPartitionResult.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.cassandra; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.TupleDomain; import java.util.List; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPlugin.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPlugin.java index 700c3453103a..6c77542c7244 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPlugin.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.cassandra; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class CassandraPlugin implements Plugin diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraRecordCursor.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraRecordCursor.java index 91e7f60ec931..0082d172bf72 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraRecordCursor.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraRecordCursor.java @@ -16,16 +16,16 @@ import com.datastax.driver.core.ResultSet; import com.datastax.driver.core.Row; import io.airlift.slice.Slice; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; import java.util.List; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.cassandra.CassandraType.TIMESTAMP; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.plugin.cassandra.CassandraType.TIMESTAMP; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; import static java.lang.Float.floatToRawIntBits; public class CassandraRecordCursor diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraRecordSet.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraRecordSet.java index 6c66b2700051..f7ff61121ffc 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraRecordSet.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraRecordSet.java @@ -14,9 +14,9 @@ package io.trino.plugin.cassandra; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.List; import java.util.function.Function; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraRecordSetProvider.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraRecordSetProvider.java index 94abcf75b37b..41b2d59cd06f 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraRecordSetProvider.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraRecordSetProvider.java @@ -14,14 +14,14 @@ package io.trino.plugin.cassandra; import io.airlift.log.Logger; -import io.prestosql.plugin.cassandra.util.CassandraCqlUtils; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.plugin.cassandra.util.CassandraCqlUtils; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import javax.inject.Inject; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSession.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSession.java index bf90e5cfe83b..5e441e8009c5 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSession.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSession.java @@ -44,14 +44,14 @@ import io.airlift.json.JsonCodec; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.plugin.cassandra.util.CassandraCqlUtils; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.cassandra.util.CassandraCqlUtils; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; import java.nio.ByteBuffer; import java.util.ArrayList; @@ -71,13 +71,13 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.transform; -import static io.prestosql.plugin.cassandra.CassandraErrorCode.CASSANDRA_VERSION_ERROR; -import static io.prestosql.plugin.cassandra.CassandraMetadata.PRESTO_COMMENT_METADATA; -import static io.prestosql.plugin.cassandra.CassandraType.isFullySupported; -import static io.prestosql.plugin.cassandra.CassandraType.toCassandraType; -import static io.prestosql.plugin.cassandra.util.CassandraCqlUtils.selectDistinctFrom; -import static io.prestosql.plugin.cassandra.util.CassandraCqlUtils.validSchemaName; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.cassandra.CassandraErrorCode.CASSANDRA_VERSION_ERROR; +import static io.trino.plugin.cassandra.CassandraMetadata.PRESTO_COMMENT_METADATA; +import static io.trino.plugin.cassandra.CassandraType.isFullySupported; +import static io.trino.plugin.cassandra.CassandraType.toCassandraType; +import static io.trino.plugin.cassandra.util.CassandraCqlUtils.selectDistinctFrom; +import static io.trino.plugin.cassandra.util.CassandraCqlUtils.validSchemaName; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; import static java.util.Comparator.comparing; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSessionProperties.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSessionProperties.java index 7a4a1f5dd1f0..5355b19f4ca9 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSessionProperties.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSessionProperties.java @@ -14,15 +14,15 @@ package io.trino.plugin.cassandra; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; import java.util.List; import java.util.Optional; -import static io.prestosql.spi.session.PropertyMetadata.longProperty; +import static io.trino.spi.session.PropertyMetadata.longProperty; public final class CassandraSessionProperties { diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSplit.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSplit.java index 91afb318d929..d5de1c1b9581 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSplit.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSplit.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSplitManager.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSplitManager.java index 8142afa22145..c2b0db79c706 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSplitManager.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraSplitManager.java @@ -17,17 +17,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.log.Logger; -import io.prestosql.plugin.cassandra.util.HostAddressFactory; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.cassandra.util.HostAddressFactory; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; @@ -38,7 +38,7 @@ import java.util.Optional; import java.util.Set; -import static io.prestosql.plugin.cassandra.CassandraSessionProperties.getSplitsPerNode; +import static io.trino.plugin.cassandra.CassandraSessionProperties.getSplitsPerNode; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTable.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTable.java index d2a58db2c385..697ee7d59822 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTable.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTable.java @@ -14,7 +14,7 @@ package io.trino.plugin.cassandra; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.cassandra.util.CassandraCqlUtils; +import io.trino.plugin.cassandra.util.CassandraCqlUtils; import java.util.List; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTableHandle.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTableHandle.java index 74638c640143..410b997a14fe 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTableHandle.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTableHandle.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTokenSplitManager.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTokenSplitManager.java index 1223dace2036..c6618d7b30af 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTokenSplitManager.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTokenSplitManager.java @@ -17,7 +17,7 @@ import com.datastax.driver.core.TokenRange; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import javax.inject.Inject; @@ -30,8 +30,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.cassandra.CassandraErrorCode.CASSANDRA_METADATA_ERROR; -import static io.prestosql.plugin.cassandra.TokenRing.createForPartitioner; +import static io.trino.plugin.cassandra.CassandraErrorCode.CASSANDRA_METADATA_ERROR; +import static io.trino.plugin.cassandra.TokenRing.createForPartitioner; import static java.lang.Math.max; import static java.lang.Math.round; import static java.lang.StrictMath.toIntExact; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTransactionHandle.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTransactionHandle.java index 3082eee2855d..ae7b61e7c6d8 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTransactionHandle.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.cassandra; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum CassandraTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraType.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraType.java index 1e6f0d500cd4..b16756257bf0 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraType.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraType.java @@ -21,20 +21,20 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.net.InetAddresses; import io.airlift.slice.Slice; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import java.math.BigDecimal; import java.math.BigInteger; @@ -49,12 +49,12 @@ import static com.google.common.net.InetAddresses.toAddrString; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.plugin.cassandra.util.CassandraCqlUtils.quoteStringLiteral; -import static io.prestosql.plugin.cassandra.util.CassandraCqlUtils.quoteStringLiteralForJson; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.plugin.cassandra.util.CassandraCqlUtils.quoteStringLiteral; +import static io.trino.plugin.cassandra.util.CassandraCqlUtils.quoteStringLiteralForJson; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/util/CassandraCqlUtils.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/util/CassandraCqlUtils.java index 01bdb0f0dec4..726cf2ce5a46 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/util/CassandraCqlUtils.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/util/CassandraCqlUtils.java @@ -18,10 +18,10 @@ import com.datastax.driver.core.querybuilder.Select.Selection; import com.fasterxml.jackson.core.io.JsonStringEncoder; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.cassandra.CassandraColumnHandle; -import io.prestosql.plugin.cassandra.CassandraPartition; -import io.prestosql.plugin.cassandra.CassandraTableHandle; -import io.prestosql.spi.connector.ColumnHandle; +import io.trino.plugin.cassandra.CassandraColumnHandle; +import io.trino.plugin.cassandra.CassandraPartition; +import io.trino.plugin.cassandra.CassandraTableHandle; +import io.trino.spi.connector.ColumnHandle; import java.util.ArrayList; import java.util.List; diff --git a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/util/HostAddressFactory.java b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/util/HostAddressFactory.java index 4038ba971b4d..f861150cec73 100644 --- a/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/util/HostAddressFactory.java +++ b/plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/util/HostAddressFactory.java @@ -14,7 +14,7 @@ package io.trino.plugin.cassandra.util; import com.datastax.driver.core.Host; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import java.util.ArrayList; import java.util.Collection; diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/BaseCassandraDistributedQueries.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/BaseCassandraDistributedQueries.java index 9f7f811012e7..fc9a34ace355 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/BaseCassandraDistributedQueries.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/BaseCassandraDistributedQueries.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.cassandra; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.MaterializedResult; +import io.trino.testing.sql.TestTable; import org.testng.SkipException; import java.util.Optional; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; import static org.assertj.core.api.Assertions.assertThatThrownBy; public abstract class BaseCassandraDistributedQueries diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/CassandraQueryRunner.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/CassandraQueryRunner.java index 6d0aca0d07d0..36f051a6f2c5 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/CassandraQueryRunner.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/CassandraQueryRunner.java @@ -17,17 +17,17 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; import io.trino.tpch.TpchTable; import java.util.Map; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.createKeyspace; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.cassandra.CassandraTestingUtils.createKeyspace; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class CassandraQueryRunner { diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/CassandraTestingUtils.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/CassandraTestingUtils.java index 4ccdb42bab88..d730b89b9dda 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/CassandraTestingUtils.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/CassandraTestingUtils.java @@ -20,7 +20,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.net.InetAddresses; import com.google.common.primitives.Ints; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import java.math.BigDecimal; import java.math.BigInteger; diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraConnector.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraConnector.java index f258700dd49f..806e494592d4 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraConnector.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraConnector.java @@ -16,30 +16,30 @@ import com.datastax.driver.core.utils.Bytes; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.testing.TestingConnectorContext; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.testing.TestingConnectorContext; +import io.trino.testing.TestingConnectorSession; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -52,20 +52,20 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.TABLE_ALL_TYPES; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.TABLE_DELETE_DATA; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.createTestTables; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.plugin.cassandra.CassandraTestingUtils.TABLE_ALL_TYPES; +import static io.trino.plugin.cassandra.CassandraTestingUtils.TABLE_DELETE_DATA; +import static io.trino.plugin.cassandra.CassandraTestingUtils.createTestTables; +import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraDistributedQueries.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraDistributedQueries.java index c6660c90d303..583480ee4ad4 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraDistributedQueries.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraDistributedQueries.java @@ -14,10 +14,10 @@ package io.trino.plugin.cassandra; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; -import static io.prestosql.plugin.cassandra.CassandraQueryRunner.createCassandraQueryRunner; +import static io.trino.plugin.cassandra.CassandraQueryRunner.createCassandraQueryRunner; public class TestCassandraDistributedQueries extends BaseCassandraDistributedQueries diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraDistributedQueriesLatest.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraDistributedQueriesLatest.java index a97aa2b1e95c..67fc56e32e01 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraDistributedQueriesLatest.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraDistributedQueriesLatest.java @@ -14,10 +14,10 @@ package io.trino.plugin.cassandra; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; -import static io.prestosql.plugin.cassandra.CassandraQueryRunner.createCassandraQueryRunner; +import static io.trino.plugin.cassandra.CassandraQueryRunner.createCassandraQueryRunner; public class TestCassandraDistributedQueriesLatest extends BaseCassandraDistributedQueries diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraIntegrationSmokeTest.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraIntegrationSmokeTest.java index 34dc903d2e87..1fb6ead95329 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraIntegrationSmokeTest.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraIntegrationSmokeTest.java @@ -16,13 +16,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.assertions.Assert; +import io.trino.Session; +import io.trino.spi.type.Type; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; +import io.trino.testing.assertions.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -35,31 +35,31 @@ import java.util.concurrent.ThreadLocalRandom; import static com.datastax.driver.core.utils.Bytes.toRawHexString; -import static io.prestosql.plugin.cassandra.CassandraQueryRunner.createCassandraQueryRunner; -import static io.prestosql.plugin.cassandra.CassandraQueryRunner.createCassandraSession; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.TABLE_ALL_TYPES; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.TABLE_ALL_TYPES_INSERT; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.TABLE_ALL_TYPES_PARTITION_KEY; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.TABLE_CLUSTERING_KEYS; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.TABLE_CLUSTERING_KEYS_INEQUALITY; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.TABLE_CLUSTERING_KEYS_LARGE; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.TABLE_DELETE_DATA; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.TABLE_MULTI_PARTITION_CLUSTERING_KEYS; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.createTestTables; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.MaterializedResult.DEFAULT_PRECISION; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.QueryAssertions.assertContains; -import static io.prestosql.testing.QueryAssertions.assertContainsEventually; +import static io.trino.plugin.cassandra.CassandraQueryRunner.createCassandraQueryRunner; +import static io.trino.plugin.cassandra.CassandraQueryRunner.createCassandraSession; +import static io.trino.plugin.cassandra.CassandraTestingUtils.TABLE_ALL_TYPES; +import static io.trino.plugin.cassandra.CassandraTestingUtils.TABLE_ALL_TYPES_INSERT; +import static io.trino.plugin.cassandra.CassandraTestingUtils.TABLE_ALL_TYPES_PARTITION_KEY; +import static io.trino.plugin.cassandra.CassandraTestingUtils.TABLE_CLUSTERING_KEYS; +import static io.trino.plugin.cassandra.CassandraTestingUtils.TABLE_CLUSTERING_KEYS_INEQUALITY; +import static io.trino.plugin.cassandra.CassandraTestingUtils.TABLE_CLUSTERING_KEYS_LARGE; +import static io.trino.plugin.cassandra.CassandraTestingUtils.TABLE_DELETE_DATA; +import static io.trino.plugin.cassandra.CassandraTestingUtils.TABLE_MULTI_PARTITION_CLUSTERING_KEYS; +import static io.trino.plugin.cassandra.CassandraTestingUtils.createTestTables; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +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.testing.MaterializedResult.DEFAULT_PRECISION; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.QueryAssertions.assertContains; +import static io.trino.testing.QueryAssertions.assertContainsEventually; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.NATION; import static io.trino.tpch.TpchTable.ORDERS; diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraSplit.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraSplit.java index ccf3c0ac9302..6f5a12bb0ddd 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraSplit.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraSplit.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.json.JsonCodec; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraTokenSplitManager.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraTokenSplitManager.java index 1407e599fe89..598b8d00ff89 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraTokenSplitManager.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraTokenSplitManager.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.cassandra; -import io.prestosql.plugin.cassandra.CassandraTokenSplitManager.TokenSplit; +import io.trino.plugin.cassandra.CassandraTokenSplitManager.TokenSplit; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -21,7 +21,7 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.plugin.cassandra.CassandraTestingUtils.createKeyspace; +import static io.trino.plugin.cassandra.CassandraTestingUtils.createKeyspace; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestJsonCassandraHandles.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestJsonCassandraHandles.java index eb46242cf461..dbe4b35574e4 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestJsonCassandraHandles.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestJsonCassandraHandles.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableMap; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import org.testng.annotations.Test; import java.util.Collections; @@ -26,7 +26,7 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/util/TestCassandraClusteringPredicatesExtractor.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/util/TestCassandraClusteringPredicatesExtractor.java index c98dca515ca6..c330e0986133 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/util/TestCassandraClusteringPredicatesExtractor.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/util/TestCassandraClusteringPredicatesExtractor.java @@ -16,18 +16,18 @@ import com.datastax.driver.core.VersionNumber; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.cassandra.CassandraClusteringPredicatesExtractor; -import io.prestosql.plugin.cassandra.CassandraColumnHandle; -import io.prestosql.plugin.cassandra.CassandraTable; -import io.prestosql.plugin.cassandra.CassandraTableHandle; -import io.prestosql.plugin.cassandra.CassandraType; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.cassandra.CassandraClusteringPredicatesExtractor; +import io.trino.plugin.cassandra.CassandraColumnHandle; +import io.trino.plugin.cassandra.CassandraTable; +import io.trino.plugin.cassandra.CassandraTableHandle; +import io.trino.plugin.cassandra.CassandraType; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; public class TestCassandraClusteringPredicatesExtractor diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/util/TestHostAddressFactory.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/util/TestHostAddressFactory.java index d91809dc105a..2422e56ca6bb 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/util/TestHostAddressFactory.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/util/TestHostAddressFactory.java @@ -16,7 +16,7 @@ import com.datastax.driver.core.Host; import com.datastax.driver.core.TestHost; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import org.testng.annotations.Test; import java.net.InetAddress; diff --git a/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidErrorCode.java b/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidErrorCode.java index e57ecc95fb21..951045402f09 100644 --- a/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidErrorCode.java +++ b/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidErrorCode.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.druid; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.EXTERNAL; public enum DruidErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidJdbcClient.java b/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidJdbcClient.java index bfdfb936a16d..c05a31dea8d7 100644 --- a/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidJdbcClient.java +++ b/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidJdbcClient.java @@ -14,24 +14,24 @@ package io.trino.plugin.druid; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.jdbc.BaseJdbcClient; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ColumnMapping; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcOutputTableHandle; -import io.prestosql.plugin.jdbc.JdbcSplit; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.plugin.jdbc.QueryBuilder; -import io.prestosql.plugin.jdbc.RemoteTableName; -import io.prestosql.plugin.jdbc.WriteFunction; -import io.prestosql.plugin.jdbc.WriteMapping; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Type; +import io.trino.plugin.jdbc.BaseJdbcClient; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ColumnMapping; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcOutputTableHandle; +import io.trino.plugin.jdbc.JdbcSplit; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.plugin.jdbc.QueryBuilder; +import io.trino.plugin.jdbc.RemoteTableName; +import io.trino.plugin.jdbc.WriteFunction; +import io.trino.plugin.jdbc.WriteMapping; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Type; import javax.inject.Inject; @@ -51,10 +51,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.defaultVarcharColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharColumnMapping; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; +import static io.trino.plugin.jdbc.StandardColumnMappings.defaultVarcharColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharColumnMapping; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; public class DruidJdbcClient extends BaseJdbcClient diff --git a/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidJdbcClientModule.java b/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidJdbcClientModule.java index ec3294bb5e70..bc781591366f 100644 --- a/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidJdbcClientModule.java +++ b/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidJdbcClientModule.java @@ -18,12 +18,12 @@ import com.google.inject.Provides; import com.google.inject.Scopes; import com.google.inject.Singleton; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.DriverConnectionFactory; -import io.prestosql.plugin.jdbc.ForBaseJdbc; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.credential.CredentialProvider; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.DriverConnectionFactory; +import io.trino.plugin.jdbc.ForBaseJdbc; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.credential.CredentialProvider; import org.apache.calcite.avatica.remote.Driver; import java.util.Properties; diff --git a/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidJdbcPlugin.java b/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidJdbcPlugin.java index ad3f72c02d0d..dc25096be8a1 100644 --- a/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidJdbcPlugin.java +++ b/plugin/trino-druid/src/main/java/io/trino/plugin/druid/DruidJdbcPlugin.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.druid; -import io.prestosql.plugin.jdbc.JdbcPlugin; +import io.trino.plugin.jdbc.JdbcPlugin; public class DruidJdbcPlugin extends JdbcPlugin diff --git a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/BaseDruidIntegrationSmokeTest.java b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/BaseDruidIntegrationSmokeTest.java index 7a453f92a125..0a792f4bc0c0 100644 --- a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/BaseDruidIntegrationSmokeTest.java +++ b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/BaseDruidIntegrationSmokeTest.java @@ -13,19 +13,19 @@ */ package io.trino.plugin.druid; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.assertions.Assert; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.assertions.Assert; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; -import static io.prestosql.plugin.druid.DruidQueryRunner.copyAndIngestTpchData; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.druid.DruidQueryRunner.copyAndIngestTpchData; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.assertj.core.api.Assertions.assertThat; public abstract class BaseDruidIntegrationSmokeTest diff --git a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/DruidQueryRunner.java b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/DruidQueryRunner.java index 56b362db75b8..961538d8f4fe 100644 --- a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/DruidQueryRunner.java +++ b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/DruidQueryRunner.java @@ -16,11 +16,11 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; import java.io.BufferedWriter; import java.io.File; @@ -32,7 +32,7 @@ import java.util.stream.Collectors; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; public class DruidQueryRunner diff --git a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidErrorCode.java b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidErrorCode.java index 901e81ffd6c1..57e96044a69c 100644 --- a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidErrorCode.java +++ b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidErrorCode.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.druid; -import io.prestosql.spi.ErrorCode; +import io.trino.spi.ErrorCode; import org.testng.annotations.Test; -import static io.prestosql.plugin.druid.DruidErrorCode.DRUID_DDL_NOT_SUPPORTED; -import static io.prestosql.plugin.druid.DruidErrorCode.DRUID_DML_NOT_SUPPORTED; -import static io.prestosql.spi.ErrorType.EXTERNAL; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.druid.DruidErrorCode.DRUID_DDL_NOT_SUPPORTED; +import static io.trino.plugin.druid.DruidErrorCode.DRUID_DML_NOT_SUPPORTED; +import static io.trino.spi.ErrorType.EXTERNAL; +import static io.trino.testing.assertions.Assert.assertEquals; public class TestDruidErrorCode { diff --git a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidIntegrationSmokeTest.java b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidIntegrationSmokeTest.java index f89c0ecbfd7f..81c5a23d3c00 100644 --- a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidIntegrationSmokeTest.java +++ b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidIntegrationSmokeTest.java @@ -14,9 +14,9 @@ package io.trino.plugin.druid; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; -import static io.prestosql.plugin.druid.DruidQueryRunner.copyAndIngestTpchData; +import static io.trino.plugin.druid.DruidQueryRunner.copyAndIngestTpchData; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.LINE_ITEM; import static io.trino.tpch.TpchTable.NATION; diff --git a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidIntegrationSmokeTestLatest.java b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidIntegrationSmokeTestLatest.java index 09dfc82128b6..8459a01193d8 100644 --- a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidIntegrationSmokeTestLatest.java +++ b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidIntegrationSmokeTestLatest.java @@ -14,9 +14,9 @@ package io.trino.plugin.druid; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; -import static io.prestosql.plugin.druid.DruidQueryRunner.copyAndIngestTpchData; +import static io.trino.plugin.druid.DruidQueryRunner.copyAndIngestTpchData; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.LINE_ITEM; import static io.trino.tpch.TpchTable.NATION; diff --git a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidJdbcPlugin.java b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidJdbcPlugin.java index b86a5c760328..ce1a88b816df 100644 --- a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidJdbcPlugin.java +++ b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidJdbcPlugin.java @@ -14,9 +14,9 @@ package io.trino.plugin.druid; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; diff --git a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestingDruidServer.java b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestingDruidServer.java index 0edb85a0c651..84df7f7b7028 100644 --- a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestingDruidServer.java +++ b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestingDruidServer.java @@ -17,7 +17,7 @@ import com.google.common.io.Closer; import com.google.common.io.MoreFiles; import com.google.common.io.Resources; -import io.prestosql.testing.assertions.Assert; +import io.trino.testing.assertions.Assert; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/BuiltinColumns.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/BuiltinColumns.java index a59c6a3ad89d..fb2d04cba38b 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/BuiltinColumns.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/BuiltinColumns.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.elasticsearch; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Arrays; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarcharType.VARCHAR; enum BuiltinColumns { diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/CountQueryPageSource.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/CountQueryPageSource.java index ea644725f30c..6eaaaf752b79 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/CountQueryPageSource.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/CountQueryPageSource.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.elasticsearch; -import io.prestosql.elasticsearch.client.ElasticsearchClient; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorPageSource; +import io.trino.plugin.elasticsearch.client.ElasticsearchClient; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorPageSource; -import static io.prestosql.elasticsearch.ElasticsearchQueryBuilder.buildSearchQuery; +import static io.trino.plugin.elasticsearch.ElasticsearchQueryBuilder.buildSearchQuery; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchColumnHandle.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchColumnHandle.java index 05642e504ce0..a46a9130ef7d 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchColumnHandle.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchColumnHandle.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchConnector.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchConnector.java index d6061deb5fc5..3571244fe1a6 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchConnector.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchConnector.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableSet; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; import java.util.Set; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; public class ElasticsearchConnector diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchConnectorFactory.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchConnectorFactory.java index d40c116e34bf..1e79404b40e2 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchConnectorFactory.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchConnectorFactory.java @@ -16,14 +16,14 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.plugin.base.jmx.ConnectorObjectNameGeneratorModule; -import io.prestosql.plugin.base.jmx.MBeanServerModule; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.jmx.ConnectorObjectNameGeneratorModule; +import io.trino.plugin.base.jmx.MBeanServerModule; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.type.TypeManager; import org.weakref.jmx.guice.MBeanModule; import java.util.Map; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchConnectorModule.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchConnectorModule.java index ff86d7de1883..47cb5ec15980 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchConnectorModule.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchConnectorModule.java @@ -18,10 +18,10 @@ import com.google.inject.Binder; import com.google.inject.Scopes; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.elasticsearch.client.ElasticsearchClient; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.elasticsearch.client.ElasticsearchClient; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; @@ -29,8 +29,8 @@ import static io.airlift.configuration.ConditionalModule.installModuleIf; import static io.airlift.configuration.ConfigBinder.configBinder; import static io.airlift.json.JsonBinder.jsonBinder; -import static io.prestosql.elasticsearch.ElasticsearchConfig.Security.AWS; -import static io.prestosql.elasticsearch.ElasticsearchConfig.Security.PASSWORD; +import static io.trino.plugin.elasticsearch.ElasticsearchConfig.Security.AWS; +import static io.trino.plugin.elasticsearch.ElasticsearchConfig.Security.PASSWORD; import static java.util.Objects.requireNonNull; import static java.util.function.Predicate.isEqual; import static org.weakref.jmx.guice.ExportBinder.newExporter; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchErrorCode.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchErrorCode.java index 90b4652f16f4..bc74a6277c77 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchErrorCode.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchErrorCode.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.elasticsearch; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; -import static io.prestosql.spi.ErrorType.USER_ERROR; +import static io.trino.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.USER_ERROR; public enum ElasticsearchErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchHandleResolver.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchHandleResolver.java index 5091e248abde..e3e73e89216a 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchHandleResolver.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.elasticsearch; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class ElasticsearchHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchMetadata.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchMetadata.java index bd9f0753d248..c675702d683e 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchMetadata.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchMetadata.java @@ -20,32 +20,32 @@ import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.elasticsearch.client.ElasticsearchClient; -import io.prestosql.elasticsearch.client.IndexMetadata; -import io.prestosql.elasticsearch.client.IndexMetadata.DateTimeType; -import io.prestosql.elasticsearch.client.IndexMetadata.ObjectType; -import io.prestosql.elasticsearch.client.IndexMetadata.PrimitiveType; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.LimitApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeSignature; +import io.trino.plugin.elasticsearch.client.ElasticsearchClient; +import io.trino.plugin.elasticsearch.client.IndexMetadata; +import io.trino.plugin.elasticsearch.client.IndexMetadata.DateTimeType; +import io.trino.plugin.elasticsearch.client.IndexMetadata.ObjectType; +import io.trino.plugin.elasticsearch.client.IndexMetadata.PrimitiveType; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.LimitApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeSignature; import javax.inject.Inject; @@ -58,19 +58,19 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.elasticsearch.ElasticsearchTableHandle.Type.QUERY; -import static io.prestosql.elasticsearch.ElasticsearchTableHandle.Type.SCAN; -import static io.prestosql.spi.StandardErrorCode.INVALID_ARGUMENTS; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.elasticsearch.ElasticsearchTableHandle.Type.QUERY; +import static io.trino.plugin.elasticsearch.ElasticsearchTableHandle.Type.SCAN; +import static io.trino.spi.StandardErrorCode.INVALID_ARGUMENTS; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchPageSourceProvider.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchPageSourceProvider.java index c0f932e774e6..fed77834b1eb 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchPageSourceProvider.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchPageSourceProvider.java @@ -13,22 +13,22 @@ */ package io.trino.plugin.elasticsearch; -import io.prestosql.elasticsearch.client.ElasticsearchClient; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.elasticsearch.client.ElasticsearchClient; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.elasticsearch.ElasticsearchTableHandle.Type.QUERY; +import static io.trino.plugin.elasticsearch.ElasticsearchTableHandle.Type.QUERY; import static java.util.Objects.requireNonNull; public class ElasticsearchPageSourceProvider diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchPlugin.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchPlugin.java index 4787ee572514..b65805c0368e 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchPlugin.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchPlugin.java @@ -15,8 +15,8 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchQueryBuilder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchQueryBuilder.java index 2bcddc4e8bf3..ef0683a40870 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchQueryBuilder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchQueryBuilder.java @@ -14,10 +14,10 @@ package io.trino.plugin.elasticsearch; import io.airlift.slice.Slice; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.ExistsQueryBuilder; import org.elasticsearch.index.query.MatchAllQueryBuilder; @@ -36,16 +36,16 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Math.floorDiv; import static java.lang.Math.toIntExact; import static java.time.format.DateTimeFormatter.ISO_DATE_TIME; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchSplit.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchSplit.java index a5d6d0294948..db2532303de1 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchSplit.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; import java.util.Optional; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchSplitManager.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchSplitManager.java index e3c1149f75c2..d6de3072f1bc 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchSplitManager.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchSplitManager.java @@ -14,14 +14,14 @@ package io.trino.plugin.elasticsearch; import com.google.common.collect.ImmutableList; -import io.prestosql.elasticsearch.client.ElasticsearchClient; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.plugin.elasticsearch.client.ElasticsearchClient; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import javax.inject.Inject; @@ -29,7 +29,7 @@ import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.elasticsearch.ElasticsearchTableHandle.Type.QUERY; +import static io.trino.plugin.elasticsearch.ElasticsearchTableHandle.Type.QUERY; import static java.util.Objects.requireNonNull; public class ElasticsearchSplitManager diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchTableHandle.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchTableHandle.java index 79de7fd222ad..e7583ebb8dbf 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchTableHandle.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchTableHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.predicate.TupleDomain; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchTransactionHandle.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchTransactionHandle.java index 21c11a3ab50d..cf42b03b5d45 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchTransactionHandle.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ElasticsearchTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.elasticsearch; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum ElasticsearchTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/NodesSystemTable.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/NodesSystemTable.java index 607a88ec5eba..a5f2e6431b1b 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/NodesSystemTable.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/NodesSystemTable.java @@ -14,28 +14,28 @@ package io.trino.plugin.elasticsearch; import com.google.common.collect.ImmutableList; -import io.prestosql.elasticsearch.client.ElasticsearchClient; -import io.prestosql.elasticsearch.client.ElasticsearchNode; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.elasticsearch.client.ElasticsearchClient; +import io.trino.plugin.elasticsearch.client.ElasticsearchNode; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; +import io.trino.spi.Page; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; import java.util.Set; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class NodesSystemTable diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/PassthroughQueryPageSource.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/PassthroughQueryPageSource.java index 8571a0eeb55f..4201d7aa3d2d 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/PassthroughQueryPageSource.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/PassthroughQueryPageSource.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.elasticsearch.client.ElasticsearchClient; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorPageSource; +import io.trino.plugin.elasticsearch.client.ElasticsearchClient; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorPageSource; import java.io.IOException; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; public class PassthroughQueryPageSource diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ScanQueryPageSource.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ScanQueryPageSource.java index 62813feef0ab..44b4d865bd16 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ScanQueryPageSource.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/ScanQueryPageSource.java @@ -16,33 +16,33 @@ import com.google.common.collect.AbstractIterator; import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; -import io.prestosql.elasticsearch.client.ElasticsearchClient; -import io.prestosql.elasticsearch.decoders.ArrayDecoder; -import io.prestosql.elasticsearch.decoders.BigintDecoder; -import io.prestosql.elasticsearch.decoders.BooleanDecoder; -import io.prestosql.elasticsearch.decoders.Decoder; -import io.prestosql.elasticsearch.decoders.DoubleDecoder; -import io.prestosql.elasticsearch.decoders.IdColumnDecoder; -import io.prestosql.elasticsearch.decoders.IntegerDecoder; -import io.prestosql.elasticsearch.decoders.IpAddressDecoder; -import io.prestosql.elasticsearch.decoders.RealDecoder; -import io.prestosql.elasticsearch.decoders.RowDecoder; -import io.prestosql.elasticsearch.decoders.ScoreColumnDecoder; -import io.prestosql.elasticsearch.decoders.SmallintDecoder; -import io.prestosql.elasticsearch.decoders.SourceColumnDecoder; -import io.prestosql.elasticsearch.decoders.TimestampDecoder; -import io.prestosql.elasticsearch.decoders.TinyintDecoder; -import io.prestosql.elasticsearch.decoders.VarbinaryDecoder; -import io.prestosql.elasticsearch.decoders.VarcharDecoder; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.plugin.elasticsearch.client.ElasticsearchClient; +import io.trino.plugin.elasticsearch.decoders.ArrayDecoder; +import io.trino.plugin.elasticsearch.decoders.BigintDecoder; +import io.trino.plugin.elasticsearch.decoders.BooleanDecoder; +import io.trino.plugin.elasticsearch.decoders.Decoder; +import io.trino.plugin.elasticsearch.decoders.DoubleDecoder; +import io.trino.plugin.elasticsearch.decoders.IdColumnDecoder; +import io.trino.plugin.elasticsearch.decoders.IntegerDecoder; +import io.trino.plugin.elasticsearch.decoders.IpAddressDecoder; +import io.trino.plugin.elasticsearch.decoders.RealDecoder; +import io.trino.plugin.elasticsearch.decoders.RowDecoder; +import io.trino.plugin.elasticsearch.decoders.ScoreColumnDecoder; +import io.trino.plugin.elasticsearch.decoders.SmallintDecoder; +import io.trino.plugin.elasticsearch.decoders.SourceColumnDecoder; +import io.trino.plugin.elasticsearch.decoders.TimestampDecoder; +import io.trino.plugin.elasticsearch.decoders.TinyintDecoder; +import io.trino.plugin.elasticsearch.decoders.VarbinaryDecoder; +import io.trino.plugin.elasticsearch.decoders.VarcharDecoder; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; @@ -56,20 +56,20 @@ import java.util.function.Supplier; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.elasticsearch.BuiltinColumns.ID; -import static io.prestosql.elasticsearch.BuiltinColumns.SCORE; -import static io.prestosql.elasticsearch.BuiltinColumns.SOURCE; -import static io.prestosql.elasticsearch.ElasticsearchQueryBuilder.buildSearchQuery; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.elasticsearch.BuiltinColumns.ID; +import static io.trino.plugin.elasticsearch.BuiltinColumns.SCORE; +import static io.trino.plugin.elasticsearch.BuiltinColumns.SOURCE; +import static io.trino.plugin.elasticsearch.ElasticsearchQueryBuilder.buildSearchQuery; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; import static java.util.function.Predicate.isEqual; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/client/ElasticsearchClient.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/client/ElasticsearchClient.java index 4b8016d78880..ecb0a0dfab2b 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/client/ElasticsearchClient.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/client/ElasticsearchClient.java @@ -30,10 +30,10 @@ import io.airlift.security.pem.PemReader; import io.airlift.stats.TimeStat; import io.airlift.units.Duration; -import io.prestosql.elasticsearch.AwsSecurityConfig; -import io.prestosql.elasticsearch.ElasticsearchConfig; -import io.prestosql.elasticsearch.PasswordConfig; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.elasticsearch.AwsSecurityConfig; +import io.trino.plugin.elasticsearch.ElasticsearchConfig; +import io.trino.plugin.elasticsearch.PasswordConfig; +import io.trino.spi.PrestoException; import org.apache.http.HttpEntity; import org.apache.http.HttpHost; import org.apache.http.auth.AuthScope; @@ -103,10 +103,10 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.elasticsearch.ElasticsearchErrorCode.ELASTICSEARCH_CONNECTION_ERROR; -import static io.prestosql.elasticsearch.ElasticsearchErrorCode.ELASTICSEARCH_INVALID_RESPONSE; -import static io.prestosql.elasticsearch.ElasticsearchErrorCode.ELASTICSEARCH_QUERY_FAILURE; -import static io.prestosql.elasticsearch.ElasticsearchErrorCode.ELASTICSEARCH_SSL_INITIALIZATION_FAILURE; +import static io.trino.plugin.elasticsearch.ElasticsearchErrorCode.ELASTICSEARCH_CONNECTION_ERROR; +import static io.trino.plugin.elasticsearch.ElasticsearchErrorCode.ELASTICSEARCH_INVALID_RESPONSE; +import static io.trino.plugin.elasticsearch.ElasticsearchErrorCode.ELASTICSEARCH_QUERY_FAILURE; +import static io.trino.plugin.elasticsearch.ElasticsearchErrorCode.ELASTICSEARCH_SSL_INITIALIZATION_FAILURE; import static java.lang.StrictMath.toIntExact; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/ArrayDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/ArrayDecoder.java index 4071a3041858..196c4aad8882 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/ArrayDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/ArrayDecoder.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.elasticsearch.decoders; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.List; import java.util.function.Supplier; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/BigintDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/BigintDecoder.java index 88762141645d..1e394d643a1f 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/BigintDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/BigintDecoder.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.elasticsearch.decoders; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/BooleanDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/BooleanDecoder.java index f55f07751266..07d58bcae2cc 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/BooleanDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/BooleanDecoder.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.elasticsearch.decoders; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/Decoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/Decoder.java index 60698ca45ac2..8588a5b1300c 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/Decoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/Decoder.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.elasticsearch.decoders; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/DoubleDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/DoubleDecoder.java index de9eb7ecfaf0..b8888bd75c41 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/DoubleDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/DoubleDecoder.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.elasticsearch.decoders; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/IdColumnDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/IdColumnDecoder.java index 77a0f3466533..ac4a1bdf5f5f 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/IdColumnDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/IdColumnDecoder.java @@ -14,12 +14,12 @@ package io.trino.plugin.elasticsearch.decoders; import io.airlift.slice.Slices; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; public class IdColumnDecoder implements Decoder diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/IntegerDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/IntegerDecoder.java index 6ab58df174d2..f30ad80dbd16 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/IntegerDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/IntegerDecoder.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.elasticsearch.decoders; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/IpAddressDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/IpAddressDecoder.java index e699f4156589..bf972dd5bb36 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/IpAddressDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/IpAddressDecoder.java @@ -16,17 +16,17 @@ import com.google.common.net.InetAddresses; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; import static java.lang.String.format; import static java.lang.System.arraycopy; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/RealDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/RealDecoder.java index 73d085a1dae0..ef271bc23db6 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/RealDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/RealDecoder.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.elasticsearch.decoders; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.type.RealType.REAL; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/RowDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/RowDecoder.java index 4faf77ecdaed..3a375ef7abdd 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/RowDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/RowDecoder.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.elasticsearch.decoders; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.List; import java.util.Map; import java.util.function.Supplier; -import static io.prestosql.elasticsearch.ScanQueryPageSource.getField; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.plugin.elasticsearch.ScanQueryPageSource.getField; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/ScoreColumnDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/ScoreColumnDecoder.java index 93d6f3798d04..ecc6b4728484 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/ScoreColumnDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/ScoreColumnDecoder.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.elasticsearch.decoders; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.RealType.REAL; public class ScoreColumnDecoder implements Decoder diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/SmallintDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/SmallintDecoder.java index 3110ebf1e6ab..753b62c6f15c 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/SmallintDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/SmallintDecoder.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.elasticsearch.decoders; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.type.SmallintType.SMALLINT; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/SourceColumnDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/SourceColumnDecoder.java index 63a31cd561c2..725afa9d6766 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/SourceColumnDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/SourceColumnDecoder.java @@ -14,12 +14,12 @@ package io.trino.plugin.elasticsearch.decoders; import io.airlift.slice.Slices; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; public class SourceColumnDecoder implements Decoder diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/TimestampDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/TimestampDecoder.java index f63cbb15b42b..b3c0763607d0 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/TimestampDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/TimestampDecoder.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.elasticsearch.decoders; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.common.document.DocumentField; import org.elasticsearch.search.SearchHit; @@ -24,10 +24,10 @@ import java.time.ZoneOffset; import java.util.function.Supplier; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; import static java.lang.String.format; import static java.time.format.DateTimeFormatter.ISO_DATE_TIME; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/TinyintDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/TinyintDecoder.java index ae9eb26cc051..44bb39054a73 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/TinyintDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/TinyintDecoder.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.elasticsearch.decoders; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/VarbinaryDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/VarbinaryDecoder.java index 4e7fdfe1b2a2..4f858a75e2e9 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/VarbinaryDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/VarbinaryDecoder.java @@ -14,15 +14,15 @@ package io.trino.plugin.elasticsearch.decoders; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.Base64; import java.util.function.Supplier; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/VarcharDecoder.java b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/VarcharDecoder.java index 0b4beebd05df..43d2dea943eb 100644 --- a/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/VarcharDecoder.java +++ b/plugin/trino-elasticsearch/src/main/java/io/trino/plugin/elasticsearch/decoders/VarcharDecoder.java @@ -14,14 +14,14 @@ package io.trino.plugin.elasticsearch.decoders; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; import org.elasticsearch.search.SearchHit; import java.util.function.Supplier; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/BaseElasticsearchSmokeTest.java b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/BaseElasticsearchSmokeTest.java index b9770b2d3144..577f99deb660 100644 --- a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/BaseElasticsearchSmokeTest.java +++ b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/BaseElasticsearchSmokeTest.java @@ -18,9 +18,9 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.BaseEncoding; import com.google.common.net.HostAndPort; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import org.apache.http.HttpHost; import org.apache.http.entity.ContentType; @@ -35,11 +35,11 @@ import java.time.LocalDateTime; import java.util.Map; -import static io.prestosql.elasticsearch.ElasticsearchQueryRunner.createElasticsearchQueryRunner; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.elasticsearch.ElasticsearchQueryRunner.createElasticsearchQueryRunner; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/ElasticsearchLoader.java b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/ElasticsearchLoader.java index b3ee0dba47ad..ad736a487e75 100644 --- a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/ElasticsearchLoader.java +++ b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/ElasticsearchLoader.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.elasticsearch; -import io.prestosql.Session; -import io.prestosql.client.Column; -import io.prestosql.client.QueryData; -import io.prestosql.client.QueryStatusInfo; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.testing.AbstractTestingPrestoClient; -import io.prestosql.testing.ResultsSession; +import io.trino.Session; +import io.trino.client.Column; +import io.trino.client.QueryData; +import io.trino.client.QueryStatusInfo; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.testing.AbstractTestingPrestoClient; +import io.trino.testing.ResultsSession; import org.elasticsearch.action.bulk.BulkRequest; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.support.WriteRequest; @@ -36,11 +36,11 @@ import java.util.concurrent.atomic.AtomicReference; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.util.Objects.requireNonNull; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; diff --git a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/ElasticsearchQueryRunner.java b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/ElasticsearchQueryRunner.java index ab816373025a..f4cc8a12f89d 100644 --- a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/ElasticsearchQueryRunner.java +++ b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/ElasticsearchQueryRunner.java @@ -17,12 +17,12 @@ import com.google.common.net.HostAndPort; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.TestingPrestoClient; +import io.trino.Session; +import io.trino.metadata.QualifiedObjectName; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; +import io.trino.testing.TestingPrestoClient; import io.trino.tpch.TpchTable; import org.apache.http.HttpHost; import org.elasticsearch.client.RestClient; @@ -32,8 +32,8 @@ import static io.airlift.testing.Closeables.closeAllSuppress; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/TestElasticsearchConfig.java b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/TestElasticsearchConfig.java index 67f105fb8660..397d1a7940b0 100644 --- a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/TestElasticsearchConfig.java +++ b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/TestElasticsearchConfig.java @@ -25,7 +25,7 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertFullMapping; import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; -import static io.prestosql.elasticsearch.ElasticsearchConfig.Security.AWS; +import static io.trino.plugin.elasticsearch.ElasticsearchConfig.Security.AWS; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/TestPasswordAuthentication.java b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/TestPasswordAuthentication.java index a6f9311ffddc..a2edc7b2b96c 100644 --- a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/TestPasswordAuthentication.java +++ b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/TestPasswordAuthentication.java @@ -19,8 +19,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.Resources; import com.google.common.net.HostAndPort; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.sql.query.QueryAssertions; +import io.trino.testing.DistributedQueryRunner; import org.apache.http.HttpHost; import org.apache.http.entity.ContentType; import org.apache.http.message.BasicHeader; @@ -36,7 +36,7 @@ import static com.google.common.io.Resources.getResource; import static io.airlift.testing.Closeables.closeAll; -import static io.prestosql.elasticsearch.ElasticsearchQueryRunner.createElasticsearchQueryRunner; +import static io.trino.plugin.elasticsearch.ElasticsearchQueryRunner.createElasticsearchQueryRunner; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/TestingElasticsearchConnectorFactory.java b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/TestingElasticsearchConnectorFactory.java index 43b6c2fe54dd..a8e4cfabfdf4 100644 --- a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/TestingElasticsearchConnectorFactory.java +++ b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/TestingElasticsearchConnectorFactory.java @@ -16,11 +16,11 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.type.TypeManager; import java.util.Map; diff --git a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/client/TestExtractAddress.java b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/client/TestExtractAddress.java index b1eeba09c8d1..889a19eeb548 100644 --- a/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/client/TestExtractAddress.java +++ b/plugin/trino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/client/TestExtractAddress.java @@ -17,7 +17,7 @@ import java.util.Optional; -import static io.prestosql.elasticsearch.client.ElasticsearchClient.extractAddress; +import static io.trino.plugin.elasticsearch.client.ElasticsearchClient.extractAddress; import static org.testng.Assert.assertEquals; public class TestExtractAddress diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleColumn.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleColumn.java index aeb26367b537..f91f5dd7f90f 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleColumn.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleColumn.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleColumnHandle.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleColumnHandle.java index 77835ab53941..9c45ed7c95a3 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleColumnHandle.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleColumnHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import static com.google.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleConnector.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleConnector.java index ff048ac0a6a3..5d0cb896fec0 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleConnector.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleConnector.java @@ -14,16 +14,16 @@ package io.trino.plugin.example; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; -import static io.prestosql.plugin.example.ExampleTransactionHandle.INSTANCE; +import static io.trino.plugin.example.ExampleTransactionHandle.INSTANCE; import static java.util.Objects.requireNonNull; public class ExampleConnector diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleConnectorFactory.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleConnectorFactory.java index 93582316b307..784e34843cd2 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleConnectorFactory.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleConnectorFactory.java @@ -16,10 +16,10 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import java.util.Map; diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleHandleResolver.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleHandleResolver.java index 647a065b5b86..aff9aeb9d7d3 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleHandleResolver.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.example; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class ExampleHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleMetadata.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleMetadata.java index 605d8fd9c28c..21a8c11c60a9 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleMetadata.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleMetadata.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.TableNotFoundException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.TableNotFoundException; import javax.inject.Inject; diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleModule.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleModule.java index 47d5c0e61dbf..4944eda00716 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleModule.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleModule.java @@ -18,9 +18,9 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExamplePlugin.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExamplePlugin.java index aca88f9cb039..5aae5f7d64a7 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExamplePlugin.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExamplePlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.example; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class ExamplePlugin implements Plugin diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleRecordCursor.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleRecordCursor.java index 3eebc3f0ad01..5a2278f76b6a 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleRecordCursor.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleRecordCursor.java @@ -19,8 +19,8 @@ import com.google.common.io.CountingInputStream; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.Type; import java.io.IOException; import java.io.UncheckedIOException; @@ -29,10 +29,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.nio.charset.StandardCharsets.UTF_8; public class ExampleRecordCursor diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleRecordSet.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleRecordSet.java index b572bb72c70f..c12b1faebd3d 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleRecordSet.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleRecordSet.java @@ -16,9 +16,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.ByteSource; import com.google.common.io.Resources; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.net.MalformedURLException; import java.util.List; diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleRecordSetProvider.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleRecordSetProvider.java index 080797608db3..4967d25028a4 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleRecordSetProvider.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleRecordSetProvider.java @@ -14,13 +14,13 @@ package io.trino.plugin.example; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import java.util.List; diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleSplit.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleSplit.java index 567337f94d8d..6935daf64994 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleSplit.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.net.URI; import java.util.List; diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleSplitManager.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleSplitManager.java index 13c85c4e1d5f..a429999425cc 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleSplitManager.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleSplitManager.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.example; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; -import io.prestosql.spi.connector.TableNotFoundException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; +import io.trino.spi.connector.TableNotFoundException; import javax.inject.Inject; diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleTable.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleTable.java index e3aba8661c2e..ece8e6f6e624 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleTable.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleTable.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ColumnMetadata; import java.net.URI; import java.util.List; diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleTableHandle.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleTableHandle.java index ba1993a9f30a..303bf7f40848 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleTableHandle.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleTableHandle.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; import java.util.Objects; diff --git a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleTransactionHandle.java b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleTransactionHandle.java index 75ee1435b783..eb4a78d25f0f 100644 --- a/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleTransactionHandle.java +++ b/plugin/trino-example-http/src/main/java/io/trino/plugin/example/ExampleTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.example; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum ExampleTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/MetadataUtil.java b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/MetadataUtil.java index 6985e02cc892..71e93cafd48b 100644 --- a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/MetadataUtil.java +++ b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/MetadataUtil.java @@ -19,18 +19,18 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import java.util.List; import java.util.Map; import static io.airlift.json.JsonCodec.listJsonCodec; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Locale.ENGLISH; public final class MetadataUtil diff --git a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleClient.java b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleClient.java index f997d49d5259..1aa5e1b2263c 100644 --- a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleClient.java +++ b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleClient.java @@ -21,9 +21,9 @@ import java.net.URI; import java.net.URL; -import static io.prestosql.plugin.example.MetadataUtil.CATALOG_CODEC; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.example.MetadataUtil.CATALOG_CODEC; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleColumnHandle.java b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleColumnHandle.java index a9641aa64ae3..674261783022 100644 --- a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleColumnHandle.java +++ b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleColumnHandle.java @@ -16,9 +16,9 @@ import io.airlift.testing.EquivalenceTester; import org.testng.annotations.Test; -import static io.prestosql.plugin.example.MetadataUtil.COLUMN_CODEC; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.example.MetadataUtil.COLUMN_CODEC; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static org.testng.Assert.assertEquals; public class TestExampleColumnHandle diff --git a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleMetadata.java b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleMetadata.java index 2df5aeb03aec..32088077b92d 100644 --- a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleMetadata.java +++ b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleMetadata.java @@ -17,21 +17,21 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.io.Resources; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import java.net.URL; import java.util.Optional; -import static io.prestosql.plugin.example.MetadataUtil.CATALOG_CODEC; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.example.MetadataUtil.CATALOG_CODEC; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNull; diff --git a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleRecordSet.java b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleRecordSet.java index 4f55a4a572c6..314129633cba 100644 --- a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleRecordSet.java +++ b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleRecordSet.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -25,8 +25,8 @@ import java.util.LinkedHashMap; import java.util.Map; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleRecordSetProvider.java b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleRecordSetProvider.java index 9ef943c4d075..d18424b794c7 100644 --- a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleRecordSetProvider.java +++ b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleRecordSetProvider.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -26,9 +26,9 @@ import java.util.LinkedHashMap; import java.util.Map; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleSplit.java b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleSplit.java index 3924b7d9e60e..1d9bceba7ca6 100644 --- a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleSplit.java +++ b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleSplit.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.json.JsonCodec; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import org.testng.annotations.Test; import java.net.URI; diff --git a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleTable.java b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleTable.java index a82419dab870..16a6d3e4f698 100644 --- a/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleTable.java +++ b/plugin/trino-example-http/src/test/java/io/trino/plugin/example/TestExampleTable.java @@ -14,14 +14,14 @@ package io.trino.plugin.example; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ColumnMetadata; import org.testng.annotations.Test; import java.net.URI; -import static io.prestosql.plugin.example.MetadataUtil.TABLE_CODEC; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.example.MetadataUtil.TABLE_CODEC; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static org.testng.Assert.assertEquals; public class TestExampleTable diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/BingTile.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/BingTile.java index 588f1756603f..f66d4d443d0c 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/BingTile.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/BingTile.java @@ -15,13 +15,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.util.Objects; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; public final class BingTile { diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/BingTileFunctions.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/BingTileFunctions.java index cc10cffa925b..9b68665a889b 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/BingTileFunctions.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/BingTileFunctions.java @@ -18,31 +18,31 @@ import com.esri.core.geometry.ogc.OGCGeometry; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.StandardTypes; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Verify.verify; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.geospatial.GeometryUtils.contains; -import static io.prestosql.geospatial.GeometryUtils.disjoint; -import static io.prestosql.geospatial.GeometryUtils.getEnvelope; -import static io.prestosql.geospatial.GeometryUtils.getPointCount; -import static io.prestosql.geospatial.GeometryUtils.isPointOrRectangle; -import static io.prestosql.geospatial.serde.GeometrySerde.deserialize; -import static io.prestosql.geospatial.serde.GeometrySerde.serialize; -import static io.prestosql.plugin.geospatial.BingTile.MAX_ZOOM_LEVEL; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.geospatial.GeometryUtils.contains; +import static io.trino.geospatial.GeometryUtils.disjoint; +import static io.trino.geospatial.GeometryUtils.getEnvelope; +import static io.trino.geospatial.GeometryUtils.getPointCount; +import static io.trino.geospatial.GeometryUtils.isPointOrRectangle; +import static io.trino.geospatial.serde.GeometrySerde.deserialize; +import static io.trino.geospatial.serde.GeometrySerde.serialize; +import static io.trino.plugin.geospatial.BingTile.MAX_ZOOM_LEVEL; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.lang.Math.asin; import static java.lang.Math.atan2; import static java.lang.Math.cos; diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/BingTileType.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/BingTileType.java index f67a00168eeb..659ce9d6585f 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/BingTileType.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/BingTileType.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.geospatial; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractLongType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractLongType; +import io.trino.spi.type.TypeSignature; public class BingTileType extends AbstractLongType diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/EncodedPolylineFunctions.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/EncodedPolylineFunctions.java index dc2ce70a5486..4ed0397c9327 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/EncodedPolylineFunctions.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/EncodedPolylineFunctions.java @@ -22,22 +22,22 @@ import com.google.common.base.Joiner; import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; -import io.prestosql.geospatial.GeometryType; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.geospatial.GeometryType; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import java.util.EnumSet; import java.util.Set; -import static io.prestosql.geospatial.GeometryType.LINE_STRING; -import static io.prestosql.geospatial.GeometryType.MULTI_POINT; -import static io.prestosql.geospatial.serde.GeometrySerde.deserialize; -import static io.prestosql.geospatial.serde.GeometrySerde.serialize; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.geospatial.GeometryType.LINE_STRING; +import static io.trino.geospatial.GeometryType.MULTI_POINT; +import static io.trino.geospatial.serde.GeometrySerde.deserialize; +import static io.trino.geospatial.serde.GeometrySerde.serialize; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; import static java.lang.String.format; /** diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeoFunctions.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeoFunctions.java index 3d85b7dbaca8..d0a90486ac4a 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeoFunctions.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeoFunctions.java @@ -41,21 +41,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.geospatial.GeometryType; -import io.prestosql.geospatial.KdbTree; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.geospatial.serde.GeometrySerde; -import io.prestosql.geospatial.serde.GeometrySerializationType; -import io.prestosql.geospatial.serde.JtsGeometrySerde; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.geospatial.GeometryType; +import io.trino.geospatial.KdbTree; +import io.trino.geospatial.Rectangle; +import io.trino.geospatial.serde.GeometrySerde; +import io.trino.geospatial.serde.GeometrySerializationType; +import io.trino.geospatial.serde.JtsGeometrySerde; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.StandardTypes; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryCollection; @@ -89,29 +89,29 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.geospatial.GeometryType.GEOMETRY_COLLECTION; -import static io.prestosql.geospatial.GeometryType.LINE_STRING; -import static io.prestosql.geospatial.GeometryType.MULTI_LINE_STRING; -import static io.prestosql.geospatial.GeometryType.MULTI_POINT; -import static io.prestosql.geospatial.GeometryType.MULTI_POLYGON; -import static io.prestosql.geospatial.GeometryType.POINT; -import static io.prestosql.geospatial.GeometryType.POLYGON; -import static io.prestosql.geospatial.GeometryUtils.getPointCount; -import static io.prestosql.geospatial.serde.GeometrySerde.deserialize; -import static io.prestosql.geospatial.serde.GeometrySerde.deserializeEnvelope; -import static io.prestosql.geospatial.serde.GeometrySerde.deserializeType; -import static io.prestosql.geospatial.serde.GeometrySerde.serialize; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; -import static io.prestosql.plugin.geospatial.SphericalGeographyType.SPHERICAL_GEOGRAPHY_TYPE_NAME; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.StandardTypes.BIGINT; -import static io.prestosql.spi.type.StandardTypes.BOOLEAN; -import static io.prestosql.spi.type.StandardTypes.DOUBLE; -import static io.prestosql.spi.type.StandardTypes.INTEGER; -import static io.prestosql.spi.type.StandardTypes.TINYINT; -import static io.prestosql.spi.type.StandardTypes.VARBINARY; -import static io.prestosql.spi.type.StandardTypes.VARCHAR; +import static io.trino.geospatial.GeometryType.GEOMETRY_COLLECTION; +import static io.trino.geospatial.GeometryType.LINE_STRING; +import static io.trino.geospatial.GeometryType.MULTI_LINE_STRING; +import static io.trino.geospatial.GeometryType.MULTI_POINT; +import static io.trino.geospatial.GeometryType.MULTI_POLYGON; +import static io.trino.geospatial.GeometryType.POINT; +import static io.trino.geospatial.GeometryType.POLYGON; +import static io.trino.geospatial.GeometryUtils.getPointCount; +import static io.trino.geospatial.serde.GeometrySerde.deserialize; +import static io.trino.geospatial.serde.GeometrySerde.deserializeEnvelope; +import static io.trino.geospatial.serde.GeometrySerde.deserializeType; +import static io.trino.geospatial.serde.GeometrySerde.serialize; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; +import static io.trino.plugin.geospatial.SphericalGeographyType.SPHERICAL_GEOGRAPHY_TYPE_NAME; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.StandardTypes.BIGINT; +import static io.trino.spi.type.StandardTypes.BOOLEAN; +import static io.trino.spi.type.StandardTypes.DOUBLE; +import static io.trino.spi.type.StandardTypes.INTEGER; +import static io.trino.spi.type.StandardTypes.TINYINT; +import static io.trino.spi.type.StandardTypes.VARBINARY; +import static io.trino.spi.type.StandardTypes.VARCHAR; import static java.lang.Double.isInfinite; import static java.lang.Double.isNaN; import static java.lang.Math.PI; diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeoPlugin.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeoPlugin.java index 9d65faf1eeac..4227b08fd7f8 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeoPlugin.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeoPlugin.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.geospatial.BingTileFunctions.BingTileCoordinatesFunction; -import io.prestosql.plugin.geospatial.aggregation.ConvexHullAggregation; -import io.prestosql.plugin.geospatial.aggregation.GeometryUnionAgg; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.type.Type; +import io.trino.plugin.geospatial.BingTileFunctions.BingTileCoordinatesFunction; +import io.trino.plugin.geospatial.aggregation.ConvexHullAggregation; +import io.trino.plugin.geospatial.aggregation.GeometryUnionAgg; +import io.trino.spi.Plugin; +import io.trino.spi.type.Type; import java.util.Set; -import static io.prestosql.plugin.geospatial.BingTileType.BING_TILE; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; -import static io.prestosql.plugin.geospatial.KdbTreeType.KDB_TREE; -import static io.prestosql.plugin.geospatial.SphericalGeographyType.SPHERICAL_GEOGRAPHY; +import static io.trino.plugin.geospatial.BingTileType.BING_TILE; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.plugin.geospatial.KdbTreeType.KDB_TREE; +import static io.trino.plugin.geospatial.SphericalGeographyType.SPHERICAL_GEOGRAPHY; public class GeoPlugin implements Plugin diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeometryType.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeometryType.java index f3300e46c9f5..b9f4129ec658 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeometryType.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeometryType.java @@ -14,13 +14,13 @@ package io.trino.plugin.geospatial; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.TypeSignature; -import static io.prestosql.geospatial.serde.GeometrySerde.deserialize; +import static io.trino.geospatial.serde.GeometrySerde.deserialize; public class GeometryType extends AbstractVariableWidthType diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/KdbTreeCasts.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/KdbTreeCasts.java index 437c371d49b3..3fc79c7629fa 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/KdbTreeCasts.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/KdbTreeCasts.java @@ -14,14 +14,14 @@ package io.trino.plugin.geospatial; import io.airlift.slice.Slice; -import io.prestosql.geospatial.KdbTreeUtils; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; +import io.trino.geospatial.KdbTreeUtils; +import io.trino.spi.PrestoException; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; -import static io.prestosql.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; -import static io.prestosql.spi.function.OperatorType.CAST; +import static io.trino.spi.StandardErrorCode.INVALID_CAST_ARGUMENT; +import static io.trino.spi.function.OperatorType.CAST; public final class KdbTreeCasts { diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/KdbTreeType.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/KdbTreeType.java index ffeb62a3dc9c..431af42f004a 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/KdbTreeType.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/KdbTreeType.java @@ -14,13 +14,13 @@ package io.trino.plugin.geospatial; import io.airlift.slice.Slice; -import io.prestosql.geospatial.KdbTree; -import io.prestosql.geospatial.KdbTreeUtils; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.geospatial.KdbTree; +import io.trino.geospatial.KdbTreeUtils; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.TypeSignature; import static io.airlift.slice.Slices.utf8Slice; diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningAggregateFunction.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningAggregateFunction.java index 20e220e57735..67e18ec3c94c 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningAggregateFunction.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningAggregateFunction.java @@ -14,16 +14,16 @@ package io.trino.plugin.geospatial; import io.airlift.slice.Slice; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; -import static io.prestosql.plugin.geospatial.SpatialPartitioningAggregateFunction.NAME; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; +import static io.trino.plugin.geospatial.SpatialPartitioningAggregateFunction.NAME; @AggregationFunction(value = NAME, decomposable = false) public final class SpatialPartitioningAggregateFunction diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningInternalAggregateFunction.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningInternalAggregateFunction.java index 4e238679050d..f4769bd35a19 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningInternalAggregateFunction.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningInternalAggregateFunction.java @@ -15,26 +15,26 @@ import com.esri.core.geometry.Envelope; import io.airlift.slice.Slice; -import io.prestosql.geospatial.KdbTreeUtils; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.geospatial.KdbTreeUtils; +import io.trino.geospatial.Rectangle; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.geospatial.KdbTree.buildKdbTree; -import static io.prestosql.geospatial.serde.GeometrySerde.deserializeEnvelope; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; -import static io.prestosql.plugin.geospatial.SpatialPartitioningAggregateFunction.NAME; -import static io.prestosql.spi.type.StandardTypes.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.geospatial.KdbTree.buildKdbTree; +import static io.trino.geospatial.serde.GeometrySerde.deserializeEnvelope; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; +import static io.trino.plugin.geospatial.SpatialPartitioningAggregateFunction.NAME; +import static io.trino.spi.type.StandardTypes.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Math.toIntExact; @AggregationFunction(value = NAME, decomposable = false, hidden = true) diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningState.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningState.java index e0f32ec01b2f..030e1dfe6719 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningState.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningState.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.geospatial; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.geospatial.Rectangle; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; import java.util.List; diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningStateFactory.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningStateFactory.java index bd6ce81454ef..ee2f76044c5f 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningStateFactory.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningStateFactory.java @@ -14,12 +14,12 @@ package io.trino.plugin.geospatial; import com.esri.core.geometry.Envelope; -import io.prestosql.array.IntBigArray; -import io.prestosql.array.LongBigArray; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.GroupedAccumulatorState; +import io.trino.array.IntBigArray; +import io.trino.array.LongBigArray; +import io.trino.array.ObjectBigArray; +import io.trino.geospatial.Rectangle; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.GroupedAccumulatorState; import org.openjdk.jol.info.ClassLayout; import java.util.ArrayList; diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningStateSerializer.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningStateSerializer.java index 49d29b1816c2..8a62281f9b21 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningStateSerializer.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SpatialPartitioningStateSerializer.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.geospatial; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarbinaryType.VARBINARY; public class SpatialPartitioningStateSerializer implements AccumulatorStateSerializer diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SphericalGeographyType.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SphericalGeographyType.java index 50b0d393e025..1dc207ca48ec 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SphericalGeographyType.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/SphericalGeographyType.java @@ -14,13 +14,13 @@ package io.trino.plugin.geospatial; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.TypeSignature; -import static io.prestosql.geospatial.serde.GeometrySerde.deserialize; +import static io.trino.geospatial.serde.GeometrySerde.deserialize; public class SphericalGeographyType extends AbstractVariableWidthType diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/ConvexHullAggregation.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/ConvexHullAggregation.java index 3ceae8bc720e..c3cb6cb6480c 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/ConvexHullAggregation.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/ConvexHullAggregation.java @@ -16,23 +16,23 @@ import com.esri.core.geometry.ogc.OGCGeometry; import com.google.common.base.Joiner; import io.airlift.slice.Slice; -import io.prestosql.geospatial.GeometryType; -import io.prestosql.geospatial.serde.GeometrySerde; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; +import io.trino.geospatial.GeometryType; +import io.trino.geospatial.serde.GeometrySerde; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.Description; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; import java.util.Set; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; import static java.lang.String.format; /** diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryState.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryState.java index a9c00e0b7a2b..f9d854dca006 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryState.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryState.java @@ -14,8 +14,8 @@ package io.trino.plugin.geospatial.aggregation; import com.esri.core.geometry.ogc.OGCGeometry; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; @AccumulatorStateMetadata(stateSerializerClass = GeometryStateSerializer.class, stateFactoryClass = GeometryStateFactory.class) public interface GeometryState diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryStateFactory.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryStateFactory.java index 60d137390120..eda512326e79 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryStateFactory.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryStateFactory.java @@ -14,9 +14,9 @@ package io.trino.plugin.geospatial.aggregation; import com.esri.core.geometry.ogc.OGCGeometry; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.GroupedAccumulatorState; +import io.trino.array.ObjectBigArray; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.GroupedAccumulatorState; import org.openjdk.jol.info.ClassLayout; public class GeometryStateFactory diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryStateSerializer.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryStateSerializer.java index 61e19de49b8b..3a6a80b63a85 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryStateSerializer.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryStateSerializer.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.geospatial.aggregation; -import io.prestosql.geospatial.serde.GeometrySerde; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.geospatial.serde.GeometrySerde; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; public class GeometryStateSerializer implements AccumulatorStateSerializer diff --git a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryUnionAgg.java b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryUnionAgg.java index a7d20feaa5a0..52546ec63ca9 100644 --- a/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryUnionAgg.java +++ b/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/aggregation/GeometryUnionAgg.java @@ -15,18 +15,18 @@ import com.esri.core.geometry.ogc.OGCGeometry; import io.airlift.slice.Slice; -import io.prestosql.geospatial.serde.GeometrySerde; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; +import io.trino.geospatial.serde.GeometrySerde; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.Description; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY_TYPE_NAME; /** * Aggregate form of ST_Union which takes a set of geometries and unions them into a single geometry using an iterative approach, diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkEnvelopeIntersection.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkEnvelopeIntersection.java index cb81562f06ea..b0f4342cd34d 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkEnvelopeIntersection.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkEnvelopeIntersection.java @@ -34,10 +34,10 @@ import java.util.concurrent.TimeUnit; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.geospatial.serde.GeometrySerde.deserialize; -import static io.prestosql.plugin.geospatial.GeoFunctions.stEnvelope; -import static io.prestosql.plugin.geospatial.GeoFunctions.stGeometryFromText; -import static io.prestosql.plugin.geospatial.GeoFunctions.stIntersection; +import static io.trino.geospatial.serde.GeometrySerde.deserialize; +import static io.trino.plugin.geospatial.GeoFunctions.stEnvelope; +import static io.trino.plugin.geospatial.GeoFunctions.stGeometryFromText; +import static io.trino.plugin.geospatial.GeoFunctions.stIntersection; import static org.testng.Assert.assertEquals; @State(Scope.Thread) diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkGeometryAggregations.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkGeometryAggregations.java index 8158f22a5525..8922d74a00a4 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkGeometryAggregations.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkGeometryAggregations.java @@ -14,9 +14,9 @@ package io.trino.plugin.geospatial; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.memory.MemoryConnectorFactory; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.MaterializedResult; +import io.trino.plugin.memory.MemoryConnectorFactory; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.MaterializedResult; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -38,7 +38,7 @@ import java.nio.file.Paths; import java.util.stream.Collectors; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.openjdk.jmh.annotations.Mode.AverageTime; diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTArea.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTArea.java index 7f16a54d53eb..c5beb7654e24 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTArea.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTArea.java @@ -37,9 +37,9 @@ import java.util.stream.IntStream; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.geospatial.GeoFunctions.stGeometryFromText; -import static io.prestosql.plugin.geospatial.GeoFunctions.toSphericalGeography; -import static io.prestosql.plugin.geospatial.GeometryBenchmarkUtils.loadPolygon; +import static io.trino.plugin.geospatial.GeoFunctions.stGeometryFromText; +import static io.trino.plugin.geospatial.GeoFunctions.toSphericalGeography; +import static io.trino.plugin.geospatial.GeometryBenchmarkUtils.loadPolygon; import static org.testng.Assert.assertEquals; @State(Scope.Thread) diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTContains.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTContains.java index 1452e5e078f8..3cab298daabd 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTContains.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTContains.java @@ -36,9 +36,9 @@ import java.io.IOException; import java.util.concurrent.TimeUnit; -import static io.prestosql.geospatial.serde.GeometrySerde.deserialize; -import static io.prestosql.geospatial.serde.GeometrySerde.deserializeEnvelope; -import static io.prestosql.plugin.geospatial.GeometryBenchmarkUtils.loadPolygon; +import static io.trino.geospatial.serde.GeometrySerde.deserialize; +import static io.trino.geospatial.serde.GeometrySerde.deserializeEnvelope; +import static io.trino.plugin.geospatial.GeometryBenchmarkUtils.loadPolygon; @State(Scope.Thread) @Fork(2) diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTEnvelope.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTEnvelope.java index 0ea551682860..65da212ac6bb 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTEnvelope.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTEnvelope.java @@ -33,7 +33,7 @@ import java.io.IOException; -import static io.prestosql.plugin.geospatial.GeometryBenchmarkUtils.loadPolygon; +import static io.trino.plugin.geospatial.GeometryBenchmarkUtils.loadPolygon; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTIntersects.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTIntersects.java index 7ba2e580596d..6ee1352b1e8c 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTIntersects.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTIntersects.java @@ -36,11 +36,11 @@ import static com.google.common.base.Verify.verify; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.geospatial.GeoFunctions.stContains; -import static io.prestosql.plugin.geospatial.GeoFunctions.stEnvelope; -import static io.prestosql.plugin.geospatial.GeoFunctions.stGeometryFromText; -import static io.prestosql.plugin.geospatial.GeoFunctions.stIntersects; -import static io.prestosql.plugin.geospatial.GeometryBenchmarkUtils.loadPolygon; +import static io.trino.plugin.geospatial.GeoFunctions.stContains; +import static io.trino.plugin.geospatial.GeoFunctions.stEnvelope; +import static io.trino.plugin.geospatial.GeoFunctions.stGeometryFromText; +import static io.trino.plugin.geospatial.GeoFunctions.stIntersects; +import static io.trino.plugin.geospatial.GeometryBenchmarkUtils.loadPolygon; @State(Scope.Thread) @Fork(3) diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTXMin.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTXMin.java index fda27ad3a0a6..50f75164d657 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTXMin.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSTXMin.java @@ -33,9 +33,9 @@ import java.io.IOException; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.geospatial.GeoFunctions.stGeometryFromText; -import static io.prestosql.plugin.geospatial.GeoFunctions.stXMin; -import static io.prestosql.plugin.geospatial.GeometryBenchmarkUtils.loadPolygon; +import static io.trino.plugin.geospatial.GeoFunctions.stGeometryFromText; +import static io.trino.plugin.geospatial.GeoFunctions.stXMin; +import static io.trino.plugin.geospatial.GeometryBenchmarkUtils.loadPolygon; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSpatialJoin.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSpatialJoin.java index faa10c1b6ff7..aca601b5cd3b 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSpatialJoin.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/BenchmarkSpatialJoin.java @@ -14,12 +14,12 @@ package io.trino.plugin.geospatial; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.memory.MemoryConnectorFactory; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.MaterializedResult; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.memory.MemoryConnectorFactory; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.MaterializedResult; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -44,7 +44,7 @@ import java.util.Optional; import java.util.stream.Collectors; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.openjdk.jmh.annotations.Mode.AverageTime; diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/GeoQueryRunner.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/GeoQueryRunner.java index 81b69dedfd85..426778d1d8d2 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/GeoQueryRunner.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/GeoQueryRunner.java @@ -16,11 +16,11 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.testing.DistributedQueryRunner; import java.util.Map; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class GeoQueryRunner { diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestBingTileFunctions.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestBingTileFunctions.java index 17f7573b0286..4f06c47a1bbe 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestBingTileFunctions.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestBingTileFunctions.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.type.ArrayType; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.type.ArrayType; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -25,14 +25,14 @@ import java.nio.file.Paths; import java.util.List; -import static io.prestosql.operator.scalar.ApplyFunction.APPLY_FUNCTION; -import static io.prestosql.plugin.geospatial.BingTile.fromCoordinates; -import static io.prestosql.plugin.geospatial.BingTileType.BING_TILE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.operator.scalar.ApplyFunction.APPLY_FUNCTION; +import static io.trino.plugin.geospatial.BingTile.fromCoordinates; +import static io.trino.plugin.geospatial.BingTileType.BING_TILE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Collections.emptyList; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestEncodedPolylineFunctions.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestEncodedPolylineFunctions.java index 595a96af6e37..7300e6b622ba 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestEncodedPolylineFunctions.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestEncodedPolylineFunctions.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.geospatial; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; public class TestEncodedPolylineFunctions diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestExtractSpatialInnerJoin.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestExtractSpatialInnerJoin.java index 5066c11b98b6..86f41ccf3827 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestExtractSpatialInnerJoin.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestExtractSpatialInnerJoin.java @@ -14,21 +14,21 @@ package io.trino.plugin.geospatial; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.ExtractSpatialJoins.ExtractSpatialInnerJoin; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.iterative.rule.test.RuleAssert; -import io.prestosql.sql.planner.iterative.rule.test.RuleTester; +import io.trino.sql.planner.iterative.rule.ExtractSpatialJoins.ExtractSpatialInnerJoin; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.iterative.rule.test.RuleAssert; +import io.trino.sql.planner.iterative.rule.test.RuleTester; import org.testng.annotations.Test; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; -import static io.prestosql.plugin.geospatial.SphericalGeographyType.SPHERICAL_GEOGRAPHY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.spatialJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.plugin.geospatial.SphericalGeographyType.SPHERICAL_GEOGRAPHY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.spatialJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; public class TestExtractSpatialInnerJoin extends BaseRuleTest diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestExtractSpatialLeftJoin.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestExtractSpatialLeftJoin.java index 8df7adb0d3b1..136f3c6c9942 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestExtractSpatialLeftJoin.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestExtractSpatialLeftJoin.java @@ -14,21 +14,21 @@ package io.trino.plugin.geospatial; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.assertions.PlanMatchPattern; -import io.prestosql.sql.planner.iterative.rule.ExtractSpatialJoins.ExtractSpatialLeftJoin; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.RuleAssert; -import io.prestosql.sql.planner.iterative.rule.test.RuleTester; +import io.trino.sql.planner.assertions.PlanMatchPattern; +import io.trino.sql.planner.iterative.rule.ExtractSpatialJoins.ExtractSpatialLeftJoin; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.RuleAssert; +import io.trino.sql.planner.iterative.rule.test.RuleTester; import org.testng.annotations.Test; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; -import static io.prestosql.plugin.geospatial.SphericalGeographyType.SPHERICAL_GEOGRAPHY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.spatialLeftJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.sql.planner.iterative.rule.test.PlanBuilder.expression; -import static io.prestosql.sql.planner.plan.JoinNode.Type.LEFT; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.plugin.geospatial.SphericalGeographyType.SPHERICAL_GEOGRAPHY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.spatialLeftJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.sql.planner.iterative.rule.test.PlanBuilder.expression; +import static io.trino.sql.planner.plan.JoinNode.Type.LEFT; public class TestExtractSpatialLeftJoin extends BaseRuleTest diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestGeoFunctions.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestGeoFunctions.java index 1e6119eaa2f5..4011c7bc6a5f 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestGeoFunctions.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestGeoFunctions.java @@ -16,12 +16,12 @@ import com.esri.core.geometry.Point; import com.esri.core.geometry.ogc.OGCPoint; import com.google.common.collect.ImmutableList; -import io.prestosql.geospatial.KdbTreeUtils; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; +import io.trino.geospatial.KdbTreeUtils; +import io.trino.geospatial.Rectangle; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -30,15 +30,15 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.geospatial.KdbTree.buildKdbTree; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.geospatial.KdbTree.buildKdbTree; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestGeoSpatialQueries.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestGeoSpatialQueries.java index 767d81dae60a..75510ec484fa 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestGeoSpatialQueries.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestGeoSpatialQueries.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.geospatial; -import io.prestosql.Session; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; -import static io.prestosql.plugin.geospatial.SphericalGeographyType.SPHERICAL_GEOGRAPHY; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.plugin.geospatial.SphericalGeographyType.SPHERICAL_GEOGRAPHY; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; public class TestGeoSpatialQueries diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestKdbTreeCasts.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestKdbTreeCasts.java index 24076a2cb9a2..743ce829663f 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestKdbTreeCasts.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestKdbTreeCasts.java @@ -14,14 +14,14 @@ package io.trino.plugin.geospatial; import com.google.common.collect.ImmutableList; -import io.prestosql.geospatial.KdbTreeUtils; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.geospatial.KdbTreeUtils; +import io.trino.geospatial.Rectangle; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.geospatial.KdbTree.buildKdbTree; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.geospatial.KdbTree.buildKdbTree; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; public class TestKdbTreeCasts diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestKdbTreeType.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestKdbTreeType.java index 500d318419d5..7daae2d839f2 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestKdbTreeType.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestKdbTreeType.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.geospatial; -import io.prestosql.geospatial.KdbTree; -import io.prestosql.geospatial.KdbTree.Node; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.type.AbstractTestType; +import io.trino.geospatial.KdbTree; +import io.trino.geospatial.KdbTree.Node; +import io.trino.geospatial.Rectangle; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.type.AbstractTestType; import java.util.Optional; import java.util.OptionalInt; -import static io.prestosql.plugin.geospatial.KdbTreeType.KDB_TREE; +import static io.trino.plugin.geospatial.KdbTreeType.KDB_TREE; public class TestKdbTreeType extends AbstractTestType diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestRewriteSpatialPartitioningAggregation.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestRewriteSpatialPartitioningAggregation.java index 3620d2152479..f57ce7ce995d 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestRewriteSpatialPartitioningAggregation.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestRewriteSpatialPartitioningAggregation.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.sql.planner.iterative.rule.RewriteSpatialPartitioningAggregation; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.iterative.rule.test.RuleAssert; -import io.prestosql.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.iterative.rule.RewriteSpatialPartitioningAggregation; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.iterative.rule.test.RuleAssert; +import io.trino.sql.planner.plan.AggregationNode; import org.testng.annotations.Test; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.aggregation; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.functionCall; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.functionCall; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; public class TestRewriteSpatialPartitioningAggregation extends BaseRuleTest diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialJoinOperator.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialJoinOperator.java index 1453b02e90db..de1aa8b0040b 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialJoinOperator.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialJoinOperator.java @@ -18,32 +18,32 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.RowPagesBuilder; -import io.prestosql.geospatial.KdbTree; -import io.prestosql.geospatial.KdbTreeUtils; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.operator.Driver; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.InternalJoinFilterFunction; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.PagesIndex.TestingFactory; -import io.prestosql.operator.PagesSpatialIndex; -import io.prestosql.operator.PagesSpatialIndexFactory; -import io.prestosql.operator.PipelineContext; -import io.prestosql.operator.SpatialIndexBuilderOperator.SpatialIndexBuilderOperatorFactory; -import io.prestosql.operator.SpatialIndexBuilderOperator.SpatialPredicate; -import io.prestosql.operator.SpatialJoinOperator.SpatialJoinOperatorFactory; -import io.prestosql.operator.StandardJoinFilterFunction; -import io.prestosql.operator.TaskContext; -import io.prestosql.operator.ValuesOperator; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.gen.JoinFilterFunctionCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.SpatialJoinNode.Type; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.TestingTaskContext; +import io.trino.RowPagesBuilder; +import io.trino.geospatial.KdbTree; +import io.trino.geospatial.KdbTreeUtils; +import io.trino.geospatial.Rectangle; +import io.trino.operator.Driver; +import io.trino.operator.DriverContext; +import io.trino.operator.InternalJoinFilterFunction; +import io.trino.operator.Operator; +import io.trino.operator.OperatorFactory; +import io.trino.operator.PagesIndex.TestingFactory; +import io.trino.operator.PagesSpatialIndex; +import io.trino.operator.PagesSpatialIndexFactory; +import io.trino.operator.PipelineContext; +import io.trino.operator.SpatialIndexBuilderOperator.SpatialIndexBuilderOperatorFactory; +import io.trino.operator.SpatialIndexBuilderOperator.SpatialPredicate; +import io.trino.operator.SpatialJoinOperator.SpatialJoinOperatorFactory; +import io.trino.operator.StandardJoinFilterFunction; +import io.trino.operator.TaskContext; +import io.trino.operator.ValuesOperator; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.sql.gen.JoinFilterFunctionCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.SpatialJoinNode.Type; +import io.trino.testing.MaterializedResult; +import io.trino.testing.TestingTaskContext; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -58,21 +58,21 @@ import java.util.concurrent.atomic.AtomicInteger; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.geospatial.KdbTree.Node.newInternal; -import static io.prestosql.geospatial.KdbTree.Node.newLeaf; -import static io.prestosql.operator.OperatorAssertion.assertOperatorEquals; -import static io.prestosql.operator.OperatorAssertion.toPages; -import static io.prestosql.plugin.geospatial.GeoFunctions.stGeometryFromText; -import static io.prestosql.plugin.geospatial.GeoFunctions.stPoint; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.plan.SpatialJoinNode.Type.INNER; -import static io.prestosql.sql.planner.plan.SpatialJoinNode.Type.LEFT; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.geospatial.KdbTree.Node.newInternal; +import static io.trino.geospatial.KdbTree.Node.newLeaf; +import static io.trino.operator.OperatorAssertion.assertOperatorEquals; +import static io.trino.operator.OperatorAssertion.toPages; +import static io.trino.plugin.geospatial.GeoFunctions.stGeometryFromText; +import static io.trino.plugin.geospatial.GeoFunctions.stPoint; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.plan.SpatialJoinNode.Type.INNER; +import static io.trino.sql.planner.plan.SpatialJoinNode.Type.LEFT; +import static io.trino.testing.MaterializedResult.resultBuilder; import static java.util.Collections.emptyIterator; import static java.util.concurrent.Executors.newScheduledThreadPool; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialJoinPlanning.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialJoinPlanning.java index bde2d049d372..5378814d2e07 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialJoinPlanning.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialJoinPlanning.java @@ -16,21 +16,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.DynamicSliceOutput; -import io.prestosql.Session; -import io.prestosql.block.BlockSerdeUtil; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.geospatial.KdbTree; -import io.prestosql.geospatial.KdbTreeUtils; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.plugin.memory.MemoryConnectorFactory; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.TestingBlockEncodingSerde; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.block.BlockSerdeUtil; +import io.trino.execution.warnings.WarningCollector; +import io.trino.geospatial.KdbTree; +import io.trino.geospatial.KdbTreeUtils; +import io.trino.geospatial.Rectangle; +import io.trino.plugin.memory.MemoryConnectorFactory; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.TestingBlockEncodingSerde; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -38,25 +38,25 @@ import java.util.Optional; import static com.google.common.base.Strings.nullToEmpty; -import static io.prestosql.SystemSessionProperties.SPATIAL_PARTITIONING_TABLE_NAME; -import static io.prestosql.geospatial.KdbTree.Node.newLeaf; -import static io.prestosql.metadata.LiteralFunction.LITERAL_FUNCTION_NAME; -import static io.prestosql.spi.StandardErrorCode.INVALID_SPATIAL_PARTITIONING; -import static io.prestosql.spi.predicate.Utils.nativeValueToBlock; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.exchange; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.spatialJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.spatialLeftJoin; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.unnest; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.values; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.SPATIAL_PARTITIONING_TABLE_NAME; +import static io.trino.geospatial.KdbTree.Node.newLeaf; +import static io.trino.metadata.LiteralFunction.LITERAL_FUNCTION_NAME; +import static io.trino.spi.StandardErrorCode.INVALID_SPATIAL_PARTITIONING; +import static io.trino.spi.predicate.Utils.nativeValueToBlock; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; +import static io.trino.sql.planner.assertions.PlanMatchPattern.exchange; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.spatialJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.spatialLeftJoin; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.assertions.PlanMatchPattern.unnest; +import static io.trino.sql.planner.assertions.PlanMatchPattern.values; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.Collections.emptyList; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialJoins.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialJoins.java index a8c644981a27..582b07d746e0 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialJoins.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialJoins.java @@ -13,22 +13,22 @@ */ package io.trino.plugin.geospatial; -import io.prestosql.Session; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.testing.TestingHivePlugin; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.testing.TestingHivePlugin; +import io.trino.spi.security.PrincipalType; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; import org.testng.annotations.Test; import java.io.File; -import static io.prestosql.SystemSessionProperties.SPATIAL_PARTITIONING_TABLE_NAME; -import static io.prestosql.plugin.hive.metastore.file.FileHiveMetastore.createTestingFileHiveMetastore; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.SPATIAL_PARTITIONING_TABLE_NAME; +import static io.trino.plugin.hive.metastore.file.FileHiveMetastore.createTestingFileHiveMetastore; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; public class TestSpatialJoins diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialPartitioningInternalAggregation.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialPartitioningInternalAggregation.java index 5899ca5944c2..244c62362829 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialPartitioningInternalAggregation.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSpatialPartitioningInternalAggregation.java @@ -19,19 +19,19 @@ import com.esri.core.geometry.ogc.OGCPoint; import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.block.BlockAssertions; -import io.prestosql.geospatial.KdbTreeUtils; -import io.prestosql.geospatial.Rectangle; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.aggregation.Accumulator; -import io.prestosql.operator.aggregation.AccumulatorFactory; -import io.prestosql.operator.aggregation.GroupedAccumulator; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.block.BlockAssertions; +import io.trino.geospatial.KdbTreeUtils; +import io.trino.geospatial.Rectangle; +import io.trino.metadata.Metadata; +import io.trino.operator.aggregation.Accumulator; +import io.trino.operator.aggregation.AccumulatorFactory; +import io.trino.operator.aggregation.GroupedAccumulator; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -40,14 +40,14 @@ import java.util.Optional; import static com.google.common.math.DoubleMath.roundToInt; -import static io.prestosql.geospatial.KdbTree.buildKdbTree; -import static io.prestosql.geospatial.serde.GeometrySerde.serialize; -import static io.prestosql.operator.aggregation.AggregationTestUtils.createGroupByIdBlock; -import static io.prestosql.operator.aggregation.AggregationTestUtils.getFinalBlock; -import static io.prestosql.operator.aggregation.AggregationTestUtils.getGroupValue; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.geospatial.KdbTree.buildKdbTree; +import static io.trino.geospatial.serde.GeometrySerde.serialize; +import static io.trino.operator.aggregation.AggregationTestUtils.createGroupByIdBlock; +import static io.trino.operator.aggregation.AggregationTestUtils.getFinalBlock; +import static io.trino.operator.aggregation.AggregationTestUtils.getGroupValue; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static java.math.RoundingMode.CEILING; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSphericalGeoFunctions.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSphericalGeoFunctions.java index 961ff19c1705..bd81d200f346 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSphericalGeoFunctions.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/TestSphericalGeoFunctions.java @@ -14,9 +14,9 @@ package io.trino.plugin.geospatial; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -29,9 +29,9 @@ import java.util.stream.Collectors; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.geospatial.SphericalGeographyType.SPHERICAL_GEOGRAPHY; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.geospatial.SphericalGeographyType.SPHERICAL_GEOGRAPHY; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/aggregation/AbstractTestGeoAggregationFunctions.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/aggregation/AbstractTestGeoAggregationFunctions.java index 22bb4fa5c5ac..9d302f10490f 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/aggregation/AbstractTestGeoAggregationFunctions.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/aggregation/AbstractTestGeoAggregationFunctions.java @@ -15,14 +15,14 @@ import com.esri.core.geometry.ogc.OGCGeometry; import io.airlift.slice.Slice; -import io.prestosql.block.BlockAssertions; -import io.prestosql.geospatial.serde.GeometrySerde; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.plugin.geospatial.GeoPlugin; -import io.prestosql.spi.Page; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.block.BlockAssertions; +import io.trino.geospatial.serde.GeometrySerde; +import io.trino.metadata.Metadata; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.plugin.geospatial.GeoPlugin; +import io.trino.spi.Page; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.BeforeClass; import java.util.Arrays; @@ -31,9 +31,9 @@ import java.util.function.BiFunction; import java.util.stream.Collectors; -import static io.prestosql.operator.aggregation.AggregationTestUtils.assertAggregation; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.operator.aggregation.AggregationTestUtils.assertAggregation; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; public abstract class AbstractTestGeoAggregationFunctions extends AbstractTestFunctions diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/aggregation/TestGeometryStateSerializer.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/aggregation/TestGeometryStateSerializer.java index 4f0ddda8611a..0d7908a91c18 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/aggregation/TestGeometryStateSerializer.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/aggregation/TestGeometryStateSerializer.java @@ -14,15 +14,15 @@ package io.trino.plugin.geospatial.aggregation; import com.esri.core.geometry.ogc.OGCGeometry; -import io.prestosql.operator.aggregation.state.StateCompiler; -import io.prestosql.plugin.geospatial.GeometryType; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.AccumulatorStateSerializer; +import io.trino.operator.aggregation.state.StateCompiler; +import io.trino.plugin.geospatial.GeometryType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.AccumulatorStateSerializer; import org.testng.annotations.Test; -import static io.prestosql.plugin.geospatial.aggregation.GeometryStateFactory.GroupedGeometryState; +import static io.trino.plugin.geospatial.aggregation.GeometryStateFactory.GroupedGeometryState; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/aggregation/TestGeometryUnionGeoAggregation.java b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/aggregation/TestGeometryUnionGeoAggregation.java index 00b0a4919175..03504f73eff0 100644 --- a/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/aggregation/TestGeometryUnionGeoAggregation.java +++ b/plugin/trino-geospatial/src/test/java/io/trino/plugin/geospatial/aggregation/TestGeometryUnionGeoAggregation.java @@ -20,7 +20,7 @@ import java.util.Arrays; import java.util.List; -import static io.prestosql.plugin.geospatial.GeometryType.GEOMETRY; +import static io.trino.plugin.geospatial.GeometryType.GEOMETRY; import static java.lang.String.format; import static java.util.Collections.reverse; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsClient.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsClient.java index c6f71f995fd1..4ac3236ac607 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsClient.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsClient.java @@ -28,8 +28,8 @@ import com.google.common.util.concurrent.UncheckedExecutionException; import io.airlift.json.JsonCodec; import io.airlift.log.Logger; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.type.VarcharType; import javax.inject.Inject; @@ -47,10 +47,10 @@ import static com.google.api.client.googleapis.javanet.GoogleNetHttpTransport.newTrustedTransport; import static com.google.common.base.Throwables.throwIfInstanceOf; import static com.google.common.cache.CacheLoader.from; -import static io.prestosql.plugin.google.sheets.SheetsErrorCode.SHEETS_BAD_CREDENTIALS_ERROR; -import static io.prestosql.plugin.google.sheets.SheetsErrorCode.SHEETS_METASTORE_ERROR; -import static io.prestosql.plugin.google.sheets.SheetsErrorCode.SHEETS_TABLE_LOAD_ERROR; -import static io.prestosql.plugin.google.sheets.SheetsErrorCode.SHEETS_UNKNOWN_TABLE_ERROR; +import static io.trino.plugin.google.sheets.SheetsErrorCode.SHEETS_BAD_CREDENTIALS_ERROR; +import static io.trino.plugin.google.sheets.SheetsErrorCode.SHEETS_METASTORE_ERROR; +import static io.trino.plugin.google.sheets.SheetsErrorCode.SHEETS_TABLE_LOAD_ERROR; +import static io.trino.plugin.google.sheets.SheetsErrorCode.SHEETS_UNKNOWN_TABLE_ERROR; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsColumn.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsColumn.java index 1e15b5776fcd..4260349458ca 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsColumn.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsColumn.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsColumnHandle.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsColumnHandle.java index b0c467210279..c1fcd94f758c 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsColumnHandle.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsColumnHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsConnector.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsConnector.java index be92804696d8..5c571229f438 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsConnector.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsConnector.java @@ -14,16 +14,16 @@ package io.trino.plugin.google.sheets; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; -import static io.prestosql.plugin.google.sheets.SheetsTransactionHandle.INSTANCE; +import static io.trino.plugin.google.sheets.SheetsTransactionHandle.INSTANCE; import static java.util.Objects.requireNonNull; public class SheetsConnector diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsConnectorFactory.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsConnectorFactory.java index aa763e6854f3..a4d76725bee6 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsConnectorFactory.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsConnectorFactory.java @@ -16,10 +16,10 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import java.util.Map; diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsErrorCode.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsErrorCode.java index ebbb85f871bf..00871e4530f1 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsErrorCode.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsErrorCode.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.google.sheets; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; -import static io.prestosql.spi.ErrorType.INTERNAL_ERROR; -import static io.prestosql.spi.ErrorType.USER_ERROR; +import static io.trino.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.INTERNAL_ERROR; +import static io.trino.spi.ErrorType.USER_ERROR; public enum SheetsErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsHandleResolver.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsHandleResolver.java index 9587228da48e..0b13bd6b9ccf 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsHandleResolver.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.google.sheets; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class SheetsHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsMetadata.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsMetadata.java index 464423cc489a..340c1f6c09a5 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsMetadata.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsMetadata.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.TableNotFoundException; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.TableNotFoundException; import javax.inject.Inject; @@ -35,7 +35,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.google.sheets.SheetsErrorCode.SHEETS_UNKNOWN_TABLE_ERROR; +import static io.trino.plugin.google.sheets.SheetsErrorCode.SHEETS_UNKNOWN_TABLE_ERROR; import static java.util.Objects.requireNonNull; public class SheetsMetadata diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsModule.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsModule.java index 62e9c7cb4106..108d29d00ec6 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsModule.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsModule.java @@ -18,9 +18,9 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsPlugin.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsPlugin.java index 0b0a518671d5..dcbc7098c7e4 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsPlugin.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.google.sheets; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class SheetsPlugin implements Plugin diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsRecordCursor.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsRecordCursor.java index 0d0165e2ed53..4427ba74f3b1 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsRecordCursor.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsRecordCursor.java @@ -17,18 +17,18 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.Type; import java.util.Arrays; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class SheetsRecordCursor diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsRecordSet.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsRecordSet.java index 8baafc2b4f55..744c817596fc 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsRecordSet.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsRecordSet.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.google.sheets; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.List; import java.util.stream.Collectors; diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsRecordSetProvider.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsRecordSetProvider.java index 29579389b663..637c937a1907 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsRecordSetProvider.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsRecordSetProvider.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.google.sheets; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import java.util.List; import java.util.stream.Collectors; diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsSplit.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsSplit.java index 4c7abd5e8566..8deaba6f4e16 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsSplit.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsSplit.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsSplitManager.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsSplitManager.java index 8ab2c8c783aa..fe006e597019 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsSplitManager.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsSplitManager.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.google.sheets; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; -import io.prestosql.spi.connector.TableNotFoundException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; +import io.trino.spi.connector.TableNotFoundException; import javax.inject.Inject; diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsTable.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsTable.java index b8d5c8c2a875..d31f94fad070 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsTable.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsTable.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ColumnMetadata; import java.util.List; diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsTableHandle.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsTableHandle.java index 226451e4d488..acaeaa6ac402 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsTableHandle.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsTableHandle.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; import java.util.Objects; diff --git a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsTransactionHandle.java b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsTransactionHandle.java index c32dcedae15e..bf79f95f1d96 100644 --- a/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsTransactionHandle.java +++ b/plugin/trino-google-sheets/src/main/java/io/trino/plugin/google/sheets/SheetsTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.google.sheets; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum SheetsTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-google-sheets/src/test/java/io/trino/plugin/google/sheets/TestGoogleSheets.java b/plugin/trino-google-sheets/src/test/java/io/trino/plugin/google/sheets/TestGoogleSheets.java index fdbb861ef9b0..271df63d3786 100644 --- a/plugin/trino-google-sheets/src/test/java/io/trino/plugin/google/sheets/TestGoogleSheets.java +++ b/plugin/trino-google-sheets/src/test/java/io/trino/plugin/google/sheets/TestGoogleSheets.java @@ -14,15 +14,15 @@ package io.trino.plugin.google.sheets; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; -import static io.prestosql.plugin.google.sheets.TestSheetsPlugin.TEST_METADATA_SHEET_ID; -import static io.prestosql.plugin.google.sheets.TestSheetsPlugin.getTestCredentialsPath; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.google.sheets.TestSheetsPlugin.TEST_METADATA_SHEET_ID; +import static io.trino.plugin.google.sheets.TestSheetsPlugin.getTestCredentialsPath; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertEquals; public class TestGoogleSheets diff --git a/plugin/trino-google-sheets/src/test/java/io/trino/plugin/google/sheets/TestSheetsPlugin.java b/plugin/trino-google-sheets/src/test/java/io/trino/plugin/google/sheets/TestSheetsPlugin.java index ef6cf81ddb7e..51eac808b76e 100644 --- a/plugin/trino-google-sheets/src/test/java/io/trino/plugin/google/sheets/TestSheetsPlugin.java +++ b/plugin/trino-google-sheets/src/test/java/io/trino/plugin/google/sheets/TestSheetsPlugin.java @@ -14,10 +14,10 @@ package io.trino.plugin.google.sheets; import com.google.common.io.Resources; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import java.io.File; @@ -26,7 +26,7 @@ import static com.google.common.collect.ImmutableMap.Builder; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.google.sheets.TestGoogleSheets.GOOGLE_SHEETS; +import static io.trino.plugin.google.sheets.TestGoogleSheets.GOOGLE_SHEETS; import static java.io.File.createTempFile; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertNotNull; diff --git a/plugin/trino-hive-hadoop2/src/main/java/io/trino/plugin/hive/HiveHadoop2Plugin.java b/plugin/trino-hive-hadoop2/src/main/java/io/trino/plugin/hive/HiveHadoop2Plugin.java index 1dbcbe9ff3fa..7ed535c13ab9 100644 --- a/plugin/trino-hive-hadoop2/src/main/java/io/trino/plugin/hive/HiveHadoop2Plugin.java +++ b/plugin/trino-hive-hadoop2/src/main/java/io/trino/plugin/hive/HiveHadoop2Plugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class HiveHadoop2Plugin implements Plugin diff --git a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileSystemAbfs.java b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileSystemAbfs.java index 0df2ab6f3573..514257e25070 100644 --- a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileSystemAbfs.java +++ b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileSystemAbfs.java @@ -16,26 +16,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.AbstractTestHive.Transaction; -import io.prestosql.plugin.hive.azure.HiveAzureConfig; -import io.prestosql.plugin.hive.azure.PrestoAzureConfigurationInitializer; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.hive.AbstractTestHive.Transaction; +import io.trino.plugin.hive.azure.HiveAzureConfig; +import io.trino.plugin.hive.azure.PrestoAzureConfigurationInitializer; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; import org.apache.hadoop.fs.Path; import java.util.Map; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.HiveTableProperties.BUCKETED_BY_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.BUCKET_COUNT_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.EXTERNAL_LOCATION_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.SKIP_FOOTER_LINE_COUNT; -import static io.prestosql.plugin.hive.HiveTableProperties.SKIP_HEADER_LINE_COUNT; -import static io.prestosql.plugin.hive.HiveTableProperties.SORTED_BY_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.STORAGE_FORMAT_PROPERTY; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.hive.HiveTableProperties.BUCKETED_BY_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.BUCKET_COUNT_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.EXTERNAL_LOCATION_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.SKIP_FOOTER_LINE_COUNT; +import static io.trino.plugin.hive.HiveTableProperties.SKIP_HEADER_LINE_COUNT; +import static io.trino.plugin.hive.HiveTableProperties.SORTED_BY_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.STORAGE_FORMAT_PROPERTY; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.String.format; import static org.testng.util.Strings.isNullOrEmpty; diff --git a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileSystemS3.java b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileSystemS3.java index fc542cf23bcf..b28d01edad36 100644 --- a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileSystemS3.java +++ b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileSystemS3.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.s3.HiveS3Config; -import io.prestosql.plugin.hive.s3.PrestoS3ConfigurationInitializer; +import io.trino.plugin.hive.s3.HiveS3Config; +import io.trino.plugin.hive.s3.PrestoS3ConfigurationInitializer; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.testng.annotations.Test; diff --git a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveAlluxioMetastore.java b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveAlluxioMetastore.java index 6ba1dcef48ee..600873722d34 100644 --- a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveAlluxioMetastore.java +++ b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveAlluxioMetastore.java @@ -15,11 +15,11 @@ import alluxio.client.table.TableMasterClient; import alluxio.conf.PropertyKey; -import io.prestosql.plugin.hive.authentication.NoHdfsAuthentication; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.alluxio.AlluxioHiveMetastore; -import io.prestosql.plugin.hive.metastore.alluxio.AlluxioHiveMetastoreConfig; -import io.prestosql.plugin.hive.metastore.alluxio.AlluxioMetastoreModule; +import io.trino.plugin.hive.authentication.NoHdfsAuthentication; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.alluxio.AlluxioHiveMetastore; +import io.trino.plugin.hive.metastore.alluxio.AlluxioHiveMetastoreConfig; +import io.trino.plugin.hive.metastore.alluxio.AlluxioMetastoreModule; import org.testng.SkipException; import org.testng.annotations.BeforeClass; import org.testng.annotations.Parameters; diff --git a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemAbfsAccessKey.java b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemAbfsAccessKey.java index 28c81c43706d..7300194872d2 100644 --- a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemAbfsAccessKey.java +++ b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemAbfsAccessKey.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.azure.HiveAzureConfig; +import io.trino.plugin.hive.azure.HiveAzureConfig; import org.testng.annotations.BeforeClass; import org.testng.annotations.Parameters; diff --git a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemAbfsOAuth.java b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemAbfsOAuth.java index 423a93d2f159..2eb1df40d1e7 100644 --- a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemAbfsOAuth.java +++ b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemAbfsOAuth.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.azure.HiveAzureConfig; +import io.trino.plugin.hive.azure.HiveAzureConfig; import org.testng.annotations.BeforeClass; import org.testng.annotations.Parameters; diff --git a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemAdl.java b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemAdl.java index aa1aeae57b50..4b9b5b4cb513 100644 --- a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemAdl.java +++ b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemAdl.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.azure.HiveAzureConfig; -import io.prestosql.plugin.hive.azure.PrestoAzureConfigurationInitializer; +import io.trino.plugin.hive.azure.HiveAzureConfig; +import io.trino.plugin.hive.azure.PrestoAzureConfigurationInitializer; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.testng.annotations.BeforeClass; diff --git a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemWasb.java b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemWasb.java index 88e8a9c96493..a04bd50217b3 100644 --- a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemWasb.java +++ b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveFileSystemWasb.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.azure.HiveAzureConfig; -import io.prestosql.plugin.hive.azure.PrestoAzureConfigurationInitializer; +import io.trino.plugin.hive.azure.HiveAzureConfig; +import io.trino.plugin.hive.azure.PrestoAzureConfigurationInitializer; import org.apache.hadoop.fs.Path; import org.testng.annotations.BeforeClass; import org.testng.annotations.Parameters; diff --git a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveHadoop2Plugin.java b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveHadoop2Plugin.java index 574b7475c169..300c5405db34 100644 --- a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveHadoop2Plugin.java +++ b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHiveHadoop2Plugin.java @@ -16,10 +16,10 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; import com.qubole.rubix.core.CachingFileSystem; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; @@ -33,8 +33,8 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static io.prestosql.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior.APPEND; -import static io.prestosql.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior.ERROR; +import static io.trino.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior.APPEND; +import static io.trino.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior.ERROR; import static java.nio.file.Files.createTempDirectory; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/metastore/cache/TestCachingHiveMetastoreWithQueryRunner.java b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/metastore/cache/TestCachingHiveMetastoreWithQueryRunner.java index 44758a2bdd42..08172660d64b 100644 --- a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/metastore/cache/TestCachingHiveMetastoreWithQueryRunner.java +++ b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/metastore/cache/TestCachingHiveMetastoreWithQueryRunner.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.hive.HiveHadoop2Plugin; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.hive.HiveHadoop2Plugin; +import io.trino.spi.security.Identity; +import io.trino.spi.security.SelectedRole; +import io.trino.testing.DistributedQueryRunner; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -34,8 +34,8 @@ 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.prestosql.spi.security.SelectedRole.Type.ROLE; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.security.SelectedRole.Type.ROLE; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThatThrownBy; @SuppressWarnings("UnstableApiUsage") diff --git a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/s3select/TestHiveFileSystemS3SelectPushdown.java b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/s3select/TestHiveFileSystemS3SelectPushdown.java index e9b2ffd73a4e..1070fe76fb7c 100644 --- a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/s3select/TestHiveFileSystemS3SelectPushdown.java +++ b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/s3select/TestHiveFileSystemS3SelectPushdown.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive.s3select; -import io.prestosql.plugin.hive.AbstractTestHiveFileSystemS3; +import io.trino.plugin.hive.AbstractTestHiveFileSystemS3; import org.testng.annotations.BeforeClass; import org.testng.annotations.Parameters; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/BackgroundHiveSplitLoader.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/BackgroundHiveSplitLoader.java index 3f2df2b557db..60e2853dad9e 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/BackgroundHiveSplitLoader.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/BackgroundHiveSplitLoader.java @@ -23,25 +23,25 @@ import com.google.common.io.CharStreams; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveSplit.BucketConversion; -import io.prestosql.plugin.hive.HiveSplit.BucketValidation; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.plugin.hive.util.HiveBucketing.HiveBucketFilter; -import io.prestosql.plugin.hive.util.HiveFileIterator; -import io.prestosql.plugin.hive.util.InternalHiveSplitFactory; -import io.prestosql.plugin.hive.util.ResumableTask; -import io.prestosql.plugin.hive.util.ResumableTasks; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveSplit.BucketConversion; +import io.trino.plugin.hive.HiveSplit.BucketValidation; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.plugin.hive.util.HiveBucketing.HiveBucketFilter; +import io.trino.plugin.hive.util.HiveFileIterator; +import io.trino.plugin.hive.util.InternalHiveSplitFactory; +import io.trino.plugin.hive.util.ResumableTask; +import io.trino.plugin.hive.util.ResumableTasks; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; @@ -93,29 +93,29 @@ import static com.google.common.util.concurrent.Futures.immediateFuture; import static io.airlift.concurrent.MoreFutures.addExceptionCallback; import static io.airlift.concurrent.MoreFutures.toListenableFuture; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_BUCKET_FILES; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_PARTITION_VALUE; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_UNKNOWN_ERROR; -import static io.prestosql.plugin.hive.HivePartitionManager.partitionMatches; -import static io.prestosql.plugin.hive.HiveSessionProperties.getMaxInitialSplitSize; -import static io.prestosql.plugin.hive.HiveSessionProperties.isForceLocalScheduling; -import static io.prestosql.plugin.hive.HiveSessionProperties.isValidateBucketing; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.getHiveSchema; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.getPartitionLocation; -import static io.prestosql.plugin.hive.s3select.S3SelectPushdown.shouldEnablePushdownForTable; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.toJobConf; -import static io.prestosql.plugin.hive.util.HiveFileIterator.NestedDirectoryPolicy.FAIL; -import static io.prestosql.plugin.hive.util.HiveFileIterator.NestedDirectoryPolicy.IGNORED; -import static io.prestosql.plugin.hive.util.HiveFileIterator.NestedDirectoryPolicy.RECURSE; -import static io.prestosql.plugin.hive.util.HiveUtil.checkCondition; -import static io.prestosql.plugin.hive.util.HiveUtil.getFooterCount; -import static io.prestosql.plugin.hive.util.HiveUtil.getHeaderCount; -import static io.prestosql.plugin.hive.util.HiveUtil.getInputFormat; -import static io.prestosql.plugin.hive.util.HiveUtil.getPartitionKeyColumnHandles; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_BUCKET_FILES; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_PARTITION_VALUE; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_UNKNOWN_ERROR; +import static io.trino.plugin.hive.HivePartitionManager.partitionMatches; +import static io.trino.plugin.hive.HiveSessionProperties.getMaxInitialSplitSize; +import static io.trino.plugin.hive.HiveSessionProperties.isForceLocalScheduling; +import static io.trino.plugin.hive.HiveSessionProperties.isValidateBucketing; +import static io.trino.plugin.hive.metastore.MetastoreUtil.getHiveSchema; +import static io.trino.plugin.hive.metastore.MetastoreUtil.getPartitionLocation; +import static io.trino.plugin.hive.s3select.S3SelectPushdown.shouldEnablePushdownForTable; +import static io.trino.plugin.hive.util.ConfigurationUtils.toJobConf; +import static io.trino.plugin.hive.util.HiveFileIterator.NestedDirectoryPolicy.FAIL; +import static io.trino.plugin.hive.util.HiveFileIterator.NestedDirectoryPolicy.IGNORED; +import static io.trino.plugin.hive.util.HiveFileIterator.NestedDirectoryPolicy.RECURSE; +import static io.trino.plugin.hive.util.HiveUtil.checkCondition; +import static io.trino.plugin.hive.util.HiveUtil.getFooterCount; +import static io.trino.plugin.hive.util.HiveUtil.getHeaderCount; +import static io.trino.plugin.hive.util.HiveUtil.getInputFormat; +import static io.trino.plugin.hive.util.HiveUtil.getPartitionKeyColumnHandles; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.Integer.parseInt; import static java.lang.Math.max; import static java.lang.String.format; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java index b311cd3be870..06649dfed042 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java @@ -18,8 +18,8 @@ import com.google.common.cache.Weigher; import com.google.common.collect.ImmutableList; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.connector.SchemaTablePrefix; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.connector.SchemaTablePrefix; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocatedFileStatus; import org.apache.hadoop.fs.Path; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/DirectoryLister.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/DirectoryLister.java index 6c2430cecd71..e9ed48f2b069 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/DirectoryLister.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/DirectoryLister.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.metastore.Table; +import io.trino.plugin.hive.metastore.Table; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocatedFileStatus; import org.apache.hadoop.fs.Path; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/DynamicConfigurationProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/DynamicConfigurationProvider.java index f9d09a912026..495f9a9609c7 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/DynamicConfigurationProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/DynamicConfigurationProvider.java @@ -17,7 +17,7 @@ import java.net.URI; -import static io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; +import static io.trino.plugin.hive.HdfsEnvironment.HdfsContext; import static org.apache.hadoop.fs.TrinoFileSystemCache.CACHE_KEY; public interface DynamicConfigurationProvider diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/FileWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/FileWriter.java index facc18a07586..d888cc9390d9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/FileWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/FileWriter.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.util.Optional; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/GenericHiveRecordCursor.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/GenericHiveRecordCursor.java index ac24fd111e01..ef61ad7065fc 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/GenericHiveRecordCursor.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/GenericHiveRecordCursor.java @@ -15,19 +15,19 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.plugin.base.type.DecodedTimestamp; -import io.prestosql.plugin.base.type.PrestoTimestampEncoder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; import io.trino.hadoop.TextLineLengthLimitExceededException; +import io.trino.plugin.base.type.DecodedTimestamp; +import io.trino.plugin.base.type.PrestoTimestampEncoder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.common.type.Date; @@ -58,27 +58,27 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.base.type.PrestoTimestampEncoderFactory.createTimestampEncoder; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CURSOR_ERROR; -import static io.prestosql.plugin.hive.util.HiveUtil.closeWithSuppression; -import static io.prestosql.plugin.hive.util.HiveUtil.getDeserializer; -import static io.prestosql.plugin.hive.util.HiveUtil.getTableObjectInspector; -import static io.prestosql.plugin.hive.util.HiveUtil.isStructuralType; -import static io.prestosql.plugin.hive.util.SerDeUtils.getBlockObject; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.Chars.truncateToLengthAndTrimSpaces; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.rescale; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.Varchars.truncateToLength; +import static io.trino.plugin.base.type.PrestoTimestampEncoderFactory.createTimestampEncoder; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CURSOR_ERROR; +import static io.trino.plugin.hive.util.HiveUtil.closeWithSuppression; +import static io.trino.plugin.hive.util.HiveUtil.getDeserializer; +import static io.trino.plugin.hive.util.HiveUtil.getTableObjectInspector; +import static io.trino.plugin.hive.util.HiveUtil.isStructuralType; +import static io.trino.plugin.hive.util.SerDeUtils.getBlockObject; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.Chars.truncateToLengthAndTrimSpaces; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.rescale; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.Varchars.truncateToLength; import static java.lang.Float.floatToRawIntBits; import static java.lang.Math.max; import static java.lang.Math.min; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/GenericHiveRecordCursorProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/GenericHiveRecordCursorProvider.java index ac10bdbd5c89..ba661a48a278 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/GenericHiveRecordCursorProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/GenericHiveRecordCursorProvider.java @@ -14,12 +14,12 @@ package io.trino.plugin.hive; import io.airlift.units.DataSize; -import io.prestosql.plugin.hive.util.HiveUtil; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.util.HiveUtil; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.Writable; @@ -34,8 +34,8 @@ import java.util.Properties; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; -import static io.prestosql.plugin.hive.HivePageSourceProvider.projectBaseColumns; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; +import static io.trino.plugin.hive.HivePageSourceProvider.projectBaseColumns; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toUnmodifiableList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HdfsConfiguration.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HdfsConfiguration.java index 3de753584c27..d783883dcd63 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HdfsConfiguration.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HdfsConfiguration.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; import org.apache.hadoop.conf.Configuration; import java.net.URI; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HdfsConfigurationInitializer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HdfsConfigurationInitializer.java index fee01c5cbccc..9b08408b3e4f 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HdfsConfigurationInitializer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HdfsConfigurationInitializer.java @@ -30,8 +30,8 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.copy; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.readConfiguration; +import static io.trino.plugin.hive.util.ConfigurationUtils.copy; +import static io.trino.plugin.hive.util.ConfigurationUtils.readConfiguration; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; import static org.apache.hadoop.fs.CommonConfigurationKeys.IPC_PING_INTERVAL_KEY; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HdfsEnvironment.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HdfsEnvironment.java index a65f92e111a2..5b4c052bca69 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HdfsEnvironment.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HdfsEnvironment.java @@ -14,11 +14,11 @@ package io.trino.plugin.hive; import com.google.common.primitives.Shorts; -import io.prestosql.plugin.hive.authentication.GenericExceptionAction; -import io.prestosql.plugin.hive.authentication.HdfsAuthentication; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.security.ConnectorIdentity; import io.trino.hadoop.HadoopNative; +import io.trino.plugin.hive.authentication.GenericExceptionAction; +import io.trino.plugin.hive.authentication.HdfsAuthentication; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.security.ConnectorIdentity; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveAnalyzeProperties.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveAnalyzeProperties.java index f1934418698f..e8715e989384 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveAnalyzeProperties.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveAnalyzeProperties.java @@ -14,9 +14,9 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.PrestoException; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.ArrayType; import javax.inject.Inject; @@ -29,9 +29,9 @@ import static com.google.common.base.MoreObjects.firstNonNull; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.hive.HivePartitionKey.HIVE_DEFAULT_DYNAMIC_PARTITION; -import static io.prestosql.spi.StandardErrorCode.INVALID_ANALYZE_PROPERTY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.hive.HivePartitionKey.HIVE_DEFAULT_DYNAMIC_PARTITION; +import static io.trino.spi.StandardErrorCode.INVALID_ANALYZE_PROPERTY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; public class HiveAnalyzeProperties diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveApplyProjectionUtil.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveApplyProjectionUtil.java index 00db46e9bd60..43a0ce3d570e 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveApplyProjectionUtil.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveApplyProjectionUtil.java @@ -15,10 +15,10 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.FieldDereference; -import io.prestosql.spi.expression.Variable; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.FieldDereference; +import io.trino.spi.expression.Variable; import java.util.List; import java.util.Map; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketAdapterRecordCursor.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketAdapterRecordCursor.java index 516f199e3313..efc7bb7d0b2b 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketAdapterRecordCursor.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketAdapterRecordCursor.java @@ -14,21 +14,21 @@ package io.trino.plugin.hive; import io.airlift.slice.Slice; -import io.prestosql.plugin.hive.util.ForwardingRecordCursor; -import io.prestosql.plugin.hive.util.HiveBucketing; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.util.ForwardingRecordCursor; +import io.trino.plugin.hive.util.HiveBucketing; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_BUCKET_FILES; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_BUCKET_FILES; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketFunction.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketFunction.java index 27755a5a6591..36416250d000 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketFunction.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketFunction.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.util.HiveBucketing; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.BucketFunction; +import io.trino.plugin.hive.util.HiveBucketing; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.spi.Page; +import io.trino.spi.connector.BucketFunction; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; import java.util.List; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketHandle.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketHandle.java index 4fe2646f0ddb..bba7581099ac 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketHandle.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketHandle.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketProperty.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketProperty.java index 93b134702c7d..dea51cb9262d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketProperty.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketProperty.java @@ -16,10 +16,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.metastore.SortingColumn; -import io.prestosql.plugin.hive.util.HiveBucketing; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.hive.metastore.SortingColumn; +import io.trino.plugin.hive.util.HiveBucketing; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.spi.PrestoException; import org.apache.hadoop.hive.metastore.api.StorageDescriptor; import java.util.List; @@ -29,7 +29,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; import static java.util.Objects.requireNonNull; public class HiveBucketProperty diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketValidationRecordCursor.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketValidationRecordCursor.java index d4327bdde2f7..8c4216ed572d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketValidationRecordCursor.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBucketValidationRecordCursor.java @@ -16,22 +16,22 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.VerifyException; import io.airlift.slice.Slice; -import io.prestosql.plugin.hive.util.ForwardingRecordCursor; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.util.ForwardingRecordCursor; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_BUCKET_FILES; -import static io.prestosql.plugin.hive.HivePageSource.BucketValidator.VALIDATION_STRIDE; -import static io.prestosql.plugin.hive.util.HiveBucketing.getHiveBucket; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_BUCKET_FILES; +import static io.trino.plugin.hive.HivePageSource.BucketValidator.VALIDATION_STRIDE; +import static io.trino.plugin.hive.util.HiveBucketing.getHiveBucket; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveCoercionRecordCursor.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveCoercionRecordCursor.java index 9a3cd1c98801..4049b5be88b4 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveCoercionRecordCursor.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveCoercionRecordCursor.java @@ -16,33 +16,33 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.plugin.hive.HivePageSourceProvider.ColumnMapping; -import io.prestosql.plugin.hive.util.ForwardingRecordCursor; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.HivePageSourceProvider.ColumnMapping; +import io.trino.plugin.hive.util.ForwardingRecordCursor; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.hive.serde2.typeinfo.ListTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.MapTypeInfo; import java.util.List; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.hive.HiveType.HIVE_BYTE; -import static io.prestosql.plugin.hive.HiveType.HIVE_DOUBLE; -import static io.prestosql.plugin.hive.HiveType.HIVE_FLOAT; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.HIVE_LONG; -import static io.prestosql.plugin.hive.HiveType.HIVE_SHORT; -import static io.prestosql.plugin.hive.util.HiveUtil.extractStructFieldTypes; -import static io.prestosql.plugin.hive.util.HiveUtil.isArrayType; -import static io.prestosql.plugin.hive.util.HiveUtil.isMapType; -import static io.prestosql.plugin.hive.util.HiveUtil.isRowType; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.hive.HiveType.HIVE_BYTE; +import static io.trino.plugin.hive.HiveType.HIVE_DOUBLE; +import static io.trino.plugin.hive.HiveType.HIVE_FLOAT; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.HIVE_LONG; +import static io.trino.plugin.hive.HiveType.HIVE_SHORT; +import static io.trino.plugin.hive.util.HiveUtil.extractStructFieldTypes; +import static io.trino.plugin.hive.util.HiveUtil.isArrayType; +import static io.trino.plugin.hive.util.HiveUtil.isMapType; +import static io.trino.plugin.hive.util.HiveUtil.isRowType; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.min; import static java.lang.String.format; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveColumnHandle.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveColumnHandle.java index bf6a59e7d8c7..ada4825f9210 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveColumnHandle.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveColumnHandle.java @@ -15,26 +15,26 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.plugin.hive.acid.AcidSchema; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.acid.AcidSchema; +import io.trino.plugin.hive.metastore.Column; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.SYNTHESIZED; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.HIVE_LONG; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.HiveType.toHiveType; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.SYNTHESIZED; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.HIVE_LONG; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.HiveType.toHiveType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; /** diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveColumnProjectionInfo.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveColumnProjectionInfo.java index ad866d4f6622..005c4d530313 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveColumnProjectionInfo.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveColumnProjectionInfo.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveCompressionCodec.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveCompressionCodec.java index 0cdd7a166b7f..3fc4c626dfa3 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveCompressionCodec.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveCompressionCodec.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.orc.metadata.CompressionKind; +import io.trino.orc.metadata.CompressionKind; import org.apache.hadoop.io.compress.CompressionCodec; import org.apache.hadoop.io.compress.GzipCodec; import org.apache.hadoop.io.compress.Lz4Codec; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveConfig.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveConfig.java index 0c11ef2b4d6a..9b97c9aa2b52 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveConfig.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveConfig.java @@ -23,7 +23,7 @@ import io.airlift.units.Duration; import io.airlift.units.MaxDataSize; import io.airlift.units.MinDataSize; -import io.prestosql.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior; +import io.trino.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior; import org.joda.time.DateTimeZone; import javax.annotation.Nullable; @@ -37,8 +37,8 @@ import java.util.TimeZone; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior.APPEND; -import static io.prestosql.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior.ERROR; +import static io.trino.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior.APPEND; +import static io.trino.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior.ERROR; import static java.util.concurrent.TimeUnit.MINUTES; @DefunctConfig({ diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveConnector.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveConnector.java index 9c64ef0913a3..c6a5226834cb 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveConnector.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveConnector.java @@ -16,30 +16,30 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorMetadata; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import java.util.List; import java.util.Optional; import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.transaction.IsolationLevel.READ_UNCOMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.transaction.IsolationLevel.READ_UNCOMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; public class HiveConnector diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveConnectorFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveConnectorFactory.java index c7f79ba4bede..5843543ce5b6 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveConnectorFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveConnectorFactory.java @@ -15,9 +15,9 @@ import com.google.inject.Binder; import com.google.inject.Module; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; import java.lang.reflect.InvocationTargetException; import java.util.Map; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveDecimalParser.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveDecimalParser.java index 22ee33e69f49..275446b2bf13 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveDecimalParser.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveDecimalParser.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.type.DecimalType; +import io.trino.spi.type.DecimalType; import java.math.BigDecimal; -import static io.prestosql.spi.type.Decimals.rescale; +import static io.trino.spi.type.Decimals.rescale; import static java.math.RoundingMode.HALF_UP; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveErrorCode.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveErrorCode.java index b0bb58668764..88a31ec2b7d5 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveErrorCode.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveErrorCode.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; -import static io.prestosql.spi.ErrorType.INTERNAL_ERROR; -import static io.prestosql.spi.ErrorType.USER_ERROR; +import static io.trino.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.INTERNAL_ERROR; +import static io.trino.spi.ErrorType.USER_ERROR; public enum HiveErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveFileWriterFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveFileWriterFactory.java index f7c484365303..52fe8cabce34 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveFileWriterFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveFileWriterFactory.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.spi.connector.ConnectorSession; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapred.JobConf; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveHandleResolver.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveHandleResolver.java index abd82cf082d5..f02a499af864 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveHandleResolver.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveHandleResolver.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class HiveHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveHdfsConfiguration.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveHdfsConfiguration.java index 8c6c363b6c80..0b51f04baeb5 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveHdfsConfiguration.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveHdfsConfiguration.java @@ -14,7 +14,7 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; import org.apache.hadoop.conf.Configuration; import javax.inject.Inject; @@ -22,8 +22,8 @@ import java.net.URI; import java.util.Set; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.copy; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.getInitialConfiguration; +import static io.trino.plugin.hive.util.ConfigurationUtils.copy; +import static io.trino.plugin.hive.util.ConfigurationUtils.getInitialConfiguration; import static java.util.Objects.requireNonNull; public class HiveHdfsConfiguration diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveInsertTableHandle.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveInsertTableHandle.java index deaf50aa4d8d..7de98124c79e 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveInsertTableHandle.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveInsertTableHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.metastore.HivePageSinkMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.metastore.HivePageSinkMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; import java.util.List; import java.util.Optional; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveLocationService.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveLocationService.java index d72d0d619eee..29a31759f3d6 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveLocationService.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveLocationService.java @@ -13,30 +13,30 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.LocationHandle.WriteMode; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.LocationHandle.WriteMode; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; import org.apache.hadoop.fs.Path; import javax.inject.Inject; import java.util.Optional; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_PATH_ALREADY_EXISTS; -import static io.prestosql.plugin.hive.HiveSessionProperties.isTemporaryStagingDirectoryEnabled; -import static io.prestosql.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_EXISTING_DIRECTORY; -import static io.prestosql.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_NEW_DIRECTORY; -import static io.prestosql.plugin.hive.LocationHandle.WriteMode.STAGE_AND_MOVE_TO_TARGET_DIRECTORY; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.createTemporaryPath; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.getTableDefaultLocation; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.isHdfsEncrypted; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.isS3FileSystem; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.pathExists; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_PATH_ALREADY_EXISTS; +import static io.trino.plugin.hive.HiveSessionProperties.isTemporaryStagingDirectoryEnabled; +import static io.trino.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_EXISTING_DIRECTORY; +import static io.trino.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_NEW_DIRECTORY; +import static io.trino.plugin.hive.LocationHandle.WriteMode.STAGE_AND_MOVE_TO_TARGET_DIRECTORY; +import static io.trino.plugin.hive.util.HiveWriteUtils.createTemporaryPath; +import static io.trino.plugin.hive.util.HiveWriteUtils.getTableDefaultLocation; +import static io.trino.plugin.hive.util.HiveWriteUtils.isHdfsEncrypted; +import static io.trino.plugin.hive.util.HiveWriteUtils.isS3FileSystem; +import static io.trino.plugin.hive.util.HiveWriteUtils.pathExists; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.apache.hadoop.hive.ql.io.AcidUtils.isTransactionalTable; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadata.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadata.java index a5fff8ff0988..b12091ee5eb5 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadata.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadata.java @@ -27,79 +27,79 @@ import com.google.common.collect.Sets; import io.airlift.json.JsonCodec; import io.airlift.slice.Slice; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveApplyProjectionUtil.ProjectedColumnRepresentation; -import io.prestosql.plugin.hive.LocationService.WriteInfo; -import io.prestosql.plugin.hive.acid.AcidOperation; -import io.prestosql.plugin.hive.acid.AcidSchema; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.PrincipalPrivileges; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.SortingColumn; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.security.AccessControlMetadata; -import io.prestosql.plugin.hive.statistics.HiveStatisticsProvider; -import io.prestosql.plugin.hive.util.HiveBucketing; -import io.prestosql.plugin.hive.util.HiveUtil; -import io.prestosql.plugin.hive.util.HiveWriteUtils; -import io.prestosql.spi.ErrorType; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.Assignment; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTablePartitioning; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.DiscretePredicates; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.connector.ViewNotFoundException; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.GrantInfo; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticMetadata; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.statistics.TableStatisticType; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.statistics.TableStatisticsMetadata; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveApplyProjectionUtil.ProjectedColumnRepresentation; +import io.trino.plugin.hive.LocationService.WriteInfo; +import io.trino.plugin.hive.acid.AcidOperation; +import io.trino.plugin.hive.acid.AcidSchema; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.PrincipalPrivileges; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.SortingColumn; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.security.AccessControlMetadata; +import io.trino.plugin.hive.statistics.HiveStatisticsProvider; +import io.trino.plugin.hive.util.HiveBucketing; +import io.trino.plugin.hive.util.HiveUtil; +import io.trino.plugin.hive.util.HiveWriteUtils; +import io.trino.spi.ErrorType; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.block.Block; +import io.trino.spi.connector.Assignment; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTablePartitioning; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.DiscretePredicates; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.connector.ViewNotFoundException; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Variable; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.GrantInfo; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticMetadata; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.statistics.TableStatisticType; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.statistics.TableStatisticsMetadata; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.metastore.TableType; @@ -140,124 +140,124 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.concat; import static com.google.common.collect.Streams.stream; -import static io.prestosql.plugin.hive.HiveAnalyzeProperties.getColumnNames; -import static io.prestosql.plugin.hive.HiveAnalyzeProperties.getPartitionList; -import static io.prestosql.plugin.hive.HiveApplyProjectionUtil.extractSupportedProjectedColumns; -import static io.prestosql.plugin.hive.HiveApplyProjectionUtil.find; -import static io.prestosql.plugin.hive.HiveApplyProjectionUtil.replaceWithNewVariables; -import static io.prestosql.plugin.hive.HiveBasicStatistics.createEmptyStatistics; -import static io.prestosql.plugin.hive.HiveBasicStatistics.createZeroStatistics; -import static io.prestosql.plugin.hive.HiveColumnHandle.BUCKET_COLUMN_NAME; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.SYNTHESIZED; -import static io.prestosql.plugin.hive.HiveColumnHandle.FILE_MODIFIED_TIME_COLUMN_NAME; -import static io.prestosql.plugin.hive.HiveColumnHandle.FILE_SIZE_COLUMN_NAME; -import static io.prestosql.plugin.hive.HiveColumnHandle.PARTITION_COLUMN_NAME; -import static io.prestosql.plugin.hive.HiveColumnHandle.PATH_COLUMN_NAME; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveColumnHandle.updateRowIdColumnHandle; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_COLUMN_ORDER_MISMATCH; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CONCURRENT_MODIFICATION_DETECTED; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_UNKNOWN_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_UNSUPPORTED_FORMAT; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; -import static io.prestosql.plugin.hive.HivePartitionManager.extractPartitionValues; -import static io.prestosql.plugin.hive.HiveSessionProperties.getCompressionCodec; -import static io.prestosql.plugin.hive.HiveSessionProperties.getHiveStorageFormat; -import static io.prestosql.plugin.hive.HiveSessionProperties.getTimestampPrecision; -import static io.prestosql.plugin.hive.HiveSessionProperties.isBucketExecutionEnabled; -import static io.prestosql.plugin.hive.HiveSessionProperties.isCollectColumnStatisticsOnWrite; -import static io.prestosql.plugin.hive.HiveSessionProperties.isCreateEmptyBucketFiles; -import static io.prestosql.plugin.hive.HiveSessionProperties.isOptimizedMismatchedBucketCount; -import static io.prestosql.plugin.hive.HiveSessionProperties.isProjectionPushdownEnabled; -import static io.prestosql.plugin.hive.HiveSessionProperties.isRespectTableFormat; -import static io.prestosql.plugin.hive.HiveSessionProperties.isSortedWritingEnabled; -import static io.prestosql.plugin.hive.HiveSessionProperties.isStatisticsEnabled; -import static io.prestosql.plugin.hive.HiveTableProperties.ANALYZE_COLUMNS_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.AVRO_SCHEMA_URL; -import static io.prestosql.plugin.hive.HiveTableProperties.BUCKETED_BY_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.BUCKET_COUNT_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.CSV_ESCAPE; -import static io.prestosql.plugin.hive.HiveTableProperties.CSV_QUOTE; -import static io.prestosql.plugin.hive.HiveTableProperties.CSV_SEPARATOR; -import static io.prestosql.plugin.hive.HiveTableProperties.EXTERNAL_LOCATION_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.NULL_FORMAT_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.ORC_BLOOM_FILTER_COLUMNS; -import static io.prestosql.plugin.hive.HiveTableProperties.ORC_BLOOM_FILTER_FPP; -import static io.prestosql.plugin.hive.HiveTableProperties.PARTITIONED_BY_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.SKIP_FOOTER_LINE_COUNT; -import static io.prestosql.plugin.hive.HiveTableProperties.SKIP_HEADER_LINE_COUNT; -import static io.prestosql.plugin.hive.HiveTableProperties.SORTED_BY_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.STORAGE_FORMAT_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.TEXTFILE_FIELD_SEPARATOR; -import static io.prestosql.plugin.hive.HiveTableProperties.TEXTFILE_FIELD_SEPARATOR_ESCAPE; -import static io.prestosql.plugin.hive.HiveTableProperties.getAnalyzeColumns; -import static io.prestosql.plugin.hive.HiveTableProperties.getAvroSchemaUrl; -import static io.prestosql.plugin.hive.HiveTableProperties.getBucketProperty; -import static io.prestosql.plugin.hive.HiveTableProperties.getExternalLocation; -import static io.prestosql.plugin.hive.HiveTableProperties.getFooterSkipCount; -import static io.prestosql.plugin.hive.HiveTableProperties.getHeaderSkipCount; -import static io.prestosql.plugin.hive.HiveTableProperties.getHiveStorageFormat; -import static io.prestosql.plugin.hive.HiveTableProperties.getNullFormat; -import static io.prestosql.plugin.hive.HiveTableProperties.getOrcBloomFilterColumns; -import static io.prestosql.plugin.hive.HiveTableProperties.getOrcBloomFilterFpp; -import static io.prestosql.plugin.hive.HiveTableProperties.getPartitionedBy; -import static io.prestosql.plugin.hive.HiveTableProperties.getSingleCharacterProperty; -import static io.prestosql.plugin.hive.HiveTableProperties.isTransactional; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.HiveType.toHiveType; -import static io.prestosql.plugin.hive.HiveWriterFactory.computeBucketedFileName; -import static io.prestosql.plugin.hive.PartitionAndStatementId.CODEC; -import static io.prestosql.plugin.hive.PartitionUpdate.UpdateMode.APPEND; -import static io.prestosql.plugin.hive.PartitionUpdate.UpdateMode.NEW; -import static io.prestosql.plugin.hive.PartitionUpdate.UpdateMode.OVERWRITE; -import static io.prestosql.plugin.hive.ViewReaderUtil.PRESTO_VIEW_FLAG; -import static io.prestosql.plugin.hive.ViewReaderUtil.createViewReader; -import static io.prestosql.plugin.hive.ViewReaderUtil.encodeViewData; -import static io.prestosql.plugin.hive.ViewReaderUtil.isHiveOrPrestoView; -import static io.prestosql.plugin.hive.ViewReaderUtil.isPrestoView; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.plugin.hive.acid.AcidTransaction.forCreateTable; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.buildInitialPrivilegeSet; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.getHiveSchema; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.getProtectMode; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.verifyOnline; -import static io.prestosql.plugin.hive.metastore.PrincipalPrivileges.fromHivePrivilegeInfos; -import static io.prestosql.plugin.hive.metastore.StorageFormat.VIEW_STORAGE_FORMAT; -import static io.prestosql.plugin.hive.metastore.StorageFormat.fromHiveStorageFormat; -import static io.prestosql.plugin.hive.util.CompressionConfigUtil.configureCompression; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.toJobConf; -import static io.prestosql.plugin.hive.util.HiveBucketing.bucketedOnTimestamp; -import static io.prestosql.plugin.hive.util.HiveBucketing.getHiveBucketHandle; -import static io.prestosql.plugin.hive.util.HiveUtil.columnExtraInfo; -import static io.prestosql.plugin.hive.util.HiveUtil.getPartitionKeyColumnHandles; -import static io.prestosql.plugin.hive.util.HiveUtil.getRegularColumnHandles; -import static io.prestosql.plugin.hive.util.HiveUtil.hiveColumnHandles; -import static io.prestosql.plugin.hive.util.HiveUtil.toPartitionValues; -import static io.prestosql.plugin.hive.util.HiveUtil.verifyPartitionTypeSupported; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.checkTableIsWritable; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.initializeSerializer; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.isS3FileSystem; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.isWritableType; -import static io.prestosql.plugin.hive.util.Statistics.ReduceOperator.ADD; -import static io.prestosql.plugin.hive.util.Statistics.createComputedStatisticsToPartitionMap; -import static io.prestosql.plugin.hive.util.Statistics.createEmptyPartitionStatistics; -import static io.prestosql.plugin.hive.util.Statistics.fromComputedStatistics; -import static io.prestosql.plugin.hive.util.Statistics.reduce; -import static io.prestosql.plugin.hive.util.SystemTables.createSystemTable; -import static io.prestosql.spi.StandardErrorCode.INVALID_ANALYZE_PROPERTY; -import static io.prestosql.spi.StandardErrorCode.INVALID_SCHEMA_PROPERTY; -import static io.prestosql.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_EMPTY; -import static io.prestosql.spi.predicate.TupleDomain.withColumnDomains; -import static io.prestosql.spi.statistics.TableStatisticType.ROW_COUNT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.TypeUtils.isFloatingPointNaN; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.hive.HiveAnalyzeProperties.getColumnNames; +import static io.trino.plugin.hive.HiveAnalyzeProperties.getPartitionList; +import static io.trino.plugin.hive.HiveApplyProjectionUtil.extractSupportedProjectedColumns; +import static io.trino.plugin.hive.HiveApplyProjectionUtil.find; +import static io.trino.plugin.hive.HiveApplyProjectionUtil.replaceWithNewVariables; +import static io.trino.plugin.hive.HiveBasicStatistics.createEmptyStatistics; +import static io.trino.plugin.hive.HiveBasicStatistics.createZeroStatistics; +import static io.trino.plugin.hive.HiveColumnHandle.BUCKET_COLUMN_NAME; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.SYNTHESIZED; +import static io.trino.plugin.hive.HiveColumnHandle.FILE_MODIFIED_TIME_COLUMN_NAME; +import static io.trino.plugin.hive.HiveColumnHandle.FILE_SIZE_COLUMN_NAME; +import static io.trino.plugin.hive.HiveColumnHandle.PARTITION_COLUMN_NAME; +import static io.trino.plugin.hive.HiveColumnHandle.PATH_COLUMN_NAME; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveColumnHandle.updateRowIdColumnHandle; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_COLUMN_ORDER_MISMATCH; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CONCURRENT_MODIFICATION_DETECTED; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_UNKNOWN_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_UNSUPPORTED_FORMAT; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; +import static io.trino.plugin.hive.HivePartitionManager.extractPartitionValues; +import static io.trino.plugin.hive.HiveSessionProperties.getCompressionCodec; +import static io.trino.plugin.hive.HiveSessionProperties.getHiveStorageFormat; +import static io.trino.plugin.hive.HiveSessionProperties.getTimestampPrecision; +import static io.trino.plugin.hive.HiveSessionProperties.isBucketExecutionEnabled; +import static io.trino.plugin.hive.HiveSessionProperties.isCollectColumnStatisticsOnWrite; +import static io.trino.plugin.hive.HiveSessionProperties.isCreateEmptyBucketFiles; +import static io.trino.plugin.hive.HiveSessionProperties.isOptimizedMismatchedBucketCount; +import static io.trino.plugin.hive.HiveSessionProperties.isProjectionPushdownEnabled; +import static io.trino.plugin.hive.HiveSessionProperties.isRespectTableFormat; +import static io.trino.plugin.hive.HiveSessionProperties.isSortedWritingEnabled; +import static io.trino.plugin.hive.HiveSessionProperties.isStatisticsEnabled; +import static io.trino.plugin.hive.HiveTableProperties.ANALYZE_COLUMNS_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.AVRO_SCHEMA_URL; +import static io.trino.plugin.hive.HiveTableProperties.BUCKETED_BY_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.BUCKET_COUNT_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.CSV_ESCAPE; +import static io.trino.plugin.hive.HiveTableProperties.CSV_QUOTE; +import static io.trino.plugin.hive.HiveTableProperties.CSV_SEPARATOR; +import static io.trino.plugin.hive.HiveTableProperties.EXTERNAL_LOCATION_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.NULL_FORMAT_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.ORC_BLOOM_FILTER_COLUMNS; +import static io.trino.plugin.hive.HiveTableProperties.ORC_BLOOM_FILTER_FPP; +import static io.trino.plugin.hive.HiveTableProperties.PARTITIONED_BY_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.SKIP_FOOTER_LINE_COUNT; +import static io.trino.plugin.hive.HiveTableProperties.SKIP_HEADER_LINE_COUNT; +import static io.trino.plugin.hive.HiveTableProperties.SORTED_BY_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.STORAGE_FORMAT_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.TEXTFILE_FIELD_SEPARATOR; +import static io.trino.plugin.hive.HiveTableProperties.TEXTFILE_FIELD_SEPARATOR_ESCAPE; +import static io.trino.plugin.hive.HiveTableProperties.getAnalyzeColumns; +import static io.trino.plugin.hive.HiveTableProperties.getAvroSchemaUrl; +import static io.trino.plugin.hive.HiveTableProperties.getBucketProperty; +import static io.trino.plugin.hive.HiveTableProperties.getExternalLocation; +import static io.trino.plugin.hive.HiveTableProperties.getFooterSkipCount; +import static io.trino.plugin.hive.HiveTableProperties.getHeaderSkipCount; +import static io.trino.plugin.hive.HiveTableProperties.getHiveStorageFormat; +import static io.trino.plugin.hive.HiveTableProperties.getNullFormat; +import static io.trino.plugin.hive.HiveTableProperties.getOrcBloomFilterColumns; +import static io.trino.plugin.hive.HiveTableProperties.getOrcBloomFilterFpp; +import static io.trino.plugin.hive.HiveTableProperties.getPartitionedBy; +import static io.trino.plugin.hive.HiveTableProperties.getSingleCharacterProperty; +import static io.trino.plugin.hive.HiveTableProperties.isTransactional; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.HiveType.toHiveType; +import static io.trino.plugin.hive.HiveWriterFactory.computeBucketedFileName; +import static io.trino.plugin.hive.PartitionAndStatementId.CODEC; +import static io.trino.plugin.hive.PartitionUpdate.UpdateMode.APPEND; +import static io.trino.plugin.hive.PartitionUpdate.UpdateMode.NEW; +import static io.trino.plugin.hive.PartitionUpdate.UpdateMode.OVERWRITE; +import static io.trino.plugin.hive.ViewReaderUtil.PRESTO_VIEW_FLAG; +import static io.trino.plugin.hive.ViewReaderUtil.createViewReader; +import static io.trino.plugin.hive.ViewReaderUtil.encodeViewData; +import static io.trino.plugin.hive.ViewReaderUtil.isHiveOrPrestoView; +import static io.trino.plugin.hive.ViewReaderUtil.isPrestoView; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.plugin.hive.acid.AcidTransaction.forCreateTable; +import static io.trino.plugin.hive.metastore.MetastoreUtil.buildInitialPrivilegeSet; +import static io.trino.plugin.hive.metastore.MetastoreUtil.getHiveSchema; +import static io.trino.plugin.hive.metastore.MetastoreUtil.getProtectMode; +import static io.trino.plugin.hive.metastore.MetastoreUtil.verifyOnline; +import static io.trino.plugin.hive.metastore.PrincipalPrivileges.fromHivePrivilegeInfos; +import static io.trino.plugin.hive.metastore.StorageFormat.VIEW_STORAGE_FORMAT; +import static io.trino.plugin.hive.metastore.StorageFormat.fromHiveStorageFormat; +import static io.trino.plugin.hive.util.CompressionConfigUtil.configureCompression; +import static io.trino.plugin.hive.util.ConfigurationUtils.toJobConf; +import static io.trino.plugin.hive.util.HiveBucketing.bucketedOnTimestamp; +import static io.trino.plugin.hive.util.HiveBucketing.getHiveBucketHandle; +import static io.trino.plugin.hive.util.HiveUtil.columnExtraInfo; +import static io.trino.plugin.hive.util.HiveUtil.getPartitionKeyColumnHandles; +import static io.trino.plugin.hive.util.HiveUtil.getRegularColumnHandles; +import static io.trino.plugin.hive.util.HiveUtil.hiveColumnHandles; +import static io.trino.plugin.hive.util.HiveUtil.toPartitionValues; +import static io.trino.plugin.hive.util.HiveUtil.verifyPartitionTypeSupported; +import static io.trino.plugin.hive.util.HiveWriteUtils.checkTableIsWritable; +import static io.trino.plugin.hive.util.HiveWriteUtils.initializeSerializer; +import static io.trino.plugin.hive.util.HiveWriteUtils.isS3FileSystem; +import static io.trino.plugin.hive.util.HiveWriteUtils.isWritableType; +import static io.trino.plugin.hive.util.Statistics.ReduceOperator.ADD; +import static io.trino.plugin.hive.util.Statistics.createComputedStatisticsToPartitionMap; +import static io.trino.plugin.hive.util.Statistics.createEmptyPartitionStatistics; +import static io.trino.plugin.hive.util.Statistics.fromComputedStatistics; +import static io.trino.plugin.hive.util.Statistics.reduce; +import static io.trino.plugin.hive.util.SystemTables.createSystemTable; +import static io.trino.spi.StandardErrorCode.INVALID_ANALYZE_PROPERTY; +import static io.trino.spi.StandardErrorCode.INVALID_SCHEMA_PROPERTY; +import static io.trino.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_EMPTY; +import static io.trino.spi.predicate.TupleDomain.withColumnDomains; +import static io.trino.spi.statistics.TableStatisticType.ROW_COUNT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.TypeUtils.isFloatingPointNaN; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.lang.Boolean.parseBoolean; import static java.lang.String.format; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadataFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadataFactory.java index ed0e372b66c5..c9b6706dcf6d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadataFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadataFactory.java @@ -16,13 +16,13 @@ import io.airlift.concurrent.BoundedExecutor; import io.airlift.json.JsonCodec; import io.airlift.units.Duration; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.security.AccessControlMetadataFactory; -import io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.security.AccessControlMetadataFactory; +import io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; @@ -32,7 +32,7 @@ import java.util.concurrent.ScheduledExecutorService; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; -import static io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastore.memoizeMetastore; +import static io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.memoizeMetastore; import static java.util.Objects.requireNonNull; public class HiveMetadataFactory diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetastoreClosure.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetastoreClosure.java index 19a5758f22d8..f1c505784ce6 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetastoreClosure.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetastoreClosure.java @@ -14,23 +14,23 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.acid.AcidOperation; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.plugin.hive.metastore.PrincipalPrivileges; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.acid.AcidOperation; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.plugin.hive.metastore.PrincipalPrivileges; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import org.apache.hadoop.hive.metastore.api.DataOperationType; import java.util.List; @@ -43,7 +43,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.Maps.immutableEntry; -import static io.prestosql.plugin.hive.HivePartitionManager.extractPartitionValues; +import static io.trino.plugin.hive.HivePartitionManager.extractPartitionValues; import static java.util.Objects.requireNonNull; public class HiveMetastoreClosure diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveModule.java index 89f76d2ddbe1..2703d7ca5212 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveModule.java @@ -21,28 +21,28 @@ import com.google.inject.Scopes; import com.google.inject.multibindings.Multibinder; import io.airlift.event.client.EventClient; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.orc.OrcFileWriterFactory; -import io.prestosql.plugin.hive.orc.OrcPageSourceFactory; -import io.prestosql.plugin.hive.orc.OrcReaderConfig; -import io.prestosql.plugin.hive.orc.OrcWriterConfig; -import io.prestosql.plugin.hive.parquet.ParquetFileWriterFactory; -import io.prestosql.plugin.hive.parquet.ParquetPageSourceFactory; -import io.prestosql.plugin.hive.parquet.ParquetReaderConfig; -import io.prestosql.plugin.hive.parquet.ParquetWriterConfig; -import io.prestosql.plugin.hive.rcfile.RcFilePageSourceFactory; -import io.prestosql.plugin.hive.s3select.PrestoS3ClientFactory; -import io.prestosql.plugin.hive.s3select.S3SelectRecordCursorProvider; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.orc.OrcFileWriterFactory; +import io.trino.plugin.hive.orc.OrcPageSourceFactory; +import io.trino.plugin.hive.orc.OrcReaderConfig; +import io.trino.plugin.hive.orc.OrcWriterConfig; +import io.trino.plugin.hive.parquet.ParquetFileWriterFactory; +import io.trino.plugin.hive.parquet.ParquetPageSourceFactory; +import io.trino.plugin.hive.parquet.ParquetReaderConfig; +import io.trino.plugin.hive.parquet.ParquetWriterConfig; +import io.trino.plugin.hive.rcfile.RcFilePageSourceFactory; +import io.trino.plugin.hive.s3select.PrestoS3ClientFactory; +import io.trino.plugin.hive.s3select.S3SelectRecordCursorProvider; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; import javax.inject.Singleton; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveNodePartitioningProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveNodePartitioningProvider.java index 9f96d7f821c0..89688af9afa7 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveNodePartitioningProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveNodePartitioningProvider.java @@ -13,22 +13,22 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.connector.ConnectorBucketNodeMap; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.connector.ConnectorBucketNodeMap; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.type.Type; import java.util.List; import java.util.function.ToIntFunction; import java.util.stream.IntStream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.connector.ConnectorBucketNodeMap.createBucketNodeMap; +import static io.trino.spi.connector.ConnectorBucketNodeMap.createBucketNodeMap; public class HiveNodePartitioningProvider implements ConnectorNodePartitioningProvider diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveNotReadableException.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveNotReadableException.java index 0d8aeba315f6..4c57dbabdf79 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveNotReadableException.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveNotReadableException.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; import java.util.Optional; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_PARTITION_NOT_READABLE; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_TABLE_READ_ONLY; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_PARTITION_NOT_READABLE; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_TABLE_READ_ONLY; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveOutputTableHandle.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveOutputTableHandle.java index a9a603e7ef62..6131fe88ee05 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveOutputTableHandle.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveOutputTableHandle.java @@ -17,9 +17,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.metastore.HivePageSinkMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.metastore.HivePageSinkMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; import java.util.List; import java.util.Map; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSink.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSink.java index 21ea45617025..3d5718087559 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSink.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSink.java @@ -22,16 +22,16 @@ import io.airlift.json.JsonCodec; import io.airlift.log.Logger; import io.airlift.slice.Slice; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageIndexer; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.IntArrayBlockBuilder; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.spi.Page; +import io.trino.spi.PageIndexer; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.IntArrayBlockBuilder; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; @@ -49,9 +49,9 @@ import static com.google.common.base.Verify.verify; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_TOO_MANY_OPEN_PARTITIONS; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_TOO_MANY_OPEN_PARTITIONS; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSinkProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSinkProvider.java index 19f57b4ad3bd..8c59590d8f6a 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSinkProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSinkProvider.java @@ -20,20 +20,20 @@ import io.airlift.event.client.EventClient; import io.airlift.json.JsonCodec; import io.airlift.units.DataSize; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HivePageSinkMetadataProvider; -import io.prestosql.plugin.hive.metastore.SortingColumn; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HivePageSinkMetadataProvider; +import io.trino.plugin.hive.metastore.SortingColumn; +import io.trino.spi.NodeManager; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.PageSorter; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.type.TypeManager; import org.joda.time.DateTimeZone; import javax.inject.Inject; @@ -45,7 +45,7 @@ import static com.google.common.util.concurrent.MoreExecutors.listeningDecorator; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastore.memoizeMetastore; +import static io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.memoizeMetastore; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newFixedThreadPool; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSource.java index 1f1cdfd6ad9b..70b759ec381a 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSource.java @@ -14,36 +14,36 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.HivePageSourceProvider.BucketAdaptation; -import io.prestosql.plugin.hive.HivePageSourceProvider.ColumnMapping; -import io.prestosql.plugin.hive.coercions.DoubleToFloatCoercer; -import io.prestosql.plugin.hive.coercions.FloatToDoubleCoercer; -import io.prestosql.plugin.hive.coercions.IntegerNumberToVarcharCoercer; -import io.prestosql.plugin.hive.coercions.IntegerNumberUpscaleCoercer; -import io.prestosql.plugin.hive.coercions.VarcharCoercer; -import io.prestosql.plugin.hive.coercions.VarcharToIntegerNumberCoercer; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.ArrayBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ColumnarArray; -import io.prestosql.spi.block.ColumnarMap; -import io.prestosql.spi.block.ColumnarRow; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.block.LazyBlockLoader; -import io.prestosql.spi.block.RowBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.HivePageSourceProvider.BucketAdaptation; +import io.trino.plugin.hive.HivePageSourceProvider.ColumnMapping; +import io.trino.plugin.hive.coercions.DoubleToFloatCoercer; +import io.trino.plugin.hive.coercions.FloatToDoubleCoercer; +import io.trino.plugin.hive.coercions.IntegerNumberToVarcharCoercer; +import io.trino.plugin.hive.coercions.IntegerNumberUpscaleCoercer; +import io.trino.plugin.hive.coercions.VarcharCoercer; +import io.trino.plugin.hive.coercions.VarcharToIntegerNumberCoercer; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.ArrayBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.ColumnarArray; +import io.trino.spi.block.ColumnarMap; +import io.trino.spi.block.ColumnarRow; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.block.LazyBlockLoader; +import io.trino.spi.block.RowBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import it.unimi.dsi.fastutil.ints.IntArrayList; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.serde2.typeinfo.ListTypeInfo; @@ -64,58 +64,58 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.hive.HiveColumnHandle.isRowIdColumnHandle; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CURSOR_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_BUCKET_FILES; -import static io.prestosql.plugin.hive.HivePageSourceProvider.ColumnMappingKind.EMPTY; -import static io.prestosql.plugin.hive.HivePageSourceProvider.ColumnMappingKind.PREFILLED; -import static io.prestosql.plugin.hive.HiveType.HIVE_BYTE; -import static io.prestosql.plugin.hive.HiveType.HIVE_DOUBLE; -import static io.prestosql.plugin.hive.HiveType.HIVE_FLOAT; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.HIVE_LONG; -import static io.prestosql.plugin.hive.HiveType.HIVE_SHORT; -import static io.prestosql.plugin.hive.coercions.DecimalCoercers.createDecimalToDecimalCoercer; -import static io.prestosql.plugin.hive.coercions.DecimalCoercers.createDecimalToDoubleCoercer; -import static io.prestosql.plugin.hive.coercions.DecimalCoercers.createDecimalToRealCoercer; -import static io.prestosql.plugin.hive.coercions.DecimalCoercers.createDoubleToDecimalCoercer; -import static io.prestosql.plugin.hive.coercions.DecimalCoercers.createRealToDecimalCoercer; -import static io.prestosql.plugin.hive.util.HiveBucketing.getHiveBucket; -import static io.prestosql.plugin.hive.util.HiveUtil.bigintPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.booleanPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.charPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.datePartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.doublePartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.extractStructFieldTypes; -import static io.prestosql.plugin.hive.util.HiveUtil.floatPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.integerPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.isArrayType; -import static io.prestosql.plugin.hive.util.HiveUtil.isHiveNull; -import static io.prestosql.plugin.hive.util.HiveUtil.isMapType; -import static io.prestosql.plugin.hive.util.HiveUtil.isRowType; -import static io.prestosql.plugin.hive.util.HiveUtil.longDecimalPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.shortDecimalPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.smallintPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.timestampPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.tinyintPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.varcharPartitionKey; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.block.ColumnarArray.toColumnarArray; -import static io.prestosql.spi.block.ColumnarMap.toColumnarMap; -import static io.prestosql.spi.block.ColumnarRow.toColumnarRow; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.isLongDecimal; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.plugin.hive.HiveColumnHandle.isRowIdColumnHandle; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CURSOR_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_BUCKET_FILES; +import static io.trino.plugin.hive.HivePageSourceProvider.ColumnMappingKind.EMPTY; +import static io.trino.plugin.hive.HivePageSourceProvider.ColumnMappingKind.PREFILLED; +import static io.trino.plugin.hive.HiveType.HIVE_BYTE; +import static io.trino.plugin.hive.HiveType.HIVE_DOUBLE; +import static io.trino.plugin.hive.HiveType.HIVE_FLOAT; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.HIVE_LONG; +import static io.trino.plugin.hive.HiveType.HIVE_SHORT; +import static io.trino.plugin.hive.coercions.DecimalCoercers.createDecimalToDecimalCoercer; +import static io.trino.plugin.hive.coercions.DecimalCoercers.createDecimalToDoubleCoercer; +import static io.trino.plugin.hive.coercions.DecimalCoercers.createDecimalToRealCoercer; +import static io.trino.plugin.hive.coercions.DecimalCoercers.createDoubleToDecimalCoercer; +import static io.trino.plugin.hive.coercions.DecimalCoercers.createRealToDecimalCoercer; +import static io.trino.plugin.hive.util.HiveBucketing.getHiveBucket; +import static io.trino.plugin.hive.util.HiveUtil.bigintPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.booleanPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.charPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.datePartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.doublePartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.extractStructFieldTypes; +import static io.trino.plugin.hive.util.HiveUtil.floatPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.integerPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.isArrayType; +import static io.trino.plugin.hive.util.HiveUtil.isHiveNull; +import static io.trino.plugin.hive.util.HiveUtil.isMapType; +import static io.trino.plugin.hive.util.HiveUtil.isRowType; +import static io.trino.plugin.hive.util.HiveUtil.longDecimalPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.shortDecimalPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.smallintPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.timestampPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.tinyintPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.varcharPartitionKey; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.block.ColumnarArray.toColumnarArray; +import static io.trino.spi.block.ColumnarMap.toColumnarMap; +import static io.trino.spi.block.ColumnarRow.toColumnarRow; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.isLongDecimal; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSourceFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSourceFactory.java index 9f0b444f26ac..768893c7b80e 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSourceFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSourceFactory.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.predicate.TupleDomain; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSourceProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSourceProvider.java index 16d4fff01b73..51fd94c3f7f9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSourceProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePageSourceProvider.java @@ -18,32 +18,32 @@ import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HivePageSource.BucketValidator; -import io.prestosql.plugin.hive.HiveRecordCursorProvider.ReaderRecordCursorWithProjections; -import io.prestosql.plugin.hive.HiveSplit.BucketConversion; -import io.prestosql.plugin.hive.HiveSplit.BucketValidation; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.orc.OrcFileWriterFactory; -import io.prestosql.plugin.hive.orc.OrcPageSource; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.EmptyPageSource; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.OrcType; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HivePageSource.BucketValidator; +import io.trino.plugin.hive.HiveRecordCursorProvider.ReaderRecordCursorWithProjections; +import io.trino.plugin.hive.HiveSplit.BucketConversion; +import io.trino.plugin.hive.HiveSplit.BucketValidation; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.orc.OrcFileWriterFactory; +import io.trino.plugin.hive.orc.OrcPageSource; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.EmptyPageSource; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; @@ -66,17 +66,17 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.Maps.uniqueIndex; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.SYNTHESIZED; -import static io.prestosql.plugin.hive.HiveColumnHandle.isRowIdColumnHandle; -import static io.prestosql.plugin.hive.HivePageSourceProvider.ColumnMapping.toColumnHandles; -import static io.prestosql.plugin.hive.HiveUpdatablePageSource.ACID_ROW_STRUCT_COLUMN_ID; -import static io.prestosql.plugin.hive.HiveUpdatablePageSource.ORIGINAL_FILE_PATH_MATCHER; -import static io.prestosql.plugin.hive.orc.OrcTypeToHiveTypeTranslator.fromOrcTypeToHiveType; -import static io.prestosql.plugin.hive.util.HiveBucketing.HiveBucketFilter; -import static io.prestosql.plugin.hive.util.HiveBucketing.getHiveBucketFilter; -import static io.prestosql.plugin.hive.util.HiveUtil.getPrefilledColumnValue; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.SYNTHESIZED; +import static io.trino.plugin.hive.HiveColumnHandle.isRowIdColumnHandle; +import static io.trino.plugin.hive.HivePageSourceProvider.ColumnMapping.toColumnHandles; +import static io.trino.plugin.hive.HiveUpdatablePageSource.ACID_ROW_STRUCT_COLUMN_ID; +import static io.trino.plugin.hive.HiveUpdatablePageSource.ORIGINAL_FILE_PATH_MATCHER; +import static io.trino.plugin.hive.orc.OrcTypeToHiveTypeTranslator.fromOrcTypeToHiveType; +import static io.trino.plugin.hive.util.HiveBucketing.HiveBucketFilter; +import static io.trino.plugin.hive.util.HiveBucketing.getHiveBucketFilter; +import static io.trino.plugin.hive.util.HiveUtil.getPrefilledColumnValue; import static java.util.Objects.requireNonNull; import static java.util.function.Function.identity; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartition.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartition.java index 8d3616eb7f35..ab7f75ddfe98 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartition.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartition.java @@ -14,9 +14,9 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.NullableValue; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.NullableValue; import java.util.Map; import java.util.Objects; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionHandle.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionHandle.java index 76733d7f1682..a5d5b1142adf 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionHandle.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorPartitionHandle; import java.util.Objects; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionManager.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionManager.java index 81f2acbd3436..eb2d4c1a8838 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionManager.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionManager.java @@ -17,20 +17,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Sets; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.util.HiveBucketing.HiveBucketFilter; -import io.prestosql.plugin.hive.util.Optionals; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.util.HiveBucketing.HiveBucketFilter; +import io.trino.plugin.hive.util.Optionals; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import org.apache.hadoop.hive.common.FileUtils; import javax.inject.Inject; @@ -44,12 +44,12 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_EXCEEDED_PARTITION_LIMIT; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.computePartitionKeyFilter; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.toPartitionName; -import static io.prestosql.plugin.hive.util.HiveBucketing.getHiveBucketFilter; -import static io.prestosql.plugin.hive.util.HiveUtil.parsePartitionValue; -import static io.prestosql.spi.predicate.TupleDomain.none; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_EXCEEDED_PARTITION_LIMIT; +import static io.trino.plugin.hive.metastore.MetastoreUtil.computePartitionKeyFilter; +import static io.trino.plugin.hive.metastore.MetastoreUtil.toPartitionName; +import static io.trino.plugin.hive.util.HiveBucketing.getHiveBucketFilter; +import static io.trino.plugin.hive.util.HiveUtil.parsePartitionValue; +import static io.trino.spi.predicate.TupleDomain.none; import static java.lang.String.format; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionMetadata.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionMetadata.java index 2200cde2e153..f484f42868c9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionMetadata.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionMetadata.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.Partition; import java.util.Optional; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionResult.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionResult.java index bc4b54fcde31..d2270b27a11a 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionResult.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionResult.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.util.HiveBucketing.HiveBucketFilter; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.hive.util.HiveBucketing.HiveBucketFilter; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.TupleDomain; import java.util.Iterator; import java.util.List; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitioningHandle.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitioningHandle.java index 16435e24ad83..fe0f19251bec 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitioningHandle.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitioningHandle.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.spi.connector.ConnectorPartitioningHandle; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveQlToPrestoTranslator.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveQlToPrestoTranslator.java index 0f967f6420a2..7011f13f06c9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveQlToPrestoTranslator.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveQlToPrestoTranslator.java @@ -15,10 +15,10 @@ import com.google.common.collect.Lists; import com.google.common.collect.PeekingIterator; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import static com.google.common.collect.Iterators.peekingIterator; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_VIEW_TRANSLATION_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_VIEW_TRANSLATION_ERROR; import static org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.unescapeSQLString; /** diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveReadOnlyException.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveReadOnlyException.java index 5b2be0bdcf45..0b903c762f6f 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveReadOnlyException.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveReadOnlyException.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; import java.util.Optional; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_PARTITION_READ_ONLY; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_TABLE_READ_ONLY; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_PARTITION_READ_ONLY; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_TABLE_READ_ONLY; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveReaderProjectionsAdaptingRecordCursor.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveReaderProjectionsAdaptingRecordCursor.java index 5f669cb47c70..4b22c13261b9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveReaderProjectionsAdaptingRecordCursor.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveReaderProjectionsAdaptingRecordCursor.java @@ -15,11 +15,11 @@ import com.google.common.collect.Iterables; import io.airlift.slice.Slice; -import io.prestosql.plugin.hive.ReaderProjectionsAdapter.ChannelMapping; -import io.prestosql.plugin.hive.util.ForwardingRecordCursor; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.ReaderProjectionsAdapter.ChannelMapping; +import io.trino.plugin.hive.util.ForwardingRecordCursor; +import io.trino.spi.block.Block; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveRecordCursor.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveRecordCursor.java index 1a8da667d38a..7483e3122f08 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveRecordCursor.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveRecordCursor.java @@ -15,49 +15,49 @@ import com.google.common.annotations.VisibleForTesting; import io.airlift.slice.Slice; -import io.prestosql.plugin.hive.HivePageSourceProvider.ColumnMapping; -import io.prestosql.plugin.hive.util.ForwardingRecordCursor; -import io.prestosql.plugin.hive.util.HiveUtil; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.HivePageSourceProvider.ColumnMapping; +import io.trino.plugin.hive.util.ForwardingRecordCursor; +import io.trino.plugin.hive.util.HiveUtil; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.joda.time.DateTimeZone; import java.util.List; -import static io.prestosql.plugin.hive.HivePageSourceProvider.ColumnMappingKind.EMPTY; -import static io.prestosql.plugin.hive.HivePageSourceProvider.ColumnMappingKind.PREFILLED; -import static io.prestosql.plugin.hive.HivePageSourceProvider.ColumnMappingKind.REGULAR; -import static io.prestosql.plugin.hive.util.HiveUtil.bigintPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.booleanPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.charPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.datePartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.doublePartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.floatPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.integerPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.longDecimalPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.shortDecimalPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.smallintPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.timestampPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.tinyintPartitionKey; -import static io.prestosql.plugin.hive.util.HiveUtil.varcharPartitionKey; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.isLongDecimal; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.plugin.hive.HivePageSourceProvider.ColumnMappingKind.EMPTY; +import static io.trino.plugin.hive.HivePageSourceProvider.ColumnMappingKind.PREFILLED; +import static io.trino.plugin.hive.HivePageSourceProvider.ColumnMappingKind.REGULAR; +import static io.trino.plugin.hive.util.HiveUtil.bigintPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.booleanPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.charPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.datePartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.doublePartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.floatPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.integerPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.longDecimalPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.shortDecimalPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.smallintPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.timestampPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.tinyintPartitionKey; +import static io.trino.plugin.hive.util.HiveUtil.varcharPartitionKey; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.isLongDecimal; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveRecordCursorProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveRecordCursorProvider.java index fe33794021d9..ca924cb27e48 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveRecordCursorProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveRecordCursorProvider.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSchemaProperties.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSchemaProperties.java index 4be8ad555c60..f46002162e9d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSchemaProperties.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSchemaProperties.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.plugin.hive.metastore.Database; +import io.trino.spi.session.PropertyMetadata; import java.util.List; import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; public final class HiveSchemaProperties { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSessionProperties.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSessionProperties.java index 244d31812a3a..1a45b490a95d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSessionProperties.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSessionProperties.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode; -import io.prestosql.plugin.hive.orc.OrcReaderConfig; -import io.prestosql.plugin.hive.orc.OrcWriterConfig; -import io.prestosql.plugin.hive.parquet.ParquetReaderConfig; -import io.prestosql.plugin.hive.parquet.ParquetWriterConfig; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.orc.OrcWriteValidation.OrcWriteValidationMode; +import io.trino.plugin.hive.orc.OrcReaderConfig; +import io.trino.plugin.hive.orc.OrcWriterConfig; +import io.trino.plugin.hive.parquet.ParquetReaderConfig; +import io.trino.plugin.hive.parquet.ParquetWriterConfig; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; @@ -31,15 +31,15 @@ import java.util.concurrent.ThreadLocalRandom; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.base.session.PropertyMetadataUtil.dataSizeProperty; -import static io.prestosql.plugin.base.session.PropertyMetadataUtil.durationProperty; -import static io.prestosql.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.base.session.PropertyMetadataUtil.dataSizeProperty; +import static io.trino.plugin.base.session.PropertyMetadataUtil.durationProperty; +import static io.trino.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSplit.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSplit.java index 4ef8a84d43cf..3aa181f96226 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSplit.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSplit.java @@ -17,9 +17,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; import java.util.Objects; @@ -29,7 +29,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.util.HiveUtil.getDeserializerClassName; +import static io.trino.plugin.hive.util.HiveUtil.getDeserializerClassName; import static java.util.Objects.requireNonNull; public class HiveSplit diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSplitManager.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSplitManager.java index 710dd6d43a78..3882c89ade37 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSplitManager.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSplitManager.java @@ -21,24 +21,24 @@ import io.airlift.concurrent.BoundedExecutor; import io.airlift.stats.CounterStat; import io.airlift.units.DataSize; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.util.HiveBucketing.HiveBucketFilter; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.VersionEmbedder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.util.HiveBucketing.HiveBucketFilter; +import io.trino.spi.PrestoException; +import io.trino.spi.VersionEmbedder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.type.TypeManager; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -60,23 +60,23 @@ import static com.google.common.collect.Iterables.concat; import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.collect.Iterables.transform; -import static io.prestosql.plugin.hive.BackgroundHiveSplitLoader.BucketSplitInfo.createBucketSplitInfo; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_PARTITION_DROPPED_DURING_QUERY; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_PARTITION_SCHEMA_MISMATCH; -import static io.prestosql.plugin.hive.HivePartition.UNPARTITIONED_ID; -import static io.prestosql.plugin.hive.HiveSessionProperties.getDynamicFilteringProbeBlockingTimeout; -import static io.prestosql.plugin.hive.HiveSessionProperties.isIgnoreAbsentPartitions; -import static io.prestosql.plugin.hive.HiveSessionProperties.isOptimizeSymlinkListing; -import static io.prestosql.plugin.hive.HiveSessionProperties.isPartitionUseColumnNames; -import static io.prestosql.plugin.hive.TableToPartitionMapping.mapColumnsByIndex; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.getProtectMode; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.makePartitionName; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.verifyOnline; -import static io.prestosql.plugin.hive.util.HiveCoercionPolicy.canCoerce; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.SERVER_SHUTTING_DOWN; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.GROUPED_SCHEDULING; +import static io.trino.plugin.hive.BackgroundHiveSplitLoader.BucketSplitInfo.createBucketSplitInfo; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_PARTITION_DROPPED_DURING_QUERY; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_PARTITION_SCHEMA_MISMATCH; +import static io.trino.plugin.hive.HivePartition.UNPARTITIONED_ID; +import static io.trino.plugin.hive.HiveSessionProperties.getDynamicFilteringProbeBlockingTimeout; +import static io.trino.plugin.hive.HiveSessionProperties.isIgnoreAbsentPartitions; +import static io.trino.plugin.hive.HiveSessionProperties.isOptimizeSymlinkListing; +import static io.trino.plugin.hive.HiveSessionProperties.isPartitionUseColumnNames; +import static io.trino.plugin.hive.TableToPartitionMapping.mapColumnsByIndex; +import static io.trino.plugin.hive.metastore.MetastoreUtil.getProtectMode; +import static io.trino.plugin.hive.metastore.MetastoreUtil.makePartitionName; +import static io.trino.plugin.hive.metastore.MetastoreUtil.verifyOnline; +import static io.trino.plugin.hive.util.HiveCoercionPolicy.canCoerce; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.SERVER_SHUTTING_DOWN; +import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.GROUPED_SCHEDULING; import static java.lang.Math.min; import static java.lang.String.format; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSplitSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSplitSource.java index a7a3e8c083e3..5ae3cf9a5414 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSplitSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSplitSource.java @@ -20,15 +20,15 @@ import io.airlift.log.Logger; import io.airlift.stats.CounterStat; import io.airlift.units.DataSize; -import io.prestosql.plugin.hive.InternalHiveSplit.InternalHiveBlock; -import io.prestosql.plugin.hive.util.AsyncQueue; -import io.prestosql.plugin.hive.util.AsyncQueue.BorrowResult; -import io.prestosql.plugin.hive.util.ThrottledAsyncQueue; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitSource; +import io.trino.plugin.hive.InternalHiveSplit.InternalHiveBlock; +import io.trino.plugin.hive.util.AsyncQueue; +import io.trino.plugin.hive.util.AsyncQueue.BorrowResult; +import io.trino.plugin.hive.util.ThrottledAsyncQueue; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitSource; import java.io.FileNotFoundException; import java.util.List; @@ -51,16 +51,16 @@ import static io.airlift.concurrent.MoreFutures.failedFuture; import static io.airlift.concurrent.MoreFutures.toCompletableFuture; import static io.airlift.units.DataSize.succinctBytes; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_EXCEEDED_SPLIT_BUFFERING_LIMIT; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILE_NOT_FOUND; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_UNKNOWN_ERROR; -import static io.prestosql.plugin.hive.HiveSessionProperties.getMaxInitialSplitSize; -import static io.prestosql.plugin.hive.HiveSessionProperties.getMaxSplitSize; -import static io.prestosql.plugin.hive.HiveSplitSource.StateKind.CLOSED; -import static io.prestosql.plugin.hive.HiveSplitSource.StateKind.FAILED; -import static io.prestosql.plugin.hive.HiveSplitSource.StateKind.INITIAL; -import static io.prestosql.plugin.hive.HiveSplitSource.StateKind.NO_MORE_SPLITS; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_EXCEEDED_SPLIT_BUFFERING_LIMIT; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILE_NOT_FOUND; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_UNKNOWN_ERROR; +import static io.trino.plugin.hive.HiveSessionProperties.getMaxInitialSplitSize; +import static io.trino.plugin.hive.HiveSessionProperties.getMaxSplitSize; +import static io.trino.plugin.hive.HiveSplitSource.StateKind.CLOSED; +import static io.trino.plugin.hive.HiveSplitSource.StateKind.FAILED; +import static io.trino.plugin.hive.HiveSplitSource.StateKind.INITIAL; +import static io.trino.plugin.hive.HiveSplitSource.StateKind.NO_MORE_SPLITS; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveStorageFormat.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveStorageFormat.java index 2ab9af684599..550687bc2c4a 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveStorageFormat.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveStorageFormat.java @@ -15,7 +15,7 @@ import io.airlift.units.DataSize; import io.airlift.units.DataSize.Unit; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat; import org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat; import org.apache.hadoop.hive.ql.io.RCFileInputFormat; @@ -44,7 +44,7 @@ import java.util.List; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTableHandle.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTableHandle.java index 6d72592b108c..70eb0f4a4644 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTableHandle.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTableHandle.java @@ -19,12 +19,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.util.HiveBucketing.HiveBucketFilter; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.util.HiveBucketing.HiveBucketFilter; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.List; import java.util.Map; @@ -33,7 +33,7 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; import static java.util.Objects.requireNonNull; public class HiveTableHandle diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTableProperties.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTableProperties.java index 02d65dd8240b..02fb05010fdb 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTableProperties.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTableProperties.java @@ -14,12 +14,12 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.metastore.SortingColumn; -import io.prestosql.plugin.hive.orc.OrcWriterConfig; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.ArrayType; +import io.trino.plugin.hive.metastore.SortingColumn; +import io.trino.plugin.hive.orc.OrcWriterConfig; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.spi.PrestoException; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.ArrayType; import javax.inject.Inject; @@ -31,17 +31,17 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.metastore.SortingColumn.Order.ASCENDING; -import static io.prestosql.plugin.hive.metastore.SortingColumn.Order.DESCENDING; -import static io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; -import static io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V2; -import static io.prestosql.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.doubleProperty; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.hive.metastore.SortingColumn.Order.ASCENDING; +import static io.trino.plugin.hive.metastore.SortingColumn.Order.DESCENDING; +import static io.trino.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; +import static io.trino.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V2; +import static io.trino.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.doubleProperty; +import static io.trino.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTransactionHandle.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTransactionHandle.java index c0e813f4ba0e..29cbc5b635ec 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTransactionHandle.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTransactionHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Objects; import java.util.UUID; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTransactionManager.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTransactionManager.java index aa755e9dfe00..a27ea17f47c2 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTransactionManager.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTransactionManager.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveType.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveType.java index c6ae72bf2a0f..59c0da7e6d8e 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveType.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveType.java @@ -16,11 +16,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeSignature; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeSignature; import org.apache.hadoop.hive.serde2.typeinfo.ListTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.MapTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo; @@ -33,11 +33,11 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveStorageFormat.AVRO; -import static io.prestosql.plugin.hive.HiveStorageFormat.ORC; -import static io.prestosql.plugin.hive.util.HiveTypeTranslator.fromPrimitiveType; -import static io.prestosql.plugin.hive.util.HiveTypeTranslator.toTypeInfo; -import static io.prestosql.plugin.hive.util.HiveTypeTranslator.toTypeSignature; +import static io.trino.plugin.hive.HiveStorageFormat.AVRO; +import static io.trino.plugin.hive.HiveStorageFormat.ORC; +import static io.trino.plugin.hive.util.HiveTypeTranslator.fromPrimitiveType; +import static io.trino.plugin.hive.util.HiveTypeTranslator.toTypeInfo; +import static io.trino.plugin.hive.util.HiveTypeTranslator.toTypeSignature; import static java.util.Objects.requireNonNull; import static org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import static org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory.binaryTypeInfo; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveUpdatablePageSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveUpdatablePageSource.java index 78a2f56a4d05..d81d1088ed97 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveUpdatablePageSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveUpdatablePageSource.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.plugin.hive.orc.OrcFileWriter; -import io.prestosql.plugin.hive.orc.OrcFileWriterFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.orc.OrcFileWriter; +import io.trino.plugin.hive.orc.OrcFileWriterFactory; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; @@ -39,17 +39,17 @@ import java.util.regex.Pattern; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.orc.OrcWriter.OrcOperation.DELETE; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; -import static io.prestosql.plugin.hive.HiveStorageFormat.ORC; -import static io.prestosql.plugin.hive.PartitionAndStatementId.CODEC; -import static io.prestosql.plugin.hive.acid.AcidSchema.ACID_COLUMN_NAMES; -import static io.prestosql.plugin.hive.acid.AcidSchema.createAcidSchema; -import static io.prestosql.plugin.hive.metastore.StorageFormat.fromHiveStorageFormat; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.toJobConf; -import static io.prestosql.spi.predicate.Utils.nativeValueToBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.orc.OrcWriter.OrcOperation.DELETE; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; +import static io.trino.plugin.hive.HiveStorageFormat.ORC; +import static io.trino.plugin.hive.PartitionAndStatementId.CODEC; +import static io.trino.plugin.hive.acid.AcidSchema.ACID_COLUMN_NAMES; +import static io.trino.plugin.hive.acid.AcidSchema.createAcidSchema; +import static io.trino.plugin.hive.metastore.StorageFormat.fromHiveStorageFormat; +import static io.trino.plugin.hive.util.ConfigurationUtils.toJobConf; +import static io.trino.spi.predicate.Utils.nativeValueToBlock; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.CompletableFuture.completedFuture; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveViewNotSupportedException.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveViewNotSupportedException.java index 9a835d8167fc..2bef6d4e010f 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveViewNotSupportedException.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveViewNotSupportedException.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.connector.NotFoundException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.NotFoundException; +import io.trino.spi.connector.SchemaTableName; import static java.lang.String.format; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWritableTableHandle.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWritableTableHandle.java index 035e6bee0bad..02cbac42336b 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWritableTableHandle.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWritableTableHandle.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.metastore.HivePageSinkMetadata; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.metastore.HivePageSinkMetadata; +import io.trino.spi.connector.SchemaTableName; import java.util.List; import java.util.Optional; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWriter.java index ac3a5df64945..531eb4065d26 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWriter.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.PartitionUpdate.UpdateMode; -import io.prestosql.spi.Page; +import io.trino.plugin.hive.PartitionUpdate.UpdateMode; +import io.trino.spi.Page; import java.util.Optional; import java.util.function.Consumer; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWriterFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWriterFactory.java index 13bb4a3f1223..786190fd635a 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWriterFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWriterFactory.java @@ -20,28 +20,28 @@ import com.google.common.collect.Sets; import io.airlift.event.client.EventClient; import io.airlift.units.DataSize; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior; -import io.prestosql.plugin.hive.LocationService.WriteInfo; -import io.prestosql.plugin.hive.PartitionUpdate.UpdateMode; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.HivePageSinkMetadataProvider; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.SortingColumn; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.orc.OrcFileWriterFactory; -import io.prestosql.plugin.hive.util.HiveWriteUtils; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior; +import io.trino.plugin.hive.LocationService.WriteInfo; +import io.trino.plugin.hive.PartitionUpdate.UpdateMode; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.HivePageSinkMetadataProvider; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.SortingColumn; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.orc.OrcFileWriterFactory; +import io.trino.plugin.hive.util.HiveWriteUtils; +import io.trino.spi.NodeManager; +import io.trino.spi.Page; +import io.trino.spi.PageSorter; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; @@ -73,27 +73,27 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_PARTITION_READ_ONLY; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_PARTITION_SCHEMA_MISMATCH; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_PATH_ALREADY_EXISTS; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_TABLE_READ_ONLY; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_UNSUPPORTED_FORMAT; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_OPEN_ERROR; -import static io.prestosql.plugin.hive.HiveSessionProperties.getCompressionCodec; -import static io.prestosql.plugin.hive.HiveSessionProperties.getInsertExistingPartitionsBehavior; -import static io.prestosql.plugin.hive.HiveSessionProperties.getTemporaryStagingDirectoryPath; -import static io.prestosql.plugin.hive.HiveSessionProperties.getTimestampPrecision; -import static io.prestosql.plugin.hive.HiveSessionProperties.isTemporaryStagingDirectoryEnabled; -import static io.prestosql.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_EXISTING_DIRECTORY; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.getHiveSchema; -import static io.prestosql.plugin.hive.metastore.StorageFormat.fromHiveStorageFormat; -import static io.prestosql.plugin.hive.util.CompressionConfigUtil.configureCompression; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.toJobConf; -import static io.prestosql.plugin.hive.util.HiveUtil.getColumnNames; -import static io.prestosql.plugin.hive.util.HiveUtil.getColumnTypes; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.createPartitionValues; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_PARTITION_READ_ONLY; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_PARTITION_SCHEMA_MISMATCH; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_PATH_ALREADY_EXISTS; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_TABLE_READ_ONLY; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_UNSUPPORTED_FORMAT; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_OPEN_ERROR; +import static io.trino.plugin.hive.HiveSessionProperties.getCompressionCodec; +import static io.trino.plugin.hive.HiveSessionProperties.getInsertExistingPartitionsBehavior; +import static io.trino.plugin.hive.HiveSessionProperties.getTemporaryStagingDirectoryPath; +import static io.trino.plugin.hive.HiveSessionProperties.getTimestampPrecision; +import static io.trino.plugin.hive.HiveSessionProperties.isTemporaryStagingDirectoryEnabled; +import static io.trino.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_EXISTING_DIRECTORY; +import static io.trino.plugin.hive.metastore.MetastoreUtil.getHiveSchema; +import static io.trino.plugin.hive.metastore.StorageFormat.fromHiveStorageFormat; +import static io.trino.plugin.hive.util.CompressionConfigUtil.configureCompression; +import static io.trino.plugin.hive.util.ConfigurationUtils.toJobConf; +import static io.trino.plugin.hive.util.HiveUtil.getColumnNames; +import static io.trino.plugin.hive.util.HiveUtil.getColumnTypes; +import static io.trino.plugin.hive.util.HiveWriteUtils.createPartitionValues; import static java.lang.Math.min; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWrittenPartitions.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWrittenPartitions.java index 524c642955e4..6028a359cdf4 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWrittenPartitions.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveWrittenPartitions.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputMetadata; import java.util.List; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/InternalHiveConnectorFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/InternalHiveConnectorFactory.java index d0f2b217ac91..9cfaf53e86a9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/InternalHiveConnectorFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/InternalHiveConnectorFactory.java @@ -21,42 +21,42 @@ import io.airlift.bootstrap.LifeCycleManager; import io.airlift.event.client.EventModule; import io.airlift.json.JsonModule; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorAccessControl; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorPageSinkProvider; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorPageSourceProvider; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorSplitManager; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeEventListener; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeNodePartitioningProvider; -import io.prestosql.plugin.base.jmx.ConnectorObjectNameGeneratorModule; -import io.prestosql.plugin.base.jmx.MBeanServerModule; -import io.prestosql.plugin.hive.authentication.HiveAuthenticationModule; -import io.prestosql.plugin.hive.azure.HiveAzureModule; -import io.prestosql.plugin.hive.gcs.HiveGcsModule; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HiveMetastoreModule; -import io.prestosql.plugin.hive.procedure.HiveProcedureModule; -import io.prestosql.plugin.hive.rubix.RubixEnabledConfig; -import io.prestosql.plugin.hive.rubix.RubixModule; -import io.prestosql.plugin.hive.s3.HiveS3Module; -import io.prestosql.plugin.hive.security.HiveSecurityModule; -import io.prestosql.plugin.hive.security.SystemTableAwareAccessControl; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.VersionEmbedder; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorAccessControl; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorPageSinkProvider; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorPageSourceProvider; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorSplitManager; +import io.trino.plugin.base.classloader.ClassLoaderSafeEventListener; +import io.trino.plugin.base.classloader.ClassLoaderSafeNodePartitioningProvider; +import io.trino.plugin.base.jmx.ConnectorObjectNameGeneratorModule; +import io.trino.plugin.base.jmx.MBeanServerModule; +import io.trino.plugin.hive.authentication.HiveAuthenticationModule; +import io.trino.plugin.hive.azure.HiveAzureModule; +import io.trino.plugin.hive.gcs.HiveGcsModule; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HiveMetastoreModule; +import io.trino.plugin.hive.procedure.HiveProcedureModule; +import io.trino.plugin.hive.rubix.RubixEnabledConfig; +import io.trino.plugin.hive.rubix.RubixModule; +import io.trino.plugin.hive.s3.HiveS3Module; +import io.trino.plugin.hive.security.HiveSecurityModule; +import io.trino.plugin.hive.security.SystemTableAwareAccessControl; +import io.trino.spi.NodeManager; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.PageSorter; +import io.trino.spi.VersionEmbedder; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.type.TypeManager; import org.weakref.jmx.guice.MBeanModule; import java.util.Map; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/InternalHiveSplit.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/InternalHiveSplit.java index c43096c59d25..af4aa4509630 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/InternalHiveSplit.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/InternalHiveSplit.java @@ -14,9 +14,9 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.HiveSplit.BucketConversion; -import io.prestosql.plugin.hive.HiveSplit.BucketValidation; -import io.prestosql.spi.HostAddress; +import io.trino.plugin.hive.HiveSplit.BucketConversion; +import io.trino.plugin.hive.HiveSplit.BucketValidation; +import io.trino.spi.HostAddress; import org.openjdk.jol.info.ClassLayout; import javax.annotation.concurrent.NotThreadSafe; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/IonSqlQueryBuilder.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/IonSqlQueryBuilder.java index 927beeafd8e4..6c7a89ec85b4 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/IonSqlQueryBuilder.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/IonSqlQueryBuilder.java @@ -18,14 +18,14 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.VarcharType; import org.joda.time.format.DateTimeFormatter; import java.util.ArrayList; @@ -34,12 +34,12 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/LegacyHiveViewReader.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/LegacyHiveViewReader.java index 0fa25c40b9f7..e69079654dd9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/LegacyHiveViewReader.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/LegacyHiveViewReader.java @@ -13,18 +13,18 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.type.TypeId; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.type.TypeId; import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.plugin.hive.HiveMetadata.TABLE_COMMENT; -import static io.prestosql.plugin.hive.HiveQlToPrestoTranslator.translateHiveViewToPresto; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.HiveMetadata.TABLE_COMMENT; +import static io.trino.plugin.hive.HiveQlToPrestoTranslator.translateHiveViewToPresto; public class LegacyHiveViewReader implements ViewReaderUtil.ViewReader diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/LocationService.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/LocationService.java index 60609e82c0b7..74e4e6a7f2f8 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/LocationService.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/LocationService.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.connector.ConnectorSession; import org.apache.hadoop.fs.Path; import java.util.Optional; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionNotFoundException.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionNotFoundException.java index 45e44433b523..8b29d65f857c 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionNotFoundException.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionNotFoundException.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.connector.NotFoundException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.NotFoundException; +import io.trino.spi.connector.SchemaTableName; import java.util.List; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionOfflineException.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionOfflineException.java index 2788942d3758..5bf77db4d2df 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionOfflineException.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionOfflineException.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; import static com.google.common.base.Strings.isNullOrEmpty; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_PARTITION_OFFLINE; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_PARTITION_OFFLINE; import static java.util.Objects.requireNonNull; public class PartitionOfflineException diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionStatistics.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionStatistics.java index 173edaca5713..d061e0039d53 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionStatistics.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionStatistics.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; import javax.annotation.concurrent.Immutable; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionUpdate.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionUpdate.java index 85f1d0c4599e..c588c9e69f2c 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionUpdate.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/PartitionUpdate.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.Multimaps; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import org.apache.hadoop.fs.Path; import java.util.Collection; @@ -25,7 +25,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CONCURRENT_MODIFICATION_DETECTED; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CONCURRENT_MODIFICATION_DETECTED; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RcFileFileWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RcFileFileWriter.java index 98224bbe5dc4..8365603cf70c 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RcFileFileWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RcFileFileWriter.java @@ -16,17 +16,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.CountingOutputStream; import io.airlift.slice.OutputStreamSliceOutput; -import io.prestosql.rcfile.AircompressorCodecFactory; -import io.prestosql.rcfile.HadoopCodecFactory; -import io.prestosql.rcfile.RcFileDataSource; -import io.prestosql.rcfile.RcFileEncoding; -import io.prestosql.rcfile.RcFileWriter; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.Type; +import io.trino.rcfile.AircompressorCodecFactory; +import io.trino.rcfile.HadoopCodecFactory; +import io.trino.rcfile.RcFileDataSource; +import io.trino.rcfile.RcFileEncoding; +import io.trino.rcfile.RcFileWriter; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -41,9 +41,9 @@ import java.util.function.Supplier; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITE_VALIDATION_FAILED; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITE_VALIDATION_FAILED; import static java.util.Objects.requireNonNull; public class RcFileFileWriter diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RcFileFileWriterFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RcFileFileWriterFactory.java index 254e26dedf31..e271b4305f39 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RcFileFileWriterFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RcFileFileWriterFactory.java @@ -14,16 +14,16 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.rcfile.HdfsRcFileDataSource; -import io.prestosql.rcfile.RcFileDataSource; -import io.prestosql.rcfile.RcFileEncoding; -import io.prestosql.rcfile.binary.BinaryRcFileEncoding; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.rcfile.HdfsRcFileDataSource; +import io.trino.rcfile.RcFileDataSource; +import io.trino.rcfile.RcFileEncoding; +import io.trino.rcfile.binary.BinaryRcFileEncoding; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.ql.io.RCFileOutputFormat; @@ -44,15 +44,15 @@ import java.util.concurrent.Callable; import java.util.function.Supplier; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_OPEN_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITE_VALIDATION_FAILED; -import static io.prestosql.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; -import static io.prestosql.plugin.hive.HiveMetadata.PRESTO_VERSION_NAME; -import static io.prestosql.plugin.hive.HiveSessionProperties.getTimestampPrecision; -import static io.prestosql.plugin.hive.HiveSessionProperties.isRcfileOptimizedWriterValidate; -import static io.prestosql.plugin.hive.rcfile.RcFilePageSourceFactory.createTextVectorEncoding; -import static io.prestosql.plugin.hive.util.HiveUtil.getColumnNames; -import static io.prestosql.plugin.hive.util.HiveUtil.getColumnTypes; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_OPEN_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITE_VALIDATION_FAILED; +import static io.trino.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; +import static io.trino.plugin.hive.HiveMetadata.PRESTO_VERSION_NAME; +import static io.trino.plugin.hive.HiveSessionProperties.getTimestampPrecision; +import static io.trino.plugin.hive.HiveSessionProperties.isRcfileOptimizedWriterValidate; +import static io.trino.plugin.hive.rcfile.RcFilePageSourceFactory.createTextVectorEncoding; +import static io.trino.plugin.hive.util.HiveUtil.getColumnNames; +import static io.trino.plugin.hive.util.HiveUtil.getColumnTypes; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderColumns.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderColumns.java index ed06e13e4bf5..ad9cd86435bc 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderColumns.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderColumns.java @@ -14,7 +14,7 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnHandle; import java.util.List; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderPageSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderPageSource.java index 228b62e22798..a22387c4f08d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderPageSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderPageSource.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSource; import java.util.Optional; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderProjectionsAdapter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderProjectionsAdapter.java index e7be608d1a12..4bc4462332b4 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderProjectionsAdapter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderProjectionsAdapter.java @@ -15,21 +15,21 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ColumnarRow; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.block.LazyBlockLoader; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ColumnarRow; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.block.LazyBlockLoader; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.type.Type; import java.util.List; 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.prestosql.spi.block.ColumnarRow.toColumnarRow; +import static io.trino.spi.block.ColumnarRow.toColumnarRow; import static java.util.Objects.requireNonNull; public class ReaderProjectionsAdapter diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RecordFileWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RecordFileWriter.java index c563023b8668..86e80f5a3b80 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RecordFileWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RecordFileWriter.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.parquet.ParquetRecordWriter; -import io.prestosql.plugin.hive.util.FieldSetterFactory; -import io.prestosql.plugin.hive.util.FieldSetterFactory.FieldSetter; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.parquet.ParquetRecordWriter; +import io.trino.plugin.hive.util.FieldSetterFactory; +import io.trino.plugin.hive.util.FieldSetterFactory.FieldSetter; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter; import org.apache.hadoop.hive.serde2.SerDeException; @@ -43,14 +43,14 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; -import static io.prestosql.plugin.hive.HiveSessionProperties.getTimestampPrecision; -import static io.prestosql.plugin.hive.util.HiveUtil.getColumnNames; -import static io.prestosql.plugin.hive.util.HiveUtil.getColumnTypes; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.createRecordWriter; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.getRowColumnInspectors; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.initializeSerializer; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; +import static io.trino.plugin.hive.HiveSessionProperties.getTimestampPrecision; +import static io.trino.plugin.hive.util.HiveUtil.getColumnNames; +import static io.trino.plugin.hive.util.HiveUtil.getColumnTypes; +import static io.trino.plugin.hive.util.HiveWriteUtils.createRecordWriter; +import static io.trino.plugin.hive.util.HiveWriteUtils.getRowColumnInspectors; +import static io.trino.plugin.hive.util.HiveWriteUtils.initializeSerializer; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; import static org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory.getStandardStructObjectInspector; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RoleAlreadyExistsException.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RoleAlreadyExistsException.java index bee5a4d27250..534ad75eeea5 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RoleAlreadyExistsException.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/RoleAlreadyExistsException.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; import static java.lang.String.format; public class RoleAlreadyExistsException diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/SchemaAlreadyExistsException.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/SchemaAlreadyExistsException.java index 925593a7f51a..84f5e6e58dae 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/SchemaAlreadyExistsException.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/SchemaAlreadyExistsException.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; import static java.lang.String.format; public class SchemaAlreadyExistsException diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/SortingFileWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/SortingFileWriter.java index 30abff0dc971..fb969356f469 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/SortingFileWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/SortingFileWriter.java @@ -17,21 +17,21 @@ import com.google.common.io.Closer; import io.airlift.log.Logger; import io.airlift.units.DataSize; -import io.prestosql.orc.OrcDataSink; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.plugin.hive.orc.HdfsOrcDataSource; -import io.prestosql.plugin.hive.util.MergingPageIterator; -import io.prestosql.plugin.hive.util.SortBuffer; -import io.prestosql.plugin.hive.util.TempFileReader; -import io.prestosql.plugin.hive.util.TempFileWriter; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.orc.OrcDataSink; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.hive.orc.HdfsOrcDataSource; +import io.trino.plugin.hive.util.MergingPageIterator; +import io.trino.plugin.hive.util.SortBuffer; +import io.trino.plugin.hive.util.TempFileReader; +import io.trino.plugin.hive.util.TempFileWriter; +import io.trino.spi.Page; +import io.trino.spi.PageSorter; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.openjdk.jol.info.ClassLayout; @@ -52,8 +52,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; import static java.lang.Math.min; import static java.util.Comparator.comparing; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TableAlreadyExistsException.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TableAlreadyExistsException.java index add14cc26ef7..282342bec99f 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TableAlreadyExistsException.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TableAlreadyExistsException.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; import static java.lang.String.format; public class TableAlreadyExistsException diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TableOfflineException.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TableOfflineException.java index 98d40c194061..7979b0272080 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TableOfflineException.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TableOfflineException.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; import static com.google.common.base.Strings.isNullOrEmpty; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_TABLE_OFFLINE; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_TABLE_OFFLINE; import static java.util.Objects.requireNonNull; public class TableOfflineException diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TransactionalMetadata.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TransactionalMetadata.java index 2767663c37bd..27771e2a149e 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TransactionalMetadata.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TransactionalMetadata.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorMetadata; public interface TransactionalMetadata extends ConnectorMetadata diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ViewAlreadyExistsException.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ViewAlreadyExistsException.java index 9c9d9cfc1ad6..558bb79699d8 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ViewAlreadyExistsException.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ViewAlreadyExistsException.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; import static java.lang.String.format; public class ViewAlreadyExistsException diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ViewReaderUtil.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ViewReaderUtil.java index 2b665a4c0cf8..e3a4cdf7d244 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ViewReaderUtil.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/ViewReaderUtil.java @@ -19,17 +19,17 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.CoralSemiTransactionalHiveMSCAdapter; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorMaterializedViewDefinition; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.ConnectorViewDefinition.ViewColumn; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.CoralSemiTransactionalHiveMSCAdapter; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorMaterializedViewDefinition; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.ConnectorViewDefinition.ViewColumn; +import io.trino.spi.type.TypeManager; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.type.RelDataType; import org.apache.hadoop.hive.metastore.TableType; @@ -41,11 +41,11 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_VIEW_DATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_VIEW_TRANSLATION_ERROR; -import static io.prestosql.plugin.hive.HiveMetadata.TABLE_COMMENT; -import static io.prestosql.plugin.hive.HiveSessionProperties.isLegacyHiveViewTranslation; -import static io.prestosql.plugin.hive.util.HiveUtil.checkCondition; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_VIEW_DATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_VIEW_TRANSLATION_ERROR; +import static io.trino.plugin.hive.HiveMetadata.TABLE_COMMENT; +import static io.trino.plugin.hive.HiveSessionProperties.isLegacyHiveViewTranslation; +import static io.trino.plugin.hive.util.HiveUtil.checkCondition; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.joining; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/acid/AcidOperation.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/acid/AcidOperation.java index 3b4f358a1dec..eb3e9356db80 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/acid/AcidOperation.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/acid/AcidOperation.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive.acid; -import io.prestosql.orc.OrcWriter.OrcOperation; +import io.trino.orc.OrcWriter.OrcOperation; import org.apache.hadoop.hive.metastore.api.DataOperationType; public enum AcidOperation diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/acid/AcidSchema.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/acid/AcidSchema.java index 3227b3ac823d..8144fbccbe81 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/acid/AcidSchema.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/acid/AcidSchema.java @@ -14,10 +14,10 @@ package io.trino.plugin.hive.acid; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.HiveTypeName; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.HiveTypeName; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; import org.apache.hadoop.hive.ql.io.IOConstants; import java.util.List; @@ -25,11 +25,11 @@ import java.util.Properties; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.HIVE_LONG; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RowType.field; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.HIVE_LONG; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RowType.field; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.joining; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/acid/AcidTransaction.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/acid/AcidTransaction.java index 62b302239070..31fcc8ad6d15 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/acid/AcidTransaction.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/acid/AcidTransaction.java @@ -16,14 +16,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.orc.OrcWriter.OrcOperation; +import io.trino.orc.OrcWriter.OrcOperation; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.hive.acid.AcidOperation.CREATE_TABLE; -import static io.prestosql.plugin.hive.acid.AcidOperation.DELETE; -import static io.prestosql.plugin.hive.acid.AcidOperation.INSERT; -import static io.prestosql.plugin.hive.acid.AcidOperation.NONE; +import static io.trino.plugin.hive.acid.AcidOperation.CREATE_TABLE; +import static io.trino.plugin.hive.acid.AcidOperation.DELETE; +import static io.trino.plugin.hive.acid.AcidOperation.INSERT; +import static io.trino.plugin.hive.acid.AcidOperation.NONE; import static java.util.Objects.requireNonNull; public class AcidTransaction diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/AuthenticationModules.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/AuthenticationModules.java index 01000efd32fc..23f9541858a2 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/AuthenticationModules.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/AuthenticationModules.java @@ -17,15 +17,15 @@ import com.google.inject.Module; import com.google.inject.Provides; import com.google.inject.Singleton; -import io.prestosql.plugin.base.authentication.KerberosAuthentication; -import io.prestosql.plugin.hive.ForHdfs; -import io.prestosql.plugin.hive.HdfsConfigurationInitializer; +import io.trino.plugin.base.authentication.KerberosAuthentication; +import io.trino.plugin.hive.ForHdfs; +import io.trino.plugin.hive.HdfsConfigurationInitializer; import javax.inject.Inject; import static com.google.inject.Scopes.SINGLETON; import static io.airlift.configuration.ConfigBinder.configBinder; -import static io.prestosql.plugin.hive.authentication.KerberosHadoopAuthentication.createKerberosHadoopAuthentication; +import static io.trino.plugin.hive.authentication.KerberosHadoopAuthentication.createKerberosHadoopAuthentication; public final class AuthenticationModules { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/CachingKerberosHadoopAuthentication.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/CachingKerberosHadoopAuthentication.java index 1035c3072d5e..cba2b0bade6d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/CachingKerberosHadoopAuthentication.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/CachingKerberosHadoopAuthentication.java @@ -20,8 +20,8 @@ import javax.security.auth.kerberos.KerberosTicket; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.base.authentication.KerberosTicketUtils.getRefreshTime; -import static io.prestosql.plugin.base.authentication.KerberosTicketUtils.getTicketGrantingTicket; +import static io.trino.plugin.base.authentication.KerberosTicketUtils.getRefreshTime; +import static io.trino.plugin.base.authentication.KerberosTicketUtils.getTicketGrantingTicket; import static java.util.Objects.requireNonNull; import static org.apache.hadoop.security.UserGroupInformationShim.getSubject; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/DirectHdfsAuthentication.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/DirectHdfsAuthentication.java index 86e29b34dfe3..a91348899c41 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/DirectHdfsAuthentication.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/DirectHdfsAuthentication.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.hive.authentication; -import io.prestosql.plugin.hive.ForHdfs; +import io.trino.plugin.hive.ForHdfs; import javax.inject.Inject; -import static io.prestosql.plugin.hive.authentication.UserGroupInformationUtils.executeActionInDoAs; +import static io.trino.plugin.hive.authentication.UserGroupInformationUtils.executeActionInDoAs; import static java.util.Objects.requireNonNull; public class DirectHdfsAuthentication diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/HiveAuthenticationModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/HiveAuthenticationModule.java index fe6422619f05..a6fa4027bc9d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/HiveAuthenticationModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/HiveAuthenticationModule.java @@ -16,15 +16,15 @@ import com.google.inject.Binder; import com.google.inject.Module; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.hive.authentication.HiveAuthenticationConfig.HdfsAuthenticationType; +import io.trino.plugin.hive.authentication.HiveAuthenticationConfig.HdfsAuthenticationType; import java.util.function.Predicate; import static io.airlift.configuration.ConditionalModule.installModuleIf; -import static io.prestosql.plugin.hive.authentication.AuthenticationModules.kerberosHdfsAuthenticationModule; -import static io.prestosql.plugin.hive.authentication.AuthenticationModules.kerberosImpersonatingHdfsAuthenticationModule; -import static io.prestosql.plugin.hive.authentication.AuthenticationModules.noHdfsAuthenticationModule; -import static io.prestosql.plugin.hive.authentication.AuthenticationModules.simpleImpersonatingHdfsAuthenticationModule; +import static io.trino.plugin.hive.authentication.AuthenticationModules.kerberosHdfsAuthenticationModule; +import static io.trino.plugin.hive.authentication.AuthenticationModules.kerberosImpersonatingHdfsAuthenticationModule; +import static io.trino.plugin.hive.authentication.AuthenticationModules.noHdfsAuthenticationModule; +import static io.trino.plugin.hive.authentication.AuthenticationModules.simpleImpersonatingHdfsAuthenticationModule; public class HiveAuthenticationModule extends AbstractConfigurationAwareModule diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/HiveIdentity.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/HiveIdentity.java index 79a3ece522dc..5cc0c78a4c58 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/HiveIdentity.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/HiveIdentity.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.hive.authentication; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.security.ConnectorIdentity; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.security.ConnectorIdentity; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/ImpersonatingHdfsAuthentication.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/ImpersonatingHdfsAuthentication.java index d119a8a929ab..df58403256c7 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/ImpersonatingHdfsAuthentication.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/ImpersonatingHdfsAuthentication.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.hive.authentication; -import io.prestosql.plugin.hive.ForHdfs; +import io.trino.plugin.hive.ForHdfs; import org.apache.hadoop.security.UserGroupInformation; import javax.inject.Inject; -import static io.prestosql.plugin.hive.authentication.UserGroupInformationUtils.executeActionInDoAs; +import static io.trino.plugin.hive.authentication.UserGroupInformationUtils.executeActionInDoAs; import static java.util.Objects.requireNonNull; public class ImpersonatingHdfsAuthentication diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/KerberosHadoopAuthentication.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/KerberosHadoopAuthentication.java index d55058697ca0..13e03c794cd2 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/KerberosHadoopAuthentication.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/KerberosHadoopAuthentication.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.hive.authentication; -import io.prestosql.plugin.base.authentication.KerberosAuthentication; -import io.prestosql.plugin.hive.HdfsConfigurationInitializer; import io.trino.hadoop.HadoopNative; +import io.trino.plugin.base.authentication.KerberosAuthentication; +import io.trino.plugin.hive.HdfsConfigurationInitializer; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.security.UserGroupInformation; import javax.security.auth.Subject; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.getInitialConfiguration; +import static io.trino.plugin.hive.util.ConfigurationUtils.getInitialConfiguration; import static java.util.Objects.requireNonNull; import static org.apache.hadoop.security.UserGroupInformationShim.createUserGroupInformationForSubject; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/avro/AvroRecordWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/avro/AvroRecordWriter.java index e3e9be0add6d..e62be19b2d9e 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/avro/AvroRecordWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/avro/AvroRecordWriter.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive.avro; -import io.prestosql.plugin.hive.RecordFileWriter.ExtendedRecordWriter; +import io.trino.plugin.hive.RecordFileWriter.ExtendedRecordWriter; import org.apache.avro.Schema; import org.apache.avro.file.CodecFactory; import org.apache.avro.file.DataFileWriter; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/azure/HiveAzureModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/azure/HiveAzureModule.java index db475521c042..5c463f381ff2 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/azure/HiveAzureModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/azure/HiveAzureModule.java @@ -16,7 +16,7 @@ import com.google.inject.Binder; import com.google.inject.Scopes; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.hive.ConfigurationInitializer; +import io.trino.plugin.hive.ConfigurationInitializer; import static com.google.inject.multibindings.Multibinder.newSetBinder; import static io.airlift.configuration.ConfigBinder.configBinder; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/azure/PrestoAzureConfigurationInitializer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/azure/PrestoAzureConfigurationInitializer.java index ccec23880a76..76e81493e6d1 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/azure/PrestoAzureConfigurationInitializer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/azure/PrestoAzureConfigurationInitializer.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive.azure; -import io.prestosql.plugin.hive.ConfigurationInitializer; +import io.trino.plugin.hive.ConfigurationInitializer; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.adl.AdlFileSystem; import org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/DecimalCoercers.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/DecimalCoercers.java index d44a0e2a4ac7..40068d20504d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/DecimalCoercers.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/DecimalCoercers.java @@ -15,29 +15,29 @@ package io.trino.plugin.hive.coercions; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.RealType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.RealType; import java.util.function.Function; -import static io.prestosql.spi.type.DecimalConversions.doubleToLongDecimal; -import static io.prestosql.spi.type.DecimalConversions.doubleToShortDecimal; -import static io.prestosql.spi.type.DecimalConversions.longDecimalToDouble; -import static io.prestosql.spi.type.DecimalConversions.longDecimalToReal; -import static io.prestosql.spi.type.DecimalConversions.longToLongCast; -import static io.prestosql.spi.type.DecimalConversions.longToShortCast; -import static io.prestosql.spi.type.DecimalConversions.realToLongDecimal; -import static io.prestosql.spi.type.DecimalConversions.realToShortDecimal; -import static io.prestosql.spi.type.DecimalConversions.shortDecimalToDouble; -import static io.prestosql.spi.type.DecimalConversions.shortDecimalToReal; -import static io.prestosql.spi.type.DecimalConversions.shortToLongCast; -import static io.prestosql.spi.type.DecimalConversions.shortToShortCast; -import static io.prestosql.spi.type.Decimals.longTenToNth; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.DecimalConversions.doubleToLongDecimal; +import static io.trino.spi.type.DecimalConversions.doubleToShortDecimal; +import static io.trino.spi.type.DecimalConversions.longDecimalToDouble; +import static io.trino.spi.type.DecimalConversions.longDecimalToReal; +import static io.trino.spi.type.DecimalConversions.longToLongCast; +import static io.trino.spi.type.DecimalConversions.longToShortCast; +import static io.trino.spi.type.DecimalConversions.realToLongDecimal; +import static io.trino.spi.type.DecimalConversions.realToShortDecimal; +import static io.trino.spi.type.DecimalConversions.shortDecimalToDouble; +import static io.trino.spi.type.DecimalConversions.shortDecimalToReal; +import static io.trino.spi.type.DecimalConversions.shortToLongCast; +import static io.trino.spi.type.DecimalConversions.shortToShortCast; +import static io.trino.spi.type.Decimals.longTenToNth; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; public final class DecimalCoercers { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/DoubleToFloatCoercer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/DoubleToFloatCoercer.java index a3ce734ce1aa..6bd0d612bf4c 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/DoubleToFloatCoercer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/DoubleToFloatCoercer.java @@ -14,13 +14,13 @@ package io.trino.plugin.hive.coercions; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.RealType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.RealType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.floatToRawIntBits; public class DoubleToFloatCoercer diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/FloatToDoubleCoercer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/FloatToDoubleCoercer.java index c00b7fc40d4f..6920b00d53ad 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/FloatToDoubleCoercer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/FloatToDoubleCoercer.java @@ -14,13 +14,13 @@ package io.trino.plugin.hive.coercions; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.RealType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.RealType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.intBitsToFloat; public class FloatToDoubleCoercer diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/IntegerNumberToVarcharCoercer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/IntegerNumberToVarcharCoercer.java index a8aae0e5c30d..bbf12c0325dc 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/IntegerNumberToVarcharCoercer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/IntegerNumberToVarcharCoercer.java @@ -14,10 +14,10 @@ package io.trino.plugin.hive.coercions; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import static io.airlift.slice.Slices.utf8Slice; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/IntegerNumberUpscaleCoercer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/IntegerNumberUpscaleCoercer.java index ed422b56292e..90dfade5a084 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/IntegerNumberUpscaleCoercer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/IntegerNumberUpscaleCoercer.java @@ -14,9 +14,9 @@ package io.trino.plugin.hive.coercions; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; public class IntegerNumberUpscaleCoercer extends TypeCoercer diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/TypeCoercer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/TypeCoercer.java index 301195f149d9..d46abf730103 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/TypeCoercer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/TypeCoercer.java @@ -14,9 +14,9 @@ package io.trino.plugin.hive.coercions; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.function.Function; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/VarcharCoercer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/VarcharCoercer.java index e46eac7d3a24..9ce92ce7c1fe 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/VarcharCoercer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/VarcharCoercer.java @@ -14,13 +14,13 @@ package io.trino.plugin.hive.coercions; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.VarcharType; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.HivePageSource.narrowerThan; -import static io.prestosql.spi.type.Varchars.truncateToLength; +import static io.trino.plugin.hive.HivePageSource.narrowerThan; +import static io.trino.spi.type.Varchars.truncateToLength; public class VarcharCoercer extends TypeCoercer diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/VarcharToIntegerNumberCoercer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/VarcharToIntegerNumberCoercer.java index 73b5022e9e96..7dedc7f17606 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/VarcharToIntegerNumberCoercer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/coercions/VarcharToIntegerNumberCoercer.java @@ -14,17 +14,17 @@ package io.trino.plugin.hive.coercions; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.String.format; public class VarcharToIntegerNumberCoercer diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/gcs/GcsConfigurationProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/gcs/GcsConfigurationProvider.java index 0573c4c11c22..4a48865477b2 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/gcs/GcsConfigurationProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/gcs/GcsConfigurationProvider.java @@ -14,14 +14,14 @@ package io.trino.plugin.hive.gcs; import com.google.cloud.hadoop.gcsio.GoogleCloudStorageFileSystem; -import io.prestosql.plugin.hive.DynamicConfigurationProvider; +import io.trino.plugin.hive.DynamicConfigurationProvider; import org.apache.hadoop.conf.Configuration; import java.net.URI; -import static io.prestosql.plugin.hive.DynamicConfigurationProvider.setCacheKey; -import static io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import static io.prestosql.plugin.hive.gcs.GcsAccessTokenProvider.GCS_ACCESS_TOKEN_CONF; +import static io.trino.plugin.hive.DynamicConfigurationProvider.setCacheKey; +import static io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import static io.trino.plugin.hive.gcs.GcsAccessTokenProvider.GCS_ACCESS_TOKEN_CONF; public class GcsConfigurationProvider implements DynamicConfigurationProvider diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/gcs/GoogleGcsConfigurationInitializer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/gcs/GoogleGcsConfigurationInitializer.java index 4801d1217bf0..3690d3260cf2 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/gcs/GoogleGcsConfigurationInitializer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/gcs/GoogleGcsConfigurationInitializer.java @@ -14,7 +14,7 @@ package io.trino.plugin.hive.gcs; import com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem; -import io.prestosql.plugin.hive.ConfigurationInitializer; +import io.trino.plugin.hive.ConfigurationInitializer; import org.apache.hadoop.conf.Configuration; import javax.inject.Inject; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/gcs/HiveGcsModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/gcs/HiveGcsModule.java index 071a3e46ed9b..b10867248875 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/gcs/HiveGcsModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/gcs/HiveGcsModule.java @@ -16,9 +16,9 @@ import com.google.inject.Binder; import com.google.inject.Scopes; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.hive.ConfigurationInitializer; -import io.prestosql.plugin.hive.DynamicConfigurationProvider; -import io.prestosql.plugin.hive.rubix.RubixEnabledConfig; +import io.trino.plugin.hive.ConfigurationInitializer; +import io.trino.plugin.hive.DynamicConfigurationProvider; +import io.trino.plugin.hive.rubix.RubixEnabledConfig; import static com.google.common.base.Preconditions.checkArgument; import static com.google.inject.multibindings.Multibinder.newSetBinder; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Column.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Column.java index 87f6e9553620..6ada463d6c57 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Column.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Column.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.plugin.hive.HiveType; +import io.trino.plugin.hive.HiveType; import javax.annotation.concurrent.Immutable; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/CoralSemiTransactionalHiveMSCAdapter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/CoralSemiTransactionalHiveMSCAdapter.java index 03d236b8c261..eda121e324a1 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/CoralSemiTransactionalHiveMSCAdapter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/CoralSemiTransactionalHiveMSCAdapter.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableMultimap; import com.linkedin.coral.hive.hive2rel.HiveMetastoreClient; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil; import org.apache.hadoop.hive.metastore.api.Database; import java.util.List; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Database.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Database.java index a97af163d3b1..c79b74a1a3e6 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Database.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Database.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.security.PrincipalType; +import io.trino.spi.security.PrincipalType; import javax.annotation.concurrent.Immutable; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastore.java index 7d17ab594a28..307db22efe7f 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastore.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.hive.metastore; -import io.prestosql.plugin.hive.HivePartition; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.acid.AcidOperation; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HivePartition; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.acid.AcidOperation; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import org.apache.hadoop.hive.metastore.api.DataOperationType; import java.util.List; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastoreModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastoreModule.java index 5ae599165907..56060c821371 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastoreModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastoreModule.java @@ -16,12 +16,12 @@ import com.google.inject.Binder; import com.google.inject.Module; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.hive.metastore.alluxio.AlluxioMetastoreModule; -import io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastoreModule; -import io.prestosql.plugin.hive.metastore.cache.ForCachingHiveMetastore; -import io.prestosql.plugin.hive.metastore.file.FileMetastoreModule; -import io.prestosql.plugin.hive.metastore.glue.GlueMetastoreModule; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreModule; +import io.trino.plugin.hive.metastore.alluxio.AlluxioMetastoreModule; +import io.trino.plugin.hive.metastore.cache.CachingHiveMetastoreModule; +import io.trino.plugin.hive.metastore.cache.ForCachingHiveMetastore; +import io.trino.plugin.hive.metastore.file.FileMetastoreModule; +import io.trino.plugin.hive.metastore.glue.GlueMetastoreModule; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreModule; import java.util.Optional; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePageSinkMetadata.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePageSinkMetadata.java index db1780bfc333..ac1549705e65 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePageSinkMetadata.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePageSinkMetadata.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import java.util.List; import java.util.Map; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePageSinkMetadataProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePageSinkMetadataProvider.java index 7d5d59272903..951a95a7c774 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePageSinkMetadataProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePageSinkMetadataProvider.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.hive.metastore; -import io.prestosql.plugin.hive.HiveMetastoreClosure; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.hive.HiveMetastoreClosure; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.spi.connector.SchemaTableName; import java.util.List; import java.util.Map; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePartitionName.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePartitionName.java index c84611becebb..1d5222d687ba 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePartitionName.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePartitionName.java @@ -24,7 +24,7 @@ import java.util.Optional; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.hive.util.HiveUtil.toPartitionValues; +import static io.trino.plugin.hive.util.HiveUtil.toPartitionValues; import static java.util.Objects.requireNonNull; @Immutable diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePrincipal.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePrincipal.java index abe1bbf9ee30..c900047eaa88 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePrincipal.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePrincipal.java @@ -15,10 +15,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.spi.security.SelectedRole; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.PrincipalType; +import io.trino.spi.security.SelectedRole; import java.util.Objects; import java.util.Set; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePrivilegeInfo.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePrivilegeInfo.java index 93839f0de29d..4000284d06ff 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePrivilegeInfo.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HivePrivilegeInfo.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.PrivilegeInfo; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.PrivilegeInfo; import javax.annotation.concurrent.Immutable; @@ -25,10 +25,10 @@ import java.util.Set; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.DELETE; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.INSERT; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.SELECT; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.UPDATE; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.DELETE; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.INSERT; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.SELECT; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.UPDATE; import static java.util.Objects.requireNonNull; @Immutable diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveTransaction.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveTransaction.java index e0535f15fd3c..6421898f71e3 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveTransaction.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveTransaction.java @@ -14,11 +14,11 @@ package io.trino.plugin.hive.metastore; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.HiveMetastoreClosure; -import io.prestosql.plugin.hive.HiveTableHandle; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.hive.HiveMetastoreClosure; +import io.trino.plugin.hive.HiveTableHandle; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.spi.connector.SchemaTableName; import org.apache.hadoop.hive.common.ValidTxnWriteIdList; import java.util.HashMap; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/MetastoreUtil.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/MetastoreUtil.java index da3d4661fd40..cf8a12e313f5 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/MetastoreUtil.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/MetastoreUtil.java @@ -18,29 +18,29 @@ import com.google.common.collect.ImmutableMultimap; import com.google.common.primitives.Longs; import io.airlift.slice.Slice; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.PartitionOfflineException; -import io.prestosql.plugin.hive.TableOfflineException; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.PartitionOfflineException; +import io.trino.plugin.hive.TableOfflineException; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.hive.common.FileUtils; import org.apache.hadoop.hive.metastore.ProtectMode; import org.joda.time.format.DateTimeFormatter; @@ -58,14 +58,14 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveMetadata.AVRO_SCHEMA_URL_KEY; -import static io.prestosql.plugin.hive.HiveSplitManager.PRESTO_OFFLINE; -import static io.prestosql.plugin.hive.HiveStorageFormat.AVRO; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.NUM_ROWS; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.predicate.TupleDomain.withColumnDomains; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.spi.type.Chars.padSpaces; +import static io.trino.plugin.hive.HiveMetadata.AVRO_SCHEMA_URL_KEY; +import static io.trino.plugin.hive.HiveSplitManager.PRESTO_OFFLINE; +import static io.trino.plugin.hive.HiveStorageFormat.AVRO; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.NUM_ROWS; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.predicate.TupleDomain.withColumnDomains; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.spi.type.Chars.padSpaces; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Partition.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Partition.java index a716305816f9..6e509b9759e1 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Partition.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Partition.java @@ -18,7 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import javax.annotation.concurrent.Immutable; @@ -28,7 +28,7 @@ import java.util.function.Consumer; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.adjustRowCount; +import static io.trino.plugin.hive.metastore.MetastoreUtil.adjustRowCount; import static java.util.Objects.requireNonNull; @Immutable diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/PartitionFilter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/PartitionFilter.java index 62dd0733df63..63535ef16090 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/PartitionFilter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/PartitionFilter.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.predicate.TupleDomain; import javax.annotation.concurrent.Immutable; @@ -23,7 +23,7 @@ import java.util.Objects; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.hive.metastore.HiveTableName.hiveTableName; +import static io.trino.plugin.hive.metastore.HiveTableName.hiveTableName; import static java.util.Objects.requireNonNull; @Immutable diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/PartitionWithStatistics.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/PartitionWithStatistics.java index aa058b366c1a..906b34639666 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/PartitionWithStatistics.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/PartitionWithStatistics.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.hive.metastore; -import io.prestosql.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.PartitionStatistics; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.util.HiveUtil.toPartitionValues; +import static io.trino.plugin.hive.util.HiveUtil.toPartitionValues; import static java.util.Objects.requireNonNull; public class PartitionWithStatistics diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/PrincipalPrivileges.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/PrincipalPrivileges.java index 9b7544da916d..8f8e161bbb7b 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/PrincipalPrivileges.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/PrincipalPrivileges.java @@ -20,8 +20,8 @@ import java.util.Set; import static com.google.common.collect.ImmutableListMultimap.toImmutableListMultimap; -import static io.prestosql.spi.security.PrincipalType.ROLE; -import static io.prestosql.spi.security.PrincipalType.USER; +import static io.trino.spi.security.PrincipalType.ROLE; +import static io.trino.spi.security.PrincipalType.USER; import static java.util.Objects.requireNonNull; import static java.util.function.Function.identity; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/RecordingHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/RecordingHiveMetastore.java index 4de148874355..ae1618d6c4b0 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/RecordingHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/RecordingHiveMetastore.java @@ -20,17 +20,17 @@ import com.google.common.cache.CacheBuilder; import io.airlift.json.JsonCodec; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.ForRecordingHiveMetastore; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.RecordingMetastoreConfig; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.ForRecordingHiveMetastore; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.RecordingMetastoreConfig; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.spi.PrestoException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import org.weakref.jmx.Managed; import javax.annotation.concurrent.Immutable; @@ -50,10 +50,10 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.hive.metastore.HivePartitionName.hivePartitionName; -import static io.prestosql.plugin.hive.metastore.HiveTableName.hiveTableName; -import static io.prestosql.plugin.hive.metastore.PartitionFilter.partitionFilter; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.plugin.hive.metastore.HivePartitionName.hivePartitionName; +import static io.trino.plugin.hive.metastore.HiveTableName.hiveTableName; +import static io.trino.plugin.hive.metastore.PartitionFilter.partitionFilter; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; import static java.nio.file.Files.readAllBytes; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/RecordingHiveMetastoreModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/RecordingHiveMetastoreModule.java index cb156f42c493..dbceb0b5be68 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/RecordingHiveMetastoreModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/RecordingHiveMetastoreModule.java @@ -18,13 +18,13 @@ import com.google.inject.Module; import com.google.inject.Scopes; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.hive.ForRecordingHiveMetastore; -import io.prestosql.plugin.hive.RecordingMetastoreConfig; -import io.prestosql.plugin.hive.metastore.cache.ForCachingHiveMetastore; -import io.prestosql.plugin.hive.util.BlockJsonSerde; -import io.prestosql.plugin.hive.util.HiveBlockEncodingSerde; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.procedure.Procedure; +import io.trino.plugin.hive.ForRecordingHiveMetastore; +import io.trino.plugin.hive.RecordingMetastoreConfig; +import io.trino.plugin.hive.metastore.cache.ForCachingHiveMetastore; +import io.trino.plugin.hive.util.BlockJsonSerde; +import io.trino.plugin.hive.util.HiveBlockEncodingSerde; +import io.trino.spi.block.Block; +import io.trino.spi.procedure.Procedure; import static com.google.inject.multibindings.Multibinder.newSetBinder; import static io.airlift.json.JsonBinder.jsonBinder; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/SemiTransactionalHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/SemiTransactionalHiveMetastore.java index 69542b6a2e9f..a5cb908834b3 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/SemiTransactionalHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/SemiTransactionalHiveMetastore.java @@ -23,29 +23,29 @@ import com.google.common.collect.Lists; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveBasicStatistics; -import io.prestosql.plugin.hive.HiveMetastoreClosure; -import io.prestosql.plugin.hive.HiveTableHandle; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.LocationHandle.WriteMode; -import io.prestosql.plugin.hive.PartitionAndStatementId; -import io.prestosql.plugin.hive.PartitionNotFoundException; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.TableAlreadyExistsException; -import io.prestosql.plugin.hive.acid.AcidOperation; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveBasicStatistics; +import io.trino.plugin.hive.HiveMetastoreClosure; +import io.trino.plugin.hive.HiveTableHandle; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.LocationHandle.WriteMode; +import io.trino.plugin.hive.PartitionAndStatementId; +import io.trino.plugin.hive.PartitionNotFoundException; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.TableAlreadyExistsException; +import io.trino.plugin.hive.acid.AcidOperation; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.PrincipalType; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; @@ -83,28 +83,28 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CORRUPTED_COLUMN_STATISTICS; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_METASTORE_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_PATH_ALREADY_EXISTS; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_TABLE_DROPPED_DURING_QUERY; -import static io.prestosql.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; -import static io.prestosql.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_NEW_DIRECTORY; -import static io.prestosql.plugin.hive.ViewReaderUtil.isPrestoView; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.OWNERSHIP; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.buildInitialPrivilegeSet; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.NUM_ROWS; -import static io.prestosql.plugin.hive.util.HiveUtil.toPartitionValues; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.createDirectory; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.pathExists; -import static io.prestosql.plugin.hive.util.Statistics.ReduceOperator.SUBTRACT; -import static io.prestosql.plugin.hive.util.Statistics.merge; -import static io.prestosql.plugin.hive.util.Statistics.reduce; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TRANSACTION_CONFLICT; -import static io.prestosql.spi.security.PrincipalType.USER; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CORRUPTED_COLUMN_STATISTICS; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_METASTORE_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_PATH_ALREADY_EXISTS; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_TABLE_DROPPED_DURING_QUERY; +import static io.trino.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; +import static io.trino.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_NEW_DIRECTORY; +import static io.trino.plugin.hive.ViewReaderUtil.isPrestoView; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.OWNERSHIP; +import static io.trino.plugin.hive.metastore.MetastoreUtil.buildInitialPrivilegeSet; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.NUM_ROWS; +import static io.trino.plugin.hive.util.HiveUtil.toPartitionValues; +import static io.trino.plugin.hive.util.HiveWriteUtils.createDirectory; +import static io.trino.plugin.hive.util.HiveWriteUtils.pathExists; +import static io.trino.plugin.hive.util.Statistics.ReduceOperator.SUBTRACT; +import static io.trino.plugin.hive.util.Statistics.merge; +import static io.trino.plugin.hive.util.Statistics.reduce; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TRANSACTION_CONFLICT; +import static io.trino.spi.security.PrincipalType.USER; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/SortingColumn.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/SortingColumn.java index 72da80f1db88..658a9822b5e5 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/SortingColumn.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/SortingColumn.java @@ -15,17 +15,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SortOrder; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SortOrder; import javax.annotation.concurrent.Immutable; import java.util.Objects; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.connector.SortOrder.DESC_NULLS_LAST; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.connector.SortOrder.DESC_NULLS_LAST; import static java.util.Objects.requireNonNull; @Immutable diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Storage.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Storage.java index ae21fe56d97e..b575e2f0790d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Storage.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Storage.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.HiveBucketProperty; import javax.annotation.concurrent.Immutable; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/StorageFormat.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/StorageFormat.java index d074a2cd1b4f..93bd0908b488 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/StorageFormat.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/StorageFormat.java @@ -15,16 +15,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.plugin.hive.HiveStorageFormat; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.hive.HiveStorageFormat; +import io.trino.spi.PrestoException; import javax.annotation.concurrent.Immutable; import java.util.Objects; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_UNSUPPORTED_FORMAT; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_UNSUPPORTED_FORMAT; import static java.util.Objects.requireNonNull; @Immutable diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Table.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Table.java index 7cda2c51d1f1..84dd15df9a15 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Table.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/Table.java @@ -18,7 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import javax.annotation.concurrent.Immutable; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/WriteHiveMetastoreRecordingProcedure.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/WriteHiveMetastoreRecordingProcedure.java index 0feaf73872ed..7e5a5ed55b7b 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/WriteHiveMetastoreRecordingProcedure.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/WriteHiveMetastoreRecordingProcedure.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.RateLimiter; -import io.prestosql.spi.procedure.Procedure; +import io.trino.spi.procedure.Procedure; import javax.inject.Inject; import javax.inject.Provider; @@ -23,7 +23,7 @@ import java.io.IOException; import java.lang.invoke.MethodHandle; -import static io.prestosql.spi.block.MethodHandleUtil.methodHandle; +import static io.trino.spi.block.MethodHandleUtil.methodHandle; import static java.util.Objects.requireNonNull; public class WriteHiveMetastoreRecordingProcedure diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/AlluxioHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/AlluxioHiveMetastore.java index 4c44c315a245..b5f5fb0f0fba 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/AlluxioHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/AlluxioHiveMetastore.java @@ -22,28 +22,28 @@ import alluxio.grpc.table.layout.hive.PartitionInfo; import com.google.common.collect.ImmutableMap; import com.google.inject.Inject; -import io.prestosql.plugin.hive.HiveBasicStatistics; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.plugin.hive.metastore.PrincipalPrivileges; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HiveBasicStatistics; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.plugin.hive.metastore.PrincipalPrivileges; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil; +import io.trino.spi.PrestoException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.Collections; @@ -58,9 +58,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_METASTORE_ERROR; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.getHiveBasicStatistics; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_METASTORE_ERROR; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.getHiveBasicStatistics; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.util.Objects.requireNonNull; import static org.apache.hadoop.hive.common.FileUtils.makePartName; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/AlluxioMetastoreModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/AlluxioMetastoreModule.java index 56f1e15b65d4..c4ea691b82f0 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/AlluxioMetastoreModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/AlluxioMetastoreModule.java @@ -24,7 +24,7 @@ import com.google.inject.Provides; import com.google.inject.Scopes; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HiveMetastore; import static io.airlift.configuration.ConfigBinder.configBinder; import static org.weakref.jmx.guice.ExportBinder.newExporter; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/ProtoUtils.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/ProtoUtils.java index c24d6605b918..29e0cd795585 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/ProtoUtils.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/alluxio/ProtoUtils.java @@ -29,17 +29,17 @@ import alluxio.grpc.table.layout.hive.PartitionInfo; import alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException; import com.google.common.collect.Lists; -import io.prestosql.plugin.hive.HiveBucketProperty; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.SortingColumn; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.util.HiveBucketing; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.SortingColumn; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.util.HiveBucketing; +import io.trino.spi.PrestoException; import javax.annotation.Nullable; @@ -55,18 +55,18 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createBinaryColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createBooleanColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createDateColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createDecimalColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createDoubleColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createIntegerColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createStringColumnStatistics; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreDistinctValuesCount; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreNullsCount; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.getTotalSizeInBytes; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createBinaryColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createBooleanColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createDateColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createDecimalColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createDoubleColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createIntegerColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createStringColumnStatistics; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreDistinctValuesCount; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreNullsCount; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.getTotalSizeInBytes; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; public final class ProtoUtils { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/CachingHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/CachingHiveMetastore.java index d1d13a47c03e..8b92c9fc2099 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/CachingHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/CachingHiveMetastore.java @@ -23,33 +23,33 @@ import com.google.common.util.concurrent.UncheckedExecutionException; import io.airlift.jmx.CacheStatsMBean; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.HivePartition; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.PartitionNotFoundException; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.acid.AcidOperation; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HivePartitionName; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.HiveTableName; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.PartitionFilter; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.plugin.hive.metastore.PrincipalPrivileges; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.metastore.TablesWithParameterCacheKey; -import io.prestosql.plugin.hive.metastore.UserTableKey; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HivePartition; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.PartitionNotFoundException; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.acid.AcidOperation; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HivePartitionName; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.HiveTableName; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.PartitionFilter; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.plugin.hive.metastore.PrincipalPrivileges; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.metastore.TablesWithParameterCacheKey; +import io.trino.plugin.hive.metastore.UserTableKey; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import org.apache.hadoop.hive.metastore.api.DataOperationType; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -80,11 +80,11 @@ import static com.google.common.collect.Maps.immutableEntry; import static com.google.common.collect.Streams.stream; import static com.google.common.util.concurrent.MoreExecutors.newDirectExecutorService; -import static io.prestosql.plugin.hive.HivePartitionManager.extractPartitionValues; -import static io.prestosql.plugin.hive.metastore.HivePartitionName.hivePartitionName; -import static io.prestosql.plugin.hive.metastore.HiveTableName.hiveTableName; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.makePartitionName; -import static io.prestosql.plugin.hive.metastore.PartitionFilter.partitionFilter; +import static io.trino.plugin.hive.HivePartitionManager.extractPartitionValues; +import static io.trino.plugin.hive.metastore.HivePartitionName.hivePartitionName; +import static io.trino.plugin.hive.metastore.HiveTableName.hiveTableName; +import static io.trino.plugin.hive.metastore.MetastoreUtil.makePartitionName; +import static io.trino.plugin.hive.metastore.PartitionFilter.partitionFilter; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/CachingHiveMetastoreModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/CachingHiveMetastoreModule.java index 904a8876812e..7310708a79e9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/CachingHiveMetastoreModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/CachingHiveMetastoreModule.java @@ -16,9 +16,9 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Provides; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HiveMetastoreDecorator; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HiveMetastoreDecorator; import javax.inject.Singleton; @@ -28,7 +28,7 @@ import static com.google.inject.multibindings.OptionalBinder.newOptionalBinder; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.configuration.ConfigBinder.configBinder; -import static io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastore.cachingHiveMetastore; +import static io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.cachingHiveMetastore; import static java.util.concurrent.Executors.newCachedThreadPool; import static org.weakref.jmx.guice.ExportBinder.newExporter; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/DatabaseMetadata.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/DatabaseMetadata.java index 81398c45fcf6..e52ed69f2eaf 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/DatabaseMetadata.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/DatabaseMetadata.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.spi.security.PrincipalType; +import io.trino.plugin.hive.metastore.Database; +import io.trino.spi.security.PrincipalType; import java.util.Map; import java.util.Optional; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java index df356eebd115..ffc194471e24 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java @@ -20,45 +20,45 @@ import com.google.common.collect.Sets; import com.google.common.io.ByteStreams; import io.airlift.json.JsonCodec; -import io.prestosql.plugin.hive.HdfsConfig; -import io.prestosql.plugin.hive.HdfsConfiguration; -import io.prestosql.plugin.hive.HdfsConfigurationInitializer; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveBasicStatistics; -import io.prestosql.plugin.hive.HiveHdfsConfiguration; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.NodeVersion; -import io.prestosql.plugin.hive.PartitionNotFoundException; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.SchemaAlreadyExistsException; -import io.prestosql.plugin.hive.TableAlreadyExistsException; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.authentication.NoHdfsAuthentication; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.plugin.hive.metastore.PrincipalPrivileges; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig.VersionCompatibility; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnNotFoundException; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HdfsConfig; +import io.trino.plugin.hive.HdfsConfiguration; +import io.trino.plugin.hive.HdfsConfigurationInitializer; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveBasicStatistics; +import io.trino.plugin.hive.HiveHdfsConfiguration; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.NodeVersion; +import io.trino.plugin.hive.PartitionNotFoundException; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.SchemaAlreadyExistsException; +import io.trino.plugin.hive.TableAlreadyExistsException; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.authentication.NoHdfsAuthentication; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.plugin.hive.metastore.PrincipalPrivileges; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig.VersionCompatibility; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnNotFoundException; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; @@ -97,24 +97,24 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_METASTORE_ERROR; -import static io.prestosql.plugin.hive.HiveMetadata.DELTA_LAKE_PROVIDER; -import static io.prestosql.plugin.hive.HiveMetadata.SPARK_TABLE_PROVIDER_KEY; -import static io.prestosql.plugin.hive.HiveMetadata.TABLE_COMMENT; -import static io.prestosql.plugin.hive.HivePartitionManager.extractPartitionValues; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.OWNERSHIP; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.makePartitionName; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.partitionKeyFilterToStringList; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.verifyCanDropColumn; -import static io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig.VERSION_COMPATIBILITY_CONFIG; -import static io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig.VersionCompatibility.UNSAFE_ASSUME_COMPATIBILITY; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.getHiveBasicStatistics; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.updateStatisticsParameters; -import static io.prestosql.plugin.hive.util.HiveUtil.toPartitionValues; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.security.PrincipalType.ROLE; -import static io.prestosql.spi.security.PrincipalType.USER; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_METASTORE_ERROR; +import static io.trino.plugin.hive.HiveMetadata.DELTA_LAKE_PROVIDER; +import static io.trino.plugin.hive.HiveMetadata.SPARK_TABLE_PROVIDER_KEY; +import static io.trino.plugin.hive.HiveMetadata.TABLE_COMMENT; +import static io.trino.plugin.hive.HivePartitionManager.extractPartitionValues; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.OWNERSHIP; +import static io.trino.plugin.hive.metastore.MetastoreUtil.makePartitionName; +import static io.trino.plugin.hive.metastore.MetastoreUtil.partitionKeyFilterToStringList; +import static io.trino.plugin.hive.metastore.MetastoreUtil.verifyCanDropColumn; +import static io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig.VERSION_COMPATIBILITY_CONFIG; +import static io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig.VersionCompatibility.UNSAFE_ASSUME_COMPATIBILITY; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.getHiveBasicStatistics; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.updateStatisticsParameters; +import static io.trino.plugin.hive.util.HiveUtil.toPartitionValues; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.security.PrincipalType.ROLE; +import static io.trino.spi.security.PrincipalType.USER; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastoreConfig.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastoreConfig.java index 29e6b46295d1..4564b813d7e5 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastoreConfig.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastoreConfig.java @@ -18,7 +18,7 @@ import javax.validation.constraints.NotNull; -import static io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig.VersionCompatibility.NOT_SUPPORTED; +import static io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig.VersionCompatibility.NOT_SUPPORTED; public class FileHiveMetastoreConfig { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileMetastoreModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileMetastoreModule.java index 8a3b4c07d991..c9370d66e810 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileMetastoreModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileMetastoreModule.java @@ -16,9 +16,9 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastoreModule; -import io.prestosql.plugin.hive.metastore.cache.ForCachingHiveMetastore; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.cache.CachingHiveMetastoreModule; +import io.trino.plugin.hive.metastore.cache.ForCachingHiveMetastore; import static io.airlift.configuration.ConfigBinder.configBinder; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/PartitionMetadata.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/PartitionMetadata.java index 2234ffc4c12f..c6c1bb0fd4ec 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/PartitionMetadata.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/PartitionMetadata.java @@ -17,16 +17,16 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HiveBucketProperty; -import io.prestosql.plugin.hive.HiveStorageFormat; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.plugin.hive.metastore.Storage; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.metastore.Table; +import io.trino.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.HiveStorageFormat; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.plugin.hive.metastore.Storage; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.metastore.Table; import org.apache.hadoop.hive.metastore.TableType; import java.util.Arrays; @@ -34,8 +34,8 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.plugin.hive.metastore.StorageFormat.VIEW_STORAGE_FORMAT; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.updateStatisticsParameters; +import static io.trino.plugin.hive.metastore.StorageFormat.VIEW_STORAGE_FORMAT; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.updateStatisticsParameters; import static java.util.Objects.requireNonNull; public class PartitionMetadata diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/PermissionMetadata.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/PermissionMetadata.java index f97385118072..e3dac719adef 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/PermissionMetadata.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/PermissionMetadata.java @@ -15,11 +15,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege; -import static io.prestosql.spi.security.PrincipalType.USER; +import static io.trino.spi.security.PrincipalType.USER; import static java.util.Objects.requireNonNull; public class PermissionMetadata diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/TableMetadata.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/TableMetadata.java index 304f786301d1..1ce911c8e4bf 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/TableMetadata.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/TableMetadata.java @@ -17,13 +17,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HiveBucketProperty; -import io.prestosql.plugin.hive.HiveStorageFormat; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.Storage; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.metastore.Table; +import io.trino.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.HiveStorageFormat; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.Storage; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.metastore.Table; import org.apache.hadoop.hive.metastore.TableType; import java.util.Arrays; @@ -33,7 +33,7 @@ import java.util.OptionalLong; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.metastore.StorageFormat.VIEW_STORAGE_FORMAT; +import static io.trino.plugin.hive.metastore.StorageFormat.VIEW_STORAGE_FORMAT; import static java.util.Objects.requireNonNull; public class TableMetadata diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/DefaultGlueMetastoreTableFilterProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/DefaultGlueMetastoreTableFilterProvider.java index b757b31da7a1..142e4c0963e0 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/DefaultGlueMetastoreTableFilterProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/DefaultGlueMetastoreTableFilterProvider.java @@ -14,15 +14,15 @@ package io.trino.plugin.hive.metastore.glue; import com.amazonaws.services.glue.model.Table; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.MetastoreConfig; import javax.inject.Inject; import javax.inject.Provider; import java.util.function.Predicate; -import static io.prestosql.plugin.hive.HiveMetadata.DELTA_LAKE_PROVIDER; -import static io.prestosql.plugin.hive.HiveMetadata.SPARK_TABLE_PROVIDER_KEY; +import static io.trino.plugin.hive.HiveMetadata.DELTA_LAKE_PROVIDER; +import static io.trino.plugin.hive.HiveMetadata.SPARK_TABLE_PROVIDER_KEY; import static java.util.Objects.requireNonNull; import static java.util.function.Predicate.not; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/DisabledGlueColumnStatisticsProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/DisabledGlueColumnStatisticsProvider.java index acdc3ee11f52..f9806d8e8d44 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/DisabledGlueColumnStatisticsProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/DisabledGlueColumnStatisticsProvider.java @@ -17,17 +17,17 @@ import com.amazonaws.services.glue.model.TableInput; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.PrestoException; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import java.util.Map; import java.util.Set; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; public class DisabledGlueColumnStatisticsProvider implements GlueColumnStatisticsProvider diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueColumnStatisticsProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueColumnStatisticsProvider.java index f21432be494b..78d8abec87dc 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueColumnStatisticsProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueColumnStatisticsProvider.java @@ -15,11 +15,11 @@ import com.amazonaws.services.glue.model.PartitionInput; import com.amazonaws.services.glue.model.TableInput; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import java.util.Map; import java.util.Set; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueExpressionUtil.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueExpressionUtil.java index 4a1344f7dc58..b4f2831edf96 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueExpressionUtil.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueExpressionUtil.java @@ -16,17 +16,17 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Joiner; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.metastore.MetastoreUtil; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Marker; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.metastore.MetastoreUtil; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Marker; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.util.ArrayList; import java.util.List; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastore.java index 7eb66659f096..400b49e6392b 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastore.java @@ -63,40 +63,40 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import io.airlift.log.Logger; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.PartitionNotFoundException; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.SchemaAlreadyExistsException; -import io.prestosql.plugin.hive.TableAlreadyExistsException; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.MetastoreUtil; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.plugin.hive.metastore.PrincipalPrivileges; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.metastore.glue.converter.GlueInputConverter; -import io.prestosql.plugin.hive.metastore.glue.converter.GlueToPrestoConverter; -import io.prestosql.plugin.hive.metastore.glue.converter.GlueToPrestoConverter.GluePartitionConverter; -import io.prestosql.plugin.hive.util.HiveUtil; -import io.prestosql.plugin.hive.util.HiveWriteUtils; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnNotFoundException; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.PartitionNotFoundException; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.SchemaAlreadyExistsException; +import io.trino.plugin.hive.TableAlreadyExistsException; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.MetastoreUtil; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.plugin.hive.metastore.PrincipalPrivileges; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.metastore.glue.converter.GlueInputConverter; +import io.trino.plugin.hive.metastore.glue.converter.GlueToPrestoConverter; +import io.trino.plugin.hive.metastore.glue.converter.GlueToPrestoConverter.GluePartitionConverter; +import io.trino.plugin.hive.util.HiveUtil; +import io.trino.plugin.hive.util.HiveWriteUtils; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnNotFoundException; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import org.apache.hadoop.fs.Path; import org.weakref.jmx.Flatten; import org.weakref.jmx.Managed; @@ -124,18 +124,18 @@ import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.Comparators.lexicographical; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_METASTORE_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_PARTITION_DROPPED_DURING_QUERY; -import static io.prestosql.plugin.hive.aws.AwsCurrentRegionHolder.getCurrentRegionFromEC2Metadata; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.makePartitionName; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.verifyCanDropColumn; -import static io.prestosql.plugin.hive.metastore.glue.converter.GlueToPrestoConverter.mappedCopy; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.getHiveBasicStatistics; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.updateStatisticsParameters; -import static io.prestosql.plugin.hive.util.HiveUtil.toPartitionValues; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.security.PrincipalType.USER; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_METASTORE_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_PARTITION_DROPPED_DURING_QUERY; +import static io.trino.plugin.hive.aws.AwsCurrentRegionHolder.getCurrentRegionFromEC2Metadata; +import static io.trino.plugin.hive.metastore.MetastoreUtil.makePartitionName; +import static io.trino.plugin.hive.metastore.MetastoreUtil.verifyCanDropColumn; +import static io.trino.plugin.hive.metastore.glue.converter.GlueToPrestoConverter.mappedCopy; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.getHiveBasicStatistics; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.updateStatisticsParameters; +import static io.trino.plugin.hive.util.HiveUtil.toPartitionValues; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.security.PrincipalType.USER; import static java.lang.String.format; import static java.util.Comparator.comparing; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueMetastoreModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueMetastoreModule.java index aabd9b4922f3..db06db0a3214 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueMetastoreModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueMetastoreModule.java @@ -23,11 +23,11 @@ import com.google.inject.TypeLiteral; import io.airlift.concurrent.BoundedExecutor; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.ForRecordingHiveMetastore; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.RecordingHiveMetastoreModule; -import io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastoreModule; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.ForRecordingHiveMetastore; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.RecordingHiveMetastoreModule; +import io.trino.plugin.hive.metastore.cache.CachingHiveMetastoreModule; import java.util.concurrent.Executor; import java.util.function.Predicate; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueMetastoreStats.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueMetastoreStats.java index bf834b39b2db..579c2bcf99d7 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueMetastoreStats.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueMetastoreStats.java @@ -16,7 +16,7 @@ import io.airlift.stats.CounterStat; import io.airlift.stats.TimeStat; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.aws.AbstractSdkMetricsCollector; +import io.trino.plugin.hive.aws.AbstractSdkMetricsCollector; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/converter/GlueInputConverter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/converter/GlueInputConverter.java index bafa64c151c8..5427b15df0f3 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/converter/GlueInputConverter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/converter/GlueInputConverter.java @@ -20,21 +20,21 @@ import com.amazonaws.services.glue.model.StorageDescriptor; import com.amazonaws.services.glue.model.TableInput; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HiveBucketProperty; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.plugin.hive.metastore.Storage; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.metastore.glue.GlueColumnStatisticsProvider; +import io.trino.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.plugin.hive.metastore.Storage; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.metastore.glue.GlueColumnStatisticsProvider; import java.util.List; import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.updateStatisticsParameters; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.updateStatisticsParameters; public final class GlueInputConverter { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/converter/GlueToPrestoConverter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/converter/GlueToPrestoConverter.java index 01789b0ac621..b67444b2ae12 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/converter/GlueToPrestoConverter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/converter/GlueToPrestoConverter.java @@ -17,20 +17,20 @@ import com.amazonaws.services.glue.model.StorageDescriptor; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HiveBucketProperty; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.SortingColumn; -import io.prestosql.plugin.hive.metastore.SortingColumn.Order; -import io.prestosql.plugin.hive.metastore.Storage; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.util.HiveBucketing; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.security.PrincipalType; +import io.trino.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.SortingColumn; +import io.trino.plugin.hive.metastore.SortingColumn.Order; +import io.trino.plugin.hive.metastore.Storage; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.util.HiveBucketing; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.spi.PrestoException; +import io.trino.spi.security.PrincipalType; import java.util.List; import java.util.Locale; @@ -41,8 +41,8 @@ import static com.google.common.base.MoreObjects.firstNonNull; import static com.google.common.base.Strings.nullToEmpty; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.plugin.hive.metastore.util.Memoizers.memoizeLast; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.metastore.util.Memoizers.memoizeLast; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.apache.hadoop.hive.metastore.TableType.EXTERNAL_TABLE; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/BridgingHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/BridgingHiveMetastore.java index cb68a312df43..90a6df5d1008 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/BridgingHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/BridgingHiveMetastore.java @@ -15,29 +15,29 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HivePartition; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.acid.AcidOperation; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.plugin.hive.metastore.PrincipalPrivileges; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.util.HiveUtil; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HivePartition; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.acid.AcidOperation; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.plugin.hive.metastore.PrincipalPrivileges; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.util.HiveUtil; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import org.apache.hadoop.hive.metastore.api.DataOperationType; import org.apache.hadoop.hive.metastore.api.FieldSchema; @@ -52,18 +52,18 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveMetadata.TABLE_COMMENT; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.isAvroTableWithSchemaSet; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.verifyCanDropColumn; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.csvSchemaFields; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreApiDatabase; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreApiTable; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.isAvroTableWithSchemaSet; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.isCsvTable; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.toMetastoreApiDatabase; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.toMetastoreApiTable; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.security.PrincipalType.USER; +import static io.trino.plugin.hive.HiveMetadata.TABLE_COMMENT; +import static io.trino.plugin.hive.metastore.MetastoreUtil.isAvroTableWithSchemaSet; +import static io.trino.plugin.hive.metastore.MetastoreUtil.verifyCanDropColumn; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.csvSchemaFields; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreApiDatabase; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreApiTable; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.isAvroTableWithSchemaSet; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.isCsvTable; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.toMetastoreApiDatabase; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.toMetastoreApiTable; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.security.PrincipalType.USER; import static java.util.Objects.requireNonNull; import static java.util.function.UnaryOperator.identity; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/DefaultThriftMetastoreClientFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/DefaultThriftMetastoreClientFactory.java index da92e69ace6f..b2816f0d4d13 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/DefaultThriftMetastoreClientFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/DefaultThriftMetastoreClientFactory.java @@ -16,8 +16,8 @@ import com.google.common.net.HostAndPort; import io.airlift.security.pem.PemReader; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.authentication.HiveMetastoreAuthentication; -import io.prestosql.spi.NodeManager; +import io.trino.plugin.hive.authentication.HiveMetastoreAuthentication; +import io.trino.spi.NodeManager; import org.apache.thrift.transport.TTransport; import org.apache.thrift.transport.TTransportException; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/FailureAwareThriftMetastoreClient.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/FailureAwareThriftMetastoreClient.java index 0104eb0a8e77..7f63d7a17efb 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/FailureAwareThriftMetastoreClient.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/FailureAwareThriftMetastoreClient.java @@ -14,7 +14,7 @@ package io.trino.plugin.hive.metastore.thrift; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.plugin.hive.acid.AcidOperation; +import io.trino.plugin.hive.acid.AcidOperation; import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.EnvironmentContext; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/KerberosHiveMetastoreAuthentication.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/KerberosHiveMetastoreAuthentication.java index 59f76b56a62f..35b76b4d3726 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/KerberosHiveMetastoreAuthentication.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/KerberosHiveMetastoreAuthentication.java @@ -14,10 +14,10 @@ package io.trino.plugin.hive.metastore.thrift; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.ForHiveMetastore; -import io.prestosql.plugin.hive.authentication.HadoopAuthentication; -import io.prestosql.plugin.hive.authentication.HiveMetastoreAuthentication; -import io.prestosql.plugin.hive.authentication.MetastoreKerberosConfig; +import io.trino.plugin.hive.ForHiveMetastore; +import io.trino.plugin.hive.authentication.HadoopAuthentication; +import io.trino.plugin.hive.authentication.HiveMetastoreAuthentication; +import io.trino.plugin.hive.authentication.MetastoreKerberosConfig; import org.apache.hadoop.hive.metastore.security.DelegationTokenIdentifier; import org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport; import org.apache.hadoop.security.SaslRpcServer; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/NoHiveMetastoreAuthentication.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/NoHiveMetastoreAuthentication.java index 5db79afabc59..3c1d59fd1772 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/NoHiveMetastoreAuthentication.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/NoHiveMetastoreAuthentication.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive.metastore.thrift; -import io.prestosql.plugin.hive.authentication.HiveMetastoreAuthentication; +import io.trino.plugin.hive.authentication.HiveMetastoreAuthentication; import org.apache.thrift.transport.TTransport; import java.util.Optional; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/StaticMetastoreLocator.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/StaticMetastoreLocator.java index 037a61896c92..ec01595342c4 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/StaticMetastoreLocator.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/StaticMetastoreLocator.java @@ -17,8 +17,8 @@ import com.google.common.base.Ticker; import com.google.common.net.HostAndPort; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.metastore.thrift.FailureAwareThriftMetastoreClient.Callback; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreAuthenticationConfig.ThriftMetastoreAuthenticationType; +import io.trino.plugin.hive.metastore.thrift.FailureAwareThriftMetastoreClient.Callback; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreAuthenticationConfig.ThriftMetastoreAuthenticationType; import org.apache.thrift.TException; import javax.annotation.Nullable; @@ -33,7 +33,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.metastore.thrift.StaticMetastoreConfig.HIVE_METASTORE_USERNAME; +import static io.trino.plugin.hive.metastore.thrift.StaticMetastoreConfig.HIVE_METASTORE_USERNAME; import static java.lang.Math.max; import static java.lang.Math.min; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastore.java index 199b88b3157d..de355def8814 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastore.java @@ -23,37 +23,37 @@ import com.google.common.util.concurrent.UncheckedExecutionException; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveBasicStatistics; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HivePartition; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.HiveViewNotSupportedException; -import io.prestosql.plugin.hive.PartitionNotFoundException; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.SchemaAlreadyExistsException; -import io.prestosql.plugin.hive.TableAlreadyExistsException; -import io.prestosql.plugin.hive.acid.AcidOperation; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreAuthenticationConfig.ThriftMetastoreAuthenticationType; -import io.prestosql.plugin.hive.util.RetryDriver; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveBasicStatistics; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HivePartition; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.HiveViewNotSupportedException; +import io.trino.plugin.hive.PartitionNotFoundException; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.SchemaAlreadyExistsException; +import io.trino.plugin.hive.TableAlreadyExistsException; +import io.trino.plugin.hive.acid.AcidOperation; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreAuthenticationConfig.ThriftMetastoreAuthenticationType; +import io.trino.plugin.hive.util.RetryDriver; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.metastore.LockComponentBuilder; import org.apache.hadoop.hive.metastore.LockRequestBuilder; @@ -124,25 +124,25 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.collect.Sets.difference; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_METASTORE_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_TABLE_LOCK_NOT_ACQUIRED; -import static io.prestosql.plugin.hive.ViewReaderUtil.PRESTO_VIEW_FLAG; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.OWNERSHIP; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.partitionKeyFilterToStringList; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.createMetastoreColumnStatistics; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreApiPrincipalType; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreApiTable; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromPrestoPrincipalType; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromRolePrincipalGrants; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.getHiveBasicStatistics; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.isAvroTableWithSchemaSet; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.parsePrivilege; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.toMetastoreApiPartition; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.updateStatisticsParameters; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.security.PrincipalType.USER; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_METASTORE_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_TABLE_LOCK_NOT_ACQUIRED; +import static io.trino.plugin.hive.ViewReaderUtil.PRESTO_VIEW_FLAG; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.OWNERSHIP; +import static io.trino.plugin.hive.metastore.MetastoreUtil.partitionKeyFilterToStringList; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.createMetastoreColumnStatistics; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreApiPrincipalType; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreApiTable; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromPrestoPrincipalType; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromRolePrincipalGrants; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.getHiveBasicStatistics; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.isAvroTableWithSchemaSet; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.parsePrivilege; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.toMetastoreApiPartition; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.updateStatisticsParameters; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.security.PrincipalType.USER; import static java.lang.Boolean.FALSE; import static java.lang.Boolean.TRUE; import static java.lang.String.format; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastoreClient.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastoreClient.java index c3ab7fff2baa..c93b483a6a44 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastoreClient.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastoreClient.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; -import io.prestosql.plugin.base.util.LoggingInvocationHandler; -import io.prestosql.plugin.base.util.LoggingInvocationHandler.AirliftParameterNamesProvider; -import io.prestosql.plugin.base.util.LoggingInvocationHandler.ParameterNamesProvider; -import io.prestosql.plugin.hive.acid.AcidOperation; +import io.trino.plugin.base.util.LoggingInvocationHandler; +import io.trino.plugin.base.util.LoggingInvocationHandler.AirliftParameterNamesProvider; +import io.trino.plugin.base.util.LoggingInvocationHandler.ParameterNamesProvider; +import io.trino.plugin.hive.acid.AcidOperation; import org.apache.hadoop.hive.common.ValidTxnList; import org.apache.hadoop.hive.metastore.api.AbortTxnRequest; import org.apache.hadoop.hive.metastore.api.AddDynamicPartitions; @@ -74,7 +74,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.reflect.Reflection.newProxy; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.adjustRowCount; +import static io.trino.plugin.hive.metastore.MetastoreUtil.adjustRowCount; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.apache.hadoop.hive.metastore.txn.TxnUtils.createValidTxnWriteIdList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastore.java index c364d4451fe9..46644c18c615 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastore.java @@ -13,21 +13,21 @@ */ package io.trino.plugin.hive.metastore.thrift; -import io.prestosql.plugin.hive.HivePartition; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.acid.AcidOperation; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HivePartition; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.acid.AcidOperation; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import org.apache.hadoop.hive.metastore.api.DataOperationType; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; @@ -41,7 +41,7 @@ import java.util.Set; import java.util.function.Function; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; public interface ThriftMetastore { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreAuthenticationConfig.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreAuthenticationConfig.java index 21f8f78dd3ce..895fdaefd8d2 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreAuthenticationConfig.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreAuthenticationConfig.java @@ -18,7 +18,7 @@ import javax.validation.constraints.NotNull; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreAuthenticationConfig.ThriftMetastoreAuthenticationType.NONE; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreAuthenticationConfig.ThriftMetastoreAuthenticationType.NONE; public class ThriftMetastoreAuthenticationConfig { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreAuthenticationModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreAuthenticationModule.java index d43fbe4c2a71..b220b01de744 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreAuthenticationModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreAuthenticationModule.java @@ -18,16 +18,16 @@ import com.google.inject.Provides; import com.google.inject.Singleton; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.hive.ForHiveMetastore; -import io.prestosql.plugin.hive.HdfsConfigurationInitializer; -import io.prestosql.plugin.hive.authentication.HadoopAuthentication; -import io.prestosql.plugin.hive.authentication.HiveMetastoreAuthentication; -import io.prestosql.plugin.hive.authentication.MetastoreKerberosConfig; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreAuthenticationConfig.ThriftMetastoreAuthenticationType; +import io.trino.plugin.hive.ForHiveMetastore; +import io.trino.plugin.hive.HdfsConfigurationInitializer; +import io.trino.plugin.hive.authentication.HadoopAuthentication; +import io.trino.plugin.hive.authentication.HiveMetastoreAuthentication; +import io.trino.plugin.hive.authentication.MetastoreKerberosConfig; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreAuthenticationConfig.ThriftMetastoreAuthenticationType; import static com.google.inject.Scopes.SINGLETON; import static io.airlift.configuration.ConfigBinder.configBinder; -import static io.prestosql.plugin.hive.authentication.AuthenticationModules.createCachingKerberosHadoopAuthentication; +import static io.trino.plugin.hive.authentication.AuthenticationModules.createCachingKerberosHadoopAuthentication; public class ThriftMetastoreAuthenticationModule extends AbstractConfigurationAwareModule diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreClient.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreClient.java index be79cdd9a983..0357728c8273 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreClient.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreClient.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive.metastore.thrift; -import io.prestosql.plugin.hive.acid.AcidOperation; +import io.trino.plugin.hive.acid.AcidOperation; import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.EnvironmentContext; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreConfig.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreConfig.java index 905c2f8edd17..038307e25132 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreConfig.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreConfig.java @@ -20,7 +20,7 @@ import io.airlift.configuration.validation.FileExists; import io.airlift.units.Duration; import io.airlift.units.MinDuration; -import io.prestosql.plugin.hive.util.RetryDriver; +import io.trino.plugin.hive.util.RetryDriver; import javax.validation.constraints.AssertTrue; import javax.validation.constraints.Min; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreModule.java index 53f708202d06..e1f8b1870320 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreModule.java @@ -17,10 +17,10 @@ import com.google.inject.Scopes; import com.google.inject.multibindings.OptionalBinder; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.hive.ForRecordingHiveMetastore; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.RecordingHiveMetastoreModule; -import io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastoreModule; +import io.trino.plugin.hive.ForRecordingHiveMetastore; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.RecordingHiveMetastoreModule; +import io.trino.plugin.hive.metastore.cache.CachingHiveMetastoreModule; import static io.airlift.configuration.ConfigBinder.configBinder; import static org.weakref.jmx.guice.ExportBinder.newExporter; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreUtil.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreUtil.java index d99c0c753471..237d2b3ad6e5 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreUtil.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreUtil.java @@ -19,37 +19,37 @@ import com.google.common.collect.Streams; import com.google.common.primitives.Longs; import com.google.common.primitives.Shorts; -import io.prestosql.plugin.hive.HiveBasicStatistics; -import io.prestosql.plugin.hive.HiveBucketProperty; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.plugin.hive.metastore.PrincipalPrivileges; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.Storage; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.HiveBasicStatistics; +import io.trino.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.plugin.hive.metastore.PrincipalPrivileges; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.Storage; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.PrestoException; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.PrincipalType; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.security.SelectedRole; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.hive.metastore.api.BinaryColumnStatsData; import org.apache.hadoop.hive.metastore.api.BooleanColumnStatsData; import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; @@ -96,40 +96,40 @@ import static com.google.common.base.Strings.nullToEmpty; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.plugin.hive.HiveMetadata.AVRO_SCHEMA_URL_KEY; -import static io.prestosql.plugin.hive.HiveStorageFormat.AVRO; -import static io.prestosql.plugin.hive.HiveStorageFormat.CSV; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createBinaryColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createBooleanColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createDateColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createDecimalColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createDoubleColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createIntegerColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createStringColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.DELETE; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.INSERT; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.OWNERSHIP; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.SELECT; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.UPDATE; -import static io.prestosql.spi.security.PrincipalType.ROLE; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.spi.statistics.ColumnStatisticType.MAX_VALUE; -import static io.prestosql.spi.statistics.ColumnStatisticType.MAX_VALUE_SIZE_IN_BYTES; -import static io.prestosql.spi.statistics.ColumnStatisticType.MIN_VALUE; -import static io.prestosql.spi.statistics.ColumnStatisticType.NUMBER_OF_DISTINCT_VALUES; -import static io.prestosql.spi.statistics.ColumnStatisticType.NUMBER_OF_NON_NULL_VALUES; -import static io.prestosql.spi.statistics.ColumnStatisticType.NUMBER_OF_TRUE_VALUES; -import static io.prestosql.spi.statistics.ColumnStatisticType.TOTAL_SIZE_IN_BYTES; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.HiveMetadata.AVRO_SCHEMA_URL_KEY; +import static io.trino.plugin.hive.HiveStorageFormat.AVRO; +import static io.trino.plugin.hive.HiveStorageFormat.CSV; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createBinaryColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createBooleanColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createDateColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createDecimalColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createDoubleColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createIntegerColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createStringColumnStatistics; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.DELETE; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.INSERT; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.OWNERSHIP; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.SELECT; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.UPDATE; +import static io.trino.spi.security.PrincipalType.ROLE; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.spi.statistics.ColumnStatisticType.MAX_VALUE; +import static io.trino.spi.statistics.ColumnStatisticType.MAX_VALUE_SIZE_IN_BYTES; +import static io.trino.spi.statistics.ColumnStatisticType.MIN_VALUE; +import static io.trino.spi.statistics.ColumnStatisticType.NUMBER_OF_DISTINCT_VALUES; +import static io.trino.spi.statistics.ColumnStatisticType.NUMBER_OF_NON_NULL_VALUES; +import static io.trino.spi.statistics.ColumnStatisticType.NUMBER_OF_TRUE_VALUES; +import static io.trino.spi.statistics.ColumnStatisticType.TOTAL_SIZE_IN_BYTES; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.lang.Math.round; import static java.lang.String.format; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/Transport.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/Transport.java index b59dc1a55366..09ef73c307aa 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/Transport.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/Transport.java @@ -14,7 +14,7 @@ package io.trino.plugin.hive.metastore.thrift; import com.google.common.net.HostAndPort; -import io.prestosql.plugin.hive.authentication.HiveMetastoreAuthentication; +import io.trino.plugin.hive.authentication.HiveMetastoreAuthentication; import org.apache.thrift.transport.TSocket; import org.apache.thrift.transport.TTransport; import org.apache.thrift.transport.TTransportException; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/HdfsOrcDataSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/HdfsOrcDataSource.java index 8928cb885ca3..f12d21d5c49b 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/HdfsOrcDataSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/HdfsOrcDataSource.java @@ -14,20 +14,20 @@ package io.trino.plugin.hive.orc; import io.airlift.slice.Slice; -import io.prestosql.orc.AbstractOrcDataSource; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.util.FSDataInputStreamTail; -import io.prestosql.spi.PrestoException; +import io.trino.orc.AbstractOrcDataSource; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.util.FSDataInputStreamTail; +import io.trino.spi.PrestoException; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.hdfs.BlockMissingException; import java.io.IOException; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_MISSING_DATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_UNKNOWN_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_MISSING_DATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_UNKNOWN_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSource.java index 8d4033668881..cbd6fb3a65fb 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSource.java @@ -14,20 +14,20 @@ package io.trino.plugin.hive.orc; import com.google.common.collect.ImmutableList; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.OrcPredicate; -import io.prestosql.orc.OrcReader; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.orc.OrcRecordReader; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorPageSource; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.OrcPredicate; +import io.trino.orc.OrcReader; +import io.trino.orc.OrcReaderOptions; +import io.trino.orc.OrcRecordReader; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorPageSource; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; @@ -44,16 +44,16 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Strings.nullToEmpty; import static com.google.common.collect.Maps.uniqueIndex; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcReader.MAX_BATCH_SIZE; -import static io.prestosql.orc.OrcReader.createOrcReader; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CANNOT_OPEN_SPLIT; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_MISSING_DATA; -import static io.prestosql.plugin.hive.acid.AcidSchema.ACID_COLUMN_ORIGINAL_TRANSACTION; -import static io.prestosql.plugin.hive.acid.AcidSchema.ACID_COLUMN_ROW_ID; -import static io.prestosql.plugin.hive.orc.OrcPageSource.handleException; -import static io.prestosql.plugin.hive.orc.OrcPageSourceFactory.verifyAcidSchema; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcReader.MAX_BATCH_SIZE; +import static io.trino.orc.OrcReader.createOrcReader; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CANNOT_OPEN_SPLIT; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_MISSING_DATA; +import static io.trino.plugin.hive.acid.AcidSchema.ACID_COLUMN_ORIGINAL_TRANSACTION; +import static io.trino.plugin.hive.acid.AcidSchema.ACID_COLUMN_ROW_ID; +import static io.trino.plugin.hive.orc.OrcPageSource.handleException; +import static io.trino.plugin.hive.orc.OrcPageSourceFactory.verifyAcidSchema; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSourceFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSourceFactory.java index 7cbec042e2ff..0d8a9453fc1c 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSourceFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSourceFactory.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.hive.orc; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.spi.connector.ConnectorPageSource; +import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.spi.connector.ConnectorPageSource; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import java.util.Optional; -import static io.prestosql.plugin.hive.orc.OrcDeleteDeltaPageSource.createOrcDeleteDeltaPageSource; +import static io.trino.plugin.hive.orc.OrcDeleteDeltaPageSource.createOrcDeleteDeltaPageSource; import static java.util.Objects.requireNonNull; public class OrcDeleteDeltaPageSourceFactory diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeletedRows.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeletedRows.java index 7ac216a409c5..0b7f3961c77f 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeletedRows.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeletedRows.java @@ -14,15 +14,15 @@ package io.trino.plugin.hive.orc; import com.google.common.collect.ImmutableSet; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.plugin.hive.AcidInfo; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.DictionaryBlock; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.EmptyPageSource; +import io.trino.orc.OrcCorruptionException; +import io.trino.plugin.hive.AcidInfo; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.DictionaryBlock; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.EmptyPageSource; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; @@ -40,10 +40,10 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Verify.verify; -import static io.prestosql.plugin.hive.BackgroundHiveSplitLoader.hasAttemptId; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CURSOR_ERROR; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.hive.BackgroundHiveSplitLoader.hasAttemptId; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CURSOR_ERROR; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; @NotThreadSafe diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcFileWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcFileWriter.java index bb49dda89371..9eb925ecc339 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcFileWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcFileWriter.java @@ -15,25 +15,25 @@ import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.OrcDataSink; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode; -import io.prestosql.orc.OrcWriter; -import io.prestosql.orc.OrcWriterOptions; -import io.prestosql.orc.OrcWriterStats; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.plugin.hive.FileWriter; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.block.RowBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.Type; +import io.trino.orc.OrcDataSink; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcWriteValidation.OrcWriteValidationMode; +import io.trino.orc.OrcWriter; +import io.trino.orc.OrcWriterOptions; +import io.trino.orc.OrcWriterStats; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcType; +import io.trino.plugin.hive.FileWriter; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.block.RowBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.io.IOException; @@ -51,11 +51,11 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITE_VALIDATION_FAILED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITE_VALIDATION_FAILED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcFileWriterFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcFileWriterFactory.java index 7f13ce2847b1..98f77c1fa1f8 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcFileWriterFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcFileWriterFactory.java @@ -14,26 +14,26 @@ package io.trino.plugin.hive.orc; import com.google.common.collect.ImmutableMap; -import io.prestosql.orc.OrcDataSink; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.orc.OrcWriterOptions; -import io.prestosql.orc.OrcWriterStats; -import io.prestosql.orc.OutputStreamOrcDataSink; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.FileWriter; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveFileWriterFactory; -import io.prestosql.plugin.hive.NodeVersion; -import io.prestosql.plugin.hive.acid.AcidSchema; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.orc.OrcDataSink; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.OrcReaderOptions; +import io.trino.orc.OrcWriterOptions; +import io.trino.orc.OrcWriterStats; +import io.trino.orc.OutputStreamOrcDataSink; +import io.trino.orc.metadata.CompressionKind; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.FileWriter; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveFileWriterFactory; +import io.trino.plugin.hive.NodeVersion; +import io.trino.plugin.hive.acid.AcidSchema; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat; @@ -52,25 +52,25 @@ import java.util.concurrent.Callable; import java.util.function.Supplier; -import static io.prestosql.orc.metadata.OrcType.createRootOrcType; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_UNSUPPORTED_FORMAT; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_OPEN_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITE_VALIDATION_FAILED; -import static io.prestosql.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; -import static io.prestosql.plugin.hive.HiveMetadata.PRESTO_VERSION_NAME; -import static io.prestosql.plugin.hive.HiveSessionProperties.getOrcOptimizedWriterMaxDictionaryMemory; -import static io.prestosql.plugin.hive.HiveSessionProperties.getOrcOptimizedWriterMaxStripeRows; -import static io.prestosql.plugin.hive.HiveSessionProperties.getOrcOptimizedWriterMaxStripeSize; -import static io.prestosql.plugin.hive.HiveSessionProperties.getOrcOptimizedWriterMinStripeSize; -import static io.prestosql.plugin.hive.HiveSessionProperties.getOrcOptimizedWriterValidateMode; -import static io.prestosql.plugin.hive.HiveSessionProperties.getOrcStringStatisticsLimit; -import static io.prestosql.plugin.hive.HiveSessionProperties.getTimestampPrecision; -import static io.prestosql.plugin.hive.HiveSessionProperties.isOrcOptimizedWriterValidate; -import static io.prestosql.plugin.hive.acid.AcidSchema.ACID_COLUMN_NAMES; -import static io.prestosql.plugin.hive.acid.AcidSchema.createAcidColumnPrestoTypes; -import static io.prestosql.plugin.hive.util.HiveUtil.getColumnNames; -import static io.prestosql.plugin.hive.util.HiveUtil.getColumnTypes; -import static io.prestosql.plugin.hive.util.HiveUtil.getOrcWriterOptions; +import static io.trino.orc.metadata.OrcType.createRootOrcType; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_UNSUPPORTED_FORMAT; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_OPEN_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITE_VALIDATION_FAILED; +import static io.trino.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; +import static io.trino.plugin.hive.HiveMetadata.PRESTO_VERSION_NAME; +import static io.trino.plugin.hive.HiveSessionProperties.getOrcOptimizedWriterMaxDictionaryMemory; +import static io.trino.plugin.hive.HiveSessionProperties.getOrcOptimizedWriterMaxStripeRows; +import static io.trino.plugin.hive.HiveSessionProperties.getOrcOptimizedWriterMaxStripeSize; +import static io.trino.plugin.hive.HiveSessionProperties.getOrcOptimizedWriterMinStripeSize; +import static io.trino.plugin.hive.HiveSessionProperties.getOrcOptimizedWriterValidateMode; +import static io.trino.plugin.hive.HiveSessionProperties.getOrcStringStatisticsLimit; +import static io.trino.plugin.hive.HiveSessionProperties.getTimestampPrecision; +import static io.trino.plugin.hive.HiveSessionProperties.isOrcOptimizedWriterValidate; +import static io.trino.plugin.hive.acid.AcidSchema.ACID_COLUMN_NAMES; +import static io.trino.plugin.hive.acid.AcidSchema.createAcidColumnPrestoTypes; +import static io.trino.plugin.hive.util.HiveUtil.getColumnNames; +import static io.trino.plugin.hive.util.HiveUtil.getColumnTypes; +import static io.trino.plugin.hive.util.HiveUtil.getOrcWriterOptions; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSource.java index 4ac5776793bf..38cb14425023 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSource.java @@ -14,24 +14,24 @@ package io.trino.plugin.hive.orc; import com.google.common.collect.ImmutableList; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.OrcRecordReader; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.orc.OrcDeletedRows.MaskDeletedRowsFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.block.LazyBlockLoader; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.OrcRecordReader; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.OrcType; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.orc.OrcDeletedRows.MaskDeletedRowsFunction; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.block.LazyBlockLoader; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.type.Type; import java.io.IOException; import java.io.UncheckedIOException; @@ -42,16 +42,16 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CURSOR_ERROR; -import static io.prestosql.plugin.hive.HiveUpdatablePageSource.BUCKET_CHANNEL; -import static io.prestosql.plugin.hive.HiveUpdatablePageSource.ORIGINAL_TRANSACTION_CHANNEL; -import static io.prestosql.plugin.hive.HiveUpdatablePageSource.ROW_ID_CHANNEL; -import static io.prestosql.plugin.hive.orc.OrcFileWriter.computeBucketValue; -import static io.prestosql.spi.block.RowBlock.fromFieldBlocks; -import static io.prestosql.spi.predicate.Utils.nativeValueToBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CURSOR_ERROR; +import static io.trino.plugin.hive.HiveUpdatablePageSource.BUCKET_CHANNEL; +import static io.trino.plugin.hive.HiveUpdatablePageSource.ORIGINAL_TRANSACTION_CHANNEL; +import static io.trino.plugin.hive.HiveUpdatablePageSource.ROW_ID_CHANNEL; +import static io.trino.plugin.hive.orc.OrcFileWriter.computeBucketValue; +import static io.trino.spi.block.RowBlock.fromFieldBlocks; +import static io.trino.spi.predicate.Utils.nativeValueToBlock; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSourceFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSourceFactory.java index 0b750029152d..5ed334584618 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSourceFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSourceFactory.java @@ -16,35 +16,35 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.OrcReader; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.orc.OrcRecordReader; -import io.prestosql.orc.TupleDomainOrcPredicate; -import io.prestosql.orc.TupleDomainOrcPredicate.TupleDomainOrcPredicateBuilder; -import io.prestosql.orc.metadata.OrcType.OrcTypeKind; -import io.prestosql.plugin.hive.AcidInfo; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveColumnProjectionInfo; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HivePageSourceFactory; -import io.prestosql.plugin.hive.ReaderColumns; -import io.prestosql.plugin.hive.ReaderPageSource; -import io.prestosql.plugin.hive.acid.AcidSchema; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.orc.OrcPageSource.ColumnAdaptation; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.EmptyPageSource; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.OrcReader; +import io.trino.orc.OrcReaderOptions; +import io.trino.orc.OrcRecordReader; +import io.trino.orc.TupleDomainOrcPredicate; +import io.trino.orc.TupleDomainOrcPredicate.TupleDomainOrcPredicateBuilder; +import io.trino.orc.metadata.OrcType.OrcTypeKind; +import io.trino.plugin.hive.AcidInfo; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveColumnProjectionInfo; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HivePageSourceFactory; +import io.trino.plugin.hive.ReaderColumns; +import io.trino.plugin.hive.ReaderPageSource; +import io.trino.plugin.hive.acid.AcidSchema; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.orc.OrcPageSource.ColumnAdaptation; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.EmptyPageSource; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; @@ -71,33 +71,33 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.Maps.uniqueIndex; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcReader.INITIAL_BATCH_SIZE; -import static io.prestosql.orc.OrcReader.ProjectedLayout.createProjectedLayout; -import static io.prestosql.orc.OrcReader.ProjectedLayout.fullyProjectedLayout; -import static io.prestosql.orc.metadata.OrcType.OrcTypeKind.INT; -import static io.prestosql.orc.metadata.OrcType.OrcTypeKind.LONG; -import static io.prestosql.orc.metadata.OrcType.OrcTypeKind.STRUCT; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CANNOT_OPEN_SPLIT; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILE_MISSING_COLUMN_NAMES; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_MISSING_DATA; -import static io.prestosql.plugin.hive.HivePageSourceProvider.projectBaseColumns; -import static io.prestosql.plugin.hive.HiveSessionProperties.getOrcLazyReadSmallRanges; -import static io.prestosql.plugin.hive.HiveSessionProperties.getOrcMaxBufferSize; -import static io.prestosql.plugin.hive.HiveSessionProperties.getOrcMaxMergeDistance; -import static io.prestosql.plugin.hive.HiveSessionProperties.getOrcMaxReadBlockSize; -import static io.prestosql.plugin.hive.HiveSessionProperties.getOrcStreamBufferSize; -import static io.prestosql.plugin.hive.HiveSessionProperties.getOrcTinyStripeThreshold; -import static io.prestosql.plugin.hive.HiveSessionProperties.isOrcBloomFiltersEnabled; -import static io.prestosql.plugin.hive.HiveSessionProperties.isOrcNestedLazy; -import static io.prestosql.plugin.hive.HiveSessionProperties.isUseOrcColumnNames; -import static io.prestosql.plugin.hive.ReaderPageSource.noProjectionAdaptation; -import static io.prestosql.plugin.hive.orc.OrcPageSource.handleException; -import static io.prestosql.plugin.hive.util.HiveUtil.isDeserializerClass; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcReader.INITIAL_BATCH_SIZE; +import static io.trino.orc.OrcReader.ProjectedLayout.createProjectedLayout; +import static io.trino.orc.OrcReader.ProjectedLayout.fullyProjectedLayout; +import static io.trino.orc.metadata.OrcType.OrcTypeKind.INT; +import static io.trino.orc.metadata.OrcType.OrcTypeKind.LONG; +import static io.trino.orc.metadata.OrcType.OrcTypeKind.STRUCT; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CANNOT_OPEN_SPLIT; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILE_MISSING_COLUMN_NAMES; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_MISSING_DATA; +import static io.trino.plugin.hive.HivePageSourceProvider.projectBaseColumns; +import static io.trino.plugin.hive.HiveSessionProperties.getOrcLazyReadSmallRanges; +import static io.trino.plugin.hive.HiveSessionProperties.getOrcMaxBufferSize; +import static io.trino.plugin.hive.HiveSessionProperties.getOrcMaxMergeDistance; +import static io.trino.plugin.hive.HiveSessionProperties.getOrcMaxReadBlockSize; +import static io.trino.plugin.hive.HiveSessionProperties.getOrcStreamBufferSize; +import static io.trino.plugin.hive.HiveSessionProperties.getOrcTinyStripeThreshold; +import static io.trino.plugin.hive.HiveSessionProperties.isOrcBloomFiltersEnabled; +import static io.trino.plugin.hive.HiveSessionProperties.isOrcNestedLazy; +import static io.trino.plugin.hive.HiveSessionProperties.isUseOrcColumnNames; +import static io.trino.plugin.hive.ReaderPageSource.noProjectionAdaptation; +import static io.trino.plugin.hive.orc.OrcPageSource.handleException; +import static io.trino.plugin.hive.util.HiveUtil.isDeserializerClass; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcReaderConfig.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcReaderConfig.java index ef8324635c17..65c637ff9987 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcReaderConfig.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcReaderConfig.java @@ -16,7 +16,7 @@ import io.airlift.configuration.Config; import io.airlift.configuration.ConfigDescription; import io.airlift.units.DataSize; -import io.prestosql.orc.OrcReaderOptions; +import io.trino.orc.OrcReaderOptions; import javax.validation.constraints.NotNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcTypeToHiveTypeTranslator.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcTypeToHiveTypeTranslator.java index 8c8f90303cb8..f467ea45a340 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcTypeToHiveTypeTranslator.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcTypeToHiveTypeTranslator.java @@ -15,25 +15,25 @@ import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableList; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.plugin.hive.HiveType; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.OrcType; +import io.trino.plugin.hive.HiveType; import org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.HiveType.HIVE_BINARY; -import static io.prestosql.plugin.hive.HiveType.HIVE_BOOLEAN; -import static io.prestosql.plugin.hive.HiveType.HIVE_BYTE; -import static io.prestosql.plugin.hive.HiveType.HIVE_DATE; -import static io.prestosql.plugin.hive.HiveType.HIVE_DOUBLE; -import static io.prestosql.plugin.hive.HiveType.HIVE_FLOAT; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.HIVE_LONG; -import static io.prestosql.plugin.hive.HiveType.HIVE_SHORT; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.HiveType.HIVE_TIMESTAMP; -import static io.prestosql.plugin.hive.HiveType.toHiveType; +import static io.trino.plugin.hive.HiveType.HIVE_BINARY; +import static io.trino.plugin.hive.HiveType.HIVE_BOOLEAN; +import static io.trino.plugin.hive.HiveType.HIVE_BYTE; +import static io.trino.plugin.hive.HiveType.HIVE_DATE; +import static io.trino.plugin.hive.HiveType.HIVE_DOUBLE; +import static io.trino.plugin.hive.HiveType.HIVE_FLOAT; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.HIVE_LONG; +import static io.trino.plugin.hive.HiveType.HIVE_SHORT; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.HiveType.HIVE_TIMESTAMP; +import static io.trino.plugin.hive.HiveType.toHiveType; import static org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory.getListTypeInfo; import static org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory.getMapTypeInfo; import static org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory.getStructTypeInfo; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcWriterConfig.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcWriterConfig.java index cb25bd7ae831..4c3a5d2525e6 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcWriterConfig.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcWriterConfig.java @@ -17,8 +17,8 @@ import io.airlift.configuration.ConfigDescription; import io.airlift.configuration.DefunctConfig; import io.airlift.units.DataSize; -import io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode; -import io.prestosql.orc.OrcWriterOptions; +import io.trino.orc.OrcWriteValidation.OrcWriteValidationMode; +import io.trino.orc.OrcWriterOptions; import javax.validation.constraints.DecimalMax; import javax.validation.constraints.DecimalMin; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OriginalFilesUtils.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OriginalFilesUtils.java index fa9c8f09cff9..6773fec52973 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OriginalFilesUtils.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OriginalFilesUtils.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.hive.orc; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.OrcReader; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.spi.PrestoException; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.OrcReader; +import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.spi.PrestoException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; @@ -27,9 +27,9 @@ import java.util.Collection; -import static io.prestosql.orc.OrcReader.createOrcReader; -import static io.prestosql.plugin.hive.AcidInfo.OriginalFileInfo; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CANNOT_OPEN_SPLIT; +import static io.trino.orc.OrcReader.createOrcReader; +import static io.trino.plugin.hive.AcidInfo.OriginalFileInfo; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CANNOT_OPEN_SPLIT; public final class OriginalFilesUtils { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/HdfsParquetDataSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/HdfsParquetDataSource.java index ab64d4f13f5b..b204a175a627 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/HdfsParquetDataSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/HdfsParquetDataSource.java @@ -18,14 +18,14 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.parquet.ChunkReader; -import io.prestosql.parquet.DiskRange; -import io.prestosql.parquet.ParquetDataSource; -import io.prestosql.parquet.ParquetDataSourceId; -import io.prestosql.parquet.ParquetReaderOptions; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.util.FSDataInputStreamTail; -import io.prestosql.spi.PrestoException; +import io.trino.parquet.ChunkReader; +import io.trino.parquet.DiskRange; +import io.trino.parquet.ParquetDataSource; +import io.trino.parquet.ParquetDataSourceId; +import io.trino.parquet.ParquetReaderOptions; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.util.FSDataInputStreamTail; +import io.trino.spi.PrestoException; import org.apache.hadoop.fs.FSDataInputStream; import java.io.IOException; @@ -36,7 +36,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.util.Comparator.comparingLong; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetColumnIOConverter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetColumnIOConverter.java index 9ca5987a129e..a74d2f9366ae 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetColumnIOConverter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetColumnIOConverter.java @@ -14,16 +14,16 @@ package io.trino.plugin.hive.parquet; import com.google.common.collect.ImmutableList; -import io.prestosql.parquet.Field; -import io.prestosql.parquet.GroupField; -import io.prestosql.parquet.PrimitiveField; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.parquet.Field; +import io.trino.parquet.GroupField; +import io.trino.parquet.PrimitiveField; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; import org.apache.parquet.io.ColumnIO; import org.apache.parquet.io.GroupColumnIO; import org.apache.parquet.io.PrimitiveColumnIO; @@ -32,9 +32,9 @@ import java.util.Locale; import java.util.Optional; -import static io.prestosql.parquet.ParquetTypeUtils.getArrayElementColumn; -import static io.prestosql.parquet.ParquetTypeUtils.getMapKeyValueColumn; -import static io.prestosql.parquet.ParquetTypeUtils.lookupColumnByName; +import static io.trino.parquet.ParquetTypeUtils.getArrayElementColumn; +import static io.trino.parquet.ParquetTypeUtils.getMapKeyValueColumn; +import static io.trino.parquet.ParquetTypeUtils.lookupColumnByName; import static org.apache.parquet.io.ColumnIOUtil.columnDefinitionLevel; import static org.apache.parquet.io.ColumnIOUtil.columnRepetitionLevel; import static org.apache.parquet.schema.Type.Repetition.OPTIONAL; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetFileWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetFileWriter.java index aac2e53e2918..abc9f448fa4b 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetFileWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetFileWriter.java @@ -14,15 +14,15 @@ package io.trino.plugin.hive.parquet; import com.google.common.collect.ImmutableList; -import io.prestosql.parquet.writer.ParquetWriter; -import io.prestosql.parquet.writer.ParquetWriterOptions; -import io.prestosql.plugin.hive.FileWriter; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.type.Type; +import io.trino.parquet.writer.ParquetWriter; +import io.trino.parquet.writer.ParquetWriterOptions; +import io.trino.plugin.hive.FileWriter; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.type.Type; import org.apache.parquet.hadoop.metadata.CompressionCodecName; import org.apache.parquet.schema.MessageType; import org.openjdk.jol.info.ClassLayout; @@ -35,8 +35,8 @@ import java.util.concurrent.Callable; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_CLOSE_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; import static java.util.Objects.requireNonNull; public class ParquetFileWriter diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetFileWriterFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetFileWriterFactory.java index aa4e990092f9..94df1dd39222 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetFileWriterFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetFileWriterFactory.java @@ -13,18 +13,18 @@ */ package io.trino.plugin.hive.parquet; -import io.prestosql.parquet.writer.ParquetSchemaConverter; -import io.prestosql.parquet.writer.ParquetWriterOptions; -import io.prestosql.plugin.hive.FileWriter; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveFileWriterFactory; -import io.prestosql.plugin.hive.HiveSessionProperties; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.parquet.writer.ParquetSchemaConverter; +import io.trino.parquet.writer.ParquetWriterOptions; +import io.trino.plugin.hive.FileWriter; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveFileWriterFactory; +import io.trino.plugin.hive.HiveSessionProperties; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat; @@ -41,10 +41,10 @@ import java.util.Properties; import java.util.concurrent.Callable; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_OPEN_ERROR; -import static io.prestosql.plugin.hive.HiveSessionProperties.getTimestampPrecision; -import static io.prestosql.plugin.hive.util.HiveUtil.getColumnNames; -import static io.prestosql.plugin.hive.util.HiveUtil.getColumnTypes; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_OPEN_ERROR; +import static io.trino.plugin.hive.HiveSessionProperties.getTimestampPrecision; +import static io.trino.plugin.hive.util.HiveUtil.getColumnNames; +import static io.trino.plugin.hive.util.HiveUtil.getColumnTypes; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetPageSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetPageSource.java index 799957cfbf21..8c049d78b77c 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetPageSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetPageSource.java @@ -14,17 +14,17 @@ package io.trino.plugin.hive.parquet; import com.google.common.collect.ImmutableList; -import io.prestosql.parquet.Field; -import io.prestosql.parquet.ParquetCorruptionException; -import io.prestosql.parquet.reader.ParquetReader; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.block.LazyBlockLoader; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.type.Type; +import io.trino.parquet.Field; +import io.trino.parquet.ParquetCorruptionException; +import io.trino.parquet.reader.ParquetReader; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.block.LazyBlockLoader; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.type.Type; import java.io.IOException; import java.io.UncheckedIOException; @@ -32,8 +32,8 @@ import java.util.Optional; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CURSOR_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CURSOR_ERROR; import static java.util.Objects.requireNonNull; public class ParquetPageSource diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetPageSourceFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetPageSourceFactory.java index 57661e1641f8..a80e3e0536d2 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetPageSourceFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetPageSourceFactory.java @@ -16,30 +16,30 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.parquet.Field; -import io.prestosql.parquet.ParquetCorruptionException; -import io.prestosql.parquet.ParquetDataSource; -import io.prestosql.parquet.ParquetDataSourceId; -import io.prestosql.parquet.ParquetReaderOptions; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.parquet.predicate.Predicate; -import io.prestosql.parquet.reader.MetadataReader; -import io.prestosql.parquet.reader.ParquetReader; -import io.prestosql.plugin.hive.AcidInfo; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HivePageSourceFactory; -import io.prestosql.plugin.hive.ReaderColumns; -import io.prestosql.plugin.hive.ReaderPageSource; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.parquet.Field; +import io.trino.parquet.ParquetCorruptionException; +import io.trino.parquet.ParquetDataSource; +import io.trino.parquet.ParquetDataSourceId; +import io.trino.parquet.ParquetReaderOptions; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.parquet.predicate.Predicate; +import io.trino.parquet.reader.MetadataReader; +import io.trino.parquet.reader.ParquetReader; +import io.trino.plugin.hive.AcidInfo; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HivePageSourceFactory; +import io.trino.plugin.hive.ReaderColumns; +import io.trino.plugin.hive.ReaderPageSource; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; @@ -69,24 +69,24 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Strings.nullToEmpty; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.parquet.ParquetTypeUtils.getColumnIO; -import static io.prestosql.parquet.ParquetTypeUtils.getDescriptors; -import static io.prestosql.parquet.ParquetTypeUtils.getParquetTypeByName; -import static io.prestosql.parquet.ParquetTypeUtils.lookupColumnByName; -import static io.prestosql.parquet.predicate.PredicateUtils.buildPredicate; -import static io.prestosql.parquet.predicate.PredicateUtils.predicateMatches; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CANNOT_OPEN_SPLIT; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_MISSING_DATA; -import static io.prestosql.plugin.hive.HivePageSourceProvider.projectBaseColumns; -import static io.prestosql.plugin.hive.HivePageSourceProvider.projectSufficientColumns; -import static io.prestosql.plugin.hive.HiveSessionProperties.getParquetMaxReadBlockSize; -import static io.prestosql.plugin.hive.HiveSessionProperties.isParquetIgnoreStatistics; -import static io.prestosql.plugin.hive.HiveSessionProperties.isUseParquetColumnNames; -import static io.prestosql.plugin.hive.parquet.ParquetColumnIOConverter.constructField; -import static io.prestosql.plugin.hive.util.HiveUtil.getDeserializerClassName; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.parquet.ParquetTypeUtils.getColumnIO; +import static io.trino.parquet.ParquetTypeUtils.getDescriptors; +import static io.trino.parquet.ParquetTypeUtils.getParquetTypeByName; +import static io.trino.parquet.ParquetTypeUtils.lookupColumnByName; +import static io.trino.parquet.predicate.PredicateUtils.buildPredicate; +import static io.trino.parquet.predicate.PredicateUtils.predicateMatches; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CANNOT_OPEN_SPLIT; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_MISSING_DATA; +import static io.trino.plugin.hive.HivePageSourceProvider.projectBaseColumns; +import static io.trino.plugin.hive.HivePageSourceProvider.projectSufficientColumns; +import static io.trino.plugin.hive.HiveSessionProperties.getParquetMaxReadBlockSize; +import static io.trino.plugin.hive.HiveSessionProperties.isParquetIgnoreStatistics; +import static io.trino.plugin.hive.HiveSessionProperties.isUseParquetColumnNames; +import static io.trino.plugin.hive.parquet.ParquetColumnIOConverter.constructField; +import static io.trino.plugin.hive.util.HiveUtil.getDeserializerClassName; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toUnmodifiableList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetReaderConfig.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetReaderConfig.java index 2f9881deefc5..42b6b04a821e 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetReaderConfig.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetReaderConfig.java @@ -17,7 +17,7 @@ import io.airlift.configuration.ConfigDescription; import io.airlift.configuration.LegacyConfig; import io.airlift.units.DataSize; -import io.prestosql.parquet.ParquetReaderOptions; +import io.trino.parquet.ParquetReaderOptions; import javax.validation.constraints.NotNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetRecordWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetRecordWriter.java index 058503787de8..51792f9b80ce 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetRecordWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetRecordWriter.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.hive.parquet; -import io.prestosql.plugin.hive.RecordFileWriter.ExtendedRecordWriter; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.hive.RecordFileWriter.ExtendedRecordWriter; +import io.trino.spi.connector.ConnectorSession; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter; import org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat; @@ -30,8 +30,8 @@ import java.lang.reflect.Field; import java.util.Properties; -import static io.prestosql.plugin.hive.HiveSessionProperties.getParquetWriterBlockSize; -import static io.prestosql.plugin.hive.HiveSessionProperties.getParquetWriterPageSize; +import static io.trino.plugin.hive.HiveSessionProperties.getParquetWriterBlockSize; +import static io.trino.plugin.hive.HiveSessionProperties.getParquetWriterPageSize; import static java.util.Objects.requireNonNull; public final class ParquetRecordWriter diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetWriterConfig.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetWriterConfig.java index 2454cad28464..b2d4474af1fd 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetWriterConfig.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetWriterConfig.java @@ -17,7 +17,7 @@ import io.airlift.configuration.ConfigDescription; import io.airlift.configuration.LegacyConfig; import io.airlift.units.DataSize; -import io.prestosql.parquet.writer.ParquetWriterOptions; +import io.trino.parquet.writer.ParquetWriterOptions; import org.apache.parquet.hadoop.ParquetWriter; public class ParquetWriterConfig diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/CreateEmptyPartitionProcedure.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/CreateEmptyPartitionProcedure.java index d8953b64ad27..864fde42ecb8 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/CreateEmptyPartitionProcedure.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/CreateEmptyPartitionProcedure.java @@ -17,26 +17,26 @@ import io.airlift.json.JsonCodec; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveInsertTableHandle; -import io.prestosql.plugin.hive.HiveMetastoreClosure; -import io.prestosql.plugin.hive.HiveTableHandle; -import io.prestosql.plugin.hive.LocationService; -import io.prestosql.plugin.hive.LocationService.WriteInfo; -import io.prestosql.plugin.hive.PartitionUpdate; -import io.prestosql.plugin.hive.PartitionUpdate.UpdateMode; -import io.prestosql.plugin.hive.TransactionalMetadata; -import io.prestosql.plugin.hive.TransactionalMetadataFactory; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.procedure.Procedure.Argument; -import io.prestosql.spi.type.ArrayType; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveInsertTableHandle; +import io.trino.plugin.hive.HiveMetastoreClosure; +import io.trino.plugin.hive.HiveTableHandle; +import io.trino.plugin.hive.LocationService; +import io.trino.plugin.hive.LocationService.WriteInfo; +import io.trino.plugin.hive.PartitionUpdate; +import io.trino.plugin.hive.PartitionUpdate.UpdateMode; +import io.trino.plugin.hive.TransactionalMetadata; +import io.trino.plugin.hive.TransactionalMetadataFactory; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.spi.PrestoException; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.procedure.Procedure.Argument; +import io.trino.spi.type.ArrayType; import org.apache.hadoop.hive.common.FileUtils; import javax.inject.Inject; @@ -48,10 +48,10 @@ import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; -import static io.prestosql.spi.block.MethodHandleUtil.methodHandle; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; +import static io.trino.spi.block.MethodHandleUtil.methodHandle; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/DropStatsProcedure.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/DropStatsProcedure.java index 383f504e7277..ae8ccfc2ddc9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/DropStatsProcedure.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/DropStatsProcedure.java @@ -14,24 +14,24 @@ package io.trino.plugin.hive.procedure; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveMetastoreClosure; -import io.prestosql.plugin.hive.HiveTableHandle; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.TransactionalMetadata; -import io.prestosql.plugin.hive.TransactionalMetadataFactory; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.procedure.Procedure.Argument; -import io.prestosql.spi.type.ArrayType; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveMetastoreClosure; +import io.trino.plugin.hive.HiveTableHandle; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.TransactionalMetadata; +import io.trino.plugin.hive.TransactionalMetadataFactory; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.spi.PrestoException; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.procedure.Procedure.Argument; +import io.trino.spi.type.ArrayType; import javax.inject.Inject; import javax.inject.Provider; @@ -41,10 +41,10 @@ import java.util.Map; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; -import static io.prestosql.spi.block.MethodHandleUtil.methodHandle; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; +import static io.trino.spi.block.MethodHandleUtil.methodHandle; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.apache.hadoop.hive.metastore.utils.FileUtils.makePartName; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/HiveProcedureModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/HiveProcedureModule.java index 46fbc7bf27d5..7e1aa2090eb9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/HiveProcedureModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/HiveProcedureModule.java @@ -17,7 +17,7 @@ import com.google.inject.Module; import com.google.inject.Scopes; import com.google.inject.multibindings.Multibinder; -import io.prestosql.spi.procedure.Procedure; +import io.trino.spi.procedure.Procedure; import static com.google.inject.multibindings.Multibinder.newSetBinder; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/Procedures.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/Procedures.java index 1601dbb318a2..947b4208afa9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/Procedures.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/Procedures.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.hive.procedure; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.PrestoException; import org.apache.hadoop.hive.metastore.TableType; import java.util.List; import java.util.Objects; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; final class Procedures { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/RegisterPartitionProcedure.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/RegisterPartitionProcedure.java index 933857d0a406..50c33bc7bfb8 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/RegisterPartitionProcedure.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/RegisterPartitionProcedure.java @@ -15,27 +15,27 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HiveMetadata; -import io.prestosql.plugin.hive.HiveMetastoreClosure; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.TransactionalMetadataFactory; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.util.HiveWriteUtils; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.type.ArrayType; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HiveMetadata; +import io.trino.plugin.hive.HiveMetastoreClosure; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.TransactionalMetadataFactory; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.util.HiveWriteUtils; +import io.trino.spi.PrestoException; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.type.ArrayType; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.common.FileUtils; @@ -46,14 +46,14 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; -import static io.prestosql.plugin.hive.procedure.Procedures.checkIsPartitionedTable; -import static io.prestosql.plugin.hive.procedure.Procedures.checkPartitionColumns; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.PERMISSION_DENIED; -import static io.prestosql.spi.block.MethodHandleUtil.methodHandle; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; +import static io.trino.plugin.hive.procedure.Procedures.checkIsPartitionedTable; +import static io.trino.plugin.hive.procedure.Procedures.checkPartitionColumns; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; +import static io.trino.spi.StandardErrorCode.PERMISSION_DENIED; +import static io.trino.spi.block.MethodHandleUtil.methodHandle; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/SyncPartitionMetadataProcedure.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/SyncPartitionMetadataProcedure.java index fedff09efd22..f883b83bb90f 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/SyncPartitionMetadataProcedure.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/SyncPartitionMetadataProcedure.java @@ -16,23 +16,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Sets; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveMetadata; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.TransactionalMetadataFactory; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.procedure.Procedure.Argument; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveMetadata; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.TransactionalMetadataFactory; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.PrestoException; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.procedure.Procedure.Argument; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; @@ -48,14 +48,14 @@ import java.util.stream.Stream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; -import static io.prestosql.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; -import static io.prestosql.plugin.hive.HivePartitionManager.extractPartitionValues; -import static io.prestosql.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; -import static io.prestosql.spi.block.MethodHandleUtil.methodHandle; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; +import static io.trino.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; +import static io.trino.plugin.hive.HivePartitionManager.extractPartitionValues; +import static io.trino.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; +import static io.trino.spi.block.MethodHandleUtil.methodHandle; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Boolean.TRUE; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/UnregisterPartitionProcedure.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/UnregisterPartitionProcedure.java index cd75e6d9d6d7..0dda8fcb5b13 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/UnregisterPartitionProcedure.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/procedure/UnregisterPartitionProcedure.java @@ -14,22 +14,22 @@ package io.trino.plugin.hive.procedure; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.HiveMetadata; -import io.prestosql.plugin.hive.HiveMetastoreClosure; -import io.prestosql.plugin.hive.TransactionalMetadataFactory; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.type.ArrayType; +import io.trino.plugin.hive.HiveMetadata; +import io.trino.plugin.hive.HiveMetastoreClosure; +import io.trino.plugin.hive.TransactionalMetadataFactory; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.PrestoException; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.type.ArrayType; import org.apache.hadoop.hive.common.FileUtils; import javax.inject.Inject; @@ -38,11 +38,11 @@ import java.lang.invoke.MethodHandle; import java.util.List; -import static io.prestosql.plugin.hive.procedure.Procedures.checkIsPartitionedTable; -import static io.prestosql.plugin.hive.procedure.Procedures.checkPartitionColumns; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.block.MethodHandleUtil.methodHandle; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.hive.procedure.Procedures.checkIsPartitionedTable; +import static io.trino.plugin.hive.procedure.Procedures.checkPartitionColumns; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.block.MethodHandleUtil.methodHandle; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rcfile/HdfsRcFileDataSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rcfile/HdfsRcFileDataSource.java index 106dcfaa5026..6def5227717e 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rcfile/HdfsRcFileDataSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rcfile/HdfsRcFileDataSource.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.hive.rcfile; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.rcfile.RcFileDataSource; -import io.prestosql.rcfile.RcFileDataSourceId; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.rcfile.RcFileDataSource; +import io.trino.rcfile.RcFileDataSourceId; import org.apache.hadoop.fs.FSDataInputStream; import java.io.IOException; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rcfile/RcFilePageSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rcfile/RcFilePageSource.java index 7d4a630c4533..c65919a8925d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rcfile/RcFilePageSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rcfile/RcFilePageSource.java @@ -15,27 +15,27 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.rcfile.RcFileCorruptionException; -import io.prestosql.rcfile.RcFileReader; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.block.LazyBlockLoader; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveType; +import io.trino.rcfile.RcFileCorruptionException; +import io.trino.rcfile.RcFileReader; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.block.LazyBlockLoader; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.type.Type; import java.io.IOException; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CURSOR_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CURSOR_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rcfile/RcFilePageSourceFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rcfile/RcFilePageSourceFactory.java index 6a214a68119a..e234660fb7e1 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rcfile/RcFilePageSourceFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rcfile/RcFilePageSourceFactory.java @@ -18,34 +18,34 @@ import io.airlift.slice.Slices; import io.airlift.units.DataSize; import io.airlift.units.DataSize.Unit; -import io.prestosql.plugin.hive.AcidInfo; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HivePageSourceFactory; -import io.prestosql.plugin.hive.HiveTimestampPrecision; -import io.prestosql.plugin.hive.ReaderColumns; -import io.prestosql.plugin.hive.ReaderPageSource; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.util.FSDataInputStreamTail; -import io.prestosql.rcfile.AircompressorCodecFactory; -import io.prestosql.rcfile.HadoopCodecFactory; -import io.prestosql.rcfile.MemoryRcFileDataSource; -import io.prestosql.rcfile.RcFileCorruptionException; -import io.prestosql.rcfile.RcFileDataSource; -import io.prestosql.rcfile.RcFileDataSourceId; -import io.prestosql.rcfile.RcFileEncoding; -import io.prestosql.rcfile.RcFileReader; -import io.prestosql.rcfile.binary.BinaryRcFileEncoding; -import io.prestosql.rcfile.text.TextRcFileEncoding; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.EmptyPageSource; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.AcidInfo; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HivePageSourceFactory; +import io.trino.plugin.hive.HiveTimestampPrecision; +import io.trino.plugin.hive.ReaderColumns; +import io.trino.plugin.hive.ReaderPageSource; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.util.FSDataInputStreamTail; +import io.trino.rcfile.AircompressorCodecFactory; +import io.trino.rcfile.HadoopCodecFactory; +import io.trino.rcfile.MemoryRcFileDataSource; +import io.trino.rcfile.RcFileCorruptionException; +import io.trino.rcfile.RcFileDataSource; +import io.trino.rcfile.RcFileDataSourceId; +import io.trino.rcfile.RcFileEncoding; +import io.trino.rcfile.RcFileReader; +import io.trino.rcfile.binary.BinaryRcFileEncoding; +import io.trino.rcfile.text.TextRcFileEncoding; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.EmptyPageSource; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; @@ -68,15 +68,15 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Strings.nullToEmpty; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CANNOT_OPEN_SPLIT; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_MISSING_DATA; -import static io.prestosql.plugin.hive.HivePageSourceProvider.projectBaseColumns; -import static io.prestosql.plugin.hive.HiveSessionProperties.getTimestampPrecision; -import static io.prestosql.plugin.hive.ReaderPageSource.noProjectionAdaptation; -import static io.prestosql.plugin.hive.util.HiveUtil.getDeserializerClassName; -import static io.prestosql.rcfile.text.TextRcFileEncoding.DEFAULT_NULL_SEQUENCE; -import static io.prestosql.rcfile.text.TextRcFileEncoding.DEFAULT_SEPARATORS; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CANNOT_OPEN_SPLIT; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_MISSING_DATA; +import static io.trino.plugin.hive.HivePageSourceProvider.projectBaseColumns; +import static io.trino.plugin.hive.HiveSessionProperties.getTimestampPrecision; +import static io.trino.plugin.hive.ReaderPageSource.noProjectionAdaptation; +import static io.trino.plugin.hive.util.HiveUtil.getDeserializerClassName; +import static io.trino.rcfile.text.TextRcFileEncoding.DEFAULT_NULL_SEQUENCE; +import static io.trino.rcfile.text.TextRcFileEncoding.DEFAULT_SEPARATORS; import static java.lang.Math.min; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/CachingPrestoS3FileSystem.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/CachingPrestoS3FileSystem.java index 0a4ac3cfc32a..f1a39d58c59f 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/CachingPrestoS3FileSystem.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/CachingPrestoS3FileSystem.java @@ -15,7 +15,7 @@ import com.qubole.rubix.core.CachingFileSystem; import com.qubole.rubix.spi.ClusterType; -import io.prestosql.plugin.hive.s3.PrestoS3FileSystem; +import io.trino.plugin.hive.s3.PrestoS3FileSystem; public class CachingPrestoS3FileSystem extends CachingFileSystem diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/PrestoClusterManager.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/PrestoClusterManager.java index caba08e86255..b1c57f41b64c 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/PrestoClusterManager.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/PrestoClusterManager.java @@ -15,9 +15,9 @@ import com.qubole.rubix.spi.ClusterManager; import com.qubole.rubix.spi.ClusterType; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; +import io.trino.spi.HostAddress; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; import java.net.InetAddress; import java.net.UnknownHostException; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixConfigurationInitializer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixConfigurationInitializer.java index cd4c490031e1..d710a31af0c8 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixConfigurationInitializer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixConfigurationInitializer.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.hive.rubix; -import io.prestosql.plugin.hive.DynamicConfigurationProvider; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.DynamicConfigurationProvider; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; import org.apache.hadoop.conf.Configuration; import javax.inject.Inject; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixHdfsInitializer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixHdfsInitializer.java index 72f9cd1e99f6..dea418441c09 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixHdfsInitializer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixHdfsInitializer.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive.rubix; -import io.prestosql.plugin.hive.ConfigurationInitializer; +import io.trino.plugin.hive.ConfigurationInitializer; public interface RubixHdfsInitializer extends ConfigurationInitializer diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixInitializer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixInitializer.java index 112fc83c42b2..ba0f33b04d1a 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixInitializer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixInitializer.java @@ -28,13 +28,13 @@ import com.qubole.rubix.prestosql.CachingPrestoSecureNativeAzureFileSystem; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.HdfsConfigurationInitializer; -import io.prestosql.plugin.hive.util.RetryDriver; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.HdfsConfigurationInitializer; +import io.trino.plugin.hive.util.RetryDriver; +import io.trino.spi.HostAddress; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; +import io.trino.spi.PrestoException; import org.apache.hadoop.conf.Configuration; import javax.annotation.Nullable; @@ -60,13 +60,13 @@ import static com.qubole.rubix.spi.CacheConfig.setIsParallelWarmupEnabled; import static com.qubole.rubix.spi.CacheConfig.setOnMaster; import static com.qubole.rubix.spi.CacheConfig.setPrestoClusterManager; -import static io.prestosql.plugin.hive.DynamicConfigurationProvider.setCacheKey; -import static io.prestosql.plugin.hive.rubix.RubixInitializer.Owner.PRESTO; -import static io.prestosql.plugin.hive.rubix.RubixInitializer.Owner.RUBIX; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.getInitialConfiguration; -import static io.prestosql.plugin.hive.util.RetryDriver.DEFAULT_SCALE_FACTOR; -import static io.prestosql.plugin.hive.util.RetryDriver.retry; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.plugin.hive.DynamicConfigurationProvider.setCacheKey; +import static io.trino.plugin.hive.rubix.RubixInitializer.Owner.PRESTO; +import static io.trino.plugin.hive.rubix.RubixInitializer.Owner.RUBIX; +import static io.trino.plugin.hive.util.ConfigurationUtils.getInitialConfiguration; +import static io.trino.plugin.hive.util.RetryDriver.DEFAULT_SCALE_FACTOR; +import static io.trino.plugin.hive.util.RetryDriver.retry; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.lang.Integer.MAX_VALUE; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixModule.java index 06720dc09ff4..bfb9c4d04f5b 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/rubix/RubixModule.java @@ -19,8 +19,8 @@ import com.google.inject.Module; import com.google.inject.Scopes; import com.qubole.rubix.prestosql.CachingPrestoDistributedFileSystem; -import io.prestosql.plugin.hive.DynamicConfigurationProvider; -import io.prestosql.plugin.hive.authentication.HiveAuthenticationConfig; +import io.trino.plugin.hive.DynamicConfigurationProvider; +import io.trino.plugin.hive.authentication.HiveAuthenticationConfig; import org.apache.hadoop.conf.Configuration; import java.util.Set; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/HiveS3Module.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/HiveS3Module.java index d1c1981577a2..974dab47f7ff 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/HiveS3Module.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/HiveS3Module.java @@ -17,11 +17,11 @@ import com.google.inject.Provider; import com.google.inject.Scopes; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.ConfigurationInitializer; -import io.prestosql.plugin.hive.DynamicConfigurationProvider; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.rubix.RubixEnabledConfig; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.ConfigurationInitializer; +import io.trino.plugin.hive.DynamicConfigurationProvider; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.rubix.RubixEnabledConfig; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.common.JavaUtils; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/PrestoS3ConfigurationInitializer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/PrestoS3ConfigurationInitializer.java index 365c54bc177e..dab2ccf6ef67 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/PrestoS3ConfigurationInitializer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/PrestoS3ConfigurationInitializer.java @@ -15,45 +15,45 @@ import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.ConfigurationInitializer; +import io.trino.plugin.hive.ConfigurationInitializer; import org.apache.hadoop.conf.Configuration; import javax.inject.Inject; import java.io.File; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ACCESS_KEY; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ACL_TYPE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_CONNECT_TIMEOUT; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ENCRYPTION_MATERIALS_PROVIDER; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ENDPOINT; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_EXTERNAL_ID; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_IAM_ROLE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_KMS_KEY_ID; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_BACKOFF_TIME; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_CLIENT_RETRIES; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_CONNECTIONS; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_ERROR_RETRIES; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_RETRY_TIME; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MULTIPART_MIN_FILE_SIZE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MULTIPART_MIN_PART_SIZE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_PATH_STYLE_ACCESS; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_PIN_CLIENT_TO_CURRENT_REGION; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_REQUESTER_PAYS_ENABLED; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SECRET_KEY; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SIGNER_CLASS; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SIGNER_TYPE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SKIP_GLACIER_OBJECTS; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SOCKET_TIMEOUT; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SSE_ENABLED; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SSE_KMS_KEY_ID; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SSE_TYPE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SSL_ENABLED; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_STAGING_DIRECTORY; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_STORAGE_CLASS; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_STREAMING_UPLOAD_ENABLED; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_STREAMING_UPLOAD_PART_SIZE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_USER_AGENT_PREFIX; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ACCESS_KEY; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ACL_TYPE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_CONNECT_TIMEOUT; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ENCRYPTION_MATERIALS_PROVIDER; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ENDPOINT; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_EXTERNAL_ID; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_IAM_ROLE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_KMS_KEY_ID; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_BACKOFF_TIME; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_CLIENT_RETRIES; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_CONNECTIONS; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_ERROR_RETRIES; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_RETRY_TIME; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MULTIPART_MIN_FILE_SIZE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MULTIPART_MIN_PART_SIZE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_PATH_STYLE_ACCESS; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_PIN_CLIENT_TO_CURRENT_REGION; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_REQUESTER_PAYS_ENABLED; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SECRET_KEY; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SIGNER_CLASS; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SIGNER_TYPE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SKIP_GLACIER_OBJECTS; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SOCKET_TIMEOUT; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SSE_ENABLED; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SSE_KMS_KEY_ID; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SSE_TYPE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SSL_ENABLED; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_STAGING_DIRECTORY; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_STORAGE_CLASS; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_STREAMING_UPLOAD_ENABLED; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_STREAMING_UPLOAD_PART_SIZE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_USER_AGENT_PREFIX; public class PrestoS3ConfigurationInitializer implements ConfigurationInitializer diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/PrestoS3FileSystem.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/PrestoS3FileSystem.java index 46edeb193160..e4b34699bbc9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/PrestoS3FileSystem.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/PrestoS3FileSystem.java @@ -73,7 +73,7 @@ import io.airlift.log.Logger; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.util.FSDataInputStreamTail; +import io.trino.plugin.hive.util.FSDataInputStreamTail; import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.BlockLocation; @@ -137,8 +137,8 @@ import static com.google.common.hash.Hashing.md5; import static io.airlift.concurrent.Threads.threadsNamed; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.plugin.hive.aws.AwsCurrentRegionHolder.getCurrentRegionFromEC2Metadata; -import static io.prestosql.plugin.hive.util.RetryDriver.retry; +import static io.trino.plugin.hive.aws.AwsCurrentRegionHolder.getCurrentRegionFromEC2Metadata; +import static io.trino.plugin.hive.util.RetryDriver.retry; import static java.lang.Math.max; import static java.lang.Math.min; import static java.lang.Math.toIntExact; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/PrestoS3FileSystemMetricCollector.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/PrestoS3FileSystemMetricCollector.java index 18f51d3e70e8..80817770cdb6 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/PrestoS3FileSystemMetricCollector.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/PrestoS3FileSystemMetricCollector.java @@ -14,7 +14,7 @@ package io.trino.plugin.hive.s3; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.aws.AbstractSdkMetricsCollector; +import io.trino.plugin.hive.aws.AbstractSdkMetricsCollector; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/S3SecurityMapping.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/S3SecurityMapping.java index 1c73217f5522..2e69c116e517 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/S3SecurityMapping.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/S3SecurityMapping.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.security.ConnectorIdentity; +import io.trino.spi.security.ConnectorIdentity; import java.net.URI; import java.util.Collection; @@ -28,7 +28,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.extractBucketName; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.extractBucketName; import static java.util.Objects.requireNonNull; public class S3SecurityMapping diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/S3SecurityMappingConfigurationProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/S3SecurityMappingConfigurationProvider.java index ac7b5c565412..5d0b6cce5244 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/S3SecurityMappingConfigurationProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/S3SecurityMappingConfigurationProvider.java @@ -18,9 +18,9 @@ import com.google.common.hash.Hasher; import com.google.common.hash.Hashing; import io.airlift.log.Logger; -import io.prestosql.plugin.hive.DynamicConfigurationProvider; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.spi.security.AccessDeniedException; +import io.trino.plugin.hive.DynamicConfigurationProvider; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.spi.security.AccessDeniedException; import org.apache.hadoop.conf.Configuration; import javax.inject.Inject; @@ -32,12 +32,12 @@ import java.util.function.Supplier; import static com.google.common.base.Verify.verify; -import static io.prestosql.plugin.base.util.JsonUtils.parseJson; -import static io.prestosql.plugin.hive.DynamicConfigurationProvider.setCacheKey; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ACCESS_KEY; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ENDPOINT; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_IAM_ROLE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SECRET_KEY; +import static io.trino.plugin.base.util.JsonUtils.parseJson; +import static io.trino.plugin.hive.DynamicConfigurationProvider.setCacheKey; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ACCESS_KEY; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ENDPOINT; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_IAM_ROLE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SECRET_KEY; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/S3SecurityMappings.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/S3SecurityMappings.java index c1a510ef9df0..30301a8124b7 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/S3SecurityMappings.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3/S3SecurityMappings.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.security.ConnectorIdentity; +import io.trino.spi.security.ConnectorIdentity; import java.net.URI; import java.util.List; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/PrestoS3ClientFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/PrestoS3ClientFactory.java index 485a2a69666c..04d6d3f37d74 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/PrestoS3ClientFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/PrestoS3ClientFactory.java @@ -24,10 +24,10 @@ import com.amazonaws.services.s3.AmazonS3Builder; import com.amazonaws.services.s3.AmazonS3Client; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.s3.HiveS3Config; -import io.prestosql.plugin.hive.s3.PrestoS3FileSystem; -import io.prestosql.plugin.hive.s3.PrestoS3FileSystemMetricCollector; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.s3.HiveS3Config; +import io.trino.plugin.hive.s3.PrestoS3FileSystem; +import io.trino.plugin.hive.s3.PrestoS3FileSystemMetricCollector; import org.apache.hadoop.conf.Configuration; import javax.annotation.concurrent.GuardedBy; @@ -40,17 +40,17 @@ import static com.amazonaws.regions.Regions.US_EAST_1; import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.base.Verify.verify; -import static io.prestosql.plugin.hive.aws.AwsCurrentRegionHolder.getCurrentRegionFromEC2Metadata; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ACCESS_KEY; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_CONNECT_TIMEOUT; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_CREDENTIALS_PROVIDER; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ENDPOINT; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_ERROR_RETRIES; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_PIN_CLIENT_TO_CURRENT_REGION; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SECRET_KEY; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SOCKET_TIMEOUT; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SSL_ENABLED; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_USER_AGENT_PREFIX; +import static io.trino.plugin.hive.aws.AwsCurrentRegionHolder.getCurrentRegionFromEC2Metadata; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ACCESS_KEY; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_CONNECT_TIMEOUT; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_CREDENTIALS_PROVIDER; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ENDPOINT; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_ERROR_RETRIES; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_PIN_CLIENT_TO_CURRENT_REGION; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SECRET_KEY; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SOCKET_TIMEOUT; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SSL_ENABLED; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_USER_AGENT_PREFIX; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectCsvRecordReader.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectCsvRecordReader.java index a583c55fff32..6e62bb761ee7 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectCsvRecordReader.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectCsvRecordReader.java @@ -19,7 +19,7 @@ import com.amazonaws.services.s3.model.InputSerialization; import com.amazonaws.services.s3.model.OutputSerialization; import com.amazonaws.services.s3.model.SelectObjectContentRequest; -import io.prestosql.plugin.hive.s3.PrestoS3FileSystem; +import io.trino.plugin.hive.s3.PrestoS3FileSystem; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectLineRecordReader.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectLineRecordReader.java index 689bbe11a718..1100124fdc5a 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectLineRecordReader.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectLineRecordReader.java @@ -19,8 +19,8 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.io.Closer; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.s3.HiveS3Config; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.hive.s3.HiveS3Config; +import io.trino.spi.PrestoException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.LongWritable; @@ -41,11 +41,11 @@ import static com.google.common.base.Throwables.throwIfInstanceOf; import static com.google.common.base.Throwables.throwIfUnchecked; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_BACKOFF_TIME; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_CLIENT_RETRIES; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_RETRY_TIME; -import static io.prestosql.plugin.hive.util.RetryDriver.retry; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_BACKOFF_TIME; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_CLIENT_RETRIES; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_RETRY_TIME; +import static io.trino.plugin.hive.util.RetryDriver.retry; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; import static java.net.HttpURLConnection.HTTP_BAD_REQUEST; import static java.net.HttpURLConnection.HTTP_FORBIDDEN; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectPushdown.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectPushdown.java index 025e1f464061..4eb42f35f5b6 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectPushdown.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectPushdown.java @@ -14,10 +14,10 @@ package io.trino.plugin.hive.s3select; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.connector.ConnectorSession; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; import org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo; @@ -32,13 +32,13 @@ import java.util.Properties; import java.util.Set; -import static io.prestosql.plugin.hive.HiveMetadata.SKIP_FOOTER_COUNT_KEY; -import static io.prestosql.plugin.hive.HiveMetadata.SKIP_HEADER_COUNT_KEY; -import static io.prestosql.plugin.hive.HiveSessionProperties.isS3SelectPushdownEnabled; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.getHiveSchema; -import static io.prestosql.plugin.hive.util.HiveUtil.getCompressionCodec; -import static io.prestosql.plugin.hive.util.HiveUtil.getDeserializerClassName; -import static io.prestosql.plugin.hive.util.HiveUtil.getInputFormatName; +import static io.trino.plugin.hive.HiveMetadata.SKIP_FOOTER_COUNT_KEY; +import static io.trino.plugin.hive.HiveMetadata.SKIP_HEADER_COUNT_KEY; +import static io.trino.plugin.hive.HiveSessionProperties.isS3SelectPushdownEnabled; +import static io.trino.plugin.hive.metastore.MetastoreUtil.getHiveSchema; +import static io.trino.plugin.hive.util.HiveUtil.getCompressionCodec; +import static io.trino.plugin.hive.util.HiveUtil.getDeserializerClassName; +import static io.trino.plugin.hive.util.HiveUtil.getInputFormatName; import static java.util.Objects.requireNonNull; import static org.apache.hadoop.hive.serde.serdeConstants.BIGINT_TYPE_NAME; import static org.apache.hadoop.hive.serde.serdeConstants.BOOLEAN_TYPE_NAME; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectRecordCursor.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectRecordCursor.java index 78bb240eb86e..5a29061c5d8d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectRecordCursor.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectRecordCursor.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive.s3select; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.plugin.hive.GenericHiveRecordCursor; -import io.prestosql.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.GenericHiveRecordCursor; +import io.trino.plugin.hive.HiveColumnHandle; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.Writable; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectRecordCursorProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectRecordCursorProvider.java index bce745c5c52d..385ebcb5fcb7 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectRecordCursorProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectRecordCursorProvider.java @@ -14,16 +14,16 @@ package io.trino.plugin.hive.s3select; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveRecordCursorProvider; -import io.prestosql.plugin.hive.IonSqlQueryBuilder; -import io.prestosql.plugin.hive.ReaderColumns; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveRecordCursorProvider; +import io.trino.plugin.hive.IonSqlQueryBuilder; +import io.trino.plugin.hive.ReaderColumns; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; @@ -36,9 +36,9 @@ import java.util.Properties; import java.util.Set; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; -import static io.prestosql.plugin.hive.HivePageSourceProvider.projectBaseColumns; -import static io.prestosql.plugin.hive.util.HiveUtil.getDeserializerClassName; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; +import static io.trino.plugin.hive.HivePageSourceProvider.projectBaseColumns; +import static io.trino.plugin.hive.util.HiveUtil.getDeserializerClassName; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toUnmodifiableList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/AccessControlMetadata.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/AccessControlMetadata.java index ed665b4155e8..f85deac28c5b 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/AccessControlMetadata.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/AccessControlMetadata.java @@ -13,20 +13,20 @@ */ package io.trino.plugin.hive.security; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.GrantInfo; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.RoleGrant; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.GrantInfo; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.RoleGrant; import java.util.List; import java.util.Optional; import java.util.OptionalLong; import java.util.Set; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; public interface AccessControlMetadata { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/AccessControlMetadataFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/AccessControlMetadataFactory.java index 9719c83e9789..c50a858e6f91 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/AccessControlMetadataFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/AccessControlMetadataFactory.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive.security; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; public interface AccessControlMetadataFactory { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/AllowAllSecurityModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/AllowAllSecurityModule.java index 216202506729..7a4ecfd55722 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/AllowAllSecurityModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/AllowAllSecurityModule.java @@ -16,8 +16,8 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.plugin.base.security.AllowAllAccessControl; -import io.prestosql.spi.connector.ConnectorAccessControl; +import io.trino.plugin.base.security.AllowAllAccessControl; +import io.trino.spi.connector.ConnectorAccessControl; public class AllowAllSecurityModule implements Module diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/HiveSecurityModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/HiveSecurityModule.java index 1335fa258f2d..bb7ab040a4b4 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/HiveSecurityModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/HiveSecurityModule.java @@ -16,8 +16,8 @@ import com.google.inject.Binder; import com.google.inject.Module; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.base.security.FileBasedAccessControlModule; -import io.prestosql.plugin.base.security.ReadOnlySecurityModule; +import io.trino.plugin.base.security.FileBasedAccessControlModule; +import io.trino.plugin.base.security.ReadOnlySecurityModule; import static io.airlift.configuration.ConditionalModule.installModuleIf; import static io.airlift.configuration.ConfigurationModule.installModules; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/LegacyAccessControl.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/LegacyAccessControl.java index 10ed59512b28..b2427f304d03 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/LegacyAccessControl.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/LegacyAccessControl.java @@ -13,18 +13,18 @@ */ package io.trino.plugin.hive.security; -import io.prestosql.plugin.hive.HiveTransactionHandle; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.SchemaRoutineName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HiveTransactionHandle; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.SchemaRoutineName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import javax.inject.Inject; @@ -32,13 +32,13 @@ import java.util.Set; import java.util.function.Function; -import static io.prestosql.spi.security.AccessDeniedException.denyAddColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyDropTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameTable; +import static io.trino.spi.security.AccessDeniedException.denyAddColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentTable; +import static io.trino.spi.security.AccessDeniedException.denyDropColumn; +import static io.trino.spi.security.AccessDeniedException.denyDropTable; +import static io.trino.spi.security.AccessDeniedException.denyRenameColumn; +import static io.trino.spi.security.AccessDeniedException.denyRenameTable; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/LegacySecurityModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/LegacySecurityModule.java index c4a936e9716f..aaac89aa70f3 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/LegacySecurityModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/LegacySecurityModule.java @@ -16,7 +16,7 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorAccessControl; import static io.airlift.configuration.ConfigBinder.configBinder; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControl.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControl.java index 42c67c598268..131e638b1ea2 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControl.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControl.java @@ -14,25 +14,25 @@ package io.trino.plugin.hive.security; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.HiveTransactionHandle; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.SchemaRoutineName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.security.ViewExpression; -import io.prestosql.spi.type.Type; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.HiveTransactionHandle; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.SchemaRoutineName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.security.ViewExpression; +import io.trino.spi.type.Type; import javax.inject.Inject; @@ -41,55 +41,55 @@ import java.util.function.Function; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.hive.metastore.Database.DEFAULT_DATABASE_NAME; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.DELETE; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.INSERT; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.OWNERSHIP; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.SELECT; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.toHivePrivilege; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.isRoleApplicable; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.isRoleEnabled; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.listApplicableRoles; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.listApplicableTablePrivileges; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.listEnabledPrincipals; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.security.AccessDeniedException.denyAddColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyCommentTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateRole; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateView; -import static io.prestosql.spi.security.AccessDeniedException.denyCreateViewWithSelect; -import static io.prestosql.spi.security.AccessDeniedException.denyDeleteTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyDropRole; -import static io.prestosql.spi.security.AccessDeniedException.denyDropSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyDropTable; -import static io.prestosql.spi.security.AccessDeniedException.denyDropView; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyGrantTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denyInsertTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameColumn; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameTable; -import static io.prestosql.spi.security.AccessDeniedException.denyRenameView; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeRoles; -import static io.prestosql.spi.security.AccessDeniedException.denyRevokeTablePrivilege; -import static io.prestosql.spi.security.AccessDeniedException.denySelectTable; -import static io.prestosql.spi.security.AccessDeniedException.denySetCatalogSessionProperty; -import static io.prestosql.spi.security.AccessDeniedException.denySetRole; -import static io.prestosql.spi.security.AccessDeniedException.denySetSchemaAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denySetTableAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denySetViewAuthorization; -import static io.prestosql.spi.security.AccessDeniedException.denyShowColumns; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateSchema; -import static io.prestosql.spi.security.AccessDeniedException.denyShowCreateTable; -import static io.prestosql.spi.security.AccessDeniedException.denyShowRoleAuthorizationDescriptors; -import static io.prestosql.spi.security.AccessDeniedException.denyShowRoles; -import static io.prestosql.spi.security.PrincipalType.ROLE; -import static io.prestosql.spi.security.PrincipalType.USER; +import static io.trino.plugin.hive.metastore.Database.DEFAULT_DATABASE_NAME; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.DELETE; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.INSERT; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.OWNERSHIP; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.SELECT; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.toHivePrivilege; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.isRoleApplicable; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.isRoleEnabled; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.listApplicableRoles; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.listApplicableTablePrivileges; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.listEnabledPrincipals; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.security.AccessDeniedException.denyAddColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentColumn; +import static io.trino.spi.security.AccessDeniedException.denyCommentTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateRole; +import static io.trino.spi.security.AccessDeniedException.denyCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyCreateView; +import static io.trino.spi.security.AccessDeniedException.denyCreateViewWithSelect; +import static io.trino.spi.security.AccessDeniedException.denyDeleteTable; +import static io.trino.spi.security.AccessDeniedException.denyDropColumn; +import static io.trino.spi.security.AccessDeniedException.denyDropRole; +import static io.trino.spi.security.AccessDeniedException.denyDropSchema; +import static io.trino.spi.security.AccessDeniedException.denyDropTable; +import static io.trino.spi.security.AccessDeniedException.denyDropView; +import static io.trino.spi.security.AccessDeniedException.denyGrantRoles; +import static io.trino.spi.security.AccessDeniedException.denyGrantTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denyInsertTable; +import static io.trino.spi.security.AccessDeniedException.denyRenameColumn; +import static io.trino.spi.security.AccessDeniedException.denyRenameSchema; +import static io.trino.spi.security.AccessDeniedException.denyRenameTable; +import static io.trino.spi.security.AccessDeniedException.denyRenameView; +import static io.trino.spi.security.AccessDeniedException.denyRevokeRoles; +import static io.trino.spi.security.AccessDeniedException.denyRevokeTablePrivilege; +import static io.trino.spi.security.AccessDeniedException.denySelectTable; +import static io.trino.spi.security.AccessDeniedException.denySetCatalogSessionProperty; +import static io.trino.spi.security.AccessDeniedException.denySetRole; +import static io.trino.spi.security.AccessDeniedException.denySetSchemaAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetTableAuthorization; +import static io.trino.spi.security.AccessDeniedException.denySetViewAuthorization; +import static io.trino.spi.security.AccessDeniedException.denyShowColumns; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateSchema; +import static io.trino.spi.security.AccessDeniedException.denyShowCreateTable; +import static io.trino.spi.security.AccessDeniedException.denyShowRoleAuthorizationDescriptors; +import static io.trino.spi.security.AccessDeniedException.denyShowRoles; +import static io.trino.spi.security.PrincipalType.ROLE; +import static io.trino.spi.security.PrincipalType.USER; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toSet; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControlMetadata.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControlMetadata.java index d29d3c245246..af92a19ff6de 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControlMetadata.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControlMetadata.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.HiveViewNotSupportedException; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.security.GrantInfo; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.spi.security.Privilege; -import io.prestosql.spi.security.PrivilegeInfo; -import io.prestosql.spi.security.RoleGrant; +import io.trino.plugin.hive.HiveViewNotSupportedException; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.security.GrantInfo; +import io.trino.spi.security.PrincipalType; +import io.trino.spi.security.Privilege; +import io.trino.spi.security.PrivilegeInfo; +import io.trino.spi.security.RoleGrant; import java.util.List; import java.util.Optional; @@ -37,12 +37,12 @@ import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.toHivePrivilege; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.listEnabledPrincipals; -import static io.prestosql.plugin.hive.security.SqlStandardAccessControl.ADMIN_ROLE_NAME; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.security.PrincipalType.ROLE; -import static io.prestosql.spi.security.PrincipalType.USER; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.toHivePrivilege; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.listEnabledPrincipals; +import static io.trino.plugin.hive.security.SqlStandardAccessControl.ADMIN_ROLE_NAME; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.security.PrincipalType.ROLE; +import static io.trino.spi.security.PrincipalType.USER; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toSet; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardSecurityModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardSecurityModule.java index 70c7f75107a4..b2cde90a5677 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardSecurityModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardSecurityModule.java @@ -16,8 +16,8 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.spi.connector.ConnectorAccessControl; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.spi.connector.ConnectorAccessControl; public class SqlStandardSecurityModule implements Module diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SystemTableAwareAccessControl.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SystemTableAwareAccessControl.java index 94161b1a2ee4..ec3cc3484bf1 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SystemTableAwareAccessControl.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SystemTableAwareAccessControl.java @@ -14,18 +14,18 @@ package io.trino.plugin.hive.security; -import io.prestosql.plugin.base.security.ForwardingConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorSecurityContext; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.AccessDeniedException; +import io.trino.plugin.base.security.ForwardingConnectorAccessControl; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorSecurityContext; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.AccessDeniedException; import java.util.Optional; import java.util.Set; -import static io.prestosql.plugin.hive.HiveMetadata.getSourceTableNameFromSystemTable; -import static io.prestosql.spi.security.AccessDeniedException.denySelectTable; -import static io.prestosql.spi.security.AccessDeniedException.denyShowColumns; +import static io.trino.plugin.hive.HiveMetadata.getSourceTableNameFromSystemTable; +import static io.trino.spi.security.AccessDeniedException.denySelectTable; +import static io.trino.spi.security.AccessDeniedException.denyShowColumns; import static java.util.Objects.requireNonNull; public class SystemTableAwareAccessControl diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/statistics/HiveStatisticsProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/statistics/HiveStatisticsProvider.java index fa3757ffe787..dc3d95f700ae 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/statistics/HiveStatisticsProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/statistics/HiveStatisticsProvider.java @@ -14,12 +14,12 @@ package io.trino.plugin.hive.statistics; -import io.prestosql.plugin.hive.HivePartition; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HivePartition; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.Type; import java.util.List; import java.util.Map; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/statistics/MetastoreHiveStatisticsProvider.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/statistics/MetastoreHiveStatisticsProvider.java index eb0db89e4a76..0e9c533853c1 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/statistics/MetastoreHiveStatisticsProvider.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/statistics/MetastoreHiveStatisticsProvider.java @@ -23,31 +23,31 @@ import com.google.common.primitives.SignedBytes; import io.airlift.log.Logger; import io.airlift.slice.Slice; -import io.prestosql.plugin.hive.HiveBasicStatistics; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HivePartition; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.DateStatistics; -import io.prestosql.plugin.hive.metastore.DecimalStatistics; -import io.prestosql.plugin.hive.metastore.DoubleStatistics; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.IntegerStatistics; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.statistics.ColumnStatistics; -import io.prestosql.spi.statistics.DoubleRange; -import io.prestosql.spi.statistics.Estimate; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.HiveBasicStatistics; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HivePartition; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.DateStatistics; +import io.trino.plugin.hive.metastore.DecimalStatistics; +import io.trino.plugin.hive.metastore.DoubleStatistics; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.IntegerStatistics; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.statistics.ColumnStatistics; +import io.trino.spi.statistics.DoubleRange; +import io.trino.spi.statistics.Estimate; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.math.BigDecimal; import java.time.LocalDate; @@ -71,20 +71,20 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Maps.immutableEntry; import static com.google.common.hash.Hashing.murmur3_128; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CORRUPTED_COLUMN_STATISTICS; -import static io.prestosql.plugin.hive.HivePartition.UNPARTITIONED_ID; -import static io.prestosql.plugin.hive.HiveSessionProperties.getPartitionStatisticsSampleSize; -import static io.prestosql.plugin.hive.HiveSessionProperties.isIgnoreCorruptedStatistics; -import static io.prestosql.plugin.hive.HiveSessionProperties.isStatisticsEnabled; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.isLongDecimal; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CORRUPTED_COLUMN_STATISTICS; +import static io.trino.plugin.hive.HivePartition.UNPARTITIONED_ID; +import static io.trino.plugin.hive.HiveSessionProperties.getPartitionStatisticsSampleSize; +import static io.trino.plugin.hive.HiveSessionProperties.isIgnoreCorruptedStatistics; +import static io.trino.plugin.hive.HiveSessionProperties.isStatisticsEnabled; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.isLongDecimal; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Double.isFinite; import static java.lang.Double.isNaN; import static java.lang.Double.parseDouble; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/testing/TestingHiveConnectorFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/testing/TestingHiveConnectorFactory.java index 0c16135b67b5..0c9a19982665 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/testing/TestingHiveConnectorFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/testing/TestingHiveConnectorFactory.java @@ -14,18 +14,18 @@ package io.trino.plugin.hive.testing; import com.google.inject.Module; -import io.prestosql.plugin.hive.HiveHandleResolver; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.plugin.hive.HiveHandleResolver; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import java.util.Map; import java.util.Optional; import static com.google.inject.util.Modules.EMPTY_MODULE; -import static io.prestosql.plugin.hive.InternalHiveConnectorFactory.createConnector; +import static io.trino.plugin.hive.InternalHiveConnectorFactory.createConnector; import static java.util.Objects.requireNonNull; public class TestingHiveConnectorFactory diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/testing/TestingHivePlugin.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/testing/TestingHivePlugin.java index 7932bf3e75b9..10b72dc3b877 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/testing/TestingHivePlugin.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/testing/TestingHivePlugin.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Module; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; import static com.google.inject.util.Modules.EMPTY_MODULE; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/BlockJsonSerde.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/BlockJsonSerde.java index b79de3f3d81b..4a3423f8f98c 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/BlockJsonSerde.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/BlockJsonSerde.java @@ -24,8 +24,8 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockEncodingSerde; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockEncodingSerde; import java.io.IOException; import java.util.Base64; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/CompressionConfigUtil.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/CompressionConfigUtil.java index 041fe2496bf0..44bcaf8f0226 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/CompressionConfigUtil.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/CompressionConfigUtil.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive.util; -import io.prestosql.plugin.hive.HiveCompressionCodec; +import io.trino.plugin.hive.HiveCompressionCodec; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.orc.OrcConf; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/DecimalUtils.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/DecimalUtils.java index 36d2cdd9c9b4..d0b5de4326d1 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/DecimalUtils.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/DecimalUtils.java @@ -18,8 +18,8 @@ import java.math.BigInteger; -import static io.prestosql.spi.type.Decimals.encodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.rescale; +import static io.trino.spi.type.Decimals.encodeUnscaledValue; +import static io.trino.spi.type.Decimals.rescale; public final class DecimalUtils { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/FieldSetterFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/FieldSetterFactory.java index 4a1d1f1afef5..350824865b6c 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/FieldSetterFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/FieldSetterFactory.java @@ -16,22 +16,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.block.Block; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.hive.common.type.Timestamp; import org.apache.hadoop.hive.serde2.io.DateWritableV2; import org.apache.hadoop.hive.serde2.io.DoubleWritable; @@ -54,14 +54,14 @@ import java.util.List; import java.util.Map; -import static io.prestosql.plugin.hive.util.HiveUtil.isArrayType; -import static io.prestosql.plugin.hive.util.HiveUtil.isMapType; -import static io.prestosql.plugin.hive.util.HiveUtil.isRowType; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.getHiveDecimal; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.MILLISECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.plugin.hive.util.HiveUtil.isArrayType; +import static io.trino.plugin.hive.util.HiveUtil.isMapType; +import static io.trino.plugin.hive.util.HiveUtil.isRowType; +import static io.trino.plugin.hive.util.HiveWriteUtils.getHiveDecimal; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.MILLISECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.floorDiv; import static java.lang.Math.floorMod; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/ForwardingRecordCursor.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/ForwardingRecordCursor.java index bb2d827378af..b62bb76cc877 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/ForwardingRecordCursor.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/ForwardingRecordCursor.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive.util; import io.airlift.slice.Slice; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.Type; public abstract class ForwardingRecordCursor implements RecordCursor diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBlockEncodingSerde.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBlockEncodingSerde.java index e4090b61060e..602a231f30cf 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBlockEncodingSerde.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBlockEncodingSerde.java @@ -16,23 +16,23 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.SliceInput; import io.airlift.slice.SliceOutput; -import io.prestosql.spi.block.ArrayBlockEncoding; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockEncoding; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.block.ByteArrayBlockEncoding; -import io.prestosql.spi.block.DictionaryBlockEncoding; -import io.prestosql.spi.block.Int128ArrayBlockEncoding; -import io.prestosql.spi.block.IntArrayBlockEncoding; -import io.prestosql.spi.block.LazyBlockEncoding; -import io.prestosql.spi.block.LongArrayBlockEncoding; -import io.prestosql.spi.block.RowBlockEncoding; -import io.prestosql.spi.block.RunLengthBlockEncoding; -import io.prestosql.spi.block.ShortArrayBlockEncoding; -import io.prestosql.spi.block.SingleRowBlockEncoding; -import io.prestosql.spi.block.VariableWidthBlockEncoding; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; +import io.trino.spi.block.ArrayBlockEncoding; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockEncoding; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.block.ByteArrayBlockEncoding; +import io.trino.spi.block.DictionaryBlockEncoding; +import io.trino.spi.block.Int128ArrayBlockEncoding; +import io.trino.spi.block.IntArrayBlockEncoding; +import io.trino.spi.block.LazyBlockEncoding; +import io.trino.spi.block.LongArrayBlockEncoding; +import io.trino.spi.block.RowBlockEncoding; +import io.trino.spi.block.RunLengthBlockEncoding; +import io.trino.spi.block.ShortArrayBlockEncoding; +import io.trino.spi.block.SingleRowBlockEncoding; +import io.trino.spi.block.VariableWidthBlockEncoding; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; import javax.inject.Inject; @@ -42,16 +42,16 @@ import java.util.concurrent.ConcurrentMap; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketing.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketing.java index 604eb2f298ae..93d1572fc54d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketing.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketing.java @@ -18,24 +18,24 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.HiveBucketHandle; -import io.prestosql.plugin.hive.HiveBucketProperty; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveTableHandle; -import io.prestosql.plugin.hive.HiveTimestampPrecision; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.HiveBucketHandle; +import io.trino.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveTableHandle; +import io.trino.plugin.hive.HiveTimestampPrecision; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.hive.serde2.typeinfo.ListTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.MapTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo; @@ -52,12 +52,12 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Lists.cartesianProduct; -import static io.prestosql.plugin.hive.HiveColumnHandle.BUCKET_COLUMN_NAME; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.plugin.hive.HiveSessionProperties.getTimestampPrecision; -import static io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; -import static io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V2; -import static io.prestosql.plugin.hive.util.HiveUtil.getRegularColumnHandles; +import static io.trino.plugin.hive.HiveColumnHandle.BUCKET_COLUMN_NAME; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.HiveSessionProperties.getTimestampPrecision; +import static io.trino.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; +import static io.trino.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V2; +import static io.trino.plugin.hive.util.HiveUtil.getRegularColumnHandles; import static java.lang.String.format; import static java.util.Map.Entry; import static java.util.function.Function.identity; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketingV1.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketingV1.java index b80aea057e76..ceb85c5ec33d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketingV1.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketingV1.java @@ -16,9 +16,9 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.hadoop.hive.serde2.typeinfo.ListTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.MapTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketingV2.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketingV2.java index 1407a1f6dd7e..63d8319784a9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketingV2.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketingV2.java @@ -16,9 +16,9 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import org.apache.hadoop.hive.serde2.typeinfo.ListTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.MapTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveCoercionPolicy.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveCoercionPolicy.java index d37851641dc0..ef16132fea86 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveCoercionPolicy.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveCoercionPolicy.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.hive.util; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.HiveType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.hive.serde2.typeinfo.ListTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.MapTypeInfo; @@ -25,13 +25,13 @@ import java.util.List; -import static io.prestosql.plugin.hive.HiveType.HIVE_BYTE; -import static io.prestosql.plugin.hive.HiveType.HIVE_DOUBLE; -import static io.prestosql.plugin.hive.HiveType.HIVE_FLOAT; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.HIVE_LONG; -import static io.prestosql.plugin.hive.HiveType.HIVE_SHORT; -import static io.prestosql.plugin.hive.util.HiveUtil.extractStructFieldTypes; +import static io.trino.plugin.hive.HiveType.HIVE_BYTE; +import static io.trino.plugin.hive.HiveType.HIVE_DOUBLE; +import static io.trino.plugin.hive.HiveType.HIVE_FLOAT; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.HIVE_LONG; +import static io.trino.plugin.hive.HiveType.HIVE_SHORT; +import static io.trino.plugin.hive.util.HiveUtil.extractStructFieldTypes; import static java.lang.Math.min; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveFileIterator.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveFileIterator.java index fd1f31c2bb2f..fc0f38926236 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveFileIterator.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveFileIterator.java @@ -15,10 +15,10 @@ import com.google.common.collect.AbstractIterator; import io.airlift.stats.TimeStat; -import io.prestosql.plugin.hive.DirectoryLister; -import io.prestosql.plugin.hive.NamenodeStats; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.hive.DirectoryLister; +import io.trino.plugin.hive.NamenodeStats; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.PrestoException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocatedFileStatus; import org.apache.hadoop.fs.Path; @@ -30,8 +30,8 @@ import java.util.Deque; import java.util.Iterator; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILE_NOT_FOUND; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILE_NOT_FOUND; import static java.util.Collections.emptyIterator; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveTypeTranslator.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveTypeTranslator.java index 5dca04d12c72..2351e279edaa 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveTypeTranslator.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveTypeTranslator.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Streams; -import io.prestosql.plugin.hive.HiveErrorCode; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.HiveErrorCode; +import io.trino.spi.PrestoException; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.hive.common.type.HiveChar; import org.apache.hadoop.hive.common.type.HiveVarchar; import org.apache.hadoop.hive.serde2.typeinfo.CharTypeInfo; @@ -44,40 +44,40 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveType.HIVE_BINARY; -import static io.prestosql.plugin.hive.HiveType.HIVE_BOOLEAN; -import static io.prestosql.plugin.hive.HiveType.HIVE_BYTE; -import static io.prestosql.plugin.hive.HiveType.HIVE_DATE; -import static io.prestosql.plugin.hive.HiveType.HIVE_DOUBLE; -import static io.prestosql.plugin.hive.HiveType.HIVE_FLOAT; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.HIVE_LONG; -import static io.prestosql.plugin.hive.HiveType.HIVE_SHORT; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.HiveType.HIVE_TIMESTAMP; -import static io.prestosql.plugin.hive.util.HiveUtil.isArrayType; -import static io.prestosql.plugin.hive.util.HiveUtil.isMapType; -import static io.prestosql.plugin.hive.util.HiveUtil.isRowType; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.TypeSignature.rowType; -import static io.prestosql.spi.type.TypeSignatureParameter.namedField; -import static io.prestosql.spi.type.TypeSignatureParameter.typeParameter; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.plugin.hive.HiveType.HIVE_BINARY; +import static io.trino.plugin.hive.HiveType.HIVE_BOOLEAN; +import static io.trino.plugin.hive.HiveType.HIVE_BYTE; +import static io.trino.plugin.hive.HiveType.HIVE_DATE; +import static io.trino.plugin.hive.HiveType.HIVE_DOUBLE; +import static io.trino.plugin.hive.HiveType.HIVE_FLOAT; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.HIVE_LONG; +import static io.trino.plugin.hive.HiveType.HIVE_SHORT; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.HiveType.HIVE_TIMESTAMP; +import static io.trino.plugin.hive.util.HiveUtil.isArrayType; +import static io.trino.plugin.hive.util.HiveUtil.isMapType; +import static io.trino.plugin.hive.util.HiveUtil.isRowType; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.TypeSignature.rowType; +import static io.trino.spi.type.TypeSignatureParameter.namedField; +import static io.trino.spi.type.TypeSignatureParameter.typeParameter; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory.getCharTypeInfo; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveUtil.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveUtil.java index bd9cfeac9853..4d93228a056d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveUtil.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveUtil.java @@ -23,30 +23,30 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceUtf8; import io.airlift.slice.Slices; -import io.prestosql.orc.OrcWriterOptions; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HivePartitionKey; -import io.prestosql.plugin.hive.HiveStorageFormat; -import io.prestosql.plugin.hive.HiveTimestampPrecision; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.avro.PrestoAvroSerDe; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; import io.trino.hadoop.TextLineLengthLimitExceededException; +import io.trino.orc.OrcWriterOptions; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HivePartitionKey; +import io.trino.plugin.hive.HiveStorageFormat; +import io.trino.plugin.hive.HiveTimestampPrecision; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.avro.PrestoAvroSerDe; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; @@ -100,48 +100,48 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Lists.newArrayList; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.bucketColumnHandle; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveColumnHandle.fileModifiedTimeColumnHandle; -import static io.prestosql.plugin.hive.HiveColumnHandle.fileSizeColumnHandle; -import static io.prestosql.plugin.hive.HiveColumnHandle.isBucketColumnHandle; -import static io.prestosql.plugin.hive.HiveColumnHandle.isFileModifiedTimeColumnHandle; -import static io.prestosql.plugin.hive.HiveColumnHandle.isFileSizeColumnHandle; -import static io.prestosql.plugin.hive.HiveColumnHandle.isPartitionColumnHandle; -import static io.prestosql.plugin.hive.HiveColumnHandle.isPathColumnHandle; -import static io.prestosql.plugin.hive.HiveColumnHandle.partitionColumnHandle; -import static io.prestosql.plugin.hive.HiveColumnHandle.pathColumnHandle; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CANNOT_OPEN_SPLIT; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_PARTITION_VALUE; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_SERDE_NOT_FOUND; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_UNSUPPORTED_FORMAT; -import static io.prestosql.plugin.hive.HiveMetadata.SKIP_FOOTER_COUNT_KEY; -import static io.prestosql.plugin.hive.HiveMetadata.SKIP_HEADER_COUNT_KEY; -import static io.prestosql.plugin.hive.HivePartitionKey.HIVE_DEFAULT_DYNAMIC_PARTITION; -import static io.prestosql.plugin.hive.HiveTableProperties.ORC_BLOOM_FILTER_COLUMNS; -import static io.prestosql.plugin.hive.HiveTableProperties.ORC_BLOOM_FILTER_FPP; -import static io.prestosql.plugin.hive.HiveType.toHiveTypes; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.copy; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.toJobConf; -import static io.prestosql.plugin.hive.util.HiveBucketing.bucketedOnTimestamp; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.Chars.trimTrailingSpaces; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.bucketColumnHandle; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveColumnHandle.fileModifiedTimeColumnHandle; +import static io.trino.plugin.hive.HiveColumnHandle.fileSizeColumnHandle; +import static io.trino.plugin.hive.HiveColumnHandle.isBucketColumnHandle; +import static io.trino.plugin.hive.HiveColumnHandle.isFileModifiedTimeColumnHandle; +import static io.trino.plugin.hive.HiveColumnHandle.isFileSizeColumnHandle; +import static io.trino.plugin.hive.HiveColumnHandle.isPartitionColumnHandle; +import static io.trino.plugin.hive.HiveColumnHandle.isPathColumnHandle; +import static io.trino.plugin.hive.HiveColumnHandle.partitionColumnHandle; +import static io.trino.plugin.hive.HiveColumnHandle.pathColumnHandle; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_BAD_DATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CANNOT_OPEN_SPLIT; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_PARTITION_VALUE; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_SERDE_NOT_FOUND; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_UNSUPPORTED_FORMAT; +import static io.trino.plugin.hive.HiveMetadata.SKIP_FOOTER_COUNT_KEY; +import static io.trino.plugin.hive.HiveMetadata.SKIP_HEADER_COUNT_KEY; +import static io.trino.plugin.hive.HivePartitionKey.HIVE_DEFAULT_DYNAMIC_PARTITION; +import static io.trino.plugin.hive.HiveTableProperties.ORC_BLOOM_FILTER_COLUMNS; +import static io.trino.plugin.hive.HiveTableProperties.ORC_BLOOM_FILTER_FPP; +import static io.trino.plugin.hive.HiveType.toHiveTypes; +import static io.trino.plugin.hive.util.ConfigurationUtils.copy; +import static io.trino.plugin.hive.util.ConfigurationUtils.toJobConf; +import static io.trino.plugin.hive.util.HiveBucketing.bucketedOnTimestamp; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.Chars.trimTrailingSpaces; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Byte.parseByte; import static java.lang.Double.parseDouble; import static java.lang.Float.floatToRawIntBits; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveWriteUtils.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveWriteUtils.java index 85b31caa51de..93e729fee740 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveWriteUtils.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveWriteUtils.java @@ -17,41 +17,41 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveReadOnlyException; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.avro.AvroRecordWriter; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.Storage; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.parquet.ParquetRecordWriter; -import io.prestosql.plugin.hive.rubix.CachingPrestoS3FileSystem; -import io.prestosql.plugin.hive.s3.PrestoS3FileSystem; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveReadOnlyException; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.avro.AvroRecordWriter; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.Storage; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.parquet.ParquetRecordWriter; +import io.trino.plugin.hive.rubix.CachingPrestoS3FileSystem; +import io.trino.plugin.hive.s3.PrestoS3FileSystem; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; @@ -98,24 +98,24 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.io.BaseEncoding.base16; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_DATABASE_LOCATION_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_PARTITION_VALUE; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_SERDE_NOT_FOUND; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; -import static io.prestosql.plugin.hive.HivePartitionKey.HIVE_DEFAULT_DYNAMIC_PARTITION; -import static io.prestosql.plugin.hive.HiveSessionProperties.getTemporaryStagingDirectoryPath; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.getProtectMode; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.verifyOnline; -import static io.prestosql.plugin.hive.s3.HiveS3Module.EMR_FS_CLASS_NAME; -import static io.prestosql.plugin.hive.util.HiveUtil.checkCondition; -import static io.prestosql.plugin.hive.util.HiveUtil.isArrayType; -import static io.prestosql.plugin.hive.util.HiveUtil.isMapType; -import static io.prestosql.plugin.hive.util.HiveUtil.isRowType; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_DATABASE_LOCATION_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_PARTITION_VALUE; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_SERDE_NOT_FOUND; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; +import static io.trino.plugin.hive.HivePartitionKey.HIVE_DEFAULT_DYNAMIC_PARTITION; +import static io.trino.plugin.hive.HiveSessionProperties.getTemporaryStagingDirectoryPath; +import static io.trino.plugin.hive.metastore.MetastoreUtil.getProtectMode; +import static io.trino.plugin.hive.metastore.MetastoreUtil.verifyOnline; +import static io.trino.plugin.hive.s3.HiveS3Module.EMR_FS_CLASS_NAME; +import static io.trino.plugin.hive.util.HiveUtil.checkCondition; +import static io.trino.plugin.hive.util.HiveUtil.isArrayType; +import static io.trino.plugin.hive.util.HiveUtil.isMapType; +import static io.trino.plugin.hive.util.HiveUtil.isRowType; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.floorDiv; import static java.lang.Math.toIntExact; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/InternalHiveSplitFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/InternalHiveSplitFactory.java index 5b1be8acf37d..f63cbd356b86 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/InternalHiveSplitFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/InternalHiveSplitFactory.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.plugin.hive.AcidInfo; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HivePartitionKey; -import io.prestosql.plugin.hive.HiveSplit; -import io.prestosql.plugin.hive.HiveSplit.BucketConversion; -import io.prestosql.plugin.hive.InternalHiveSplit; -import io.prestosql.plugin.hive.InternalHiveSplit.InternalHiveBlock; -import io.prestosql.plugin.hive.TableToPartitionMapping; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.s3select.S3SelectPushdown; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.hive.AcidInfo; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HivePartitionKey; +import io.trino.plugin.hive.HiveSplit; +import io.trino.plugin.hive.HiveSplit.BucketConversion; +import io.trino.plugin.hive.InternalHiveSplit; +import io.trino.plugin.hive.InternalHiveSplit.InternalHiveBlock; +import io.trino.plugin.hive.TableToPartitionMapping; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.s3select.S3SelectPushdown; +import io.trino.spi.HostAddress; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; import org.apache.hadoop.fs.BlockLocation; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; @@ -52,8 +52,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.hive.HiveColumnHandle.isPathColumnHandle; -import static io.prestosql.plugin.hive.util.HiveUtil.isSplittable; +import static io.trino.plugin.hive.HiveColumnHandle.isPathColumnHandle; +import static io.trino.plugin.hive.util.HiveUtil.isSplittable; import static java.util.Objects.requireNonNull; public class InternalHiveSplitFactory diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/MergingPageIterator.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/MergingPageIterator.java index ea53ad5a4fda..42c61b4b22c4 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/MergingPageIterator.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/MergingPageIterator.java @@ -15,13 +15,13 @@ import com.google.common.collect.AbstractIterator; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import java.lang.invoke.MethodHandle; import java.util.Collection; @@ -33,11 +33,11 @@ import static com.google.common.collect.Iterators.concat; import static com.google.common.collect.Iterators.mergeSorted; import static com.google.common.collect.Iterators.transform; -import static io.prestosql.plugin.hive.util.SortBuffer.appendPositionTo; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; +import static io.trino.plugin.hive.util.SortBuffer.appendPositionTo; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; import static java.util.Comparator.naturalOrder; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SequenceFileRecordWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SequenceFileRecordWriter.java index ea8a7519a9cf..34400a63d2e6 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SequenceFileRecordWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SequenceFileRecordWriter.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive.util; -import io.prestosql.plugin.hive.RecordFileWriter.ExtendedRecordWriter; +import io.trino.plugin.hive.RecordFileWriter.ExtendedRecordWriter; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.BytesWritable; import org.apache.hadoop.io.SequenceFile.Writer; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SerDeUtils.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SerDeUtils.java index a1843509eb83..7aa690902b4e 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SerDeUtils.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SerDeUtils.java @@ -15,11 +15,11 @@ import com.google.common.annotations.VisibleForTesting; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; import org.apache.hadoop.hive.common.type.HiveChar; import org.apache.hadoop.hive.serde2.io.DateWritable; import org.apache.hadoop.hive.serde2.io.HiveDecimalWritable; @@ -51,9 +51,9 @@ import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.Chars.truncateToLengthAndTrimSpaces; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.Chars.truncateToLengthAndTrimSpaces; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Float.floatToRawIntBits; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SortBuffer.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SortBuffer.java index 09cd75e7e071..635942aa12e2 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SortBuffer.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SortBuffer.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PageSorter; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; import org.openjdk.jol.info.ClassLayout; import java.util.ArrayList; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/Statistics.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/Statistics.java index be25d17e9fde..b301a348b64d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/Statistics.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/Statistics.java @@ -15,23 +15,23 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HiveBasicStatistics; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.metastore.BooleanStatistics; -import io.prestosql.plugin.hive.metastore.DateStatistics; -import io.prestosql.plugin.hive.metastore.DecimalStatistics; -import io.prestosql.plugin.hive.metastore.DoubleStatistics; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.IntegerStatistics; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.statistics.ColumnStatisticMetadata; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HiveBasicStatistics; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.metastore.BooleanStatistics; +import io.trino.plugin.hive.metastore.DateStatistics; +import io.trino.plugin.hive.metastore.DecimalStatistics; +import io.trino.plugin.hive.metastore.DoubleStatistics; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.IntegerStatistics; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.statistics.ColumnStatisticMetadata; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -50,26 +50,26 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.Sets.intersection; -import static io.prestosql.plugin.hive.HiveBasicStatistics.createZeroStatistics; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_UNKNOWN_COLUMN_STATISTIC_TYPE; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.createPartitionValues; -import static io.prestosql.plugin.hive.util.Statistics.ReduceOperator.ADD; -import static io.prestosql.plugin.hive.util.Statistics.ReduceOperator.MAX; -import static io.prestosql.plugin.hive.util.Statistics.ReduceOperator.MIN; -import static io.prestosql.spi.statistics.ColumnStatisticType.MAX_VALUE; -import static io.prestosql.spi.statistics.ColumnStatisticType.MAX_VALUE_SIZE_IN_BYTES; -import static io.prestosql.spi.statistics.ColumnStatisticType.MIN_VALUE; -import static io.prestosql.spi.statistics.ColumnStatisticType.NUMBER_OF_DISTINCT_VALUES; -import static io.prestosql.spi.statistics.ColumnStatisticType.NUMBER_OF_NON_NULL_VALUES; -import static io.prestosql.spi.statistics.ColumnStatisticType.NUMBER_OF_TRUE_VALUES; -import static io.prestosql.spi.statistics.ColumnStatisticType.TOTAL_SIZE_IN_BYTES; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.plugin.hive.HiveBasicStatistics.createZeroStatistics; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_UNKNOWN_COLUMN_STATISTIC_TYPE; +import static io.trino.plugin.hive.util.HiveWriteUtils.createPartitionValues; +import static io.trino.plugin.hive.util.Statistics.ReduceOperator.ADD; +import static io.trino.plugin.hive.util.Statistics.ReduceOperator.MAX; +import static io.trino.plugin.hive.util.Statistics.ReduceOperator.MIN; +import static io.trino.spi.statistics.ColumnStatisticType.MAX_VALUE; +import static io.trino.spi.statistics.ColumnStatisticType.MAX_VALUE_SIZE_IN_BYTES; +import static io.trino.spi.statistics.ColumnStatisticType.MIN_VALUE; +import static io.trino.spi.statistics.ColumnStatisticType.NUMBER_OF_DISTINCT_VALUES; +import static io.trino.spi.statistics.ColumnStatisticType.NUMBER_OF_NON_NULL_VALUES; +import static io.trino.spi.statistics.ColumnStatisticType.NUMBER_OF_TRUE_VALUES; +import static io.trino.spi.statistics.ColumnStatisticType.TOTAL_SIZE_IN_BYTES; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SystemTables.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SystemTables.java index 8f282c43dfa9..b16010999f0f 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SystemTables.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/SystemTables.java @@ -14,12 +14,12 @@ package io.trino.plugin.hive.util; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; import java.util.function.Function; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/TempFileReader.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/TempFileReader.java index facb8d82f420..b199e2cd6917 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/TempFileReader.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/TempFileReader.java @@ -14,22 +14,22 @@ package io.trino.plugin.hive.util; import com.google.common.collect.AbstractIterator; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcPredicate; -import io.prestosql.orc.OrcReader; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.orc.OrcRecordReader; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.Type; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcPredicate; +import io.trino.orc.OrcReader; +import io.trino.orc.OrcReaderOptions; +import io.trino.orc.OrcRecordReader; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.type.Type; import java.io.IOException; import java.io.InterruptedIOException; import java.util.List; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcReader.INITIAL_BATCH_SIZE; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcReader.INITIAL_BATCH_SIZE; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_WRITER_DATA_ERROR; import static java.util.Objects.requireNonNull; import static org.joda.time.DateTimeZone.UTC; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/TempFileWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/TempFileWriter.java index b7b0a7ffa76b..6c4cde4b80a6 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/TempFileWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/TempFileWriter.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableMap; import io.airlift.units.DataSize; -import io.prestosql.orc.OrcDataSink; -import io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode; -import io.prestosql.orc.OrcWriter; -import io.prestosql.orc.OrcWriterOptions; -import io.prestosql.orc.OrcWriterStats; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; +import io.trino.orc.OrcDataSink; +import io.trino.orc.OrcWriteValidation.OrcWriteValidationMode; +import io.trino.orc.OrcWriter; +import io.trino.orc.OrcWriterOptions; +import io.trino.orc.OrcWriterStats; +import io.trino.orc.metadata.OrcType; +import io.trino.spi.Page; +import io.trino.spi.type.Type; import java.io.Closeable; import java.io.IOException; @@ -32,7 +32,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.orc.metadata.CompressionKind.LZ4; +import static io.trino.orc.metadata.CompressionKind.LZ4; public class TempFileWriter implements Closeable diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/TextRecordWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/TextRecordWriter.java index acaca4499a25..03b304c501a9 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/TextRecordWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/TextRecordWriter.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive.util; -import io.prestosql.plugin.hive.RecordFileWriter.ExtendedRecordWriter; +import io.trino.plugin.hive.RecordFileWriter.ExtendedRecordWriter; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.serde.serdeConstants; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHive.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHive.java index 8772f43a4b8e..7c0b6fd010a0 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHive.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHive.java @@ -23,105 +23,105 @@ import io.airlift.stats.CounterStat; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.GroupByHashPageIndexerFactory; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.LocationService.WriteInfo; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.authentication.NoHdfsAuthentication; -import io.prestosql.plugin.hive.azure.HiveAzureConfig; -import io.prestosql.plugin.hive.azure.PrestoAzureConfigurationInitializer; -import io.prestosql.plugin.hive.gcs.GoogleGcsConfigurationInitializer; -import io.prestosql.plugin.hive.gcs.HiveGcsConfig; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.plugin.hive.metastore.PrincipalPrivileges; -import io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore; -import io.prestosql.plugin.hive.metastore.SortingColumn; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.metastore.thrift.BridgingHiveMetastore; -import io.prestosql.plugin.hive.metastore.thrift.MetastoreLocator; -import io.prestosql.plugin.hive.metastore.thrift.TestingMetastoreLocator; -import io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreConfig; -import io.prestosql.plugin.hive.orc.OrcPageSource; -import io.prestosql.plugin.hive.parquet.ParquetPageSource; -import io.prestosql.plugin.hive.rcfile.RcFilePageSource; -import io.prestosql.plugin.hive.s3.HiveS3Config; -import io.prestosql.plugin.hive.s3.PrestoS3ConfigurationInitializer; -import io.prestosql.plugin.hive.security.SqlStandardAccessControlMetadata; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.Assignment; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.ConnectorViewDefinition.ViewColumn; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.DiscretePredicates; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.connector.ViewNotFoundException; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.FieldDereference; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.statistics.ColumnStatistics; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.RowFieldName; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.TestingConnectorSession; -import io.prestosql.testing.TestingNodeManager; -import io.prestosql.type.BlockTypeOperators; +import io.trino.GroupByHashPageIndexerFactory; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.LocationService.WriteInfo; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.authentication.NoHdfsAuthentication; +import io.trino.plugin.hive.azure.HiveAzureConfig; +import io.trino.plugin.hive.azure.PrestoAzureConfigurationInitializer; +import io.trino.plugin.hive.gcs.GoogleGcsConfigurationInitializer; +import io.trino.plugin.hive.gcs.HiveGcsConfig; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.plugin.hive.metastore.PrincipalPrivileges; +import io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore; +import io.trino.plugin.hive.metastore.SortingColumn; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.metastore.thrift.BridgingHiveMetastore; +import io.trino.plugin.hive.metastore.thrift.MetastoreLocator; +import io.trino.plugin.hive.metastore.thrift.TestingMetastoreLocator; +import io.trino.plugin.hive.metastore.thrift.ThriftHiveMetastore; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreConfig; +import io.trino.plugin.hive.orc.OrcPageSource; +import io.trino.plugin.hive.parquet.ParquetPageSource; +import io.trino.plugin.hive.rcfile.RcFilePageSource; +import io.trino.plugin.hive.s3.HiveS3Config; +import io.trino.plugin.hive.s3.PrestoS3ConfigurationInitializer; +import io.trino.plugin.hive.security.SqlStandardAccessControlMetadata; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.Assignment; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.ConnectorViewDefinition.ViewColumn; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.DiscretePredicates; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.connector.ViewNotFoundException; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.FieldDereference; +import io.trino.spi.expression.Variable; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.statistics.ColumnStatistics; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.RowFieldName; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.VarcharType; +import io.trino.sql.gen.JoinCompiler; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.TestingConnectorSession; +import io.trino.testing.TestingNodeManager; +import io.trino.type.BlockTypeOperators; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; @@ -180,100 +180,100 @@ import static io.airlift.testing.Assertions.assertInstanceOf; import static io.airlift.testing.Assertions.assertLessThanOrEqual; import static io.airlift.units.DataSize.Unit.KILOBYTE; -import static io.prestosql.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.COMMIT; -import static io.prestosql.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.ROLLBACK_AFTER_APPEND_PAGE; -import static io.prestosql.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.ROLLBACK_AFTER_BEGIN_INSERT; -import static io.prestosql.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.ROLLBACK_AFTER_DELETE; -import static io.prestosql.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.ROLLBACK_AFTER_FINISH_INSERT; -import static io.prestosql.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.ROLLBACK_AFTER_SINK_FINISH; -import static io.prestosql.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.ROLLBACK_RIGHT_AWAY; -import static io.prestosql.plugin.hive.HiveBasicStatistics.createEmptyStatistics; -import static io.prestosql.plugin.hive.HiveBasicStatistics.createZeroStatistics; -import static io.prestosql.plugin.hive.HiveColumnHandle.BUCKET_COLUMN_NAME; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.bucketColumnHandle; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_BUCKET_FILES; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_PARTITION_VALUE; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_PARTITION_SCHEMA_MISMATCH; -import static io.prestosql.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; -import static io.prestosql.plugin.hive.HiveMetadata.PRESTO_VERSION_NAME; -import static io.prestosql.plugin.hive.HiveMetadata.convertToPredicate; -import static io.prestosql.plugin.hive.HiveSessionProperties.getTemporaryStagingDirectoryPath; -import static io.prestosql.plugin.hive.HiveSessionProperties.isTemporaryStagingDirectoryEnabled; -import static io.prestosql.plugin.hive.HiveStorageFormat.AVRO; -import static io.prestosql.plugin.hive.HiveStorageFormat.CSV; -import static io.prestosql.plugin.hive.HiveStorageFormat.JSON; -import static io.prestosql.plugin.hive.HiveStorageFormat.ORC; -import static io.prestosql.plugin.hive.HiveStorageFormat.PARQUET; -import static io.prestosql.plugin.hive.HiveStorageFormat.RCBINARY; -import static io.prestosql.plugin.hive.HiveStorageFormat.RCTEXT; -import static io.prestosql.plugin.hive.HiveStorageFormat.SEQUENCEFILE; -import static io.prestosql.plugin.hive.HiveStorageFormat.TEXTFILE; -import static io.prestosql.plugin.hive.HiveTableProperties.BUCKETED_BY_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.BUCKET_COUNT_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.PARTITIONED_BY_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.SORTED_BY_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.STORAGE_FORMAT_PROPERTY; -import static io.prestosql.plugin.hive.HiveTestUtils.PAGE_SORTER; -import static io.prestosql.plugin.hive.HiveTestUtils.SESSION; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.HiveTestUtils.arrayType; -import static io.prestosql.plugin.hive.HiveTestUtils.getDefaultHiveFileWriterFactories; -import static io.prestosql.plugin.hive.HiveTestUtils.getDefaultHivePageSourceFactories; -import static io.prestosql.plugin.hive.HiveTestUtils.getDefaultHiveRecordCursorProviders; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSession; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSessionProperties; -import static io.prestosql.plugin.hive.HiveTestUtils.getTypes; -import static io.prestosql.plugin.hive.HiveTestUtils.mapType; -import static io.prestosql.plugin.hive.HiveTestUtils.rowType; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.HIVE_LONG; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.HiveType.toHiveType; -import static io.prestosql.plugin.hive.LocationHandle.WriteMode.STAGE_AND_MOVE_TO_TARGET_DIRECTORY; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createBinaryColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createBooleanColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createDateColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createDecimalColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createDoubleColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createIntegerColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createStringColumnStatistics; -import static io.prestosql.plugin.hive.metastore.StorageFormat.fromHiveStorageFormat; -import static io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastore.cachingHiveMetastore; -import static io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; -import static io.prestosql.plugin.hive.util.HiveUtil.columnExtraInfo; -import static io.prestosql.plugin.hive.util.HiveUtil.toPartitionValues; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.createDirectory; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.getTableDefaultLocation; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.TRANSACTION_CONFLICT; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.MaterializedResult.materializeSourceDataStream; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.COMMIT; +import static io.trino.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.ROLLBACK_AFTER_APPEND_PAGE; +import static io.trino.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.ROLLBACK_AFTER_BEGIN_INSERT; +import static io.trino.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.ROLLBACK_AFTER_DELETE; +import static io.trino.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.ROLLBACK_AFTER_FINISH_INSERT; +import static io.trino.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.ROLLBACK_AFTER_SINK_FINISH; +import static io.trino.plugin.hive.AbstractTestHive.TransactionDeleteInsertTestTag.ROLLBACK_RIGHT_AWAY; +import static io.trino.plugin.hive.HiveBasicStatistics.createEmptyStatistics; +import static io.trino.plugin.hive.HiveBasicStatistics.createZeroStatistics; +import static io.trino.plugin.hive.HiveColumnHandle.BUCKET_COLUMN_NAME; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.bucketColumnHandle; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_BUCKET_FILES; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_PARTITION_VALUE; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_PARTITION_SCHEMA_MISMATCH; +import static io.trino.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; +import static io.trino.plugin.hive.HiveMetadata.PRESTO_VERSION_NAME; +import static io.trino.plugin.hive.HiveMetadata.convertToPredicate; +import static io.trino.plugin.hive.HiveSessionProperties.getTemporaryStagingDirectoryPath; +import static io.trino.plugin.hive.HiveSessionProperties.isTemporaryStagingDirectoryEnabled; +import static io.trino.plugin.hive.HiveStorageFormat.AVRO; +import static io.trino.plugin.hive.HiveStorageFormat.CSV; +import static io.trino.plugin.hive.HiveStorageFormat.JSON; +import static io.trino.plugin.hive.HiveStorageFormat.ORC; +import static io.trino.plugin.hive.HiveStorageFormat.PARQUET; +import static io.trino.plugin.hive.HiveStorageFormat.RCBINARY; +import static io.trino.plugin.hive.HiveStorageFormat.RCTEXT; +import static io.trino.plugin.hive.HiveStorageFormat.SEQUENCEFILE; +import static io.trino.plugin.hive.HiveStorageFormat.TEXTFILE; +import static io.trino.plugin.hive.HiveTableProperties.BUCKETED_BY_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.BUCKET_COUNT_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.PARTITIONED_BY_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.SORTED_BY_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.STORAGE_FORMAT_PROPERTY; +import static io.trino.plugin.hive.HiveTestUtils.PAGE_SORTER; +import static io.trino.plugin.hive.HiveTestUtils.SESSION; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.HiveTestUtils.arrayType; +import static io.trino.plugin.hive.HiveTestUtils.getDefaultHiveFileWriterFactories; +import static io.trino.plugin.hive.HiveTestUtils.getDefaultHivePageSourceFactories; +import static io.trino.plugin.hive.HiveTestUtils.getDefaultHiveRecordCursorProviders; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSession; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSessionProperties; +import static io.trino.plugin.hive.HiveTestUtils.getTypes; +import static io.trino.plugin.hive.HiveTestUtils.mapType; +import static io.trino.plugin.hive.HiveTestUtils.rowType; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.HIVE_LONG; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.HiveType.toHiveType; +import static io.trino.plugin.hive.LocationHandle.WriteMode.STAGE_AND_MOVE_TO_TARGET_DIRECTORY; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createBinaryColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createBooleanColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createDateColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createDecimalColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createDoubleColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createIntegerColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createStringColumnStatistics; +import static io.trino.plugin.hive.metastore.StorageFormat.fromHiveStorageFormat; +import static io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.cachingHiveMetastore; +import static io.trino.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; +import static io.trino.plugin.hive.util.HiveUtil.columnExtraInfo; +import static io.trino.plugin.hive.util.HiveUtil.toPartitionValues; +import static io.trino.plugin.hive.util.HiveWriteUtils.createDirectory; +import static io.trino.plugin.hive.util.HiveWriteUtils.getTableDefaultLocation; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.TRANSACTION_CONFLICT; +import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +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.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.MaterializedResult.materializeSourceDataStream; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static java.lang.Float.floatToRawIntBits; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileFormats.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileFormats.java index b831238390c8..4076aff51ea1 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileFormats.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileFormats.java @@ -17,29 +17,29 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.common.type.Date; @@ -85,39 +85,39 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveColumnProjectionInfo.generatePartialName; -import static io.prestosql.plugin.hive.HivePartitionKey.HIVE_DEFAULT_DYNAMIC_PARTITION; -import static io.prestosql.plugin.hive.HiveTestUtils.SESSION; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.HiveTestUtils.isDistinctFrom; -import static io.prestosql.plugin.hive.HiveTestUtils.mapType; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.plugin.hive.util.CompressionConfigUtil.configureCompression; -import static io.prestosql.plugin.hive.util.HiveUtil.isStructuralType; -import static io.prestosql.plugin.hive.util.SerDeUtils.serializeObject; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.MaterializedResult.materializeSourceDataStream; -import static io.prestosql.testing.StructuralTestUtil.arrayBlockOf; -import static io.prestosql.testing.StructuralTestUtil.decimalArrayBlockOf; -import static io.prestosql.testing.StructuralTestUtil.decimalMapBlockOf; -import static io.prestosql.testing.StructuralTestUtil.mapBlockOf; -import static io.prestosql.testing.StructuralTestUtil.rowBlockOf; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_MILLISECOND; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveColumnProjectionInfo.generatePartialName; +import static io.trino.plugin.hive.HivePartitionKey.HIVE_DEFAULT_DYNAMIC_PARTITION; +import static io.trino.plugin.hive.HiveTestUtils.SESSION; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.HiveTestUtils.isDistinctFrom; +import static io.trino.plugin.hive.HiveTestUtils.mapType; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.plugin.hive.util.CompressionConfigUtil.configureCompression; +import static io.trino.plugin.hive.util.HiveUtil.isStructuralType; +import static io.trino.plugin.hive.util.SerDeUtils.serializeObject; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.MaterializedResult.materializeSourceDataStream; +import static io.trino.testing.StructuralTestUtil.arrayBlockOf; +import static io.trino.testing.StructuralTestUtil.decimalArrayBlockOf; +import static io.trino.testing.StructuralTestUtil.decimalMapBlockOf; +import static io.trino.testing.StructuralTestUtil.mapBlockOf; +import static io.trino.testing.StructuralTestUtil.rowBlockOf; +import static io.trino.type.DateTimes.MICROSECONDS_PER_MILLISECOND; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.floorDiv; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileSystem.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileSystem.java index d0f593949d5b..81e7e9b545ea 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileSystem.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHiveFileSystem.java @@ -20,52 +20,52 @@ import io.airlift.json.JsonCodec; import io.airlift.slice.Slice; import io.airlift.stats.CounterStat; -import io.prestosql.GroupByHashPageIndexerFactory; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.AbstractTestHive.HiveTransaction; -import io.prestosql.plugin.hive.AbstractTestHive.Transaction; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.authentication.NoHdfsAuthentication; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.PrincipalPrivileges; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastore; -import io.prestosql.plugin.hive.metastore.thrift.BridgingHiveMetastore; -import io.prestosql.plugin.hive.metastore.thrift.MetastoreLocator; -import io.prestosql.plugin.hive.metastore.thrift.TestingMetastoreLocator; -import io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreConfig; -import io.prestosql.plugin.hive.security.SqlStandardAccessControlMetadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.TestingNodeManager; -import io.prestosql.type.BlockTypeOperators; +import io.trino.GroupByHashPageIndexerFactory; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.AbstractTestHive.HiveTransaction; +import io.trino.plugin.hive.AbstractTestHive.Transaction; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.authentication.NoHdfsAuthentication; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.PrincipalPrivileges; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.metastore.cache.CachingHiveMetastore; +import io.trino.plugin.hive.metastore.thrift.BridgingHiveMetastore; +import io.trino.plugin.hive.metastore.thrift.MetastoreLocator; +import io.trino.plugin.hive.metastore.thrift.TestingMetastoreLocator; +import io.trino.plugin.hive.metastore.thrift.ThriftHiveMetastore; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreConfig; +import io.trino.plugin.hive.security.SqlStandardAccessControlMetadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.TestingNodeManager; +import io.trino.type.BlockTypeOperators; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem; @@ -90,23 +90,23 @@ import static com.google.common.util.concurrent.MoreExecutors.newDirectExecutorService; import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.hive.AbstractTestHive.createTableProperties; -import static io.prestosql.plugin.hive.AbstractTestHive.filterNonHiddenColumnHandles; -import static io.prestosql.plugin.hive.AbstractTestHive.filterNonHiddenColumnMetadata; -import static io.prestosql.plugin.hive.AbstractTestHive.getAllSplits; -import static io.prestosql.plugin.hive.AbstractTestHive.getSplits; -import static io.prestosql.plugin.hive.HiveTestUtils.PAGE_SORTER; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.HiveTestUtils.getDefaultHiveFileWriterFactories; -import static io.prestosql.plugin.hive.HiveTestUtils.getDefaultHivePageSourceFactories; -import static io.prestosql.plugin.hive.HiveTestUtils.getDefaultHiveRecordCursorProviders; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSession; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSessionProperties; -import static io.prestosql.plugin.hive.HiveTestUtils.getTypes; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.getRawFileSystem; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.MaterializedResult.materializeSourceDataStream; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.plugin.hive.AbstractTestHive.createTableProperties; +import static io.trino.plugin.hive.AbstractTestHive.filterNonHiddenColumnHandles; +import static io.trino.plugin.hive.AbstractTestHive.filterNonHiddenColumnMetadata; +import static io.trino.plugin.hive.AbstractTestHive.getAllSplits; +import static io.trino.plugin.hive.AbstractTestHive.getSplits; +import static io.trino.plugin.hive.HiveTestUtils.PAGE_SORTER; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.HiveTestUtils.getDefaultHiveFileWriterFactories; +import static io.trino.plugin.hive.HiveTestUtils.getDefaultHivePageSourceFactories; +import static io.trino.plugin.hive.HiveTestUtils.getDefaultHiveRecordCursorProviders; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSession; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSessionProperties; +import static io.trino.plugin.hive.HiveTestUtils.getTypes; +import static io.trino.plugin.hive.util.HiveWriteUtils.getRawFileSystem; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.MaterializedResult.materializeSourceDataStream; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static java.util.Locale.ENGLISH; import static java.util.UUID.randomUUID; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHiveLocal.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHiveLocal.java index 6c4bd45624a7..864724b98a6f 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHiveLocal.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHiveLocal.java @@ -14,13 +14,13 @@ package io.trino.plugin.hive; import com.google.common.io.Files; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrincipalType; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrincipalType; import org.testng.SkipException; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -30,8 +30,8 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.util.Objects.requireNonNull; public abstract class AbstractTestHiveLocal diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveBenchmarkQueryRunner.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveBenchmarkQueryRunner.java index 6ea66bf47165..df4afe5212e1 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveBenchmarkQueryRunner.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveBenchmarkQueryRunner.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.Files; -import io.prestosql.Session; -import io.prestosql.benchmark.BenchmarkSuite; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.testing.TestingHiveConnectorFactory; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.benchmark.BenchmarkSuite; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.testing.TestingHiveConnectorFactory; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.spi.security.PrincipalType; +import io.trino.testing.LocalQueryRunner; import java.io.File; import java.io.IOException; @@ -31,9 +31,9 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static io.prestosql.plugin.hive.metastore.file.FileHiveMetastore.createTestingFileHiveMetastore; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.hive.metastore.file.FileHiveMetastore.createTestingFileHiveMetastore; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Objects.requireNonNull; public final class HiveBenchmarkQueryRunner diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveQueryRunner.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveQueryRunner.java index 4fbc2fb865a2..4c34554d0e30 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveQueryRunner.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveQueryRunner.java @@ -18,21 +18,21 @@ import com.google.inject.Module; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastore; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig; -import io.prestosql.plugin.hive.testing.TestingHivePlugin; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.metadata.QualifiedObjectName; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.file.FileHiveMetastore; +import io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig; +import io.trino.plugin.hive.testing.TestingHivePlugin; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrincipalType; +import io.trino.spi.security.SelectedRole; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import org.intellij.lang.annotations.Language; import org.joda.time.DateTimeZone; @@ -49,12 +49,12 @@ import static com.google.inject.util.Modules.EMPTY_MODULE; import static io.airlift.log.Level.WARN; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.spi.security.SelectedRole.Type.ROLE; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.spi.security.SelectedRole.Type.ROLE; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.nio.file.Files.createDirectories; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveTestUtils.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveTestUtils.java index 24617ef9e2e3..d16132f8c838 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveTestUtils.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveTestUtils.java @@ -17,42 +17,42 @@ import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; import io.airlift.units.DataSize; -import io.prestosql.PagesIndexPageSorter; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.PagesIndex; -import io.prestosql.plugin.hive.authentication.NoHdfsAuthentication; -import io.prestosql.plugin.hive.azure.HiveAzureConfig; -import io.prestosql.plugin.hive.azure.PrestoAzureConfigurationInitializer; -import io.prestosql.plugin.hive.gcs.GoogleGcsConfigurationInitializer; -import io.prestosql.plugin.hive.gcs.HiveGcsConfig; -import io.prestosql.plugin.hive.orc.OrcFileWriterFactory; -import io.prestosql.plugin.hive.orc.OrcPageSourceFactory; -import io.prestosql.plugin.hive.orc.OrcReaderConfig; -import io.prestosql.plugin.hive.orc.OrcWriterConfig; -import io.prestosql.plugin.hive.parquet.ParquetPageSourceFactory; -import io.prestosql.plugin.hive.parquet.ParquetReaderConfig; -import io.prestosql.plugin.hive.parquet.ParquetWriterConfig; -import io.prestosql.plugin.hive.rcfile.RcFilePageSourceFactory; -import io.prestosql.plugin.hive.rubix.RubixEnabledConfig; -import io.prestosql.plugin.hive.s3.HiveS3Config; -import io.prestosql.plugin.hive.s3.PrestoS3ConfigurationInitializer; -import io.prestosql.plugin.hive.s3select.PrestoS3ClientFactory; -import io.prestosql.plugin.hive.s3select.S3SelectRecordCursorProvider; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.testing.TestingConnectorSession; -import io.prestosql.type.InternalTypeManager; +import io.trino.PagesIndexPageSorter; +import io.trino.metadata.Metadata; +import io.trino.operator.PagesIndex; +import io.trino.plugin.hive.authentication.NoHdfsAuthentication; +import io.trino.plugin.hive.azure.HiveAzureConfig; +import io.trino.plugin.hive.azure.PrestoAzureConfigurationInitializer; +import io.trino.plugin.hive.gcs.GoogleGcsConfigurationInitializer; +import io.trino.plugin.hive.gcs.HiveGcsConfig; +import io.trino.plugin.hive.orc.OrcFileWriterFactory; +import io.trino.plugin.hive.orc.OrcPageSourceFactory; +import io.trino.plugin.hive.orc.OrcReaderConfig; +import io.trino.plugin.hive.orc.OrcWriterConfig; +import io.trino.plugin.hive.parquet.ParquetPageSourceFactory; +import io.trino.plugin.hive.parquet.ParquetReaderConfig; +import io.trino.plugin.hive.parquet.ParquetWriterConfig; +import io.trino.plugin.hive.rcfile.RcFilePageSourceFactory; +import io.trino.plugin.hive.rubix.RubixEnabledConfig; +import io.trino.plugin.hive.s3.HiveS3Config; +import io.trino.plugin.hive.s3.PrestoS3ConfigurationInitializer; +import io.trino.plugin.hive.s3select.PrestoS3ClientFactory; +import io.trino.plugin.hive.s3select.S3SelectRecordCursorProvider; +import io.trino.spi.PageSorter; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.RowType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.testing.TestingConnectorSession; +import io.trino.type.InternalTypeManager; import org.apache.hadoop.hive.common.type.Timestamp; import java.lang.invoke.MethodHandle; @@ -64,11 +64,11 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NULL_FLAG; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; +import static io.trino.spi.type.Decimals.encodeScaledValue; public final class HiveTestUtils { diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestBackgroundHiveSplitLoader.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestBackgroundHiveSplitLoader.java index 38d2bfd68a9d..7b4d21c91457 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestBackgroundHiveSplitLoader.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestBackgroundHiveSplitLoader.java @@ -23,19 +23,19 @@ import io.airlift.stats.CounterStat; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.HiveColumnHandle.ColumnType; -import io.prestosql.plugin.hive.authentication.NoHdfsAuthentication; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.util.HiveBucketing.HiveBucketFilter; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.hive.HiveColumnHandle.ColumnType; +import io.trino.plugin.hive.authentication.NoHdfsAuthentication; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.util.HiveBucketing.HiveBucketFilter; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.BlockLocation; import org.apache.hadoop.fs.FSDataInputStream; @@ -91,31 +91,31 @@ import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.units.DataSize.Unit.GIGABYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.plugin.hive.BackgroundHiveSplitLoader.BucketSplitInfo.createBucketSplitInfo; -import static io.prestosql.plugin.hive.BackgroundHiveSplitLoader.getBucketNumber; -import static io.prestosql.plugin.hive.BackgroundHiveSplitLoader.hasAttemptId; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveColumnHandle.pathColumnHandle; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_BUCKET_FILES; -import static io.prestosql.plugin.hive.HiveSessionProperties.getMaxInitialSplitSize; -import static io.prestosql.plugin.hive.HiveStorageFormat.AVRO; -import static io.prestosql.plugin.hive.HiveStorageFormat.CSV; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.SESSION; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSession; -import static io.prestosql.plugin.hive.HiveTimestampPrecision.DEFAULT_PRECISION; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; -import static io.prestosql.plugin.hive.util.HiveUtil.getRegularColumnHandles; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.predicate.TupleDomain.withColumnDomains; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.plugin.hive.BackgroundHiveSplitLoader.BucketSplitInfo.createBucketSplitInfo; +import static io.trino.plugin.hive.BackgroundHiveSplitLoader.getBucketNumber; +import static io.trino.plugin.hive.BackgroundHiveSplitLoader.hasAttemptId; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveColumnHandle.pathColumnHandle; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_BUCKET_FILES; +import static io.trino.plugin.hive.HiveSessionProperties.getMaxInitialSplitSize; +import static io.trino.plugin.hive.HiveStorageFormat.AVRO; +import static io.trino.plugin.hive.HiveStorageFormat.CSV; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.SESSION; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSession; +import static io.trino.plugin.hive.HiveTimestampPrecision.DEFAULT_PRECISION; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; +import static io.trino.plugin.hive.util.HiveUtil.getRegularColumnHandles; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.predicate.TupleDomain.withColumnDomains; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestFileSystemCache.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestFileSystemCache.java index f888cdf65c3c..ac7fcebec194 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestFileSystemCache.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestFileSystemCache.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.authentication.ImpersonatingHdfsAuthentication; -import io.prestosql.plugin.hive.authentication.SimpleHadoopAuthentication; +import io.trino.plugin.hive.authentication.ImpersonatingHdfsAuthentication; +import io.trino.plugin.hive.authentication.SimpleHadoopAuthentication; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveApplyProjectionUtil.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveApplyProjectionUtil.java index 4841ddb59ba8..8cf95d7ca0b2 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveApplyProjectionUtil.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveApplyProjectionUtil.java @@ -14,17 +14,17 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Constant; -import io.prestosql.spi.expression.FieldDereference; -import io.prestosql.spi.expression.Variable; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Constant; +import io.trino.spi.expression.FieldDereference; +import io.trino.spi.expression.Variable; import org.testng.annotations.Test; -import static io.prestosql.plugin.hive.HiveApplyProjectionUtil.extractSupportedProjectedColumns; -import static io.prestosql.plugin.hive.HiveApplyProjectionUtil.isPushDownSupported; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.spi.type.RowType.rowType; +import static io.trino.plugin.hive.HiveApplyProjectionUtil.extractSupportedProjectedColumns; +import static io.trino.plugin.hive.HiveApplyProjectionUtil.isPushDownSupported; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RowType.field; +import static io.trino.spi.type.RowType.rowType; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveBooleanParser.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveBooleanParser.java index 9b3cc7c86d34..a645a859acc2 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveBooleanParser.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveBooleanParser.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static io.prestosql.plugin.hive.HiveBooleanParser.parseHiveBoolean; +import static io.trino.plugin.hive.HiveBooleanParser.parseHiveBoolean; import static java.nio.charset.StandardCharsets.US_ASCII; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNull; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveColumnHandle.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveColumnHandle.java index e05d70f1475e..7023d753a9d8 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveColumnHandle.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveColumnHandle.java @@ -18,24 +18,24 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.InternalTypeManager; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.type.InternalTypeManager; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveType.toHiveType; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveType.toHiveType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RowType.field; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Arrays.asList; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConfig.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConfig.java index d9d4f79a4343..eab7ab1836c9 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConfig.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConfig.java @@ -26,9 +26,9 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertFullMapping; import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; -import static io.prestosql.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior.APPEND; -import static io.prestosql.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior.OVERWRITE; -import static io.prestosql.plugin.hive.util.TestHiveUtil.nonDefaultTimeZone; +import static io.trino.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior.APPEND; +import static io.trino.plugin.hive.HiveSessionProperties.InsertExistingPartitionsBehavior.OVERWRITE; +import static io.trino.plugin.hive.util.TestHiveUtil.nonDefaultTimeZone; public class TestHiveConfig { diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorFactory.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorFactory.java index bdbf8736d9b5..29dd9d116c70 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorFactory.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorFactory.java @@ -14,19 +14,19 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorMetadata; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorSplitManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorSplitManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import java.util.Map; import static io.airlift.testing.Assertions.assertContains; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.spi.transaction.IsolationLevel.READ_UNCOMMITTED; +import static io.trino.spi.transaction.IsolationLevel.READ_UNCOMMITTED; import static org.testng.Assert.fail; public class TestHiveConnectorFactory diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveCreateExternalTable.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveCreateExternalTable.java index d25e081654d4..6768e03b5845 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveCreateExternalTable.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveCreateExternalTable.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; @@ -27,7 +27,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.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.ORDERS; import static java.lang.String.format; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveCreateExternalTableDisabled.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveCreateExternalTableDisabled.java index 0e6a716b6c29..7234709c7f39 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveCreateExternalTableDisabled.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveCreateExternalTableDisabled.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDecimalParser.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDecimalParser.java index cd20971c8c8d..b46833319d80 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDecimalParser.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDecimalParser.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.type.DecimalType; +import io.trino.spi.type.DecimalType; import org.testng.annotations.Test; import java.math.BigDecimal; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedAggregations.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedAggregations.java index 3a172d3ff77c..13a5fe418f09 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedAggregations.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedAggregations.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.hive; -import io.prestosql.testing.AbstractTestAggregations; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestAggregations; +import io.trino.testing.QueryRunner; import static io.trino.tpch.TpchTable.getTables; 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 2aaa3c2767eb..a23588ba653f 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,18 +13,18 @@ */ package io.trino.plugin.hive; -import io.prestosql.Session; -import io.prestosql.execution.DynamicFilterConfig; -import io.prestosql.operator.OperatorStats; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.testing.AbstractTestJoinQueries; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.ResultWithQueryId; +import io.trino.Session; +import io.trino.execution.DynamicFilterConfig; +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; +import io.trino.testing.ResultWithQueryId; import org.testng.annotations.Test; import static com.google.common.base.Verify.verify; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.tpch.TpchTable.getTables; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedJoinQueriesWithoutDynamicFiltering.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedJoinQueriesWithoutDynamicFiltering.java index f771b29e8b9d..0fd913b97f8a 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedJoinQueriesWithoutDynamicFiltering.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedJoinQueriesWithoutDynamicFiltering.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestJoinQueries; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestJoinQueries; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; import static io.trino.tpch.TpchTable.getTables; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedOrderByQueries.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedOrderByQueries.java index 56817c6d4413..f29bf5417e95 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedOrderByQueries.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedOrderByQueries.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.hive; -import io.prestosql.testing.AbstractTestOrderByQueries; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestOrderByQueries; +import io.trino.testing.QueryRunner; import static io.trino.tpch.TpchTable.getTables; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedQueries.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedQueries.java index 96999a807567..41bae304cc36 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedQueries.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedQueries.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.hive; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.TestTable; import org.testng.SkipException; import org.testng.annotations.Test; import java.util.Optional; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.sql.tree.ExplainType.Type.DISTRIBUTED; +import static io.trino.sql.tree.ExplainType.Type.DISTRIBUTED; import static io.trino.tpch.TpchTable.getTables; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedWindowQueries.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedWindowQueries.java index d8f2b140569d..53e4b948ecd4 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedWindowQueries.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedWindowQueries.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.hive; -import io.prestosql.testing.AbstractTestWindowQueries; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestWindowQueries; +import io.trino.testing.QueryRunner; import static io.trino.tpch.TpchTable.getTables; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDynamicPartitionPruning.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDynamicPartitionPruning.java index cce1dfa154cf..b295bd5bb7ed 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDynamicPartitionPruning.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDynamicPartitionPruning.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; -import io.prestosql.Session; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.ResultWithQueryId; +import io.trino.Session; +import io.trino.spi.QueryId; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.ValueSet; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.testing.ResultWithQueryId; import org.intellij.lang.annotations.Language; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -33,18 +33,18 @@ import static io.airlift.testing.Assertions.assertGreaterThan; import static io.airlift.testing.Assertions.assertGreaterThanOrEqual; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.SystemSessionProperties.ENABLE_LARGE_DYNAMIC_FILTERS; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.server.DynamicFilterService.DynamicFilterDomainStats; -import static io.prestosql.server.DynamicFilterService.DynamicFiltersStats; -import static io.prestosql.spi.predicate.Domain.none; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.PARTITIONED; -import static io.prestosql.sql.analyzer.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; +import static io.trino.server.DynamicFilterService.DynamicFilterDomainStats; +import static io.trino.server.DynamicFilterService.DynamicFiltersStats; +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.spi.type.IntegerType.INTEGER; +import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.PARTITIONED; +import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.tpch.TpchTable.getTables; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileBasedSecurity.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileBasedSecurity.java index f4778fdbed32..6adccb94b1fd 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileBasedSecurity.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileBasedSecurity.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.io.Resources; -import io.prestosql.Session; -import io.prestosql.spi.security.Identity; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.spi.security.Identity; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.io.File; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static io.trino.tpch.TpchTable.NATION; public class TestHiveFileBasedSecurity diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileFormats.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileFormats.java index 11a07bdce4b2..1c2255d78205 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileFormats.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileFormats.java @@ -18,25 +18,25 @@ import com.google.common.collect.Lists; import io.airlift.compress.lzo.LzoCodec; import io.airlift.compress.lzo.LzopCodec; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.orc.OrcWriterOptions; -import io.prestosql.plugin.hive.orc.OrcFileWriterFactory; -import io.prestosql.plugin.hive.orc.OrcPageSourceFactory; -import io.prestosql.plugin.hive.orc.OrcReaderConfig; -import io.prestosql.plugin.hive.orc.OrcWriterConfig; -import io.prestosql.plugin.hive.parquet.ParquetFileWriterFactory; -import io.prestosql.plugin.hive.parquet.ParquetPageSourceFactory; -import io.prestosql.plugin.hive.parquet.ParquetReaderConfig; -import io.prestosql.plugin.hive.parquet.ParquetWriterConfig; -import io.prestosql.plugin.hive.rcfile.RcFilePageSourceFactory; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.orc.OrcReaderOptions; +import io.trino.orc.OrcWriterOptions; +import io.trino.plugin.hive.orc.OrcFileWriterFactory; +import io.trino.plugin.hive.orc.OrcPageSourceFactory; +import io.trino.plugin.hive.orc.OrcReaderConfig; +import io.trino.plugin.hive.orc.OrcWriterConfig; +import io.trino.plugin.hive.parquet.ParquetFileWriterFactory; +import io.trino.plugin.hive.parquet.ParquetPageSourceFactory; +import io.trino.plugin.hive.parquet.ParquetReaderConfig; +import io.trino.plugin.hive.parquet.ParquetWriterConfig; +import io.trino.plugin.hive.rcfile.RcFilePageSourceFactory; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.testing.TestingConnectorSession; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.common.type.HiveVarchar; import org.apache.hadoop.hive.ql.io.SymlinkTextInputFormat; @@ -70,23 +70,23 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.hive.HiveStorageFormat.AVRO; -import static io.prestosql.plugin.hive.HiveStorageFormat.CSV; -import static io.prestosql.plugin.hive.HiveStorageFormat.JSON; -import static io.prestosql.plugin.hive.HiveStorageFormat.ORC; -import static io.prestosql.plugin.hive.HiveStorageFormat.PARQUET; -import static io.prestosql.plugin.hive.HiveStorageFormat.RCBINARY; -import static io.prestosql.plugin.hive.HiveStorageFormat.RCTEXT; -import static io.prestosql.plugin.hive.HiveStorageFormat.SEQUENCEFILE; -import static io.prestosql.plugin.hive.HiveStorageFormat.TEXTFILE; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.SESSION; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.HiveTestUtils.createGenericHiveRecordCursorProvider; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSession; -import static io.prestosql.plugin.hive.HiveTestUtils.getTypes; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.testing.StructuralTestUtil.rowBlockOf; +import static io.trino.plugin.hive.HiveStorageFormat.AVRO; +import static io.trino.plugin.hive.HiveStorageFormat.CSV; +import static io.trino.plugin.hive.HiveStorageFormat.JSON; +import static io.trino.plugin.hive.HiveStorageFormat.ORC; +import static io.trino.plugin.hive.HiveStorageFormat.PARQUET; +import static io.trino.plugin.hive.HiveStorageFormat.RCBINARY; +import static io.trino.plugin.hive.HiveStorageFormat.RCTEXT; +import static io.trino.plugin.hive.HiveStorageFormat.SEQUENCEFILE; +import static io.trino.plugin.hive.HiveStorageFormat.TEXTFILE; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.SESSION; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.HiveTestUtils.createGenericHiveRecordCursorProvider; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSession; +import static io.trino.plugin.hive.HiveTestUtils.getTypes; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.testing.StructuralTestUtil.rowBlockOf; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileMetastore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileMetastore.java index 5c35a4109d23..2eb2539a485a 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileMetastore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileMetastore.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastore; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.file.FileHiveMetastore; +import io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig; import org.testng.SkipException; import java.io.File; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; public class TestHiveFileMetastore extends AbstractTestHiveLocal diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveInMemoryMetastore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveInMemoryMetastore.java index 252c67a6a982..3997dc0170d2 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveInMemoryMetastore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveInMemoryMetastore.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.hive; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.thrift.BridgingHiveMetastore; -import io.prestosql.plugin.hive.metastore.thrift.InMemoryThriftMetastore; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreConfig; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.thrift.BridgingHiveMetastore; +import io.trino.plugin.hive.metastore.thrift.InMemoryThriftMetastore; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreConfig; import org.testng.SkipException; import java.io.File; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveIntegrationSmokeTest.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveIntegrationSmokeTest.java index 7587bdec12f3..f3cacff9af3a 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveIntegrationSmokeTest.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveIntegrationSmokeTest.java @@ -21,41 +21,41 @@ import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.execution.QueryInfo; -import io.prestosql.metadata.InsertTableHandle; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.metadata.TableMetadata; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.planprinter.IoPlanPrinter.ColumnConstraint; -import io.prestosql.sql.planner.planprinter.IoPlanPrinter.EstimatedStatsAndCost; -import io.prestosql.sql.planner.planprinter.IoPlanPrinter.FormattedDomain; -import io.prestosql.sql.planner.planprinter.IoPlanPrinter.FormattedMarker; -import io.prestosql.sql.planner.planprinter.IoPlanPrinter.FormattedRange; -import io.prestosql.sql.planner.planprinter.IoPlanPrinter.IoPlan; -import io.prestosql.sql.planner.planprinter.IoPlanPrinter.IoPlan.TableColumnInfo; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.ResultWithQueryId; -import io.prestosql.testing.sql.TestTable; -import io.prestosql.type.TypeDeserializer; +import io.trino.Session; +import io.trino.cost.StatsAndCosts; +import io.trino.execution.QueryInfo; +import io.trino.metadata.InsertTableHandle; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.metadata.TableMetadata; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.Constraint; +import io.trino.spi.security.Identity; +import io.trino.spi.security.SelectedRole; +import io.trino.spi.type.DateType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.planprinter.IoPlanPrinter.ColumnConstraint; +import io.trino.sql.planner.planprinter.IoPlanPrinter.EstimatedStatsAndCost; +import io.trino.sql.planner.planprinter.IoPlanPrinter.FormattedDomain; +import io.trino.sql.planner.planprinter.IoPlanPrinter.FormattedMarker; +import io.trino.sql.planner.planprinter.IoPlanPrinter.FormattedRange; +import io.trino.sql.planner.planprinter.IoPlanPrinter.IoPlan; +import io.trino.sql.planner.planprinter.IoPlanPrinter.IoPlan.TableColumnInfo; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; +import io.trino.testing.ResultWithQueryId; +import io.trino.testing.sql.TestTable; +import io.trino.type.TypeDeserializer; import org.apache.hadoop.fs.Path; import org.intellij.lang.annotations.Language; import org.testng.annotations.DataProvider; @@ -89,61 +89,61 @@ 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.prestosql.SystemSessionProperties.COLOCATED_JOIN; -import static io.prestosql.SystemSessionProperties.CONCURRENT_LIFESPANS_PER_NODE; -import static io.prestosql.SystemSessionProperties.DYNAMIC_SCHEDULE_FOR_GROUPED_EXECUTION; -import static io.prestosql.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; -import static io.prestosql.SystemSessionProperties.GROUPED_EXECUTION; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.plugin.hive.HiveColumnHandle.BUCKET_COLUMN_NAME; -import static io.prestosql.plugin.hive.HiveColumnHandle.FILE_MODIFIED_TIME_COLUMN_NAME; -import static io.prestosql.plugin.hive.HiveColumnHandle.FILE_SIZE_COLUMN_NAME; -import static io.prestosql.plugin.hive.HiveColumnHandle.PARTITION_COLUMN_NAME; -import static io.prestosql.plugin.hive.HiveColumnHandle.PATH_COLUMN_NAME; -import static io.prestosql.plugin.hive.HiveQueryRunner.HIVE_CATALOG; -import static io.prestosql.plugin.hive.HiveQueryRunner.TPCH_SCHEMA; -import static io.prestosql.plugin.hive.HiveQueryRunner.createBucketedSession; -import static io.prestosql.plugin.hive.HiveTableProperties.BUCKETED_BY_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.BUCKET_COUNT_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.PARTITIONED_BY_PROPERTY; -import static io.prestosql.plugin.hive.HiveTableProperties.STORAGE_FORMAT_PROPERTY; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.HiveType.toHiveType; -import static io.prestosql.plugin.hive.util.HiveUtil.columnExtraInfo; -import static io.prestosql.spi.predicate.Marker.Bound.ABOVE; -import static io.prestosql.spi.predicate.Marker.Bound.EXACTLY; -import static io.prestosql.spi.security.Identity.ofUser; -import static io.prestosql.spi.security.SelectedRole.Type.ROLE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; -import static io.prestosql.sql.planner.planprinter.PlanPrinter.textLogicalPlan; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.DELETE_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.INSERT_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SELECT_COLUMN; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_COLUMNS; -import static io.prestosql.testing.TestingAccessControlManager.privilege; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; -import static io.prestosql.testing.assertions.Assert.assertEventually; -import static io.prestosql.testing.sql.TestTable.randomTableSuffix; -import static io.prestosql.transaction.TransactionBuilder.transaction; +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; +import static io.trino.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; +import static io.trino.SystemSessionProperties.GROUPED_EXECUTION; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +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; +import static io.trino.plugin.hive.HiveColumnHandle.PARTITION_COLUMN_NAME; +import static io.trino.plugin.hive.HiveColumnHandle.PATH_COLUMN_NAME; +import static io.trino.plugin.hive.HiveQueryRunner.HIVE_CATALOG; +import static io.trino.plugin.hive.HiveQueryRunner.TPCH_SCHEMA; +import static io.trino.plugin.hive.HiveQueryRunner.createBucketedSession; +import static io.trino.plugin.hive.HiveTableProperties.BUCKETED_BY_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.BUCKET_COUNT_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.PARTITIONED_BY_PROPERTY; +import static io.trino.plugin.hive.HiveTableProperties.STORAGE_FORMAT_PROPERTY; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.HiveType.toHiveType; +import static io.trino.plugin.hive.util.HiveUtil.columnExtraInfo; +import static io.trino.spi.predicate.Marker.Bound.ABOVE; +import static io.trino.spi.predicate.Marker.Bound.EXACTLY; +import static io.trino.spi.security.Identity.ofUser; +import static io.trino.spi.security.SelectedRole.Type.ROLE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +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.PlanPrinter.textLogicalPlan; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.DELETE_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.INSERT_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SELECT_COLUMN; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_COLUMNS; +import static io.trino.testing.TestingAccessControlManager.privilege; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; +import static io.trino.testing.assertions.Assert.assertEventually; +import static io.trino.testing.sql.TestTable.randomTableSuffix; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.NATION; import static io.trino.tpch.TpchTable.ORDERS; import static io.trino.tpch.TpchTable.REGION; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveLocationService.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveLocationService.java index 98b999220337..70dfcb453f05 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveLocationService.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveLocationService.java @@ -14,15 +14,15 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.LocationService.WriteInfo; -import io.prestosql.plugin.hive.TestBackgroundHiveSplitLoader.TestingHdfsEnvironment; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.hive.LocationService.WriteInfo; +import io.trino.plugin.hive.TestBackgroundHiveSplitLoader.TestingHdfsEnvironment; +import io.trino.spi.PrestoException; import org.apache.hadoop.fs.Path; import org.testng.annotations.Test; -import static io.prestosql.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_EXISTING_DIRECTORY; -import static io.prestosql.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_NEW_DIRECTORY; -import static io.prestosql.plugin.hive.LocationHandle.WriteMode.STAGE_AND_MOVE_TO_TARGET_DIRECTORY; +import static io.trino.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_EXISTING_DIRECTORY; +import static io.trino.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_NEW_DIRECTORY; +import static io.trino.plugin.hive.LocationHandle.WriteMode.STAGE_AND_MOVE_TO_TARGET_DIRECTORY; import static org.testng.Assert.assertEquals; public class TestHiveLocationService diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveMetadata.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveMetadata.java index 9d2829aca601..e298fcddbdda 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveMetadata.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveMetadata.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.ValueSet; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.ValueSet; import org.testng.annotations.Test; import java.util.Optional; @@ -26,10 +26,10 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveMetadata.createPredicate; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveMetadata.createPredicate; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHivePageSink.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHivePageSink.java index afeda4287307..c74c419fedc8 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHivePageSink.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHivePageSink.java @@ -19,30 +19,30 @@ import com.google.common.io.Files; import io.airlift.json.JsonCodec; import io.airlift.slice.Slices; -import io.prestosql.GroupByHashPageIndexerFactory; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HivePageSinkMetadata; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.TestingNodeManager; -import io.prestosql.type.BlockTypeOperators; +import io.trino.GroupByHashPageIndexerFactory; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HivePageSinkMetadata; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.gen.JoinCompiler; +import io.trino.testing.MaterializedResult; +import io.trino.testing.TestingNodeManager; import io.trino.tpch.LineItem; import io.trino.tpch.LineItemColumn; import io.trino.tpch.LineItemGenerator; import io.trino.tpch.TpchColumnType; import io.trino.tpch.TpchColumnTypes; +import io.trino.type.BlockTypeOperators; import org.apache.hadoop.fs.Path; import org.testng.annotations.Test; @@ -60,31 +60,31 @@ import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.testing.Assertions.assertGreaterThan; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveCompressionCodec.NONE; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.PAGE_SORTER; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.HiveTestUtils.getDefaultHiveFileWriterFactories; -import static io.prestosql.plugin.hive.HiveTestUtils.getDefaultHivePageSourceFactories; -import static io.prestosql.plugin.hive.HiveTestUtils.getDefaultHiveRecordCursorProviders; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSession; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSessionProperties; -import static io.prestosql.plugin.hive.HiveType.HIVE_DATE; -import static io.prestosql.plugin.hive.HiveType.HIVE_DOUBLE; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.HIVE_LONG; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_NEW_DIRECTORY; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.plugin.hive.metastore.file.FileHiveMetastore.createTestingFileHiveMetastore; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveCompressionCodec.NONE; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.PAGE_SORTER; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.HiveTestUtils.getDefaultHiveFileWriterFactories; +import static io.trino.plugin.hive.HiveTestUtils.getDefaultHivePageSourceFactories; +import static io.trino.plugin.hive.HiveTestUtils.getDefaultHiveRecordCursorProviders; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSession; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSessionProperties; +import static io.trino.plugin.hive.HiveType.HIVE_DATE; +import static io.trino.plugin.hive.HiveType.HIVE_DOUBLE; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.HIVE_LONG; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.LocationHandle.WriteMode.DIRECT_TO_TARGET_NEW_DIRECTORY; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.plugin.hive.metastore.file.FileHiveMetastore.createTestingFileHiveMetastore; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.Math.round; import static java.lang.String.format; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveQlTranslation.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveQlTranslation.java index 9bea988e3f1d..7a83914a8cf0 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveQlTranslation.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveQlTranslation.java @@ -18,9 +18,9 @@ import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.google.common.collect.Streams; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; +import io.trino.spi.PrestoException; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -29,9 +29,9 @@ import java.util.Map; import java.util.stream.Stream; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_VIEW_TRANSLATION_ERROR; -import static io.prestosql.plugin.hive.HiveQlToPrestoTranslator.translateHiveViewToPresto; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_VIEW_TRANSLATION_ERROR; +import static io.trino.plugin.hive.HiveQlToPrestoTranslator.translateHiveViewToPresto; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.String.format; import static java.lang.String.join; import static java.util.Collections.nCopies; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveReaderProjectionsUtil.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveReaderProjectionsUtil.java index 20efb7c3afc7..bb6f74a7b8e6 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveReaderProjectionsUtil.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveReaderProjectionsUtil.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.RowFieldName; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.InternalTypeManager; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.RowFieldName; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.type.InternalTypeManager; import java.util.List; import java.util.Map; import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveTestUtils.rowType; -import static io.prestosql.plugin.hive.HiveType.toHiveType; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveTestUtils.rowType; +import static io.trino.plugin.hive.HiveType.toHiveType; +import static io.trino.spi.type.BigintType.BIGINT; public class TestHiveReaderProjectionsUtil { diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveRoles.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveRoles.java index 7a586b0ea473..c2282bcbe0af 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveRoles.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveRoles.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.spi.security.Identity; +import io.trino.spi.security.SelectedRole; +import io.trino.spi.type.Type; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterMethod; import org.testng.annotations.Test; @@ -32,9 +32,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.testing.QueryAssertions.assertContains; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.testing.QueryAssertions.assertContains; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static org.testng.Assert.assertEquals; @Test(singleThreaded = true) diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveSplit.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveSplit.java index 5dd0085a616c..f5c43c8b8880 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveSplit.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveSplit.java @@ -18,10 +18,10 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.plugin.hive.HiveColumnHandle.ColumnType; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HiveColumnHandle.ColumnType; +import io.trino.spi.HostAddress; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; import org.apache.hadoop.fs.Path; import org.testng.annotations.Test; @@ -30,10 +30,10 @@ import java.util.OptionalInt; import java.util.Properties; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveType.HIVE_LONG; -import static io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveType.HIVE_LONG; +import static io.trino.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; public class TestHiveSplit diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveSplitSource.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveSplitSource.java index 5a5373ca06db..d6596bb896d4 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveSplitSource.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveSplitSource.java @@ -17,9 +17,9 @@ import com.google.common.util.concurrent.SettableFuture; import io.airlift.stats.CounterStat; import io.airlift.units.DataSize; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitSource; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitSource; import org.testng.annotations.Test; import java.time.Instant; @@ -34,9 +34,9 @@ import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.testing.Assertions.assertContains; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.plugin.hive.HiveSessionProperties.getMaxInitialSplitSize; -import static io.prestosql.plugin.hive.HiveTestUtils.SESSION; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.plugin.hive.HiveSessionProperties.getMaxInitialSplitSize; +import static io.trino.plugin.hive.HiveTestUtils.SESSION; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; import static java.lang.Math.toIntExact; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveWriterFactory.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveWriterFactory.java index ad946e57b23d..8811a44e7835 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveWriterFactory.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveWriterFactory.java @@ -17,7 +17,7 @@ import java.util.Optional; -import static io.prestosql.plugin.hive.HiveWriterFactory.computeBucketedFileName; +import static io.trino.plugin.hive.HiveWriterFactory.computeBucketedFileName; import static org.apache.hadoop.hive.ql.exec.Utilities.getBucketIdFromFile; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestIonSqlQueryBuilder.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestIonSqlQueryBuilder.java index f8088b9804ff..65042fb2219e 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestIonSqlQueryBuilder.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestIonSqlQueryBuilder.java @@ -15,38 +15,38 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.SortedRangeSet; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.InternalTypeManager; -import io.prestosql.util.DateTimeUtils; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.SortedRangeSet; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.type.InternalTypeManager; +import io.trino.util.DateTimeUtils; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveTestUtils.longDecimal; -import static io.prestosql.plugin.hive.HiveTestUtils.shortDecimal; -import static io.prestosql.plugin.hive.HiveType.HIVE_DATE; -import static io.prestosql.plugin.hive.HiveType.HIVE_DOUBLE; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.HiveType.HIVE_TIMESTAMP; -import static io.prestosql.spi.predicate.TupleDomain.withColumnDomains; -import static io.prestosql.spi.predicate.ValueSet.ofRanges; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveTestUtils.longDecimal; +import static io.trino.plugin.hive.HiveTestUtils.shortDecimal; +import static io.trino.plugin.hive.HiveType.HIVE_DATE; +import static io.trino.plugin.hive.HiveType.HIVE_DOUBLE; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.HiveType.HIVE_TIMESTAMP; +import static io.trino.spi.predicate.TupleDomain.withColumnDomains; +import static io.trino.spi.predicate.ValueSet.ofRanges; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; public class TestIonSqlQueryBuilder diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestNodeLocalDynamicSplitPruning.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestNodeLocalDynamicSplitPruning.java index b7ad7bd1f4a1..2b7964cebcc0 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestNodeLocalDynamicSplitPruning.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestNodeLocalDynamicSplitPruning.java @@ -16,20 +16,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.testing.TempFile; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.orc.OrcReaderConfig; -import io.prestosql.plugin.hive.orc.OrcWriterConfig; -import io.prestosql.plugin.hive.parquet.ParquetReaderConfig; -import io.prestosql.plugin.hive.parquet.ParquetWriterConfig; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.EmptyPageSource; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.connector.CatalogName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.orc.OrcReaderConfig; +import io.trino.plugin.hive.orc.OrcWriterConfig; +import io.trino.plugin.hive.parquet.ParquetReaderConfig; +import io.trino.plugin.hive.parquet.ParquetWriterConfig; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.EmptyPageSource; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.testing.TestingConnectorSession; import org.testng.annotations.Test; import java.io.File; @@ -39,14 +39,14 @@ import java.util.Properties; import java.util.concurrent.CompletableFuture; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.HiveTestUtils.getDefaultHivePageSourceFactories; -import static io.prestosql.plugin.hive.HiveTestUtils.getDefaultHiveRecordCursorProviders; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.HiveTestUtils.getDefaultHivePageSourceFactories; +import static io.trino.plugin.hive.HiveTestUtils.getDefaultHiveRecordCursorProviders; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.util.concurrent.CompletableFuture.completedFuture; import static org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.FILE_INPUT_FORMAT; import static org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_LIB; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOrcPageSourceMemoryTracking.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOrcPageSourceMemoryTracking.java index d9722f4c63f3..13e81c4ee6eb 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOrcPageSourceMemoryTracking.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOrcPageSourceMemoryTracking.java @@ -18,38 +18,38 @@ import io.airlift.slice.Slice; import io.airlift.stats.Distribution; import io.airlift.units.DataSize; -import io.prestosql.connector.CatalogName; -import io.prestosql.execution.Lifespan; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.Split; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.ScanFilterAndProjectOperator.ScanFilterAndProjectOperatorFactory; -import io.prestosql.operator.SourceOperator; -import io.prestosql.operator.SourceOperatorFactory; -import io.prestosql.operator.TableScanOperator.TableScanOperatorFactory; -import io.prestosql.operator.project.CursorProcessor; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.plugin.hive.orc.OrcPageSourceFactory; -import io.prestosql.plugin.hive.orc.OrcReaderConfig; -import io.prestosql.plugin.hive.orc.OrcWriterConfig; -import io.prestosql.plugin.hive.parquet.ParquetReaderConfig; -import io.prestosql.plugin.hive.parquet.ParquetWriterConfig; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.testing.TestingConnectorSession; -import io.prestosql.testing.TestingSplit; +import io.trino.connector.CatalogName; +import io.trino.execution.Lifespan; +import io.trino.metadata.Metadata; +import io.trino.metadata.Split; +import io.trino.operator.DriverContext; +import io.trino.operator.ScanFilterAndProjectOperator.ScanFilterAndProjectOperatorFactory; +import io.trino.operator.SourceOperator; +import io.trino.operator.SourceOperatorFactory; +import io.trino.operator.TableScanOperator.TableScanOperatorFactory; +import io.trino.operator.project.CursorProcessor; +import io.trino.operator.project.PageProcessor; +import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.hive.orc.OrcPageSourceFactory; +import io.trino.plugin.hive.orc.OrcReaderConfig; +import io.trino.plugin.hive.orc.OrcWriterConfig; +import io.trino.plugin.hive.parquet.ParquetReaderConfig; +import io.trino.plugin.hive.parquet.ParquetWriterConfig; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.relational.RowExpression; +import io.trino.testing.TestingConnectorSession; +import io.trino.testing.TestingSplit; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; @@ -97,20 +97,20 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.testing.Assertions.assertBetweenInclusive; import static io.airlift.units.DataSize.Unit.BYTE; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.orc.OrcReader.MAX_BATCH_SIZE; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.SESSION; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.sql.relational.Expressions.field; -import static io.prestosql.testing.TestingHandles.TEST_TABLE_HANDLE; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.TestingTaskContext.createTaskContext; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.orc.OrcReader.MAX_BATCH_SIZE; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.SESSION; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.sql.relational.Expressions.field; +import static io.trino.testing.TestingHandles.TEST_TABLE_HANDLE; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingTaskContext.createTaskContext; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOrcWriterConfig.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOrcWriterConfig.java index 902f6ec8ff6b..b3e3f3c82769 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOrcWriterConfig.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOrcWriterConfig.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableMap; import io.airlift.units.DataSize; -import io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode; -import io.prestosql.plugin.hive.orc.OrcWriterConfig; +import io.trino.orc.OrcWriteValidation.OrcWriteValidationMode; +import io.trino.plugin.hive.orc.OrcWriterConfig; import org.testng.annotations.Test; import java.util.Map; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOriginalFilesUtils.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOriginalFilesUtils.java index 0cceeca42025..3dbb6279baef 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOriginalFilesUtils.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOriginalFilesUtils.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive; import com.google.common.io.Resources; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.plugin.hive.orc.OriginalFilesUtils; +import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.hive.orc.OriginalFilesUtils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapred.JobConf; @@ -26,9 +26,9 @@ import java.util.ArrayList; import java.util.List; -import static io.prestosql.plugin.hive.AcidInfo.OriginalFileInfo; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.hive.AcidInfo.OriginalFileInfo; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.testng.Assert.assertEquals; public class TestOriginalFilesUtils diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestPartitionOfflineException.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestPartitionOfflineException.java index fdb2bf238655..d2aed3e3d31a 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestPartitionOfflineException.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestPartitionOfflineException.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestPartitionUpdate.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestPartitionUpdate.java index 3a78476a5f21..69031a976ad0 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestPartitionUpdate.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestPartitionUpdate.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.json.JsonCodec; -import io.prestosql.plugin.hive.PartitionUpdate.UpdateMode; +import io.trino.plugin.hive.PartitionUpdate.UpdateMode; import org.apache.hadoop.fs.Path; import org.testng.annotations.Test; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestReaderColumns.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestReaderColumns.java index eeefa3fa3835..975946be097b 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestReaderColumns.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestReaderColumns.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.ArrayList; @@ -24,13 +24,13 @@ import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HivePageSourceProvider.projectBaseColumns; -import static io.prestosql.plugin.hive.HivePageSourceProvider.projectSufficientColumns; -import static io.prestosql.plugin.hive.TestHiveReaderProjectionsUtil.ROWTYPE_OF_PRIMITIVES; -import static io.prestosql.plugin.hive.TestHiveReaderProjectionsUtil.ROWTYPE_OF_ROW_AND_PRIMITIVES; -import static io.prestosql.plugin.hive.TestHiveReaderProjectionsUtil.createProjectedColumnHandle; -import static io.prestosql.plugin.hive.TestHiveReaderProjectionsUtil.createTestFullColumns; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.hive.HivePageSourceProvider.projectBaseColumns; +import static io.trino.plugin.hive.HivePageSourceProvider.projectSufficientColumns; +import static io.trino.plugin.hive.TestHiveReaderProjectionsUtil.ROWTYPE_OF_PRIMITIVES; +import static io.trino.plugin.hive.TestHiveReaderProjectionsUtil.ROWTYPE_OF_ROW_AND_PRIMITIVES; +import static io.trino.plugin.hive.TestHiveReaderProjectionsUtil.createProjectedColumnHandle; +import static io.trino.plugin.hive.TestHiveReaderProjectionsUtil.createTestFullColumns; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestReaderProjectionsAdapter.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestReaderProjectionsAdapter.java index 80282077728a..ea29bef0bd9a 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestReaderProjectionsAdapter.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestReaderProjectionsAdapter.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.ColumnarRow; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.block.RowBlock; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.ColumnarRow; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.block.RowBlock; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.ArrayList; @@ -34,15 +34,15 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.block.BlockAssertions.assertBlockEquals; -import static io.prestosql.plugin.hive.HivePageSourceProvider.projectBaseColumns; -import static io.prestosql.plugin.hive.TestHiveReaderProjectionsUtil.ROWTYPE_OF_ROW_AND_PRIMITIVES; -import static io.prestosql.plugin.hive.TestHiveReaderProjectionsUtil.createProjectedColumnHandle; -import static io.prestosql.plugin.hive.TestHiveReaderProjectionsUtil.createTestFullColumns; -import static io.prestosql.plugin.hive.TestReaderProjectionsAdapter.RowData.rowData; -import static io.prestosql.spi.block.ColumnarRow.toColumnarRow; -import static io.prestosql.spi.block.RowBlock.fromFieldBlocks; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.block.BlockAssertions.assertBlockEquals; +import static io.trino.plugin.hive.HivePageSourceProvider.projectBaseColumns; +import static io.trino.plugin.hive.TestHiveReaderProjectionsUtil.ROWTYPE_OF_ROW_AND_PRIMITIVES; +import static io.trino.plugin.hive.TestHiveReaderProjectionsUtil.createProjectedColumnHandle; +import static io.trino.plugin.hive.TestHiveReaderProjectionsUtil.createTestFullColumns; +import static io.trino.plugin.hive.TestReaderProjectionsAdapter.RowData.rowData; +import static io.trino.spi.block.ColumnarRow.toColumnarRow; +import static io.trino.spi.block.RowBlock.fromFieldBlocks; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestShowStats.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestShowStats.java index 14ee689fea54..1f486e206e4f 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestShowStats.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestShowStats.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive; import com.google.common.collect.ImmutableList; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestTableOfflineException.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestTableOfflineException.java index 6cd145f2f6de..d7c7f91d2a5c 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestTableOfflineException.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestTableOfflineException.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestTableToPartitionMapping.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestTableToPartitionMapping.java index f56e41d3dc41..307001afe121 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestTableToPartitionMapping.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestTableToPartitionMapping.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableMap; import org.testng.annotations.Test; -import static io.prestosql.plugin.hive.TableToPartitionMapping.isIdentityMapping; +import static io.trino.plugin.hive.TableToPartitionMapping.isIdentityMapping; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/authentication/TestHiveAuthenticationConfig.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/authentication/TestHiveAuthenticationConfig.java index 7a302d340491..bfb0fd499491 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/authentication/TestHiveAuthenticationConfig.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/authentication/TestHiveAuthenticationConfig.java @@ -14,7 +14,7 @@ package io.trino.plugin.hive.authentication; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.authentication.HiveAuthenticationConfig.HdfsAuthenticationType; +import io.trino.plugin.hive.authentication.HiveAuthenticationConfig.HdfsAuthenticationType; import org.testng.annotations.Test; import java.util.Map; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/BenchmarkHiveFileFormat.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/BenchmarkHiveFileFormat.java index 606289393cd0..af22c597be22 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/BenchmarkHiveFileFormat.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/BenchmarkHiveFileFormat.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.plugin.hive.HiveCompressionCodec; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; import io.trino.hadoop.HadoopNative; +import io.trino.plugin.hive.HiveCompressionCodec; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; import io.trino.tpch.OrderColumn; import io.trino.tpch.TpchColumn; import io.trino.tpch.TpchEntity; @@ -59,14 +59,14 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.SESSION; -import static io.prestosql.plugin.hive.HiveTestUtils.mapType; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.SESSION; +import static io.trino.plugin.hive.HiveTestUtils.mapType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static io.trino.tpch.TpchTable.LINE_ITEM; import static io.trino.tpch.TpchTable.ORDERS; import static java.lang.String.format; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/BenchmarkProjectionPushdownHive.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/BenchmarkProjectionPushdownHive.java index d4450a316760..f00d22f6bbee 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/BenchmarkProjectionPushdownHive.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/BenchmarkProjectionPushdownHive.java @@ -14,21 +14,21 @@ package io.trino.plugin.hive.benchmark; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveCompressionCodec; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RowBlock; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; import io.trino.hadoop.HadoopNative; +import io.trino.metadata.Metadata; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveCompressionCodec; +import io.trino.plugin.hive.HiveType; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RowBlock; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Measurement; @@ -59,13 +59,13 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.SESSION; -import static io.prestosql.plugin.hive.HiveType.toHiveType; -import static io.prestosql.plugin.hive.TestHiveReaderProjectionsUtil.createProjectedColumnHandle; -import static io.prestosql.plugin.hive.benchmark.FileFormat.PRESTO_ORC; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.SESSION; +import static io.trino.plugin.hive.HiveType.toHiveType; +import static io.trino.plugin.hive.TestHiveReaderProjectionsUtil.createProjectedColumnHandle; +import static io.trino.plugin.hive.benchmark.FileFormat.PRESTO_ORC; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.nio.file.Files.createTempDirectory; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/FileFormat.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/FileFormat.java index b628b2f9e8bb..26f90d878404 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/FileFormat.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/FileFormat.java @@ -17,52 +17,52 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.OutputStreamSliceOutput; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.orc.OrcWriter; -import io.prestosql.orc.OrcWriterOptions; -import io.prestosql.orc.OrcWriterStats; -import io.prestosql.orc.OutputStreamOrcDataSink; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.parquet.writer.ParquetSchemaConverter; -import io.prestosql.parquet.writer.ParquetWriter; -import io.prestosql.parquet.writer.ParquetWriterOptions; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.GenericHiveRecordCursorProvider; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveCompressionCodec; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HivePageSourceFactory; -import io.prestosql.plugin.hive.HivePageSourceProvider; -import io.prestosql.plugin.hive.HiveRecordCursorProvider; -import io.prestosql.plugin.hive.HiveRecordCursorProvider.ReaderRecordCursorWithProjections; -import io.prestosql.plugin.hive.HiveSplit; -import io.prestosql.plugin.hive.HiveStorageFormat; -import io.prestosql.plugin.hive.HiveTableHandle; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.HiveTypeName; -import io.prestosql.plugin.hive.ReaderPageSource; -import io.prestosql.plugin.hive.RecordFileWriter; -import io.prestosql.plugin.hive.TableToPartitionMapping; -import io.prestosql.plugin.hive.orc.OrcPageSourceFactory; -import io.prestosql.plugin.hive.parquet.ParquetPageSourceFactory; -import io.prestosql.plugin.hive.parquet.ParquetReaderConfig; -import io.prestosql.plugin.hive.rcfile.RcFilePageSourceFactory; -import io.prestosql.rcfile.AircompressorCodecFactory; -import io.prestosql.rcfile.HadoopCodecFactory; -import io.prestosql.rcfile.RcFileEncoding; -import io.prestosql.rcfile.RcFileWriter; -import io.prestosql.rcfile.binary.BinaryRcFileEncoding; -import io.prestosql.rcfile.text.TextRcFileEncoding; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.TestingConnectorTransactionHandle; +import io.trino.orc.OrcReaderOptions; +import io.trino.orc.OrcWriter; +import io.trino.orc.OrcWriterOptions; +import io.trino.orc.OrcWriterStats; +import io.trino.orc.OutputStreamOrcDataSink; +import io.trino.orc.metadata.OrcType; +import io.trino.parquet.writer.ParquetSchemaConverter; +import io.trino.parquet.writer.ParquetWriter; +import io.trino.parquet.writer.ParquetWriterOptions; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.GenericHiveRecordCursorProvider; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveCompressionCodec; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HivePageSourceFactory; +import io.trino.plugin.hive.HivePageSourceProvider; +import io.trino.plugin.hive.HiveRecordCursorProvider; +import io.trino.plugin.hive.HiveRecordCursorProvider.ReaderRecordCursorWithProjections; +import io.trino.plugin.hive.HiveSplit; +import io.trino.plugin.hive.HiveStorageFormat; +import io.trino.plugin.hive.HiveTableHandle; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.HiveTypeName; +import io.trino.plugin.hive.ReaderPageSource; +import io.trino.plugin.hive.RecordFileWriter; +import io.trino.plugin.hive.TableToPartitionMapping; +import io.trino.plugin.hive.orc.OrcPageSourceFactory; +import io.trino.plugin.hive.parquet.ParquetPageSourceFactory; +import io.trino.plugin.hive.parquet.ParquetReaderConfig; +import io.trino.plugin.hive.rcfile.RcFilePageSourceFactory; +import io.trino.rcfile.AircompressorCodecFactory; +import io.trino.rcfile.HadoopCodecFactory; +import io.trino.rcfile.RcFileEncoding; +import io.trino.rcfile.RcFileWriter; +import io.trino.rcfile.binary.BinaryRcFileEncoding; +import io.trino.rcfile.text.TextRcFileEncoding; +import io.trino.spi.Page; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.sql.planner.TestingConnectorTransactionHandle; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapred.JobConf; @@ -79,15 +79,15 @@ 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.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode.BOTH; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.HiveTestUtils.createGenericHiveRecordCursorProvider; -import static io.prestosql.plugin.hive.HiveType.toHiveType; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.plugin.hive.metastore.StorageFormat.fromHiveStorageFormat; -import static io.prestosql.plugin.hive.util.CompressionConfigUtil.configureCompression; +import static io.trino.orc.OrcWriteValidation.OrcWriteValidationMode.BOTH; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.HiveTestUtils.createGenericHiveRecordCursorProvider; +import static io.trino.plugin.hive.HiveType.toHiveType; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.plugin.hive.metastore.StorageFormat.fromHiveStorageFormat; +import static io.trino.plugin.hive.util.CompressionConfigUtil.configureCompression; import static java.lang.String.join; import static java.util.stream.Collectors.joining; import static org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.FILE_INPUT_FORMAT; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/FormatWriter.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/FormatWriter.java index 4b5c46f9f61d..a17ec1d9234b 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/FormatWriter.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/FormatWriter.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.hive.benchmark; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import java.io.Closeable; import java.io.IOException; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/TestData.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/TestData.java index 8bf96002551e..89ce02131838 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/TestData.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/TestData.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive.benchmark; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/TestHiveFileFormatBenchmark.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/TestHiveFileFormatBenchmark.java index 6af4db8022db..20717b46fd19 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/TestHiveFileFormatBenchmark.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/benchmark/TestHiveFileFormatBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.hive.benchmark; -import io.prestosql.plugin.hive.HiveCompressionCodec; -import io.prestosql.plugin.hive.benchmark.BenchmarkHiveFileFormat.CompressionCounter; -import io.prestosql.plugin.hive.benchmark.BenchmarkHiveFileFormat.DataSet; +import io.trino.plugin.hive.HiveCompressionCodec; +import io.trino.plugin.hive.benchmark.BenchmarkHiveFileFormat.CompressionCounter; +import io.trino.plugin.hive.benchmark.BenchmarkHiveFileFormat.DataSet; import org.testng.annotations.Test; import java.io.IOException; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestMetastoreUtil.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestMetastoreUtil.java index c6d4961de227..fe2c9e57de57 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestMetastoreUtil.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestMetastoreUtil.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMultimap; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Order; import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; @@ -36,12 +36,12 @@ import java.util.Properties; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; -import static io.prestosql.plugin.hive.HiveColumnHandle.bucketColumnHandle; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.computePartitionKeyFilter; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; +import static io.trino.plugin.hive.HiveColumnHandle.bucketColumnHandle; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.metastore.MetastoreUtil.computePartitionKeyFilter; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.apache.hadoop.hive.serde.serdeConstants.COLUMN_NAME_DELIMITER; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestPrincipalPrivileges.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestPrincipalPrivileges.java index fe28aaf2ad72..75598ba06c30 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestPrincipalPrivileges.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestPrincipalPrivileges.java @@ -14,10 +14,10 @@ package io.trino.plugin.hive.metastore; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.security.PrincipalType; +import io.trino.spi.security.PrincipalType; import org.testng.annotations.Test; -import static io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.SELECT; +import static io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege.SELECT; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestRecordingHiveMetastore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestRecordingHiveMetastore.java index cc13ae00c527..018186238b35 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestRecordingHiveMetastore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestRecordingHiveMetastore.java @@ -21,25 +21,25 @@ import io.airlift.json.ObjectMapperProvider; import io.airlift.slice.Slices; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.HiveBasicStatistics; -import io.prestosql.plugin.hive.HiveBucketProperty; -import io.prestosql.plugin.hive.HiveModule; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.RecordingMetastoreConfig; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege; -import io.prestosql.plugin.hive.metastore.SortingColumn.Order; -import io.prestosql.plugin.hive.util.HiveBlockEncodingSerde; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.TestingBlockJsonSerde; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HiveBasicStatistics; +import io.trino.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.HiveModule; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.RecordingMetastoreConfig; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo.HivePrivilege; +import io.trino.plugin.hive.metastore.SortingColumn.Order; +import io.trino.plugin.hive.util.HiveBlockEncodingSerde; +import io.trino.spi.block.Block; +import io.trino.spi.block.TestingBlockJsonSerde; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.io.File; @@ -51,14 +51,14 @@ import java.util.Set; import java.util.concurrent.TimeUnit; -import static io.prestosql.plugin.hive.HiveBasicStatistics.createEmptyStatistics; -import static io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.spi.statistics.ColumnStatisticType.MAX_VALUE; -import static io.prestosql.spi.statistics.ColumnStatisticType.MIN_VALUE; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.hive.HiveBasicStatistics.createEmptyStatistics; +import static io.trino.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.spi.statistics.ColumnStatisticType.MAX_VALUE; +import static io.trino.spi.statistics.ColumnStatisticType.MIN_VALUE; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.testng.Assert.assertEquals; public class TestRecordingHiveMetastore diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestSemiTransactionalHiveMetastore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestSemiTransactionalHiveMetastore.java index 8c0073fb4617..3cf988a4a635 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestSemiTransactionalHiveMetastore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/TestSemiTransactionalHiveMetastore.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HiveBucketProperty; -import io.prestosql.plugin.hive.HiveMetastoreClosure; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.HiveMetastoreClosure; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; import org.apache.hadoop.fs.Path; import org.testng.annotations.Test; @@ -34,10 +34,10 @@ import java.util.stream.IntStream; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; -import static io.prestosql.plugin.hive.HiveBasicStatistics.createEmptyStatistics; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.hive.HiveBasicStatistics.createEmptyStatistics; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.util.concurrent.Executors.newFixedThreadPool; import static java.util.concurrent.Executors.newScheduledThreadPool; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/UnimplementedHiveMetastore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/UnimplementedHiveMetastore.java index c9af3cc5087b..95eef48a2310 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/UnimplementedHiveMetastore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/UnimplementedHiveMetastore.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.hive.metastore; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import java.util.List; import java.util.Map; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/alluxio/TestProtoUtils.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/alluxio/TestProtoUtils.java index 611972d54733..a60e9a7afd58 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/alluxio/TestProtoUtils.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/alluxio/TestProtoUtils.java @@ -15,17 +15,17 @@ import alluxio.grpc.table.Layout; import alluxio.shaded.client.com.google.protobuf.ByteString; -import io.prestosql.plugin.hive.HiveBucketProperty; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.SortingColumn; -import io.prestosql.plugin.hive.metastore.Storage; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.util.HiveBucketing; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.SortingColumn; +import io.trino.plugin.hive.metastore.Storage; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.util.HiveBucketing; +import io.trino.spi.PrestoException; import org.testng.annotations.Test; import java.util.Collections; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/cache/TestCachingHiveMetastore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/cache/TestCachingHiveMetastore.java index 8615b4bdc426..92f901265dd0 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/cache/TestCachingHiveMetastore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/cache/TestCachingHiveMetastore.java @@ -18,26 +18,26 @@ import com.google.common.collect.Iterables; import com.google.common.util.concurrent.ListeningExecutorService; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HiveMetastoreClosure; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.metastore.thrift.BridgingHiveMetastore; -import io.prestosql.plugin.hive.metastore.thrift.MetastoreLocator; -import io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient; -import io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreClient; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreConfig; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreStats; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HiveMetastoreClosure; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.metastore.thrift.BridgingHiveMetastore; +import io.trino.plugin.hive.metastore.thrift.MetastoreLocator; +import io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient; +import io.trino.plugin.hive.metastore.thrift.ThriftHiveMetastore; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreClient; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreConfig; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreStats; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -52,28 +52,28 @@ import static com.google.common.util.concurrent.MoreExecutors.listeningDecorator; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createIntegerColumnStatistics; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.computePartitionKeyFilter; -import static io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastore.cachingHiveMetastore; -import static io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastore.memoizeMetastore; -import static io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient.BAD_DATABASE; -import static io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient.BAD_PARTITION; -import static io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient.PARTITION_COLUMN_NAMES; -import static io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_COLUMN; -import static io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_DATABASE; -import static io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_PARTITION1; -import static io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_PARTITION2; -import static io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_PARTITION_VALUES1; -import static io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_ROLES; -import static io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_TABLE; -import static io.prestosql.spi.predicate.TupleDomain.withColumnDomains; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createIntegerColumnStatistics; +import static io.trino.plugin.hive.metastore.MetastoreUtil.computePartitionKeyFilter; +import static io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.cachingHiveMetastore; +import static io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.memoizeMetastore; +import static io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient.BAD_DATABASE; +import static io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient.BAD_PARTITION; +import static io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient.PARTITION_COLUMN_NAMES; +import static io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_COLUMN; +import static io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_DATABASE; +import static io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_PARTITION1; +import static io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_PARTITION2; +import static io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_PARTITION_VALUES1; +import static io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_ROLES; +import static io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient.TEST_TABLE; +import static io.trino.spi.predicate.TupleDomain.withColumnDomains; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.function.Function.identity; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/file/TestFileHiveMetastoreConfig.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/file/TestFileHiveMetastoreConfig.java index 3c491fd4be2d..b3bc88732291 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/file/TestFileHiveMetastoreConfig.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/file/TestFileHiveMetastoreConfig.java @@ -21,8 +21,8 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertFullMapping; import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; -import static io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig.VersionCompatibility.NOT_SUPPORTED; -import static io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig.VersionCompatibility.UNSAFE_ASSUME_COMPATIBILITY; +import static io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig.VersionCompatibility.NOT_SUPPORTED; +import static io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig.VersionCompatibility.UNSAFE_ASSUME_COMPATIBILITY; public class TestFileHiveMetastoreConfig { diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/PartitionFilterBuilder.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/PartitionFilterBuilder.java index 9db9decb219c..3e589a1e3e81 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/PartitionFilterBuilder.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/PartitionFilterBuilder.java @@ -16,17 +16,17 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.VarcharType; import java.math.BigDecimal; import java.math.RoundingMode; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueExpressionUtil.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueExpressionUtil.java index 1ad558c2bbdf..e8b932cc2aea 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueExpressionUtil.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueExpressionUtil.java @@ -14,20 +14,20 @@ package io.trino.plugin.hive.metastore.glue; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.metastore.Column; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.VarcharType; import org.testng.annotations.Test; import java.util.Optional; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.hive.metastore.glue.GlueExpressionUtil.buildGlueExpression; -import static io.prestosql.plugin.hive.metastore.glue.GlueExpressionUtil.buildGlueExpressionForSingleDomain; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.hive.metastore.glue.GlueExpressionUtil.buildGlueExpression; +import static io.trino.plugin.hive.metastore.glue.GlueExpressionUtil.buildGlueExpressionForSingleDomain; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueInputConverter.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueInputConverter.java index c3310d9dfbb0..fb888e98995c 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueInputConverter.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueInputConverter.java @@ -18,20 +18,20 @@ import com.amazonaws.services.glue.model.StorageDescriptor; import com.amazonaws.services.glue.model.TableInput; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.HiveBucketProperty; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.Partition; -import io.prestosql.plugin.hive.metastore.Storage; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.plugin.hive.metastore.glue.converter.GlueInputConverter; +import io.trino.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.Partition; +import io.trino.plugin.hive.metastore.Storage; +import io.trino.plugin.hive.metastore.Table; +import io.trino.plugin.hive.metastore.glue.converter.GlueInputConverter; import org.testng.annotations.Test; import java.util.List; -import static io.prestosql.plugin.hive.metastore.glue.TestingMetastoreObjects.getPrestoTestDatabase; -import static io.prestosql.plugin.hive.metastore.glue.TestingMetastoreObjects.getPrestoTestPartition; -import static io.prestosql.plugin.hive.metastore.glue.TestingMetastoreObjects.getPrestoTestTable; +import static io.trino.plugin.hive.metastore.glue.TestingMetastoreObjects.getPrestoTestDatabase; +import static io.trino.plugin.hive.metastore.glue.TestingMetastoreObjects.getPrestoTestPartition; +import static io.trino.plugin.hive.metastore.glue.TestingMetastoreObjects.getPrestoTestTable; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueToPrestoConverter.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueToPrestoConverter.java index 32f02e936b05..3c796ff3e0a0 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueToPrestoConverter.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestGlueToPrestoConverter.java @@ -18,12 +18,12 @@ import com.amazonaws.services.glue.model.StorageDescriptor; import com.amazonaws.services.glue.model.Table; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.HiveBucketProperty; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Storage; -import io.prestosql.plugin.hive.metastore.glue.converter.GlueToPrestoConverter; -import io.prestosql.plugin.hive.metastore.glue.converter.GlueToPrestoConverter.GluePartitionConverter; -import io.prestosql.spi.security.PrincipalType; +import io.trino.plugin.hive.HiveBucketProperty; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Storage; +import io.trino.plugin.hive.metastore.glue.converter.GlueToPrestoConverter; +import io.trino.plugin.hive.metastore.glue.converter.GlueToPrestoConverter.GluePartitionConverter; +import io.trino.spi.security.PrincipalType; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -32,10 +32,10 @@ import java.util.List; import static com.amazonaws.util.CollectionUtils.isNullOrEmpty; -import static io.prestosql.plugin.hive.metastore.glue.TestingMetastoreObjects.getGlueTestColumn; -import static io.prestosql.plugin.hive.metastore.glue.TestingMetastoreObjects.getGlueTestDatabase; -import static io.prestosql.plugin.hive.metastore.glue.TestingMetastoreObjects.getGlueTestPartition; -import static io.prestosql.plugin.hive.metastore.glue.TestingMetastoreObjects.getGlueTestTable; +import static io.trino.plugin.hive.metastore.glue.TestingMetastoreObjects.getGlueTestColumn; +import static io.trino.plugin.hive.metastore.glue.TestingMetastoreObjects.getGlueTestDatabase; +import static io.trino.plugin.hive.metastore.glue.TestingMetastoreObjects.getGlueTestPartition; +import static io.trino.plugin.hive.metastore.glue.TestingMetastoreObjects.getGlueTestTable; import static org.apache.hadoop.hive.metastore.TableType.EXTERNAL_TABLE; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestHiveGlueMetastore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestHiveGlueMetastore.java index 36f1c2a85dd5..1ee66838a59e 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestHiveGlueMetastore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestHiveGlueMetastore.java @@ -15,28 +15,28 @@ import com.google.common.collect.ImmutableList; import io.airlift.concurrent.BoundedExecutor; -import io.prestosql.plugin.hive.AbstractTestHiveLocal; -import io.prestosql.plugin.hive.HiveMetastoreClosure; -import io.prestosql.plugin.hive.HiveTestUtils; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.AbstractTestHiveLocal; +import io.trino.plugin.hive.HiveMetastoreClosure; +import io.trino.plugin.hive.HiveTestUtils; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.VarcharType; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -49,11 +49,11 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.hive.HiveStorageFormat.ORC; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.metastore.glue.PartitionFilterBuilder.DECIMAL_TYPE; -import static io.prestosql.plugin.hive.metastore.glue.PartitionFilterBuilder.decimalOf; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.hive.HiveStorageFormat.ORC; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.metastore.glue.PartitionFilterBuilder.DECIMAL_TYPE; +import static io.trino.plugin.hive.metastore.glue.PartitionFilterBuilder.decimalOf; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.UUID.randomUUID; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestingMetastoreObjects.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestingMetastoreObjects.java index 6d5ef09416b6..871229995e6c 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestingMetastoreObjects.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/glue/TestingMetastoreObjects.java @@ -21,10 +21,10 @@ import com.amazonaws.services.glue.model.Table; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.metastore.Storage; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.spi.security.PrincipalType; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.metastore.Storage; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.spi.security.PrincipalType; import org.apache.hadoop.hive.metastore.TableType; import java.util.List; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/InMemoryThriftMetastore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/InMemoryThriftMetastore.java index 70c7f94a5d82..6fd779f1ebbe 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/InMemoryThriftMetastore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/InMemoryThriftMetastore.java @@ -16,22 +16,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.SchemaAlreadyExistsException; -import io.prestosql.plugin.hive.TableAlreadyExistsException; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.HivePrivilegeInfo; -import io.prestosql.plugin.hive.metastore.PartitionWithStatistics; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.RoleGrant; -import io.prestosql.spi.statistics.ColumnStatisticType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.SchemaAlreadyExistsException; +import io.trino.plugin.hive.TableAlreadyExistsException; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.HivePrivilegeInfo; +import io.trino.plugin.hive.metastore.PartitionWithStatistics; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.RoleGrant; +import io.trino.spi.statistics.ColumnStatisticType; +import io.trino.spi.type.Type; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.metastore.TableType; import org.apache.hadoop.hive.metastore.api.Database; @@ -63,11 +63,11 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static io.prestosql.plugin.hive.HiveBasicStatistics.createEmptyStatistics; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.partitionKeyFilterToStringList; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.toMetastoreApiPartition; -import static io.prestosql.plugin.hive.util.HiveUtil.toPartitionValues; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_EMPTY; +import static io.trino.plugin.hive.HiveBasicStatistics.createEmptyStatistics; +import static io.trino.plugin.hive.metastore.MetastoreUtil.partitionKeyFilterToStringList; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.toMetastoreApiPartition; +import static io.trino.plugin.hive.util.HiveUtil.toPartitionValues; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_EMPTY; import static java.util.Locale.US; import static java.util.Objects.requireNonNull; import static org.apache.hadoop.hive.common.FileUtils.makePartName; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/MockThriftMetastoreClient.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/MockThriftMetastoreClient.java index b191956e218b..3b5fda750727 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/MockThriftMetastoreClient.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/MockThriftMetastoreClient.java @@ -17,7 +17,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; -import io.prestosql.plugin.hive.acid.AcidOperation; +import io.trino.plugin.hive.acid.AcidOperation; import org.apache.hadoop.hive.metastore.TableType; import org.apache.hadoop.hive.metastore.Warehouse; import org.apache.hadoop.hive.metastore.api.ColumnStatisticsData; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestFailureAwareThriftMetastoreClient.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestFailureAwareThriftMetastoreClient.java index 331c9579a32a..81f95823f966 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestFailureAwareThriftMetastoreClient.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestFailureAwareThriftMetastoreClient.java @@ -16,8 +16,8 @@ import org.apache.thrift.TException; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertProperForwardingMethodsAreCalled; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertProperForwardingMethodsAreCalled; public class TestFailureAwareThriftMetastoreClient { diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestThriftMetastoreAuthenticationConfig.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestThriftMetastoreAuthenticationConfig.java index 5d7525ad2f8c..f47127bca7ed 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestThriftMetastoreAuthenticationConfig.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestThriftMetastoreAuthenticationConfig.java @@ -14,7 +14,7 @@ package io.trino.plugin.hive.metastore.thrift; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreAuthenticationConfig.ThriftMetastoreAuthenticationType; +import io.trino.plugin.hive.metastore.thrift.ThriftMetastoreAuthenticationConfig.ThriftMetastoreAuthenticationType; import org.testng.annotations.Test; import java.util.Map; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestThriftMetastoreUtil.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestThriftMetastoreUtil.java index a20b91d06227..b9e3fcf535a9 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestThriftMetastoreUtil.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestThriftMetastoreUtil.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; -import io.prestosql.plugin.hive.HiveBasicStatistics; -import io.prestosql.plugin.hive.metastore.BooleanStatistics; -import io.prestosql.plugin.hive.metastore.DateStatistics; -import io.prestosql.plugin.hive.metastore.DecimalStatistics; -import io.prestosql.plugin.hive.metastore.DoubleStatistics; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.IntegerStatistics; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.RoleGrant; +import io.trino.plugin.hive.HiveBasicStatistics; +import io.trino.plugin.hive.metastore.BooleanStatistics; +import io.trino.plugin.hive.metastore.DateStatistics; +import io.trino.plugin.hive.metastore.DecimalStatistics; +import io.trino.plugin.hive.metastore.DoubleStatistics; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.IntegerStatistics; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.RoleGrant; import org.apache.hadoop.hive.metastore.api.BinaryColumnStatsData; import org.apache.hadoop.hive.metastore.api.BooleanColumnStatsData; import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; @@ -44,12 +44,12 @@ import java.util.OptionalLong; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreApiColumnStatistics; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.getHiveBasicStatistics; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.toMetastoreDecimal; -import static io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreUtil.updateStatisticsParameters; -import static io.prestosql.spi.security.PrincipalType.ROLE; -import static io.prestosql.spi.security.PrincipalType.USER; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.fromMetastoreApiColumnStatistics; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.getHiveBasicStatistics; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.toMetastoreDecimal; +import static io.trino.plugin.hive.metastore.thrift.ThriftMetastoreUtil.updateStatisticsParameters; +import static io.trino.spi.security.PrincipalType.ROLE; +import static io.trino.spi.security.PrincipalType.USER; import static org.apache.hadoop.hive.metastore.api.ColumnStatisticsData.binaryStats; import static org.apache.hadoop.hive.metastore.api.ColumnStatisticsData.booleanStats; import static org.apache.hadoop.hive.metastore.api.ColumnStatisticsData.dateStats; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestingMetastoreLocator.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestingMetastoreLocator.java index f6899d9f8f6f..306d9c4673da 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestingMetastoreLocator.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestingMetastoreLocator.java @@ -15,7 +15,7 @@ import com.google.common.net.HostAndPort; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.authentication.HiveMetastoreAuthentication; +import io.trino.plugin.hive.authentication.HiveMetastoreAuthentication; import org.apache.thrift.TException; import java.util.Optional; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/optimizer/TestConnectorPushdownRulesWithHive.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/optimizer/TestConnectorPushdownRulesWithHive.java index cc87e65958c2..fbf07b9fbb35 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/optimizer/TestConnectorPushdownRulesWithHive.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/optimizer/TestConnectorPushdownRulesWithHive.java @@ -17,42 +17,42 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.io.Files; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.hive.HdfsConfig; -import io.prestosql.plugin.hive.HdfsConfiguration; -import io.prestosql.plugin.hive.HdfsConfigurationInitializer; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveColumnProjectionInfo; -import io.prestosql.plugin.hive.HiveHdfsConfiguration; -import io.prestosql.plugin.hive.HiveTableHandle; -import io.prestosql.plugin.hive.HiveTransactionHandle; -import io.prestosql.plugin.hive.NodeVersion; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.authentication.NoHdfsAuthentication; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastore; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig; -import io.prestosql.plugin.hive.testing.TestingHiveConnectorFactory; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.planner.iterative.rule.PushPredicateIntoTableScan; -import io.prestosql.sql.planner.iterative.rule.PushProjectionIntoTableScan; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.iterative.rule.test.PlanBuilder; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.DereferenceExpression; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.hive.HdfsConfig; +import io.trino.plugin.hive.HdfsConfiguration; +import io.trino.plugin.hive.HdfsConfigurationInitializer; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveColumnProjectionInfo; +import io.trino.plugin.hive.HiveHdfsConfiguration; +import io.trino.plugin.hive.HiveTableHandle; +import io.trino.plugin.hive.HiveTransactionHandle; +import io.trino.plugin.hive.NodeVersion; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.authentication.NoHdfsAuthentication; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.file.FileHiveMetastore; +import io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig; +import io.trino.plugin.hive.testing.TestingHiveConnectorFactory; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.PrincipalType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.sql.planner.iterative.rule.PushPredicateIntoTableScan; +import io.trino.sql.planner.iterative.rule.PushProjectionIntoTableScan; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.iterative.rule.test.PlanBuilder; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.DereferenceExpression; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.SymbolReference; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -63,19 +63,19 @@ import static com.google.common.base.Predicates.equalTo; import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.toHiveType; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.toHiveType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RowType.field; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.Arrays.asList; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/optimizer/TestHiveProjectionPushdownIntoTableScan.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/optimizer/TestHiveProjectionPushdownIntoTableScan.java index b2dd95f34dc1..484ca10d1f05 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/optimizer/TestHiveProjectionPushdownIntoTableScan.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/optimizer/TestHiveProjectionPushdownIntoTableScan.java @@ -17,31 +17,31 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.io.Files; -import io.prestosql.Session; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.hive.HdfsConfig; -import io.prestosql.plugin.hive.HdfsConfiguration; -import io.prestosql.plugin.hive.HdfsConfigurationInitializer; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveHdfsConfiguration; -import io.prestosql.plugin.hive.HiveTableHandle; -import io.prestosql.plugin.hive.NodeVersion; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.authentication.NoHdfsAuthentication; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastore; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig; -import io.prestosql.plugin.hive.testing.TestingHiveConnectorFactory; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.PrincipalType; -import io.prestosql.sql.planner.assertions.BasePushdownPlanTest; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.hive.HdfsConfig; +import io.trino.plugin.hive.HdfsConfiguration; +import io.trino.plugin.hive.HdfsConfigurationInitializer; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveHdfsConfiguration; +import io.trino.plugin.hive.HiveTableHandle; +import io.trino.plugin.hive.NodeVersion; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.authentication.NoHdfsAuthentication; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.file.FileHiveMetastore; +import io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig; +import io.trino.plugin.hive.testing.TestingHiveConnectorFactory; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.PrincipalType; +import io.trino.sql.planner.assertions.BasePushdownPlanTest; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -52,18 +52,18 @@ import static com.google.common.base.Predicates.equalTo; import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static io.prestosql.plugin.hive.TestHiveReaderProjectionsUtil.createProjectedColumnHandle; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.any; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.anyTree; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.equiJoinClause; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.filter; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.join; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.hive.TestHiveReaderProjectionsUtil.createProjectedColumnHandle; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.assertions.PlanMatchPattern.any; +import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; +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.filter; +import static io.trino.sql.planner.assertions.PlanMatchPattern.join; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeleteDeltaPageSource.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeleteDeltaPageSource.java index aed6bb028a2f..b4d42d5222c5 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeleteDeltaPageSource.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeleteDeltaPageSource.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.Resources; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; +import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapred.JobConf; @@ -27,9 +27,9 @@ import java.io.File; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.SESSION; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; public class TestOrcDeleteDeltaPageSource diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeletedRows.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeletedRows.java index cf64d79b33d5..9ca71c4a2842 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeletedRows.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeletedRows.java @@ -14,13 +14,13 @@ package io.trino.plugin.hive.orc; import com.google.common.collect.ImmutableSet; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.plugin.hive.AcidInfo; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; +import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.hive.AcidInfo; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.ql.io.AcidUtils; @@ -32,10 +32,10 @@ import java.util.OptionalLong; import java.util.Set; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.SESSION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.MaterializedResult.resultBuilder; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.MaterializedResult.resultBuilder; import static org.testng.Assert.assertEquals; public class TestOrcDeletedRows diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPageSourceFactory.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPageSourceFactory.java index 76dc11262dd3..95df89824e92 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPageSourceFactory.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPageSourceFactory.java @@ -16,17 +16,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.AcidInfo; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HivePageSourceFactory; -import io.prestosql.plugin.hive.ReaderPageSource; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.AcidInfo; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HivePageSourceFactory; +import io.trino.plugin.hive.ReaderPageSource; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import io.trino.tpch.Nation; import io.trino.tpch.NationColumn; import io.trino.tpch.NationGenerator; @@ -48,16 +48,16 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveStorageFormat.ORC; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.SESSION; -import static io.prestosql.plugin.hive.HiveType.toHiveType; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveStorageFormat.ORC; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.SESSION; +import static io.trino.plugin.hive.HiveType.toHiveType; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; import static io.trino.tpch.NationColumn.COMMENT; import static io.trino.tpch.NationColumn.NAME; import static io.trino.tpch.NationColumn.NATION_KEY; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPredicates.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPredicates.java index 3eafda89cdc9..f5c5d615a044 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPredicates.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPredicates.java @@ -16,22 +16,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.orc.OrcWriterOptions; -import io.prestosql.plugin.hive.AbstractTestHiveFileFormats; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveCompressionCodec; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HivePageSourceProvider; -import io.prestosql.plugin.hive.HivePartitionKey; -import io.prestosql.plugin.hive.NodeVersion; -import io.prestosql.plugin.hive.TableToPartitionMapping; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.orc.OrcReaderOptions; +import io.trino.orc.OrcWriterOptions; +import io.trino.plugin.hive.AbstractTestHiveFileFormats; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveCompressionCodec; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HivePageSourceProvider; +import io.trino.plugin.hive.HivePartitionKey; +import io.trino.plugin.hive.NodeVersion; +import io.trino.plugin.hive.TableToPartitionMapping; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapred.FileSplit; import org.testng.annotations.Test; @@ -48,13 +48,13 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveStorageFormat.ORC; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSession; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.StructuralTestUtil.rowBlockOf; +import static io.trino.plugin.hive.HiveStorageFormat.ORC; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSession; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.StructuralTestUtil.rowBlockOf; import static java.lang.String.format; import static java.util.stream.Collectors.toList; import static org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.FILE_INPUT_FORMAT; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/AbstractTestParquetReader.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/AbstractTestParquetReader.java index 373d700f3ed6..76393a05aed1 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/AbstractTestParquetReader.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/AbstractTestParquetReader.java @@ -21,15 +21,15 @@ import com.google.common.collect.Range; import com.google.common.primitives.Shorts; import io.airlift.units.DataSize; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.Type; -import io.prestosql.testng.services.Flaky; +import io.trino.spi.PrestoException; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.Type; +import io.trino.testng.services.Flaky; import org.apache.hadoop.hive.common.type.Date; import org.apache.hadoop.hive.common.type.HiveDecimal; import org.apache.hadoop.hive.common.type.Timestamp; @@ -65,26 +65,26 @@ import static com.google.common.collect.Iterables.cycle; import static com.google.common.collect.Iterables.limit; import static com.google.common.collect.Iterables.transform; -import static io.prestosql.plugin.hive.parquet.ParquetTester.insertNullEvery; -import static io.prestosql.plugin.hive.parquet.ParquetTester.testMaxReadBytes; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.Decimals.MAX_PRECISION; -import static io.prestosql.spi.type.Decimals.longTenToNth; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.StructuralTestUtil.mapType; +import static io.trino.plugin.hive.parquet.ParquetTester.insertNullEvery; +import static io.trino.plugin.hive.parquet.ParquetTester.testMaxReadBytes; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.Decimals.MAX_PRECISION; +import static io.trino.spi.type.Decimals.longTenToNth; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.RowType.field; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.StructuralTestUtil.mapType; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.lang.String.join; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/ParquetTester.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/ParquetTester.java index 1928f0d55d73..f6be9e6cedaa 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/ParquetTester.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/ParquetTester.java @@ -22,40 +22,40 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.parquet.writer.ParquetSchemaConverter; -import io.prestosql.parquet.writer.ParquetWriter; -import io.prestosql.parquet.writer.ParquetWriterOptions; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HiveSessionProperties; -import io.prestosql.plugin.hive.HiveStorageFormat; -import io.prestosql.plugin.hive.benchmark.FileFormat; -import io.prestosql.plugin.hive.orc.OrcReaderConfig; -import io.prestosql.plugin.hive.orc.OrcWriterConfig; -import io.prestosql.plugin.hive.parquet.write.MapKeyValuesSchemaConverter; -import io.prestosql.plugin.hive.parquet.write.SingleLevelArrayMapKeyValuesSchemaConverter; -import io.prestosql.plugin.hive.parquet.write.SingleLevelArraySchemaConverter; -import io.prestosql.plugin.hive.parquet.write.TestMapredParquetOutputFormat; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.parquet.writer.ParquetSchemaConverter; +import io.trino.parquet.writer.ParquetWriter; +import io.trino.parquet.writer.ParquetWriterOptions; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HiveSessionProperties; +import io.trino.plugin.hive.HiveStorageFormat; +import io.trino.plugin.hive.benchmark.FileFormat; +import io.trino.plugin.hive.orc.OrcReaderConfig; +import io.trino.plugin.hive.orc.OrcWriterConfig; +import io.trino.plugin.hive.parquet.write.MapKeyValuesSchemaConverter; +import io.trino.plugin.hive.parquet.write.SingleLevelArrayMapKeyValuesSchemaConverter; +import io.trino.plugin.hive.parquet.write.SingleLevelArraySchemaConverter; +import io.trino.plugin.hive.parquet.write.TestMapredParquetOutputFormat; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.testing.TestingConnectorSession; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter; import org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe; @@ -95,26 +95,26 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.Iterables.transform; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.hive.AbstractTestHiveFileFormats.getFieldFromCursor; -import static io.prestosql.plugin.hive.HiveSessionProperties.getParquetMaxReadBlockSize; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSession; -import static io.prestosql.plugin.hive.util.HiveUtil.isArrayType; -import static io.prestosql.plugin.hive.util.HiveUtil.isMapType; -import static io.prestosql.plugin.hive.util.HiveUtil.isRowType; -import static io.prestosql.plugin.hive.util.HiveUtil.isStructuralType; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.Chars.truncateToLengthAndTrimSpaces; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.Varchars.truncateToLength; +import static io.trino.plugin.hive.AbstractTestHiveFileFormats.getFieldFromCursor; +import static io.trino.plugin.hive.HiveSessionProperties.getParquetMaxReadBlockSize; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSession; +import static io.trino.plugin.hive.util.HiveUtil.isArrayType; +import static io.trino.plugin.hive.util.HiveUtil.isMapType; +import static io.trino.plugin.hive.util.HiveUtil.isRowType; +import static io.trino.plugin.hive.util.HiveUtil.isStructuralType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.Chars.truncateToLengthAndTrimSpaces; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.Varchars.truncateToLength; import static java.lang.Math.toIntExact; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Arrays.stream; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestParquetDecimalScaling.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestParquetDecimalScaling.java index 509951b9022d..6a19bf8d82fc 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestParquetDecimalScaling.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestParquetDecimalScaling.java @@ -15,11 +15,11 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.HiveQueryRunner; -import io.prestosql.plugin.hive.parquet.write.TestMapredParquetOutputFormat; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.plugin.hive.HiveQueryRunner; +import io.trino.plugin.hive.parquet.write.TestMapredParquetOutputFormat; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.common.type.HiveDecimal; import org.apache.hadoop.hive.ql.exec.FileSinkOperator; @@ -52,8 +52,8 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.transform; -import static io.prestosql.plugin.hive.parquet.TestParquetDecimalScaling.ParquetDecimalInsert.maximumValue; -import static io.prestosql.plugin.hive.parquet.TestParquetDecimalScaling.ParquetDecimalInsert.minimumValue; +import static io.trino.plugin.hive.parquet.TestParquetDecimalScaling.ParquetDecimalInsert.maximumValue; +import static io.trino.plugin.hive.parquet.TestParquetDecimalScaling.ParquetDecimalInsert.minimumValue; import static io.trino.tpch.TpchTable.NATION; import static java.lang.Integer.MAX_VALUE; import static java.lang.String.format; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestTimestamp.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestTimestamp.java index 53e7403bf2c5..32ef629c641c 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestTimestamp.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestTimestamp.java @@ -17,13 +17,13 @@ import com.google.common.collect.DiscreteDomain; import com.google.common.collect.ImmutableList; import com.google.common.collect.Range; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.benchmark.FileFormat; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.SqlTimestamp; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.benchmark.FileFormat; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.SqlTimestamp; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.mapred.JobConf; import org.apache.parquet.hadoop.metadata.CompressionCodecName; @@ -34,9 +34,9 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSession; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSession; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; import static java.util.Collections.singletonList; import static org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory.getStandardStructObjectInspector; import static org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory.javaLongObjectInspector; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestTimestampMicros.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestTimestampMicros.java index 7787a1658d86..18b6d52fbf3c 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestTimestampMicros.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestTimestampMicros.java @@ -14,20 +14,20 @@ package io.trino.plugin.hive.parquet; import com.google.common.io.Resources; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HivePageSourceFactory; -import io.prestosql.plugin.hive.HiveStorageFormat; -import io.prestosql.plugin.hive.HiveTimestampPrecision; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.ReaderPageSource; -import io.prestosql.plugin.hive.acid.AcidTransaction; -import io.prestosql.plugin.hive.benchmark.FileFormat; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HivePageSourceFactory; +import io.trino.plugin.hive.HiveStorageFormat; +import io.trino.plugin.hive.HiveTimestampPrecision; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.ReaderPageSource; +import io.trino.plugin.hive.acid.AcidTransaction; +import io.trino.plugin.hive.benchmark.FileFormat; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.testng.annotations.DataProvider; @@ -41,14 +41,14 @@ import java.util.OptionalInt; import java.util.Properties; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSession; -import static io.prestosql.plugin.hive.HiveType.HIVE_TIMESTAMP; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.testing.MaterializedResult.materializeSourceDataStream; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSession; +import static io.trino.plugin.hive.HiveType.HIVE_TIMESTAMP; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.testing.MaterializedResult.materializeSourceDataStream; import static org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_LIB; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/predicate/TestParquetPredicateUtils.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/predicate/TestParquetPredicateUtils.java index 6170cbf4561a..27e931f81ff6 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/predicate/TestParquetPredicateUtils.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/predicate/TestParquetPredicateUtils.java @@ -16,15 +16,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TypeOperators; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveType; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TypeOperators; import org.apache.parquet.column.ColumnDescriptor; import org.apache.parquet.schema.GroupType; import org.apache.parquet.schema.MessageType; @@ -35,14 +35,14 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.parquet.ParquetTypeUtils.getDescriptors; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.parquet.ParquetPageSourceFactory.getParquetTupleDomain; -import static io.prestosql.spi.predicate.TupleDomain.withColumnDomains; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RowType.rowType; +import static io.trino.parquet.ParquetTypeUtils.getDescriptors; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.parquet.ParquetPageSourceFactory.getParquetTupleDomain; +import static io.trino.spi.predicate.TupleDomain.withColumnDomains; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RowType.rowType; import static org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName.INT32; import static org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName.INT64; import static org.apache.parquet.schema.Type.Repetition.OPTIONAL; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/rubix/TestRubixCaching.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/rubix/TestRubixCaching.java index c425c5451249..014aac92837d 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/rubix/TestRubixCaching.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/rubix/TestRubixCaching.java @@ -26,23 +26,23 @@ import com.qubole.rubix.prestosql.CachingPrestoSecureAzureBlobFileSystem; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.metadata.InternalNode; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.hive.HdfsConfig; -import io.prestosql.plugin.hive.HdfsConfigurationInitializer; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HiveHdfsConfiguration; -import io.prestosql.plugin.hive.authentication.HiveAuthenticationConfig; -import io.prestosql.plugin.hive.authentication.NoHdfsAuthentication; -import io.prestosql.plugin.hive.orc.OrcReaderConfig; -import io.prestosql.plugin.hive.rubix.RubixConfig.ReadMode; -import io.prestosql.plugin.hive.rubix.RubixModule.DefaultRubixHdfsInitializer; -import io.prestosql.spi.Node; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.testing.TestingConnectorSession; -import io.prestosql.testing.TestingNodeManager; +import io.trino.metadata.InternalNode; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.hive.HdfsConfig; +import io.trino.plugin.hive.HdfsConfigurationInitializer; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HiveHdfsConfiguration; +import io.trino.plugin.hive.authentication.HiveAuthenticationConfig; +import io.trino.plugin.hive.authentication.NoHdfsAuthentication; +import io.trino.plugin.hive.orc.OrcReaderConfig; +import io.trino.plugin.hive.rubix.RubixConfig.ReadMode; +import io.trino.plugin.hive.rubix.RubixModule.DefaultRubixHdfsInitializer; +import io.trino.spi.Node; +import io.trino.spi.session.PropertyMetadata; +import io.trino.testing.TestingConnectorSession; +import io.trino.testing.TestingNodeManager; import org.apache.hadoop.fs.BlockLocation; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FSDataOutputStream; @@ -77,12 +77,12 @@ import static io.airlift.testing.Assertions.assertGreaterThan; import static io.airlift.testing.Assertions.assertInstanceOf; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.client.NodeVersion.UNKNOWN; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSessionProperties; -import static io.prestosql.plugin.hive.rubix.RubixConfig.ReadMode.ASYNC; -import static io.prestosql.plugin.hive.rubix.RubixConfig.ReadMode.READ_THROUGH; -import static io.prestosql.plugin.hive.util.RetryDriver.retry; -import static io.prestosql.testing.assertions.Assert.assertEventually; +import static io.trino.client.NodeVersion.UNKNOWN; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSessionProperties; +import static io.trino.plugin.hive.rubix.RubixConfig.ReadMode.ASYNC; +import static io.trino.plugin.hive.rubix.RubixConfig.ReadMode.READ_THROUGH; +import static io.trino.plugin.hive.util.RetryDriver.retry; +import static io.trino.testing.assertions.Assert.assertEventually; import static java.lang.String.format; import static java.net.InetAddress.getLocalHost; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/TestPrestoS3FileSystem.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/TestPrestoS3FileSystem.java index a326ccebed81..faaf0870675f 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/TestPrestoS3FileSystem.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/TestPrestoS3FileSystem.java @@ -38,7 +38,7 @@ import com.amazonaws.services.securitytoken.AWSSecurityTokenService; import com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient; import com.google.common.base.VerifyException; -import io.prestosql.plugin.hive.s3.PrestoS3FileSystem.UnrecoverableS3OperationException; +import io.trino.plugin.hive.s3.PrestoS3FileSystem.UnrecoverableS3OperationException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FSDataOutputStream; @@ -72,28 +72,28 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ACCESS_KEY; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ACL_TYPE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_CREDENTIALS_PROVIDER; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_DIRECTORY_OBJECT_CONTENT_TYPE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ENCRYPTION_MATERIALS_PROVIDER; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ENDPOINT; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_EXTERNAL_ID; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_IAM_ROLE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_KMS_KEY_ID; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_BACKOFF_TIME; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_CLIENT_RETRIES; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_RETRY_TIME; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_PATH_STYLE_ACCESS; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_PIN_CLIENT_TO_CURRENT_REGION; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SECRET_KEY; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SESSION_TOKEN; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SKIP_GLACIER_OBJECTS; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_STAGING_DIRECTORY; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_STREAMING_UPLOAD_ENABLED; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_STREAMING_UPLOAD_PART_SIZE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_USER_AGENT_PREFIX; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_USER_AGENT_SUFFIX; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ACCESS_KEY; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ACL_TYPE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_CREDENTIALS_PROVIDER; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_DIRECTORY_OBJECT_CONTENT_TYPE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ENCRYPTION_MATERIALS_PROVIDER; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ENDPOINT; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_EXTERNAL_ID; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_IAM_ROLE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_KMS_KEY_ID; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_BACKOFF_TIME; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_CLIENT_RETRIES; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_MAX_RETRY_TIME; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_PATH_STYLE_ACCESS; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_PIN_CLIENT_TO_CURRENT_REGION; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SECRET_KEY; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SESSION_TOKEN; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SKIP_GLACIER_OBJECTS; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_STAGING_DIRECTORY; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_STREAMING_UPLOAD_ENABLED; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_STREAMING_UPLOAD_PART_SIZE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_USER_AGENT_PREFIX; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_USER_AGENT_SUFFIX; import static java.net.HttpURLConnection.HTTP_FORBIDDEN; import static java.net.HttpURLConnection.HTTP_INTERNAL_ERROR; import static java.net.HttpURLConnection.HTTP_NOT_FOUND; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/TestS3SecurityMapping.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/TestS3SecurityMapping.java index 239e3b4b588f..dd19fda0c05f 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/TestS3SecurityMapping.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/TestS3SecurityMapping.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.hive.DynamicConfigurationProvider; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HiveSessionProperties; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.ConnectorIdentity; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.plugin.hive.DynamicConfigurationProvider; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HiveSessionProperties; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.ConnectorIdentity; +import io.trino.testing.TestingConnectorSession; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.testng.annotations.Test; @@ -32,16 +32,16 @@ import java.util.Set; import static com.google.common.io.Resources.getResource; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSessionProperties; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ACCESS_KEY; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_ENDPOINT; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_IAM_ROLE; -import static io.prestosql.plugin.hive.s3.PrestoS3FileSystem.S3_SECRET_KEY; -import static io.prestosql.plugin.hive.s3.TestS3SecurityMapping.MappingResult.clusterDefaultRole; -import static io.prestosql.plugin.hive.s3.TestS3SecurityMapping.MappingResult.credentials; -import static io.prestosql.plugin.hive.s3.TestS3SecurityMapping.MappingResult.role; -import static io.prestosql.plugin.hive.s3.TestS3SecurityMapping.MappingSelector.empty; -import static io.prestosql.plugin.hive.s3.TestS3SecurityMapping.MappingSelector.path; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSessionProperties; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ACCESS_KEY; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_ENDPOINT; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_IAM_ROLE; +import static io.trino.plugin.hive.s3.PrestoS3FileSystem.S3_SECRET_KEY; +import static io.trino.plugin.hive.s3.TestS3SecurityMapping.MappingResult.clusterDefaultRole; +import static io.trino.plugin.hive.s3.TestS3SecurityMapping.MappingResult.credentials; +import static io.trino.plugin.hive.s3.TestS3SecurityMapping.MappingResult.role; +import static io.trino.plugin.hive.s3.TestS3SecurityMapping.MappingSelector.empty; +import static io.trino.plugin.hive.s3.TestS3SecurityMapping.MappingSelector.path; import static java.util.Objects.requireNonNull; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3select/TestS3SelectRecordCursor.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3select/TestS3SelectRecordCursor.java index 58bbf0e51881..674cfb2c623e 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3select/TestS3SelectRecordCursor.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3select/TestS3SelectRecordCursor.java @@ -14,8 +14,8 @@ package io.trino.plugin.hive.s3select; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveType; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveType; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; import org.testng.annotations.Test; @@ -24,14 +24,14 @@ import java.util.Properties; import java.util.stream.Stream; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveType.HIVE_INT; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.s3select.S3SelectRecordCursor.updateSplitSchema; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveType.HIVE_INT; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.s3select.S3SelectRecordCursor.updateSplitSchema; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Arrays.asList; import static java.util.stream.Collectors.joining; import static org.apache.hadoop.hive.serde.serdeConstants.LIST_COLUMNS; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3select/TestUnrecoverableS3OperationException.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3select/TestUnrecoverableS3OperationException.java index 316a3fbc4341..8bc3abadbea5 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3select/TestUnrecoverableS3OperationException.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3select/TestUnrecoverableS3OperationException.java @@ -17,7 +17,7 @@ import java.io.IOException; -import static io.prestosql.plugin.hive.s3select.S3SelectLineRecordReader.UnrecoverableS3OperationException; +import static io.trino.plugin.hive.s3select.S3SelectLineRecordReader.UnrecoverableS3OperationException; import static org.assertj.core.api.Assertions.assertThat; public class TestUnrecoverableS3OperationException diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/security/TestLegacyAccessControl.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/security/TestLegacyAccessControl.java index e2b17d8a4187..ece785051db0 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/security/TestLegacyAccessControl.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/security/TestLegacyAccessControl.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.hive.security; -import io.prestosql.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorAccessControl; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; public class TestLegacyAccessControl { diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/security/TestSqlStandardAccessControl.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/security/TestSqlStandardAccessControl.java index 7d7902435e0a..89c36c22e38a 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/security/TestSqlStandardAccessControl.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/security/TestSqlStandardAccessControl.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.hive.security; -import io.prestosql.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorAccessControl; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; public class TestSqlStandardAccessControl { diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/statistics/BenchmarkGetPartitionsSample.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/statistics/BenchmarkGetPartitionsSample.java index aaf00c7d056d..96471680cea4 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/statistics/BenchmarkGetPartitionsSample.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/statistics/BenchmarkGetPartitionsSample.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HivePartition; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.hive.HivePartition; +import io.trino.spi.connector.SchemaTableName; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -35,7 +35,7 @@ import java.util.List; import java.util.concurrent.TimeUnit; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.getPartitionsSample; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.getPartitionsSample; @State(Scope.Thread) @OutputTimeUnit(TimeUnit.MILLISECONDS) diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/statistics/TestMetastoreHiveStatisticsProvider.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/statistics/TestMetastoreHiveStatisticsProvider.java index 7dd2b3320a80..d30c0370dfdc 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/statistics/TestMetastoreHiveStatisticsProvider.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/statistics/TestMetastoreHiveStatisticsProvider.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HiveBasicStatistics; -import io.prestosql.plugin.hive.HiveColumnHandle; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HivePartition; -import io.prestosql.plugin.hive.PartitionStatistics; -import io.prestosql.plugin.hive.metastore.DateStatistics; -import io.prestosql.plugin.hive.metastore.DecimalStatistics; -import io.prestosql.plugin.hive.metastore.DoubleStatistics; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.IntegerStatistics; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.statistics.ColumnStatistics; -import io.prestosql.spi.statistics.DoubleRange; -import io.prestosql.spi.statistics.Estimate; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HiveBasicStatistics; +import io.trino.plugin.hive.HiveColumnHandle; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HivePartition; +import io.trino.plugin.hive.PartitionStatistics; +import io.trino.plugin.hive.metastore.DateStatistics; +import io.trino.plugin.hive.metastore.DecimalStatistics; +import io.trino.plugin.hive.metastore.DoubleStatistics; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.IntegerStatistics; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.statistics.ColumnStatistics; +import io.trino.spi.statistics.DoubleRange; +import io.trino.spi.statistics.Estimate; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.math.BigDecimal; @@ -42,44 +42,44 @@ import java.util.OptionalDouble; import java.util.OptionalLong; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; -import static io.prestosql.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; -import static io.prestosql.plugin.hive.HiveColumnHandle.createBaseColumn; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_CORRUPTED_COLUMN_STATISTICS; -import static io.prestosql.plugin.hive.HivePartition.UNPARTITIONED_ID; -import static io.prestosql.plugin.hive.HivePartitionManager.parsePartition; -import static io.prestosql.plugin.hive.HiveTestUtils.SESSION; -import static io.prestosql.plugin.hive.HiveTestUtils.getHiveSession; -import static io.prestosql.plugin.hive.HiveType.HIVE_LONG; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createBooleanColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createDateColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createDecimalColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createDoubleColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createIntegerColumnStatistics; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateAverageRowsPerPartition; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateDataSize; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateDataSizeForPartitioningKey; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateDistinctPartitionKeys; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateDistinctValuesCount; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateNullsFraction; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateNullsFractionForPartitioningKey; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateRange; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateRangeForPartitioningKey; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.convertPartitionValueToDouble; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.createDataColumnStatistics; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.getPartitionsSample; -import static io.prestosql.plugin.hive.statistics.MetastoreHiveStatisticsProvider.validatePartitionStatistics; -import static io.prestosql.plugin.hive.util.HiveUtil.parsePartitionValue; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.PARTITION_KEY; +import static io.trino.plugin.hive.HiveColumnHandle.ColumnType.REGULAR; +import static io.trino.plugin.hive.HiveColumnHandle.createBaseColumn; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_CORRUPTED_COLUMN_STATISTICS; +import static io.trino.plugin.hive.HivePartition.UNPARTITIONED_ID; +import static io.trino.plugin.hive.HivePartitionManager.parsePartition; +import static io.trino.plugin.hive.HiveTestUtils.SESSION; +import static io.trino.plugin.hive.HiveTestUtils.getHiveSession; +import static io.trino.plugin.hive.HiveType.HIVE_LONG; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createBooleanColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createDateColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createDecimalColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createDoubleColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createIntegerColumnStatistics; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateAverageRowsPerPartition; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateDataSize; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateDataSizeForPartitioningKey; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateDistinctPartitionKeys; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateDistinctValuesCount; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateNullsFraction; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateNullsFractionForPartitioningKey; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateRange; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.calculateRangeForPartitioningKey; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.convertPartitionValueToDouble; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.createDataColumnStatistics; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.getPartitionsSample; +import static io.trino.plugin.hive.statistics.MetastoreHiveStatisticsProvider.validatePartitionStatistics; +import static io.trino.plugin.hive.util.HiveUtil.parsePartitionValue; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Double.NaN; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestAsyncQueue.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestAsyncQueue.java index 6c69adaa319a..8446b885771b 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestAsyncQueue.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestAsyncQueue.java @@ -17,7 +17,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.concurrent.Threads; -import io.prestosql.plugin.hive.util.AsyncQueue.BorrowResult; +import io.trino.plugin.hive.util.AsyncQueue.BorrowResult; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestFSDataInputStreamTail.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestFSDataInputStreamTail.java index 6ed3a523b295..8edd797978e1 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestFSDataInputStreamTail.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestFSDataInputStreamTail.java @@ -16,7 +16,7 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FSDataOutputStream; @@ -34,7 +34,7 @@ import java.util.Arrays; import static io.airlift.testing.Closeables.closeAll; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertSame; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestForwardingRecordCursor.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestForwardingRecordCursor.java index a15d9394abcc..019ea8528bfd 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestForwardingRecordCursor.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestForwardingRecordCursor.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.hive.util; -import io.prestosql.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordCursor; import org.testng.annotations.Test; -import static io.prestosql.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; +import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden; public class TestForwardingRecordCursor { diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveBucketing.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveBucketing.java index e4101b95a915..c5bdaa85e486 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveBucketing.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveBucketing.java @@ -18,26 +18,26 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; import io.airlift.slice.Slices; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.util.HiveBucketing.BucketingVersion; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.hive.common.type.Date; import org.apache.hadoop.hive.common.type.HiveVarchar; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; @@ -55,12 +55,12 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Lists.newArrayList; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; -import static io.prestosql.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V2; -import static io.prestosql.plugin.hive.util.HiveBucketing.getHiveBuckets; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V1; +import static io.trino.plugin.hive.util.HiveBucketing.BucketingVersion.BUCKETING_V2; +import static io.trino.plugin.hive.util.HiveBucketing.getHiveBuckets; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TypeUtils.writeNativeValue; import static java.lang.Double.longBitsToDouble; import static java.lang.Float.intBitsToFloat; import static java.util.Arrays.asList; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveTypeTranslator.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveTypeTranslator.java index 391f02d73d6e..7dd1a1ea486d 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveTypeTranslator.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveTypeTranslator.java @@ -15,35 +15,35 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.hive.HiveType; +import io.trino.spi.ErrorCode; +import io.trino.spi.PrestoException; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.List; import java.util.Map; import static io.airlift.testing.Assertions.assertContains; -import static io.prestosql.plugin.hive.HiveTestUtils.TYPE_MANAGER; -import static io.prestosql.plugin.hive.HiveType.toHiveType; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RowType.field; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.plugin.hive.HiveTestUtils.TYPE_MANAGER; +import static io.trino.plugin.hive.HiveType.toHiveType; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RowType.field; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveUtil.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveUtil.java index fdc0e2b06de8..bdbe9e987bf0 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveUtil.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveUtil.java @@ -33,13 +33,13 @@ import java.util.Properties; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.plugin.hive.HiveStorageFormat.AVRO; -import static io.prestosql.plugin.hive.HiveStorageFormat.PARQUET; -import static io.prestosql.plugin.hive.util.HiveUtil.getDeserializer; -import static io.prestosql.plugin.hive.util.HiveUtil.getInputFormat; -import static io.prestosql.plugin.hive.util.HiveUtil.parseHiveTimestamp; -import static io.prestosql.plugin.hive.util.HiveUtil.toPartitionValues; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_MILLISECOND; +import static io.trino.plugin.hive.HiveStorageFormat.AVRO; +import static io.trino.plugin.hive.HiveStorageFormat.PARQUET; +import static io.trino.plugin.hive.util.HiveUtil.getDeserializer; +import static io.trino.plugin.hive.util.HiveUtil.getInputFormat; +import static io.trino.plugin.hive.util.HiveUtil.parseHiveTimestamp; +import static io.trino.plugin.hive.util.HiveUtil.toPartitionValues; +import static io.trino.type.DateTimes.MICROSECONDS_PER_MILLISECOND; import static org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.FILE_INPUT_FORMAT; import static org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_CLASS; import static org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveWriteUtils.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveWriteUtils.java index 6308def5ed8c..6b21e252c57a 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveWriteUtils.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveWriteUtils.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.hive.util; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; import org.apache.hadoop.fs.Path; import org.testng.annotations.Test; -import static io.prestosql.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.isS3FileSystem; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.isViewFileSystem; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; +import static io.trino.plugin.hive.util.HiveWriteUtils.isS3FileSystem; +import static io.trino.plugin.hive.util.HiveWriteUtils.isViewFileSystem; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestLoggingInvocationHandlerWithHiveMetastore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestLoggingInvocationHandlerWithHiveMetastore.java index c463e786d2cf..2e2882e592be 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestLoggingInvocationHandlerWithHiveMetastore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestLoggingInvocationHandlerWithHiveMetastore.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.hive.util; -import io.prestosql.plugin.base.util.LoggingInvocationHandler; -import io.prestosql.plugin.base.util.LoggingInvocationHandler.AirliftParameterNamesProvider; +import io.trino.plugin.base.util.LoggingInvocationHandler; +import io.trino.plugin.base.util.LoggingInvocationHandler.AirliftParameterNamesProvider; import org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore; import org.testng.annotations.Test; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestMergingPageIterator.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestMergingPageIterator.java index 9423795b808f..f1747d725b27 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestMergingPageIterator.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestMergingPageIterator.java @@ -14,11 +14,11 @@ package io.trino.plugin.hive.util; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; import org.testng.annotations.Test; import java.util.ArrayList; @@ -27,7 +27,7 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.stream.IntStream; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.util.Comparator.naturalOrder; import static java.util.Comparator.nullsFirst; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestSerDeUtils.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestSerDeUtils.java index 3a9f5ca538dc..ea6fbc3c8100 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestSerDeUtils.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestSerDeUtils.java @@ -20,12 +20,12 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.block.BlockSerdeUtil; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.BlockEncodingSerde; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; +import io.trino.block.BlockSerdeUtil; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.BlockEncodingSerde; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; import org.apache.hadoop.hive.common.type.Date; import org.apache.hadoop.hive.common.type.Timestamp; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; @@ -42,26 +42,26 @@ import java.util.TreeMap; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.hive.HiveTestUtils.mapType; -import static io.prestosql.plugin.hive.util.SerDeUtils.getBlockObject; -import static io.prestosql.plugin.hive.util.SerDeUtils.serializeObject; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.testing.StructuralTestUtil.arrayBlockOf; -import static io.prestosql.testing.StructuralTestUtil.mapBlockOf; -import static io.prestosql.testing.StructuralTestUtil.rowBlockOf; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_MILLISECOND; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.hive.HiveTestUtils.mapType; +import static io.trino.plugin.hive.util.SerDeUtils.getBlockObject; +import static io.trino.plugin.hive.util.SerDeUtils.serializeObject; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.testing.StructuralTestUtil.arrayBlockOf; +import static io.trino.testing.StructuralTestUtil.mapBlockOf; +import static io.trino.testing.StructuralTestUtil.rowBlockOf; +import static io.trino.type.DateTimes.MICROSECONDS_PER_MILLISECOND; import static java.lang.Double.doubleToLongBits; import static java.lang.Float.floatToRawIntBits; import static java.lang.Math.toIntExact; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestStatistics.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestStatistics.java index e034e8afaf0e..4e9dd9cb14d8 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestStatistics.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestStatistics.java @@ -14,15 +14,15 @@ package io.trino.plugin.hive.util; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HiveBasicStatistics; -import io.prestosql.plugin.hive.metastore.BooleanStatistics; -import io.prestosql.plugin.hive.metastore.DateStatistics; -import io.prestosql.plugin.hive.metastore.DecimalStatistics; -import io.prestosql.plugin.hive.metastore.DoubleStatistics; -import io.prestosql.plugin.hive.metastore.HiveColumnStatistics; -import io.prestosql.plugin.hive.metastore.IntegerStatistics; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.statistics.ColumnStatisticType; +import io.trino.plugin.hive.HiveBasicStatistics; +import io.trino.plugin.hive.metastore.BooleanStatistics; +import io.trino.plugin.hive.metastore.DateStatistics; +import io.trino.plugin.hive.metastore.DecimalStatistics; +import io.trino.plugin.hive.metastore.DoubleStatistics; +import io.trino.plugin.hive.metastore.HiveColumnStatistics; +import io.trino.plugin.hive.metastore.IntegerStatistics; +import io.trino.spi.block.Block; +import io.trino.spi.statistics.ColumnStatisticType; import org.testng.annotations.Test; import java.math.BigDecimal; @@ -32,21 +32,21 @@ import java.util.OptionalDouble; import java.util.OptionalLong; -import static io.prestosql.plugin.hive.HiveBasicStatistics.createEmptyStatistics; -import static io.prestosql.plugin.hive.HiveBasicStatistics.createZeroStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createBinaryColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createBooleanColumnStatistics; -import static io.prestosql.plugin.hive.metastore.HiveColumnStatistics.createIntegerColumnStatistics; -import static io.prestosql.plugin.hive.util.Statistics.ReduceOperator.ADD; -import static io.prestosql.plugin.hive.util.Statistics.ReduceOperator.SUBTRACT; -import static io.prestosql.plugin.hive.util.Statistics.createHiveColumnStatistics; -import static io.prestosql.plugin.hive.util.Statistics.merge; -import static io.prestosql.plugin.hive.util.Statistics.reduce; -import static io.prestosql.spi.predicate.Utils.nativeValueToBlock; -import static io.prestosql.spi.statistics.ColumnStatisticType.MAX_VALUE; -import static io.prestosql.spi.statistics.ColumnStatisticType.MIN_VALUE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.plugin.hive.HiveBasicStatistics.createEmptyStatistics; +import static io.trino.plugin.hive.HiveBasicStatistics.createZeroStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createBinaryColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createBooleanColumnStatistics; +import static io.trino.plugin.hive.metastore.HiveColumnStatistics.createIntegerColumnStatistics; +import static io.trino.plugin.hive.util.Statistics.ReduceOperator.ADD; +import static io.trino.plugin.hive.util.Statistics.ReduceOperator.SUBTRACT; +import static io.trino.plugin.hive.util.Statistics.createHiveColumnStatistics; +import static io.trino.plugin.hive.util.Statistics.merge; +import static io.trino.plugin.hive.util.Statistics.reduce; +import static io.trino.spi.predicate.Utils.nativeValueToBlock; +import static io.trino.spi.statistics.ColumnStatisticType.MAX_VALUE; +import static io.trino.spi.statistics.ColumnStatisticType.MIN_VALUE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.RealType.REAL; import static java.lang.Float.floatToIntBits; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ExpressionConverter.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ExpressionConverter.java index 2cc0787e1ace..b18ccba4cdab 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ExpressionConverter.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ExpressionConverter.java @@ -15,24 +15,24 @@ import com.google.common.base.VerifyException; import io.airlift.slice.Slice; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Marker; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.SortedRangeSet; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Marker; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.SortedRangeSet; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.iceberg.expressions.Expression; import java.math.BigDecimal; @@ -42,13 +42,13 @@ import static com.google.common.base.MoreObjects.firstNonNull; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.iceberg.util.Timestamps.timestampTzToMicros; -import static io.prestosql.spi.predicate.Marker.Bound.ABOVE; -import static io.prestosql.spi.predicate.Marker.Bound.BELOW; -import static io.prestosql.spi.predicate.Marker.Bound.EXACTLY; -import static io.prestosql.spi.type.TimeType.TIME_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.plugin.iceberg.util.Timestamps.timestampTzToMicros; +import static io.trino.spi.predicate.Marker.Bound.ABOVE; +import static io.trino.spi.predicate.Marker.Bound.BELOW; +import static io.trino.spi.predicate.Marker.Bound.EXACTLY; +import static io.trino.spi.type.TimeType.TIME_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/FilesTable.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/FilesTable.java index 3219e6e7bb0d..9d831822f9ed 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/FilesTable.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/FilesTable.java @@ -16,19 +16,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slices; -import io.prestosql.plugin.iceberg.util.PageListBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.iceberg.util.PageListBuilder; +import io.trino.spi.Page; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.TypeManager; import org.apache.iceberg.DataFile; import org.apache.iceberg.Schema; import org.apache.iceberg.Table; @@ -44,11 +44,11 @@ import java.util.Optional; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; public class FilesTable diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HdfsFileIo.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HdfsFileIo.java index 928c4a3e2f36..277a7ae5b17e 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HdfsFileIo.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HdfsFileIo.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.iceberg; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.spi.PrestoException; import org.apache.hadoop.fs.Path; import org.apache.iceberg.io.FileIO; import org.apache.iceberg.io.InputFile; @@ -23,7 +23,7 @@ import java.io.IOException; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_FILESYSTEM_ERROR; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_FILESYSTEM_ERROR; import static java.util.Objects.requireNonNull; public class HdfsFileIo diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HdfsInputFile.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HdfsInputFile.java index 500fd030e4c2..5bf59b17c5a5 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HdfsInputFile.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HdfsInputFile.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.iceberg; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.spi.PrestoException; import org.apache.hadoop.fs.Path; import org.apache.iceberg.hadoop.HadoopInputFile; import org.apache.iceberg.io.InputFile; @@ -24,7 +24,7 @@ import java.io.IOException; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_FILESYSTEM_ERROR; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_FILESYSTEM_ERROR; import static java.util.Objects.requireNonNull; public class HdfsInputFile diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HdfsOutputFile.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HdfsOutputFile.java index f9db0d2b1c1e..e57c2979919e 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HdfsOutputFile.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HdfsOutputFile.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.iceberg; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.spi.PrestoException; import org.apache.hadoop.fs.Path; import org.apache.iceberg.hadoop.HadoopOutputFile; import org.apache.iceberg.io.InputFile; @@ -24,7 +24,7 @@ import java.io.IOException; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_FILESYSTEM_ERROR; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_FILESYSTEM_ERROR; import static java.util.Objects.requireNonNull; public class HdfsOutputFile diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HistoryTable.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HistoryTable.java index 694ac2ef9d3e..a07be09532ca 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HistoryTable.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HistoryTable.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TimeZoneKey; import org.apache.iceberg.HistoryEntry; import org.apache.iceberg.Snapshot; import org.apache.iceberg.Table; @@ -33,10 +33,10 @@ import java.util.List; import java.util.Set; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; import static java.util.Objects.requireNonNull; public class HistoryTable diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HiveTableOperations.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HiveTableOperations.java index 43312c395fb3..ad3b349be8bb 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HiveTableOperations.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/HiveTableOperations.java @@ -14,19 +14,19 @@ package io.trino.plugin.iceberg; import io.airlift.log.Logger; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveType; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.PrincipalPrivileges; -import io.prestosql.plugin.hive.metastore.StorageFormat; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.security.ConnectorIdentity; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveType; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.PrincipalPrivileges; +import io.trino.plugin.hive.metastore.StorageFormat; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.security.ConnectorIdentity; import org.apache.hadoop.hive.metastore.TableType; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; import org.apache.hadoop.mapred.FileInputFormat; @@ -53,10 +53,10 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveMetadata.TABLE_COMMENT; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.buildInitialPrivilegeSet; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_INVALID_METADATA; -import static io.prestosql.plugin.iceberg.IcebergUtil.isIcebergTable; +import static io.trino.plugin.hive.HiveMetadata.TABLE_COMMENT; +import static io.trino.plugin.hive.metastore.MetastoreUtil.buildInitialPrivilegeSet; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_INVALID_METADATA; +import static io.trino.plugin.iceberg.IcebergUtil.isIcebergTable; import static java.lang.Integer.parseInt; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergColumnHandle.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergColumnHandle.java index 0715c17305d4..7142b24842ef 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergColumnHandle.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergColumnHandle.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.type.Type; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConfig.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConfig.java index 5291303a49ab..a8f44a2f9e2a 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConfig.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConfig.java @@ -14,13 +14,13 @@ package io.trino.plugin.iceberg; import io.airlift.configuration.Config; -import io.prestosql.plugin.hive.HiveCompressionCodec; +import io.trino.plugin.hive.HiveCompressionCodec; import org.apache.iceberg.FileFormat; import javax.validation.constraints.NotNull; -import static io.prestosql.plugin.hive.HiveCompressionCodec.GZIP; -import static io.prestosql.plugin.iceberg.IcebergFileFormat.ORC; +import static io.trino.plugin.hive.HiveCompressionCodec.GZIP; +import static io.trino.plugin.iceberg.IcebergFileFormat.ORC; public class IcebergConfig { diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConnector.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConnector.java index 93778774f01a..122fb6a748eb 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConnector.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConnector.java @@ -16,32 +16,32 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorMetadata; -import io.prestosql.plugin.hive.HiveTransactionHandle; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorCapabilities; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata; +import io.trino.plugin.hive.HiveTransactionHandle; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorCapabilities; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import java.util.List; import java.util.Optional; import java.util.Set; import static com.google.common.collect.Sets.immutableEnumSet; -import static io.prestosql.spi.connector.ConnectorCapabilities.NOT_NULL_COLUMN_CONSTRAINT; -import static io.prestosql.spi.transaction.IsolationLevel.SERIALIZABLE; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.connector.ConnectorCapabilities.NOT_NULL_COLUMN_CONSTRAINT; +import static io.trino.spi.transaction.IsolationLevel.SERIALIZABLE; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; public class IcebergConnector diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConnectorFactory.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConnectorFactory.java index d0d0840a8fe4..bfb33358c7f2 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConnectorFactory.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConnectorFactory.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.iceberg; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; import java.lang.reflect.InvocationTargetException; import java.util.Map; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergErrorCode.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergErrorCode.java index 313fb8996672..46dcf0acc977 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergErrorCode.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergErrorCode.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.iceberg; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; -import static io.prestosql.spi.ErrorType.INTERNAL_ERROR; -import static io.prestosql.spi.ErrorType.USER_ERROR; +import static io.trino.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.INTERNAL_ERROR; +import static io.trino.spi.ErrorType.USER_ERROR; public enum IcebergErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergFileWriter.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergFileWriter.java index 518f25cc2ee7..0d04338e413e 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergFileWriter.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergFileWriter.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.iceberg; -import io.prestosql.plugin.hive.FileWriter; +import io.trino.plugin.hive.FileWriter; import org.apache.iceberg.Metrics; public interface IcebergFileWriter diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergFileWriterFactory.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergFileWriterFactory.java index f6cb255bee88..bdbdabd01793 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergFileWriterFactory.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergFileWriterFactory.java @@ -14,24 +14,24 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableMap; -import io.prestosql.orc.OrcDataSink; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.orc.OrcWriterOptions; -import io.prestosql.orc.OrcWriterStats; -import io.prestosql.orc.OutputStreamOrcDataSink; -import io.prestosql.parquet.writer.ParquetWriterOptions; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.NodeVersion; -import io.prestosql.plugin.hive.orc.HdfsOrcDataSource; -import io.prestosql.plugin.hive.orc.OrcWriterConfig; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.orc.OrcDataSink; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.OrcReaderOptions; +import io.trino.orc.OrcWriterOptions; +import io.trino.orc.OrcWriterStats; +import io.trino.orc.OutputStreamOrcDataSink; +import io.trino.parquet.writer.ParquetWriterOptions; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.NodeVersion; +import io.trino.plugin.hive.orc.HdfsOrcDataSource; +import io.trino.plugin.hive.orc.OrcWriterConfig; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapred.JobConf; @@ -51,24 +51,24 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; -import static io.prestosql.plugin.hive.HiveMetadata.PRESTO_VERSION_NAME; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_WRITER_OPEN_ERROR; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_WRITE_VALIDATION_FAILED; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getCompressionCodec; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getOrcStringStatisticsLimit; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getOrcWriterMaxDictionaryMemory; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getOrcWriterMaxStripeRows; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getOrcWriterMaxStripeSize; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getOrcWriterMinStripeSize; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getOrcWriterValidateMode; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getParquetWriterBlockSize; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getParquetWriterPageSize; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.isOrcWriterValidate; -import static io.prestosql.plugin.iceberg.TypeConverter.toOrcType; -import static io.prestosql.plugin.iceberg.TypeConverter.toPrestoType; -import static io.prestosql.plugin.iceberg.util.PrimitiveTypeMapBuilder.makeTypeMap; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; +import static io.trino.plugin.hive.HiveMetadata.PRESTO_VERSION_NAME; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_WRITER_OPEN_ERROR; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_WRITE_VALIDATION_FAILED; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getCompressionCodec; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getOrcStringStatisticsLimit; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getOrcWriterMaxDictionaryMemory; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getOrcWriterMaxStripeRows; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getOrcWriterMaxStripeSize; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getOrcWriterMinStripeSize; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getOrcWriterValidateMode; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getParquetWriterBlockSize; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getParquetWriterPageSize; +import static io.trino.plugin.iceberg.IcebergSessionProperties.isOrcWriterValidate; +import static io.trino.plugin.iceberg.TypeConverter.toOrcType; +import static io.trino.plugin.iceberg.TypeConverter.toPrestoType; +import static io.trino.plugin.iceberg.util.PrimitiveTypeMapBuilder.makeTypeMap; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.util.Objects.requireNonNull; import static org.apache.iceberg.parquet.ParquetSchemaUtil.convert; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergHandleResolver.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergHandleResolver.java index 6ab29b4e34c6..e8c888bd3ec1 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergHandleResolver.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergHandleResolver.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.iceberg; -import io.prestosql.plugin.hive.HiveTransactionHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.plugin.hive.HiveTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class IcebergHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java index a8eb4b6dafd1..c26505777740 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java @@ -20,48 +20,48 @@ import io.airlift.json.JsonCodec; import io.airlift.log.Logger; import io.airlift.slice.Slice; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeSystemTable; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.HiveSchemaProperties; -import io.prestosql.plugin.hive.HiveWrittenPartitions; -import io.prestosql.plugin.hive.TableAlreadyExistsException; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.Column; -import io.prestosql.plugin.hive.metastore.Database; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HivePrincipal; -import io.prestosql.plugin.hive.metastore.PrincipalPrivileges; -import io.prestosql.plugin.hive.metastore.Table; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMaterializedViewDefinition; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.MaterializedViewFreshness; -import io.prestosql.spi.connector.MaterializedViewNotFoundException; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.classloader.ClassLoaderSafeSystemTable; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.HiveSchemaProperties; +import io.trino.plugin.hive.HiveWrittenPartitions; +import io.trino.plugin.hive.TableAlreadyExistsException; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.Column; +import io.trino.plugin.hive.metastore.Database; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HivePrincipal; +import io.trino.plugin.hive.metastore.PrincipalPrivileges; +import io.trino.plugin.hive.metastore.Table; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMaterializedViewDefinition; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.MaterializedViewFreshness; +import io.trino.spi.connector.MaterializedViewNotFoundException; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.TypeManager; import org.apache.hadoop.fs.Path; import org.apache.iceberg.AppendFiles; import org.apache.iceberg.DataFiles; @@ -99,41 +99,41 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; -import static io.prestosql.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; -import static io.prestosql.plugin.hive.HiveMetadata.STORAGE_TABLE; -import static io.prestosql.plugin.hive.HiveMetadata.TABLE_COMMENT; -import static io.prestosql.plugin.hive.HiveType.HIVE_STRING; -import static io.prestosql.plugin.hive.ViewReaderUtil.PRESTO_VIEW_FLAG; -import static io.prestosql.plugin.hive.ViewReaderUtil.PrestoViewReader.decodeMaterializedViewData; -import static io.prestosql.plugin.hive.ViewReaderUtil.encodeMaterializedViewData; -import static io.prestosql.plugin.hive.metastore.MetastoreUtil.buildInitialPrivilegeSet; -import static io.prestosql.plugin.hive.metastore.StorageFormat.VIEW_STORAGE_FORMAT; -import static io.prestosql.plugin.hive.util.HiveWriteUtils.getTableDefaultLocation; -import static io.prestosql.plugin.iceberg.ExpressionConverter.toIcebergExpression; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_INVALID_METADATA; -import static io.prestosql.plugin.iceberg.IcebergSchemaProperties.getSchemaLocation; -import static io.prestosql.plugin.iceberg.IcebergTableProperties.FILE_FORMAT_PROPERTY; -import static io.prestosql.plugin.iceberg.IcebergTableProperties.PARTITIONING_PROPERTY; -import static io.prestosql.plugin.iceberg.IcebergTableProperties.getFileFormat; -import static io.prestosql.plugin.iceberg.IcebergTableProperties.getPartitioning; -import static io.prestosql.plugin.iceberg.IcebergTableProperties.getTableLocation; -import static io.prestosql.plugin.iceberg.IcebergUtil.getColumns; -import static io.prestosql.plugin.iceberg.IcebergUtil.getDataPath; -import static io.prestosql.plugin.iceberg.IcebergUtil.getFileFormat; -import static io.prestosql.plugin.iceberg.IcebergUtil.getIcebergTable; -import static io.prestosql.plugin.iceberg.IcebergUtil.getTableComment; -import static io.prestosql.plugin.iceberg.IcebergUtil.isIcebergTable; -import static io.prestosql.plugin.iceberg.PartitionFields.parsePartitionFields; -import static io.prestosql.plugin.iceberg.PartitionFields.toPartitionFields; -import static io.prestosql.plugin.iceberg.TableType.DATA; -import static io.prestosql.plugin.iceberg.TypeConverter.toIcebergType; -import static io.prestosql.plugin.iceberg.TypeConverter.toPrestoType; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.INVALID_SCHEMA_PROPERTY; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_EMPTY; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.hive.HiveErrorCode.HIVE_INVALID_METADATA; +import static io.trino.plugin.hive.HiveMetadata.PRESTO_QUERY_ID_NAME; +import static io.trino.plugin.hive.HiveMetadata.STORAGE_TABLE; +import static io.trino.plugin.hive.HiveMetadata.TABLE_COMMENT; +import static io.trino.plugin.hive.HiveType.HIVE_STRING; +import static io.trino.plugin.hive.ViewReaderUtil.PRESTO_VIEW_FLAG; +import static io.trino.plugin.hive.ViewReaderUtil.PrestoViewReader.decodeMaterializedViewData; +import static io.trino.plugin.hive.ViewReaderUtil.encodeMaterializedViewData; +import static io.trino.plugin.hive.metastore.MetastoreUtil.buildInitialPrivilegeSet; +import static io.trino.plugin.hive.metastore.StorageFormat.VIEW_STORAGE_FORMAT; +import static io.trino.plugin.hive.util.HiveWriteUtils.getTableDefaultLocation; +import static io.trino.plugin.iceberg.ExpressionConverter.toIcebergExpression; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_INVALID_METADATA; +import static io.trino.plugin.iceberg.IcebergSchemaProperties.getSchemaLocation; +import static io.trino.plugin.iceberg.IcebergTableProperties.FILE_FORMAT_PROPERTY; +import static io.trino.plugin.iceberg.IcebergTableProperties.PARTITIONING_PROPERTY; +import static io.trino.plugin.iceberg.IcebergTableProperties.getFileFormat; +import static io.trino.plugin.iceberg.IcebergTableProperties.getPartitioning; +import static io.trino.plugin.iceberg.IcebergTableProperties.getTableLocation; +import static io.trino.plugin.iceberg.IcebergUtil.getColumns; +import static io.trino.plugin.iceberg.IcebergUtil.getDataPath; +import static io.trino.plugin.iceberg.IcebergUtil.getFileFormat; +import static io.trino.plugin.iceberg.IcebergUtil.getIcebergTable; +import static io.trino.plugin.iceberg.IcebergUtil.getTableComment; +import static io.trino.plugin.iceberg.IcebergUtil.isIcebergTable; +import static io.trino.plugin.iceberg.PartitionFields.parsePartitionFields; +import static io.trino.plugin.iceberg.PartitionFields.toPartitionFields; +import static io.trino.plugin.iceberg.TableType.DATA; +import static io.trino.plugin.iceberg.TypeConverter.toIcebergType; +import static io.trino.plugin.iceberg.TypeConverter.toPrestoType; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.INVALID_SCHEMA_PROPERTY; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_EMPTY; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.Collections.singletonList; import static java.util.Objects.requireNonNull; import static java.util.function.Function.identity; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadataFactory.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadataFactory.java index 8184794fd116..64fdfdb911ed 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadataFactory.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadataFactory.java @@ -14,9 +14,9 @@ package io.trino.plugin.iceberg; import io.airlift.json.JsonCodec; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetastoreModule.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetastoreModule.java index 12755cc38ad7..a328333ca913 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetastoreModule.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetastoreModule.java @@ -15,8 +15,8 @@ import com.google.inject.Binder; import com.google.inject.Module; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastore; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.cache.CachingHiveMetastore; import javax.inject.Inject; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergModule.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergModule.java index 5b9eaf8626d2..4f4b85faa40d 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergModule.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergModule.java @@ -17,20 +17,20 @@ import com.google.inject.Module; import com.google.inject.Scopes; import com.google.inject.multibindings.Multibinder; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.HiveConfig; -import io.prestosql.plugin.hive.HiveHdfsModule; -import io.prestosql.plugin.hive.HiveNodePartitioningProvider; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.orc.OrcReaderConfig; -import io.prestosql.plugin.hive.orc.OrcWriterConfig; -import io.prestosql.plugin.hive.parquet.ParquetReaderConfig; -import io.prestosql.plugin.hive.parquet.ParquetWriterConfig; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.procedure.Procedure; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.HiveConfig; +import io.trino.plugin.hive.HiveHdfsModule; +import io.trino.plugin.hive.HiveNodePartitioningProvider; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.orc.OrcReaderConfig; +import io.trino.plugin.hive.orc.OrcWriterConfig; +import io.trino.plugin.hive.parquet.ParquetReaderConfig; +import io.trino.plugin.hive.parquet.ParquetWriterConfig; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.procedure.Procedure; import static com.google.inject.multibindings.Multibinder.newSetBinder; import static io.airlift.configuration.ConfigBinder.configBinder; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergOrcFileWriter.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergOrcFileWriter.java index 2bdcf2e24cfb..3c77e0e3dd7a 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergOrcFileWriter.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergOrcFileWriter.java @@ -16,23 +16,23 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcDataSink; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcWriteValidation; -import io.prestosql.orc.OrcWriterOptions; -import io.prestosql.orc.OrcWriterStats; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.CompressionKind; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.orc.metadata.statistics.ColumnStatistics; -import io.prestosql.orc.metadata.statistics.DateStatistics; -import io.prestosql.orc.metadata.statistics.DecimalStatistics; -import io.prestosql.orc.metadata.statistics.DoubleStatistics; -import io.prestosql.orc.metadata.statistics.IntegerStatistics; -import io.prestosql.orc.metadata.statistics.StringStatistics; -import io.prestosql.plugin.hive.orc.OrcFileWriter; -import io.prestosql.spi.type.Type; +import io.trino.orc.OrcDataSink; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcWriteValidation; +import io.trino.orc.OrcWriterOptions; +import io.trino.orc.OrcWriterStats; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.CompressionKind; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.OrcType; +import io.trino.orc.metadata.statistics.ColumnStatistics; +import io.trino.orc.metadata.statistics.DateStatistics; +import io.trino.orc.metadata.statistics.DecimalStatistics; +import io.trino.orc.metadata.statistics.DoubleStatistics; +import io.trino.orc.metadata.statistics.IntegerStatistics; +import io.trino.orc.metadata.statistics.StringStatistics; +import io.trino.plugin.hive.orc.OrcFileWriter; +import io.trino.spi.type.Type; import org.apache.iceberg.Metrics; import org.apache.iceberg.Schema; import org.apache.iceberg.types.Conversions; @@ -49,9 +49,9 @@ import java.util.function.Supplier; import static com.google.common.base.Verify.verify; -import static io.prestosql.orc.metadata.OrcColumnId.ROOT_COLUMN; -import static io.prestosql.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; -import static io.prestosql.plugin.iceberg.TypeConverter.ORC_ICEBERG_ID_KEY; +import static io.trino.orc.metadata.OrcColumnId.ROOT_COLUMN; +import static io.trino.plugin.hive.acid.AcidTransaction.NO_ACID_TRANSACTION; +import static io.trino.plugin.iceberg.TypeConverter.ORC_ICEBERG_ID_KEY; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSink.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSink.java index 5175c354f5eb..1be4601d0d67 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSink.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSink.java @@ -16,28 +16,28 @@ import com.google.common.collect.ImmutableList; import io.airlift.json.JsonCodec; import io.airlift.slice.Slice; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.iceberg.PartitionTransforms.ColumnTransform; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageIndexer; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.iceberg.PartitionTransforms.ColumnTransform; +import io.trino.spi.Page; +import io.trino.spi.PageIndexer; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapred.JobConf; import org.apache.iceberg.FileFormat; @@ -59,16 +59,16 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.plugin.hive.util.ConfigurationUtils.toJobConf; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_TOO_MANY_OPEN_PARTITIONS; -import static io.prestosql.plugin.iceberg.PartitionTransforms.getColumnTransform; -import static io.prestosql.plugin.iceberg.util.Timestamps.getTimestampTz; -import static io.prestosql.plugin.iceberg.util.Timestamps.timestampTzToMicros; -import static io.prestosql.spi.type.Decimals.readBigDecimal; -import static io.prestosql.spi.type.TimeType.TIME_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.plugin.hive.util.ConfigurationUtils.toJobConf; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_TOO_MANY_OPEN_PARTITIONS; +import static io.trino.plugin.iceberg.PartitionTransforms.getColumnTransform; +import static io.trino.plugin.iceberg.util.Timestamps.getTimestampTz; +import static io.trino.plugin.iceberg.util.Timestamps.timestampTzToMicros; +import static io.trino.spi.type.Decimals.readBigDecimal; +import static io.trino.spi.type.TimeType.TIME_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSinkProvider.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSinkProvider.java index c81b3a341b64..5b1a282c77b4 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSinkProvider.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSinkProvider.java @@ -14,15 +14,15 @@ package io.trino.plugin.iceberg; import io.airlift.json.JsonCodec; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import org.apache.iceberg.PartitionSpec; import org.apache.iceberg.PartitionSpecParser; import org.apache.iceberg.Schema; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSource.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSource.java index 40aea0fd8083..8c495866562b 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSource.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSource.java @@ -15,18 +15,18 @@ import io.airlift.slice.Slice; import io.airlift.slice.SliceUtf8; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.predicate.Utils; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.predicate.Utils; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import java.io.IOException; import java.io.UncheckedIOException; @@ -37,22 +37,22 @@ import static com.google.common.base.Throwables.throwIfInstanceOf; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_BAD_DATA; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_INVALID_PARTITION_VALUE; -import static io.prestosql.plugin.iceberg.util.Timestamps.timestampTzFromMicros; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.isLongDecimal; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.TimeType.TIME_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_BAD_DATA; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_INVALID_PARTITION_VALUE; +import static io.trino.plugin.iceberg.util.Timestamps.timestampTzFromMicros; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.isLongDecimal; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.TimeType.TIME_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; import static java.lang.Double.parseDouble; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.parseFloat; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java index 8fee9c75a39b..763fcaa6a895 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java @@ -15,47 +15,47 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcCorruptionException; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcDataSourceId; -import io.prestosql.orc.OrcReader; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.orc.OrcRecordReader; -import io.prestosql.orc.TupleDomainOrcPredicate; -import io.prestosql.orc.TupleDomainOrcPredicate.TupleDomainOrcPredicateBuilder; -import io.prestosql.parquet.Field; -import io.prestosql.parquet.ParquetCorruptionException; -import io.prestosql.parquet.ParquetDataSource; -import io.prestosql.parquet.ParquetDataSourceId; -import io.prestosql.parquet.ParquetReaderOptions; -import io.prestosql.parquet.RichColumnDescriptor; -import io.prestosql.parquet.predicate.Predicate; -import io.prestosql.parquet.reader.MetadataReader; -import io.prestosql.parquet.reader.ParquetReader; -import io.prestosql.plugin.hive.FileFormatDataSourceStats; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.orc.HdfsOrcDataSource; -import io.prestosql.plugin.hive.orc.OrcPageSource; -import io.prestosql.plugin.hive.orc.OrcPageSource.ColumnAdaptation; -import io.prestosql.plugin.hive.orc.OrcReaderConfig; -import io.prestosql.plugin.hive.parquet.HdfsParquetDataSource; -import io.prestosql.plugin.hive.parquet.ParquetPageSource; -import io.prestosql.plugin.hive.parquet.ParquetReaderConfig; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcCorruptionException; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcDataSourceId; +import io.trino.orc.OrcReader; +import io.trino.orc.OrcReaderOptions; +import io.trino.orc.OrcRecordReader; +import io.trino.orc.TupleDomainOrcPredicate; +import io.trino.orc.TupleDomainOrcPredicate.TupleDomainOrcPredicateBuilder; +import io.trino.parquet.Field; +import io.trino.parquet.ParquetCorruptionException; +import io.trino.parquet.ParquetDataSource; +import io.trino.parquet.ParquetDataSourceId; +import io.trino.parquet.ParquetReaderOptions; +import io.trino.parquet.RichColumnDescriptor; +import io.trino.parquet.predicate.Predicate; +import io.trino.parquet.reader.MetadataReader; +import io.trino.parquet.reader.ParquetReader; +import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.orc.HdfsOrcDataSource; +import io.trino.plugin.hive.orc.OrcPageSource; +import io.trino.plugin.hive.orc.OrcPageSource.ColumnAdaptation; +import io.trino.plugin.hive.orc.OrcReaderConfig; +import io.trino.plugin.hive.parquet.HdfsParquetDataSource; +import io.trino.plugin.hive.parquet.ParquetPageSource; +import io.trino.plugin.hive.parquet.ParquetReaderConfig; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; @@ -82,29 +82,29 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.Maps.uniqueIndex; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcReader.INITIAL_BATCH_SIZE; -import static io.prestosql.parquet.ParquetTypeUtils.getColumnIO; -import static io.prestosql.parquet.ParquetTypeUtils.getDescriptors; -import static io.prestosql.parquet.ParquetTypeUtils.getParquetTypeByName; -import static io.prestosql.parquet.predicate.PredicateUtils.buildPredicate; -import static io.prestosql.parquet.predicate.PredicateUtils.predicateMatches; -import static io.prestosql.plugin.hive.parquet.ParquetColumnIOConverter.constructField; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_BAD_DATA; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_CANNOT_OPEN_SPLIT; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_CURSOR_ERROR; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_MISSING_DATA; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getOrcLazyReadSmallRanges; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getOrcMaxBufferSize; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getOrcMaxMergeDistance; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getOrcMaxReadBlockSize; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getOrcStreamBufferSize; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getOrcTinyStripeThreshold; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.getParquetMaxReadBlockSize; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.isOrcBloomFiltersEnabled; -import static io.prestosql.plugin.iceberg.IcebergSessionProperties.isOrcNestedLazy; -import static io.prestosql.plugin.iceberg.TypeConverter.ORC_ICEBERG_ID_KEY; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcReader.INITIAL_BATCH_SIZE; +import static io.trino.parquet.ParquetTypeUtils.getColumnIO; +import static io.trino.parquet.ParquetTypeUtils.getDescriptors; +import static io.trino.parquet.ParquetTypeUtils.getParquetTypeByName; +import static io.trino.parquet.predicate.PredicateUtils.buildPredicate; +import static io.trino.parquet.predicate.PredicateUtils.predicateMatches; +import static io.trino.plugin.hive.parquet.ParquetColumnIOConverter.constructField; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_BAD_DATA; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_CANNOT_OPEN_SPLIT; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_CURSOR_ERROR; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_MISSING_DATA; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getOrcLazyReadSmallRanges; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getOrcMaxBufferSize; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getOrcMaxMergeDistance; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getOrcMaxReadBlockSize; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getOrcStreamBufferSize; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getOrcTinyStripeThreshold; +import static io.trino.plugin.iceberg.IcebergSessionProperties.getParquetMaxReadBlockSize; +import static io.trino.plugin.iceberg.IcebergSessionProperties.isOrcBloomFiltersEnabled; +import static io.trino.plugin.iceberg.IcebergSessionProperties.isOrcNestedLazy; +import static io.trino.plugin.iceberg.TypeConverter.ORC_ICEBERG_ID_KEY; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergParquetFileWriter.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergParquetFileWriter.java index 7dc38fbdee00..2054ad4d1548 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergParquetFileWriter.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergParquetFileWriter.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.iceberg; -import io.prestosql.parquet.writer.ParquetWriterOptions; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.parquet.ParquetFileWriter; -import io.prestosql.spi.type.Type; +import io.trino.parquet.writer.ParquetWriterOptions; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.parquet.ParquetFileWriter; +import io.trino.spi.type.Type; import org.apache.hadoop.fs.Path; import org.apache.iceberg.Metrics; import org.apache.iceberg.MetricsConfig; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPlugin.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPlugin.java index 9c53e4d7f102..99e510ad73b1 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPlugin.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class IcebergPlugin implements Plugin diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSchemaProperties.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSchemaProperties.java index 7f6cc04e662c..a87c48a5eaf3 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSchemaProperties.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSchemaProperties.java @@ -14,13 +14,13 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.session.PropertyMetadata; import java.util.List; import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; public final class IcebergSchemaProperties { diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSessionProperties.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSessionProperties.java index a18df0bacb76..be56721280f0 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSessionProperties.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSessionProperties.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.orc.OrcWriteValidation.OrcWriteValidationMode; -import io.prestosql.plugin.hive.HiveCompressionCodec; -import io.prestosql.plugin.hive.orc.OrcReaderConfig; -import io.prestosql.plugin.hive.orc.OrcWriterConfig; -import io.prestosql.plugin.hive.parquet.ParquetReaderConfig; -import io.prestosql.plugin.hive.parquet.ParquetWriterConfig; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.orc.OrcWriteValidation.OrcWriteValidationMode; +import io.trino.plugin.hive.HiveCompressionCodec; +import io.trino.plugin.hive.orc.OrcReaderConfig; +import io.trino.plugin.hive.orc.OrcWriterConfig; +import io.trino.plugin.hive.parquet.ParquetReaderConfig; +import io.trino.plugin.hive.parquet.ParquetWriterConfig; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; @@ -31,12 +31,12 @@ import java.util.concurrent.ThreadLocalRandom; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.base.session.PropertyMetadataUtil.dataSizeProperty; -import static io.prestosql.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.doubleProperty; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; +import static io.trino.plugin.base.session.PropertyMetadataUtil.dataSizeProperty; +import static io.trino.spi.StandardErrorCode.INVALID_SESSION_PROPERTY; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.doubleProperty; +import static io.trino.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; import static java.lang.String.format; public final class IcebergSessionProperties diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSplit.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSplit.java index 06ef3bd08f72..ff4f58a00f2b 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSplit.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSplit.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import org.apache.iceberg.FileFormat; import java.util.Collections; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSplitManager.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSplitManager.java index 07c6887b042e..66148b3f6858 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSplitManager.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSplitManager.java @@ -14,23 +14,23 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorSplitSource; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorSplitSource; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import org.apache.iceberg.Table; import org.apache.iceberg.TableScan; import javax.inject.Inject; -import static io.prestosql.plugin.iceberg.ExpressionConverter.toIcebergExpression; -import static io.prestosql.plugin.iceberg.IcebergUtil.getIcebergTable; +import static io.trino.plugin.iceberg.ExpressionConverter.toIcebergExpression; +import static io.trino.plugin.iceberg.IcebergUtil.getIcebergTable; import static java.util.Objects.requireNonNull; public class IcebergSplitManager diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSplitSource.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSplitSource.java index e691d149d7a0..90694a138b5f 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSplitSource.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergSplitSource.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Streams; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitSource; import org.apache.iceberg.CombinedScanTask; import org.apache.iceberg.FileScanTask; import org.apache.iceberg.PartitionField; @@ -39,7 +39,7 @@ import java.util.concurrent.CompletableFuture; import static com.google.common.collect.Iterators.limit; -import static io.prestosql.plugin.iceberg.IcebergUtil.getIdentityPartitions; +import static io.trino.plugin.iceberg.IcebergUtil.getIdentityPartitions; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static java.util.concurrent.CompletableFuture.completedFuture; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableHandle.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableHandle.java index 65aea6c1c2bd..b0a7d0af830d 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableHandle.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.Locale; import java.util.Objects; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableName.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableName.java index a99b84234fd5..1b6d8dd9f34a 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableName.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableName.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.iceberg; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.util.Locale; import java.util.Optional; import java.util.regex.Matcher; import java.util.regex.Pattern; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.Long.parseLong; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableProperties.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableProperties.java index c3552af6c204..2fbbf701d591 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableProperties.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableProperties.java @@ -14,8 +14,8 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.ArrayType; import org.apache.iceberg.FileFormat; import javax.inject.Inject; @@ -25,9 +25,9 @@ import java.util.Map; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Locale.ENGLISH; public class IcebergTableProperties diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTransactionManager.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTransactionManager.java index 82974dee541b..d7333b3935b8 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTransactionManager.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTransactionManager.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.iceberg; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergUtil.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergUtil.java index d46a80a99387..dad893e708d8 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergUtil.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergUtil.java @@ -14,14 +14,14 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HdfsEnvironment.HdfsContext; -import io.prestosql.plugin.hive.authentication.HiveIdentity; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HdfsEnvironment.HdfsContext; +import io.trino.plugin.hive.authentication.HiveIdentity; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.TypeManager; import org.apache.iceberg.BaseTable; import org.apache.iceberg.FileFormat; import org.apache.iceberg.HistoryEntry; @@ -39,9 +39,9 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Lists.reverse; -import static io.prestosql.plugin.hive.HiveMetadata.TABLE_COMMENT; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_INVALID_SNAPSHOT_ID; -import static io.prestosql.plugin.iceberg.TypeConverter.toPrestoType; +import static io.trino.plugin.hive.HiveMetadata.TABLE_COMMENT; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_INVALID_SNAPSHOT_ID; +import static io.trino.plugin.iceberg.TypeConverter.toPrestoType; import static java.lang.String.format; import static org.apache.iceberg.BaseMetastoreTableOperations.ICEBERG_TABLE_TYPE_VALUE; import static org.apache.iceberg.BaseMetastoreTableOperations.TABLE_TYPE_PROP; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergWritableTableHandle.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergWritableTableHandle.java index 6781dc475b38..0979915a10ca 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergWritableTableHandle.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergWritableTableHandle.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; import org.apache.iceberg.FileFormat; import java.util.List; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/InternalIcebergConnectorFactory.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/InternalIcebergConnectorFactory.java index e1f9fe1c886d..ddc81db2e794 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/InternalIcebergConnectorFactory.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/InternalIcebergConnectorFactory.java @@ -21,31 +21,31 @@ import io.airlift.bootstrap.LifeCycleManager; import io.airlift.event.client.EventModule; import io.airlift.json.JsonModule; -import io.prestosql.plugin.base.CatalogName; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorPageSinkProvider; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorPageSourceProvider; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorSplitManager; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeNodePartitioningProvider; -import io.prestosql.plugin.base.jmx.MBeanServerModule; -import io.prestosql.plugin.base.security.AllowAllAccessControl; -import io.prestosql.plugin.hive.NodeVersion; -import io.prestosql.plugin.hive.authentication.HiveAuthenticationModule; -import io.prestosql.plugin.hive.azure.HiveAzureModule; -import io.prestosql.plugin.hive.gcs.HiveGcsModule; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.HiveMetastoreModule; -import io.prestosql.plugin.hive.s3.HiveS3Module; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PageIndexerFactory; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.CatalogName; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorPageSinkProvider; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorPageSourceProvider; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorSplitManager; +import io.trino.plugin.base.classloader.ClassLoaderSafeNodePartitioningProvider; +import io.trino.plugin.base.jmx.MBeanServerModule; +import io.trino.plugin.base.security.AllowAllAccessControl; +import io.trino.plugin.hive.NodeVersion; +import io.trino.plugin.hive.authentication.HiveAuthenticationModule; +import io.trino.plugin.hive.azure.HiveAzureModule; +import io.trino.plugin.hive.gcs.HiveGcsModule; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.HiveMetastoreModule; +import io.trino.plugin.hive.s3.HiveS3Module; +import io.trino.spi.NodeManager; +import io.trino.spi.PageIndexerFactory; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.type.TypeManager; import org.weakref.jmx.guice.MBeanModule; import java.util.Map; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ManifestsTable.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ManifestsTable.java index 8ae387a5e167..29ffabec46e7 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ManifestsTable.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ManifestsTable.java @@ -14,21 +14,21 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.iceberg.util.PageListBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.RowType; +import io.trino.plugin.iceberg.util.PageListBuilder; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.RowType; import org.apache.iceberg.ManifestFile.PartitionFieldSummary; import org.apache.iceberg.PartitionField; import org.apache.iceberg.PartitionSpec; @@ -41,11 +41,11 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_INVALID_METADATA; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_INVALID_METADATA; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/PartitionTable.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/PartitionTable.java index 24cb2947abfe..563e63ef0c43 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/PartitionTable.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/PartitionTable.java @@ -14,21 +14,21 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeUtils; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeUtils; import org.apache.iceberg.DataFile; import org.apache.iceberg.FileScanTask; import org.apache.iceberg.PartitionField; @@ -53,11 +53,11 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.iceberg.IcebergUtil.getIdentityPartitions; -import static io.prestosql.plugin.iceberg.TypeConverter.toPrestoType; -import static io.prestosql.plugin.iceberg.util.Timestamps.timestampTzFromMicros; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.plugin.iceberg.IcebergUtil.getIdentityPartitions; +import static io.trino.plugin.iceberg.TypeConverter.toPrestoType; +import static io.trino.plugin.iceberg.util.Timestamps.timestampTzFromMicros; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toSet; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/PartitionTransforms.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/PartitionTransforms.java index a6c81d4394e0..ecadaf86b536 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/PartitionTransforms.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/PartitionTransforms.java @@ -17,11 +17,11 @@ import io.airlift.slice.Murmur3Hash32; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.iceberg.PartitionField; import org.joda.time.DateTimeField; import org.joda.time.chrono.ISOChronology; @@ -35,25 +35,25 @@ import java.util.regex.Pattern; import static io.airlift.slice.SliceUtf8.offsetOfCodePoint; -import static io.prestosql.plugin.iceberg.util.Timestamps.getTimestampTz; -import static io.prestosql.plugin.iceberg.util.Timestamps.timestampTzToMicros; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.spi.type.Decimals.encodeShortScaledValue; -import static io.prestosql.spi.type.Decimals.isLongDecimal; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.Decimals.readBigDecimal; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimeType.TIME_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.MILLISECONDS_PER_DAY; -import static io.prestosql.spi.type.Timestamps.MILLISECONDS_PER_HOUR; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.iceberg.util.Timestamps.getTimestampTz; +import static io.trino.plugin.iceberg.util.Timestamps.timestampTzToMicros; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.Decimals.encodeShortScaledValue; +import static io.trino.spi.type.Decimals.isLongDecimal; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.Decimals.readBigDecimal; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimeType.TIME_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.MILLISECONDS_PER_DAY; +import static io.trino.spi.type.Timestamps.MILLISECONDS_PER_HOUR; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Integer.parseInt; import static java.lang.Math.floorDiv; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/RollbackToSnapshotProcedure.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/RollbackToSnapshotProcedure.java index da6cbd8583fa..c119eb02a508 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/RollbackToSnapshotProcedure.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/RollbackToSnapshotProcedure.java @@ -14,11 +14,11 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.procedure.Procedure; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.procedure.Procedure; import org.apache.iceberg.Table; import javax.inject.Inject; @@ -26,10 +26,10 @@ import java.lang.invoke.MethodHandle; -import static io.prestosql.plugin.iceberg.IcebergUtil.getIcebergTable; -import static io.prestosql.spi.block.MethodHandleUtil.methodHandle; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.iceberg.IcebergUtil.getIcebergTable; +import static io.trino.spi.block.MethodHandleUtil.methodHandle; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; public class RollbackToSnapshotProcedure diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/SnapshotsTable.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/SnapshotsTable.java index 00819a85c8f7..94754c63ecfa 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/SnapshotsTable.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/SnapshotsTable.java @@ -14,27 +14,27 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.iceberg.util.PageListBuilder; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeSignature; +import io.trino.plugin.iceberg.util.PageListBuilder; +import io.trino.spi.Page; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeSignature; import org.apache.iceberg.Table; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; public class SnapshotsTable diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TableStatisticsMaker.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TableStatisticsMaker.java index e557a602c09d..939677decff1 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TableStatisticsMaker.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TableStatisticsMaker.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.ColumnStatistics; -import io.prestosql.spi.statistics.DoubleRange; -import io.prestosql.spi.statistics.Estimate; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.Constraint; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.ColumnStatistics; +import io.trino.spi.statistics.DoubleRange; +import io.trino.spi.statistics.Estimate; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.TypeManager; import org.apache.iceberg.DataFile; import org.apache.iceberg.FileScanTask; import org.apache.iceberg.PartitionField; @@ -46,11 +46,11 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.iceberg.ExpressionConverter.toIcebergExpression; -import static io.prestosql.plugin.iceberg.IcebergUtil.getColumns; -import static io.prestosql.plugin.iceberg.IcebergUtil.getIdentityPartitions; -import static io.prestosql.plugin.iceberg.Partition.toMap; -import static io.prestosql.plugin.iceberg.TypeConverter.toPrestoType; +import static io.trino.plugin.iceberg.ExpressionConverter.toIcebergExpression; +import static io.trino.plugin.iceberg.IcebergUtil.getColumns; +import static io.trino.plugin.iceberg.IcebergUtil.getIdentityPartitions; +import static io.trino.plugin.iceberg.Partition.toMap; +import static io.trino.plugin.iceberg.TypeConverter.toPrestoType; import static java.util.Objects.requireNonNull; import static java.util.function.Function.identity; import static java.util.stream.Collectors.toSet; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TypeConverter.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TypeConverter.java index 379c5491fb65..7f846b7c1111 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TypeConverter.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TypeConverter.java @@ -15,31 +15,31 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.orc.metadata.OrcType.OrcTypeKind; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.OrcType; +import io.trino.orc.metadata.OrcType.OrcTypeKind; +import io.trino.spi.PrestoException; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.iceberg.Schema; import org.apache.iceberg.types.Types; @@ -49,10 +49,10 @@ import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.TimeType.TIME_MICROS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MICROS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.TimeType.TIME_MICROS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MICROS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; import static java.lang.String.format; public final class TypeConverter diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/UnknownTableTypeException.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/UnknownTableTypeException.java index 6a8cba5334ab..d49222ccb6fe 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/UnknownTableTypeException.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/UnknownTableTypeException.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.iceberg; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; -import static io.prestosql.plugin.iceberg.IcebergErrorCode.ICEBERG_UNKNOWN_TABLE_TYPE; +import static io.trino.plugin.iceberg.IcebergErrorCode.ICEBERG_UNKNOWN_TABLE_TYPE; import static java.util.Objects.requireNonNull; public class UnknownTableTypeException diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/PageListBuilder.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/PageListBuilder.java index d76fd088aa42..55bef6255c06 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/PageListBuilder.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/PageListBuilder.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; import java.util.List; import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; public final class PageListBuilder { diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/PrimitiveTypeMapBuilder.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/PrimitiveTypeMapBuilder.java index c67f2022b0ba..74ae694bf781 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/PrimitiveTypeMapBuilder.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/PrimitiveTypeMapBuilder.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; import java.util.List; import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.StandardTypes.ARRAY; -import static io.prestosql.spi.type.StandardTypes.MAP; -import static io.prestosql.spi.type.StandardTypes.ROW; +import static io.trino.spi.type.StandardTypes.ARRAY; +import static io.trino.spi.type.StandardTypes.MAP; +import static io.trino.spi.type.StandardTypes.ROW; public class PrimitiveTypeMapBuilder { diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/Timestamps.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/Timestamps.java index 5f72e59939a7..c23721db5f23 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/Timestamps.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/Timestamps.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.iceberg.util; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.spi.block.Block; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.roundDiv; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MICROS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.roundDiv; import static java.lang.Math.floorDiv; import static java.lang.Math.floorMod; diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/AbstractTestIcebergSmoke.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/AbstractTestIcebergSmoke.java index 0b3bee6bedaf..4e0b94f347fb 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/AbstractTestIcebergSmoke.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/AbstractTestIcebergSmoke.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.ColumnStatistics; -import io.prestosql.spi.statistics.DoubleRange; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testng.services.Flaky; -import io.prestosql.transaction.TransactionBuilder; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.ColumnStatistics; +import io.trino.spi.statistics.DoubleRange; +import io.trino.spi.statistics.TableStatistics; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; +import io.trino.testng.services.Flaky; +import io.trino.transaction.TransactionBuilder; import org.apache.iceberg.FileFormat; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; @@ -53,16 +53,16 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.iceberg.IcebergQueryRunner.createIcebergQueryRunner; -import static io.prestosql.plugin.iceberg.IcebergSplitManager.ICEBERG_DOMAIN_COMPACTION_THRESHOLD; -import static io.prestosql.spi.predicate.Domain.multipleValues; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.plugin.iceberg.IcebergQueryRunner.createIcebergQueryRunner; +import static io.trino.plugin.iceberg.IcebergSplitManager.ICEBERG_DOMAIN_COMPACTION_THRESHOLD; +import static io.trino.spi.predicate.Domain.multipleValues; +import static io.trino.spi.predicate.Domain.singleValue; +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.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergQueryRunner.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergQueryRunner.java index 29da8ba8a20a..93b3f78563f0 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergQueryRunner.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergQueryRunner.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; import io.trino.tpch.TpchTable; import org.apache.iceberg.FileFormat; import java.nio.file.Path; import java.util.Map; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class IcebergQueryRunner { diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConfig.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConfig.java index b7d854084786..45bc578f9055 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConfig.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConfig.java @@ -14,7 +14,7 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.hive.HiveCompressionCodec; +import io.trino.plugin.hive.HiveCompressionCodec; import org.testng.annotations.Test; import java.util.Map; @@ -22,9 +22,9 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertFullMapping; import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; -import static io.prestosql.plugin.hive.HiveCompressionCodec.GZIP; -import static io.prestosql.plugin.iceberg.IcebergFileFormat.ORC; -import static io.prestosql.plugin.iceberg.IcebergFileFormat.PARQUET; +import static io.trino.plugin.hive.HiveCompressionCodec.GZIP; +import static io.trino.plugin.iceberg.IcebergFileFormat.ORC; +import static io.trino.plugin.iceberg.IcebergFileFormat.PARQUET; public class TestIcebergConfig { diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConnectorFactory.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConnectorFactory.java index 9af4ddca398e..b84e3a3b8ae9 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConnectorFactory.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConnectorFactory.java @@ -14,8 +14,8 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import java.util.Map; diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergDistributed.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergDistributed.java index 428512dbd5df..118e2dbae1b8 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergDistributed.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergDistributed.java @@ -14,14 +14,14 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.TestTable; import org.testng.SkipException; import java.util.Optional; -import static io.prestosql.plugin.iceberg.IcebergQueryRunner.createIcebergQueryRunner; +import static io.trino.plugin.iceberg.IcebergQueryRunner.createIcebergQueryRunner; public class TestIcebergDistributed extends AbstractTestDistributedQueries diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMaterializedViews.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMaterializedViews.java index ff731acf7224..15ffb66b4122 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMaterializedViews.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMaterializedViews.java @@ -14,19 +14,19 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.sql.tree.ExplainType; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; +import io.trino.Session; +import io.trino.sql.tree.ExplainType; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.testing.assertions.Assert.assertEquals; -import static io.prestosql.testing.assertions.Assert.assertFalse; -import static io.prestosql.testing.assertions.Assert.assertTrue; +import static io.trino.testing.assertions.Assert.assertEquals; +import static io.trino.testing.assertions.Assert.assertFalse; +import static io.trino.testing.assertions.Assert.assertTrue; public class TestIcebergMaterializedViews extends AbstractTestQueryFramework diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataListing.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataListing.java index da58c6742598..5c2e4455bbf2 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataListing.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataListing.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.plugin.hive.HdfsConfig; -import io.prestosql.plugin.hive.HdfsConfiguration; -import io.prestosql.plugin.hive.HdfsConfigurationInitializer; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveHdfsConfiguration; -import io.prestosql.plugin.hive.NodeVersion; -import io.prestosql.plugin.hive.authentication.NoHdfsAuthentication; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastore; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig; -import io.prestosql.plugin.hive.testing.TestingHivePlugin; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.SelectedRole; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.hive.HdfsConfig; +import io.trino.plugin.hive.HdfsConfiguration; +import io.trino.plugin.hive.HdfsConfigurationInitializer; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveHdfsConfiguration; +import io.trino.plugin.hive.NodeVersion; +import io.trino.plugin.hive.authentication.NoHdfsAuthentication; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.file.FileHiveMetastore; +import io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig; +import io.trino.plugin.hive.testing.TestingHivePlugin; +import io.trino.spi.security.Identity; +import io.trino.spi.security.SelectedRole; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -39,8 +39,8 @@ import java.io.File; import java.util.Optional; -import static io.prestosql.spi.security.SelectedRole.Type.ROLE; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.security.SelectedRole.Type.ROLE; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertEquals; public class TestIcebergMetadataListing diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergOrcMetricsCollection.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergOrcMetricsCollection.java index 633afd8282fd..53c508b3ed7e 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergOrcMetricsCollection.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergOrcMetricsCollection.java @@ -15,34 +15,34 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.plugin.hive.HdfsConfig; -import io.prestosql.plugin.hive.HdfsConfiguration; -import io.prestosql.plugin.hive.HdfsConfigurationInitializer; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveHdfsConfiguration; -import io.prestosql.plugin.hive.NodeVersion; -import io.prestosql.plugin.hive.authentication.NoHdfsAuthentication; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastore; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.plugin.hive.HdfsConfig; +import io.trino.plugin.hive.HdfsConfiguration; +import io.trino.plugin.hive.HdfsConfigurationInitializer; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveHdfsConfiguration; +import io.trino.plugin.hive.NodeVersion; +import io.trino.plugin.hive.authentication.NoHdfsAuthentication; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.file.FileHiveMetastore; +import io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; import java.io.File; import java.util.Map; -import static io.prestosql.SystemSessionProperties.MAX_DRIVERS_PER_TASK; -import static io.prestosql.SystemSessionProperties.TASK_CONCURRENCY; -import static io.prestosql.SystemSessionProperties.TASK_WRITER_COUNT; -import static io.prestosql.plugin.iceberg.TestIcebergOrcMetricsCollection.DataFileRecord.toDataFileRecord; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.MAX_DRIVERS_PER_TASK; +import static io.trino.SystemSessionProperties.TASK_CONCURRENCY; +import static io.trino.SystemSessionProperties.TASK_WRITER_COUNT; +import static io.trino.plugin.iceberg.TestIcebergOrcMetricsCollection.DataFileRecord.toDataFileRecord; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergSystemTables.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergSystemTables.java index afb6764cf81c..400bf7c59d89 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergSystemTables.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergSystemTables.java @@ -14,22 +14,22 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.plugin.hive.HdfsConfig; -import io.prestosql.plugin.hive.HdfsConfiguration; -import io.prestosql.plugin.hive.HdfsConfigurationInitializer; -import io.prestosql.plugin.hive.HdfsEnvironment; -import io.prestosql.plugin.hive.HiveHdfsConfiguration; -import io.prestosql.plugin.hive.NodeVersion; -import io.prestosql.plugin.hive.authentication.NoHdfsAuthentication; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.plugin.hive.metastore.MetastoreConfig; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastore; -import io.prestosql.plugin.hive.metastore.file.FileHiveMetastoreConfig; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; +import io.trino.Session; +import io.trino.plugin.hive.HdfsConfig; +import io.trino.plugin.hive.HdfsConfiguration; +import io.trino.plugin.hive.HdfsConfigurationInitializer; +import io.trino.plugin.hive.HdfsEnvironment; +import io.trino.plugin.hive.HiveHdfsConfiguration; +import io.trino.plugin.hive.NodeVersion; +import io.trino.plugin.hive.authentication.NoHdfsAuthentication; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.plugin.hive.metastore.MetastoreConfig; +import io.trino.plugin.hive.metastore.file.FileHiveMetastore; +import io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -40,8 +40,8 @@ import java.util.function.Function; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.testing.MaterializedResult.DEFAULT_PRECISION; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.MaterializedResult.DEFAULT_PRECISION; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertEquals; public class TestIcebergSystemTables diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergTableName.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergTableName.java index 821966c0a006..6be33a4040bb 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergTableName.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergTableName.java @@ -17,8 +17,8 @@ import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static org.testng.Assert.assertEquals; public class TestIcebergTableName diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestPartitionFields.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestPartitionFields.java index 37e7062414dd..83bf7356b8c9 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestPartitionFields.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestPartitionFields.java @@ -27,9 +27,9 @@ import java.util.function.Consumer; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.iceberg.PartitionFields.parsePartitionField; -import static io.prestosql.plugin.iceberg.PartitionFields.toPartitionFields; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.iceberg.PartitionFields.parsePartitionField; +import static io.trino.plugin.iceberg.PartitionFields.toPartitionFields; +import static io.trino.testing.assertions.Assert.assertEquals; import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; public class TestPartitionFields diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestPartitionTransforms.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestPartitionTransforms.java index 3cdb305d13e3..93020a11df6f 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestPartitionTransforms.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestPartitionTransforms.java @@ -23,10 +23,10 @@ import java.time.LocalTime; import java.time.ZoneOffset; -import static io.prestosql.plugin.iceberg.PartitionTransforms.epochDay; -import static io.prestosql.plugin.iceberg.PartitionTransforms.epochHour; -import static io.prestosql.plugin.iceberg.PartitionTransforms.epochMonth; -import static io.prestosql.plugin.iceberg.PartitionTransforms.epochYear; +import static io.trino.plugin.iceberg.PartitionTransforms.epochDay; +import static io.trino.plugin.iceberg.PartitionTransforms.epochHour; +import static io.trino.plugin.iceberg.PartitionTransforms.epochMonth; +import static io.trino.plugin.iceberg.PartitionTransforms.epochYear; import static java.lang.Math.toIntExact; import static java.util.concurrent.TimeUnit.SECONDS; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestingIcebergConnectorFactory.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestingIcebergConnectorFactory.java index 20d8b4a68305..0e57eac2f922 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestingIcebergConnectorFactory.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestingIcebergConnectorFactory.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.iceberg; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import java.util.Map; import java.util.Optional; -import static io.prestosql.plugin.iceberg.InternalIcebergConnectorFactory.createConnector; +import static io.trino.plugin.iceberg.InternalIcebergConnectorFactory.createConnector; import static java.util.Objects.requireNonNull; public class TestingIcebergConnectorFactory diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestingIcebergPlugin.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestingIcebergPlugin.java index 13096530f1d8..c225f683cdfc 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestingIcebergPlugin.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestingIcebergPlugin.java @@ -14,9 +14,9 @@ package io.trino.plugin.iceberg; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.hive.metastore.HiveMetastore; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.plugin.hive.metastore.HiveMetastore; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; import java.util.Optional; diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxColumnHandle.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxColumnHandle.java index 09a73cdc8bd4..650563eeeadd 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxColumnHandle.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxColumnHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxConnector.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxConnector.java index 7f5d6d39a69b..725d6ba37ad8 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxConnector.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxConnector.java @@ -14,14 +14,14 @@ package io.trino.plugin.jmx; import io.airlift.log.Logger; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; public class JmxConnector diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxConnectorFactory.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxConnectorFactory.java index 8af2b6376be0..97946e68d054 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxConnectorFactory.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxConnectorFactory.java @@ -16,12 +16,12 @@ import com.google.inject.Injector; import com.google.inject.Scopes; import io.airlift.bootstrap.Bootstrap; -import io.prestosql.plugin.base.jmx.MBeanServerModule; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.plugin.base.jmx.MBeanServerModule; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import java.util.Map; diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxErrorCode.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxErrorCode.java index a6e64c7b7675..c4026da0044c 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxErrorCode.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxErrorCode.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.jmx; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.EXTERNAL; public enum JmxErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxHandleResolver.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxHandleResolver.java index 760e07860890..48595cfa4b26 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxHandleResolver.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.jmx; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class JmxHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxHistoricalData.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxHistoricalData.java index bd63c6deaa82..20f6d55a122c 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxHistoricalData.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxHistoricalData.java @@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.jmx.JmxMetadata.toPattern; +import static io.trino.plugin.jmx.JmxMetadata.toPattern; import static java.util.Locale.ENGLISH; import static javax.management.ObjectName.WILDCARD; diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxMetadata.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxMetadata.java index 4411db0435b7..017e38d46a63 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxMetadata.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxMetadata.java @@ -20,21 +20,21 @@ import com.google.common.collect.Maps; import com.google.common.collect.Streams; import io.airlift.log.Logger; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import javax.inject.Inject; import javax.management.JMException; @@ -58,12 +58,12 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.plugin.jmx.JmxErrorCode.JMX_INVALID_TABLE_NAME; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.jmx.JmxErrorCode.JMX_INVALID_TABLE_NAME; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Comparator.comparing; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxPeriodicSampler.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxPeriodicSampler.java index eb1d65c5b2ca..f4d2829cdf76 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxPeriodicSampler.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxPeriodicSampler.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import javax.annotation.PostConstruct; import javax.inject.Inject; diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxPlugin.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxPlugin.java index 8b62648c585c..88238885db4b 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxPlugin.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.jmx; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class JmxPlugin implements Plugin diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxRecordSetProvider.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxRecordSetProvider.java index ace7b54e9da2..bfecf58cb351 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxRecordSetProvider.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxRecordSetProvider.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import javax.inject.Inject; import javax.management.Attribute; @@ -42,8 +42,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; import static java.util.Objects.requireNonNull; public class JmxRecordSetProvider diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxSplit.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxSplit.java index c66fa946df4d..2e314611cae9 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxSplit.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxSplitManager.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxSplitManager.java index e0562a3962af..c2ef8aa20271 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxSplitManager.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxSplitManager.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; @@ -35,9 +35,9 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.jmx.JmxMetadata.NODE_COLUMN_NAME; -import static io.prestosql.spi.predicate.TupleDomain.fromFixedValues; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.jmx.JmxMetadata.NODE_COLUMN_NAME; +import static io.trino.spi.predicate.TupleDomain.fromFixedValues; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxTableHandle.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxTableHandle.java index 1de9e94fb217..d8e9ddfb11ff 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxTableHandle.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxTableHandle.java @@ -16,11 +16,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxTransactionHandle.java b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxTransactionHandle.java index 15d84bcef4b8..3abbe27ac090 100644 --- a/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxTransactionHandle.java +++ b/plugin/trino-jmx/src/main/java/io/trino/plugin/jmx/JmxTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.jmx; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum JmxTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/JmxQueryRunner.java b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/JmxQueryRunner.java index 52e993ca8584..84a480c6a4b1 100644 --- a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/JmxQueryRunner.java +++ b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/JmxQueryRunner.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.jmx; -import io.prestosql.Session; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.testing.DistributedQueryRunner; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.plugin.jmx.JmxMetadata.JMX_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.jmx.JmxMetadata.JMX_SCHEMA_NAME; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class JmxQueryRunner { diff --git a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/MetadataUtil.java b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/MetadataUtil.java index ef60fe7cb9d0..c3d2183ae676 100644 --- a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/MetadataUtil.java +++ b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/MetadataUtil.java @@ -19,14 +19,14 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Locale.ENGLISH; public final class MetadataUtil diff --git a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxColumnHandle.java b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxColumnHandle.java index ed379ef2c7dd..8423d52c27c0 100644 --- a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxColumnHandle.java +++ b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxColumnHandle.java @@ -16,9 +16,9 @@ import io.airlift.testing.EquivalenceTester; import org.testng.annotations.Test; -import static io.prestosql.plugin.jmx.MetadataUtil.COLUMN_CODEC; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.jmx.MetadataUtil.COLUMN_CODEC; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static org.testng.Assert.assertEquals; public class TestJmxColumnHandle diff --git a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxMetadata.java b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxMetadata.java index ac9775c08000..245b49a66349 100644 --- a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxMetadata.java +++ b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxMetadata.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.client.NodeVersion; -import io.prestosql.metadata.InternalNode; -import io.prestosql.spi.Node; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.client.NodeVersion; +import io.trino.metadata.InternalNode; +import io.trino.spi.Node; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; import org.testng.annotations.Test; import java.net.URI; @@ -33,12 +33,12 @@ import java.util.Optional; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.jmx.JmxMetadata.HISTORY_SCHEMA_NAME; -import static io.prestosql.plugin.jmx.JmxMetadata.JMX_SCHEMA_NAME; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.jmx.JmxMetadata.HISTORY_SCHEMA_NAME; +import static io.trino.plugin.jmx.JmxMetadata.JMX_SCHEMA_NAME; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.lang.String.format; import static java.lang.management.ManagementFactory.getPlatformMBeanServer; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxQueries.java b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxQueries.java index ef4b5ecda099..e873c221f6bc 100644 --- a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxQueries.java +++ b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxQueries.java @@ -14,19 +14,19 @@ package io.trino.plugin.jmx; import com.google.common.collect.ImmutableSet; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; import java.util.Locale; import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.connector.informationschema.InformationSchemaTable.INFORMATION_SCHEMA; -import static io.prestosql.plugin.jmx.JmxMetadata.HISTORY_SCHEMA_NAME; -import static io.prestosql.plugin.jmx.JmxMetadata.JMX_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.connector.informationschema.InformationSchemaTable.INFORMATION_SCHEMA; +import static io.trino.plugin.jmx.JmxMetadata.HISTORY_SCHEMA_NAME; +import static io.trino.plugin.jmx.JmxMetadata.JMX_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxSplit.java b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxSplit.java index 075653a52bb2..459debe8d4ed 100644 --- a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxSplit.java +++ b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxSplit.java @@ -14,10 +14,10 @@ package io.trino.plugin.jmx; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import org.testng.annotations.Test; -import static io.prestosql.plugin.jmx.MetadataUtil.SPLIT_CODEC; +import static io.trino.plugin.jmx.MetadataUtil.SPLIT_CODEC; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertSame; diff --git a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxSplitManager.java b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxSplitManager.java index 196c03833af9..0243a8538b2e 100644 --- a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxSplitManager.java +++ b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxSplitManager.java @@ -17,23 +17,23 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.units.Duration; -import io.prestosql.client.NodeVersion; -import io.prestosql.metadata.InternalNode; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.testing.TestingNodeManager; +import io.trino.client.NodeVersion; +import io.trino.metadata.InternalNode; +import io.trino.spi.HostAddress; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.testing.TestingNodeManager; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -46,13 +46,13 @@ import java.util.concurrent.TimeUnit; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.jmx.JmxMetadata.HISTORY_SCHEMA_NAME; -import static io.prestosql.plugin.jmx.JmxMetadata.JMX_SCHEMA_NAME; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.jmx.JmxMetadata.HISTORY_SCHEMA_NAME; +import static io.trino.plugin.jmx.JmxMetadata.JMX_SCHEMA_NAME; +import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.lang.String.format; import static java.util.stream.Collectors.toSet; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxTableHandle.java b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxTableHandle.java index 56f3d09278a6..f4bf73e5756a 100644 --- a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxTableHandle.java +++ b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxTableHandle.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.testing.EquivalenceTester; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; import org.testng.annotations.Test; import java.util.List; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.jmx.MetadataUtil.TABLE_CODEC; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.jmx.MetadataUtil.TABLE_CODEC; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static org.testng.Assert.assertEquals; public class TestJmxTableHandle diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaColumnHandle.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaColumnHandle.java index f70d94e66441..d7377666c109 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaColumnHandle.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaColumnHandle.java @@ -15,10 +15,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.plugin.kafka.encoder.EncoderColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.plugin.kafka.encoder.EncoderColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConfig.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConfig.java index ca5f7b09f5c6..cc05d887718c 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConfig.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConfig.java @@ -20,8 +20,8 @@ import io.airlift.configuration.DefunctConfig; import io.airlift.units.DataSize; import io.airlift.units.DataSize.Unit; -import io.prestosql.plugin.kafka.schema.file.FileTableDescriptionSupplier; -import io.prestosql.spi.HostAddress; +import io.trino.plugin.kafka.schema.file.FileTableDescriptionSupplier; +import io.trino.spi.HostAddress; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConnector.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConnector.java index 37da244350aa..a9a1700db9bd 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConnector.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConnector.java @@ -14,14 +14,14 @@ package io.trino.plugin.kafka; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; @@ -29,8 +29,8 @@ import java.util.Set; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; public class KafkaConnector diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConnectorFactory.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConnectorFactory.java index 3bfc50f0bc1c..ddecd4810555 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConnectorFactory.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConnectorFactory.java @@ -17,12 +17,12 @@ import com.google.inject.Module; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.type.TypeManager; import java.util.Map; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConnectorModule.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConnectorModule.java index a7eae513d57c..c11906fb397c 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConnectorModule.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaConnectorModule.java @@ -19,21 +19,21 @@ import com.google.inject.Module; import com.google.inject.Scopes; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorPageSinkProvider; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorRecordSetProvider; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorSplitManager; -import io.prestosql.plugin.base.classloader.ForClassLoaderSafe; -import io.prestosql.plugin.kafka.schema.confluent.ConfluentModule; -import io.prestosql.plugin.kafka.schema.confluent.ConfluentSchemaRegistryTableDescriptionSupplier; -import io.prestosql.plugin.kafka.schema.file.FileTableDescriptionSupplier; -import io.prestosql.plugin.kafka.schema.file.FileTableDescriptionSupplierModule; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorPageSinkProvider; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorRecordSetProvider; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorSplitManager; +import io.trino.plugin.base.classloader.ForClassLoaderSafe; +import io.trino.plugin.kafka.schema.confluent.ConfluentModule; +import io.trino.plugin.kafka.schema.confluent.ConfluentSchemaRegistryTableDescriptionSupplier; +import io.trino.plugin.kafka.schema.file.FileTableDescriptionSupplier; +import io.trino.plugin.kafka.schema.file.FileTableDescriptionSupplierModule; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaErrorCode.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaErrorCode.java index 0090c75bca5f..190c38d3486f 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaErrorCode.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaErrorCode.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.kafka; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; -import static io.prestosql.spi.ErrorType.INTERNAL_ERROR; +import static io.trino.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.INTERNAL_ERROR; public enum KafkaErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaFilterManager.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaFilterManager.java index 6b12fac45abd..b2a010dc2ed7 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaFilterManager.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaFilterManager.java @@ -15,15 +15,15 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Marker; -import io.prestosql.spi.predicate.Ranges; -import io.prestosql.spi.predicate.SortedRangeSet; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Marker; +import io.trino.spi.predicate.Ranges; +import io.trino.spi.predicate.SortedRangeSet; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; import org.apache.kafka.clients.admin.Admin; import org.apache.kafka.clients.admin.Config; import org.apache.kafka.clients.admin.DescribeConfigsResult; @@ -46,11 +46,11 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.kafka.KafkaErrorCode.KAFKA_SPLIT_ERROR; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.OFFSET_TIMESTAMP_FIELD; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.PARTITION_ID_FIELD; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.PARTITION_OFFSET_FIELD; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.plugin.kafka.KafkaErrorCode.KAFKA_SPLIT_ERROR; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.OFFSET_TIMESTAMP_FIELD; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.PARTITION_ID_FIELD; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.PARTITION_OFFSET_FIELD; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; import static java.lang.Math.floorDiv; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaHandleResolver.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaHandleResolver.java index 9ab7f142ceda..1dc5f5d1d2d6 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaHandleResolver.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaHandleResolver.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.kafka; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import static com.google.common.base.Preconditions.checkArgument; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaInternalFieldManager.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaInternalFieldManager.java index 3d6ad727f65d..3de5108aab8f 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaInternalFieldManager.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaInternalFieldManager.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableMap; import com.google.inject.Inject; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TypeSignature.arrayType; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TypeSignature.arrayType; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class KafkaInternalFieldManager diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaMetadata.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaMetadata.java index 957d3f2f6c75..af9c339128a8 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaMetadata.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaMetadata.java @@ -16,24 +16,24 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slice; -import io.prestosql.decoder.dummy.DummyRowDecoder; -import io.prestosql.plugin.kafka.schema.TableDescriptionSupplier; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.ComputedStatistics; +import io.trino.decoder.dummy.DummyRowDecoder; +import io.trino.plugin.kafka.schema.TableDescriptionSupplier; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.ComputedStatistics; import javax.inject.Inject; @@ -45,8 +45,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.kafka.KafkaHandleResolver.convertColumnHandle; -import static io.prestosql.plugin.kafka.KafkaHandleResolver.convertTableHandle; +import static io.trino.plugin.kafka.KafkaHandleResolver.convertColumnHandle; +import static io.trino.plugin.kafka.KafkaHandleResolver.convertTableHandle; import static java.util.Objects.requireNonNull; /** diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaPageSink.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaPageSink.java index aba0c170492f..d43664e59900 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaPageSink.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaPageSink.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.plugin.kafka.encoder.RowEncoder; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorPageSink; +import io.trino.plugin.kafka.encoder.RowEncoder; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorPageSink; import org.apache.kafka.clients.producer.Callback; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerRecord; @@ -31,7 +31,7 @@ import java.util.concurrent.CompletableFuture; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.kafka.KafkaErrorCode.KAFKA_PRODUCER_ERROR; +import static io.trino.plugin.kafka.KafkaErrorCode.KAFKA_PRODUCER_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.CompletableFuture.completedFuture; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaPageSinkProvider.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaPageSinkProvider.java index 7d2321506c7f..9fd9e4128ae4 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaPageSinkProvider.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaPageSinkProvider.java @@ -14,16 +14,16 @@ package io.trino.plugin.kafka; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.kafka.encoder.DispatchingRowEncoderFactory; -import io.prestosql.plugin.kafka.encoder.EncoderColumnHandle; -import io.prestosql.plugin.kafka.encoder.RowEncoder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.plugin.kafka.encoder.DispatchingRowEncoderFactory; +import io.trino.plugin.kafka.encoder.EncoderColumnHandle; +import io.trino.plugin.kafka.encoder.RowEncoder; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import javax.inject.Inject; @@ -32,7 +32,7 @@ import java.nio.file.Paths; import java.util.Optional; -import static io.prestosql.plugin.kafka.KafkaErrorCode.KAFKA_SCHEMA_ERROR; +import static io.trino.plugin.kafka.KafkaErrorCode.KAFKA_SCHEMA_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaPlugin.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaPlugin.java index 9c108a52531b..c7487c33c020 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaPlugin.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaPlugin.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Module; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaRecordSet.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaRecordSet.java index ad7b0b630e6b..9496d9d94cde 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaRecordSet.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaRecordSet.java @@ -17,16 +17,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Multimap; import io.airlift.slice.Slice; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.clients.consumer.KafkaConsumer; import org.apache.kafka.common.TopicPartition; @@ -40,21 +40,21 @@ import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.decoder.FieldValueProviders.booleanValueProvider; -import static io.prestosql.decoder.FieldValueProviders.bytesValueProvider; -import static io.prestosql.decoder.FieldValueProviders.longValueProvider; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.HEADERS_FIELD; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.KEY_CORRUPT_FIELD; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.KEY_FIELD; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.KEY_LENGTH_FIELD; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.MESSAGE_CORRUPT_FIELD; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.MESSAGE_FIELD; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.MESSAGE_LENGTH_FIELD; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.OFFSET_TIMESTAMP_FIELD; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.PARTITION_ID_FIELD; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.PARTITION_OFFSET_FIELD; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; +import static io.trino.decoder.FieldValueProviders.booleanValueProvider; +import static io.trino.decoder.FieldValueProviders.bytesValueProvider; +import static io.trino.decoder.FieldValueProviders.longValueProvider; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.HEADERS_FIELD; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.KEY_CORRUPT_FIELD; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.KEY_FIELD; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.KEY_LENGTH_FIELD; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.MESSAGE_CORRUPT_FIELD; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.MESSAGE_FIELD; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.MESSAGE_LENGTH_FIELD; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.OFFSET_TIMESTAMP_FIELD; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.PARTITION_ID_FIELD; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.PARTITION_OFFSET_FIELD; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.TypeUtils.writeNativeValue; import static java.lang.Math.max; import static java.util.Collections.emptyIterator; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaRecordSetProvider.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaRecordSetProvider.java index 55fdaf561031..aecb9e17ffc7 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaRecordSetProvider.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaRecordSetProvider.java @@ -14,15 +14,15 @@ package io.trino.plugin.kafka; import com.google.common.collect.ImmutableMap; -import io.prestosql.decoder.DispatchingRowDecoderFactory; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.decoder.DispatchingRowDecoderFactory; +import io.trino.decoder.RowDecoder; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import javax.inject.Inject; @@ -32,7 +32,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.kafka.KafkaHandleResolver.convertSplit; +import static io.trino.plugin.kafka.KafkaHandleResolver.convertSplit; import static java.util.Objects.requireNonNull; public class KafkaRecordSetProvider diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaSessionProperties.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaSessionProperties.java index 582c0eee00ba..db1d172784ed 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaSessionProperties.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaSessionProperties.java @@ -14,8 +14,8 @@ package io.trino.plugin.kafka; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaSplit.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaSplit.java index ea4a1ee2af8f..b3bb2d266811 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaSplit.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; import java.util.Optional; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaSplitManager.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaSplitManager.java index dad9266b4346..f42a473fdfd7 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaSplitManager.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaSplitManager.java @@ -14,16 +14,16 @@ package io.trino.plugin.kafka; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.kafka.schema.ContentSchemaReader; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.plugin.kafka.schema.ContentSchemaReader; +import io.trino.spi.HostAddress; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import org.apache.kafka.clients.consumer.KafkaConsumer; import org.apache.kafka.common.PartitionInfo; import org.apache.kafka.common.TopicPartition; @@ -35,7 +35,7 @@ import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.kafka.KafkaErrorCode.KAFKA_SPLIT_ERROR; +import static io.trino.plugin.kafka.KafkaErrorCode.KAFKA_SPLIT_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaTableHandle.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaTableHandle.java index b583ff13d960..9259b1381a40 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaTableHandle.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaTableHandle.java @@ -16,11 +16,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaTopicFieldDescription.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaTopicFieldDescription.java index 590358059170..30b68e54809a 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaTopicFieldDescription.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaTopicFieldDescription.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaTransactionHandle.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaTransactionHandle.java index f59abb63e6cd..20eddf18a8f0 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaTransactionHandle.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kafka; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum KafkaTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/PlainTextKafkaAdminFactory.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/PlainTextKafkaAdminFactory.java index 0d74df86f92c..c6f51e0f03ad 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/PlainTextKafkaAdminFactory.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/PlainTextKafkaAdminFactory.java @@ -14,7 +14,7 @@ package io.trino.plugin.kafka; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import javax.inject.Inject; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/PlainTextKafkaConsumerFactory.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/PlainTextKafkaConsumerFactory.java index 9bdc1915f218..3e4f311e018f 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/PlainTextKafkaConsumerFactory.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/PlainTextKafkaConsumerFactory.java @@ -14,7 +14,7 @@ package io.trino.plugin.kafka; import io.airlift.units.DataSize; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import org.apache.kafka.common.serialization.ByteArrayDeserializer; import javax.inject.Inject; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/PlainTextKafkaProducerFactory.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/PlainTextKafkaProducerFactory.java index 25a057241740..3995f410b521 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/PlainTextKafkaProducerFactory.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/PlainTextKafkaProducerFactory.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kafka; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import org.apache.kafka.common.serialization.ByteArraySerializer; import javax.inject.Inject; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/SessionPropertiesProvider.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/SessionPropertiesProvider.java index b8cfe77dbc9e..5b8653f8a650 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/SessionPropertiesProvider.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/SessionPropertiesProvider.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kafka; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.session.PropertyMetadata; import java.util.List; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/AbstractRowEncoder.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/AbstractRowEncoder.java index f25b08483b35..6153a485e224 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/AbstractRowEncoder.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/AbstractRowEncoder.java @@ -16,37 +16,37 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimeWithTimeZone; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimeWithTimeZone; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import java.nio.ByteBuffer; import java.util.List; import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/DispatchingRowEncoderFactory.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/DispatchingRowEncoderFactory.java index 83d71692e789..6822596ede1d 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/DispatchingRowEncoderFactory.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/DispatchingRowEncoderFactory.java @@ -14,7 +14,7 @@ package io.trino.plugin.kafka.encoder; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSession; import javax.inject.Inject; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/EncoderColumnHandle.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/EncoderColumnHandle.java index 0ab71bc1a9b9..8032cf47b406 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/EncoderColumnHandle.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/EncoderColumnHandle.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.kafka.encoder; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.type.Type; public interface EncoderColumnHandle extends ColumnHandle diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/EncoderModule.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/EncoderModule.java index ea09df08b615..c10a0a52c60a 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/EncoderModule.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/EncoderModule.java @@ -16,13 +16,13 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.multibindings.MapBinder; -import io.prestosql.plugin.kafka.encoder.avro.AvroEncoderModule; -import io.prestosql.plugin.kafka.encoder.csv.CsvRowEncoder; -import io.prestosql.plugin.kafka.encoder.csv.CsvRowEncoderFactory; -import io.prestosql.plugin.kafka.encoder.json.JsonRowEncoder; -import io.prestosql.plugin.kafka.encoder.json.JsonRowEncoderFactory; -import io.prestosql.plugin.kafka.encoder.raw.RawRowEncoder; -import io.prestosql.plugin.kafka.encoder.raw.RawRowEncoderFactory; +import io.trino.plugin.kafka.encoder.avro.AvroEncoderModule; +import io.trino.plugin.kafka.encoder.csv.CsvRowEncoder; +import io.trino.plugin.kafka.encoder.csv.CsvRowEncoderFactory; +import io.trino.plugin.kafka.encoder.json.JsonRowEncoder; +import io.trino.plugin.kafka.encoder.json.JsonRowEncoderFactory; +import io.trino.plugin.kafka.encoder.raw.RawRowEncoder; +import io.trino.plugin.kafka.encoder.raw.RawRowEncoderFactory; import static com.google.inject.Scopes.SINGLETON; import static com.google.inject.multibindings.MapBinder.newMapBinder; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/RowEncoder.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/RowEncoder.java index cecd56f28c4f..cb794378d063 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/RowEncoder.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/RowEncoder.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kafka.encoder; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import java.io.Closeable; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/RowEncoderFactory.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/RowEncoderFactory.java index d136b58dea40..8b1245c0732e 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/RowEncoderFactory.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/RowEncoderFactory.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kafka.encoder; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSession; import java.util.List; import java.util.Optional; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/avro/AvroEncoderModule.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/avro/AvroEncoderModule.java index df54f6900abf..9e95aa6a0cd7 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/avro/AvroEncoderModule.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/avro/AvroEncoderModule.java @@ -16,10 +16,10 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.multibindings.MapBinder; -import io.prestosql.plugin.kafka.encoder.RowEncoderFactory; +import io.trino.plugin.kafka.encoder.RowEncoderFactory; import static com.google.inject.Scopes.SINGLETON; -import static io.prestosql.plugin.kafka.encoder.EncoderModule.encoderFactory; +import static io.trino.plugin.kafka.encoder.EncoderModule.encoderFactory; public class AvroEncoderModule implements Module diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/avro/AvroRowEncoder.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/avro/AvroRowEncoder.java index 776edc874585..1aaa5f297e70 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/avro/AvroRowEncoder.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/avro/AvroRowEncoder.java @@ -14,11 +14,11 @@ package io.trino.plugin.kafka.encoder.avro; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.kafka.encoder.AbstractRowEncoder; -import io.prestosql.plugin.kafka.encoder.EncoderColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.kafka.encoder.AbstractRowEncoder; +import io.trino.plugin.kafka.encoder.EncoderColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.avro.Schema; import org.apache.avro.file.DataFileWriter; import org.apache.avro.generic.GenericData; @@ -32,11 +32,11 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/avro/AvroRowEncoderFactory.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/avro/AvroRowEncoderFactory.java index 5f88d692f182..b218162807e2 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/avro/AvroRowEncoderFactory.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/avro/AvroRowEncoderFactory.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.kafka.encoder.avro; -import io.prestosql.plugin.kafka.encoder.EncoderColumnHandle; -import io.prestosql.plugin.kafka.encoder.RowEncoder; -import io.prestosql.plugin.kafka.encoder.RowEncoderFactory; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.kafka.encoder.EncoderColumnHandle; +import io.trino.plugin.kafka.encoder.RowEncoder; +import io.trino.plugin.kafka.encoder.RowEncoderFactory; +import io.trino.spi.connector.ConnectorSession; import org.apache.avro.Schema; import java.util.List; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/csv/CsvRowEncoder.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/csv/CsvRowEncoder.java index 443220759808..1bc37616885a 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/csv/CsvRowEncoder.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/csv/CsvRowEncoder.java @@ -15,11 +15,11 @@ import au.com.bytecode.opencsv.CSVWriter; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.kafka.encoder.AbstractRowEncoder; -import io.prestosql.plugin.kafka.encoder.EncoderColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.kafka.encoder.AbstractRowEncoder; +import io.trino.plugin.kafka.encoder.EncoderColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -30,13 +30,13 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.String.format; public class CsvRowEncoder diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/csv/CsvRowEncoderFactory.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/csv/CsvRowEncoderFactory.java index c8d73c1dfd1e..aa4ee0cb28d0 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/csv/CsvRowEncoderFactory.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/csv/CsvRowEncoderFactory.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.kafka.encoder.csv; -import io.prestosql.plugin.kafka.encoder.EncoderColumnHandle; -import io.prestosql.plugin.kafka.encoder.RowEncoder; -import io.prestosql.plugin.kafka.encoder.RowEncoderFactory; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.kafka.encoder.EncoderColumnHandle; +import io.trino.plugin.kafka.encoder.RowEncoder; +import io.trino.plugin.kafka.encoder.RowEncoderFactory; +import io.trino.spi.connector.ConnectorSession; import java.util.List; import java.util.Optional; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/JsonRowEncoder.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/JsonRowEncoder.java index 3c9a8fa47a0a..93de2ecdc855 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/JsonRowEncoder.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/JsonRowEncoder.java @@ -18,20 +18,20 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.kafka.encoder.AbstractRowEncoder; -import io.prestosql.plugin.kafka.encoder.EncoderColumnHandle; -import io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat; -import io.prestosql.plugin.kafka.encoder.json.format.JsonDateTimeFormatter; -import io.prestosql.plugin.kafka.encoder.json.format.UnimplementedJsonDateTimeFormatter; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimeWithTimeZone; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.kafka.encoder.AbstractRowEncoder; +import io.trino.plugin.kafka.encoder.EncoderColumnHandle; +import io.trino.plugin.kafka.encoder.json.format.DateTimeFormat; +import io.trino.plugin.kafka.encoder.json.format.JsonDateTimeFormatter; +import io.trino.plugin.kafka.encoder.json.format.UnimplementedJsonDateTimeFormatter; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimeWithTimeZone; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.nio.ByteBuffer; import java.util.List; @@ -39,17 +39,17 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME_MILLIS; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME_MILLIS; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/JsonRowEncoderFactory.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/JsonRowEncoderFactory.java index de094291def1..b59889530d2f 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/JsonRowEncoderFactory.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/JsonRowEncoderFactory.java @@ -14,10 +14,10 @@ package io.trino.plugin.kafka.encoder.json; import com.fasterxml.jackson.databind.ObjectMapper; -import io.prestosql.plugin.kafka.encoder.EncoderColumnHandle; -import io.prestosql.plugin.kafka.encoder.RowEncoder; -import io.prestosql.plugin.kafka.encoder.RowEncoderFactory; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.kafka.encoder.EncoderColumnHandle; +import io.trino.plugin.kafka.encoder.RowEncoder; +import io.trino.plugin.kafka.encoder.RowEncoderFactory; +import io.trino.spi.connector.ConnectorSession; import javax.inject.Inject; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/CustomDateTimeFormatter.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/CustomDateTimeFormatter.java index 46d85741e85e..5ae366587f07 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/CustomDateTimeFormatter.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/CustomDateTimeFormatter.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.kafka.encoder.json.format; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimeWithTimeZone; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimeWithTimeZone; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.Type; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.LocalTime; @@ -29,15 +29,15 @@ import java.util.Locale; import java.util.Optional; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.PICOSECONDS_PER_SECOND; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.getMillisOfDay; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.scaleEpochMicrosToMillis; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.scalePicosToMillis; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimeType.TIME_MILLIS; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.PICOSECONDS_PER_SECOND; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.getMillisOfDay; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.scaleEpochMicrosToMillis; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.scalePicosToMillis; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimeType.TIME_MILLIS; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; import static java.util.concurrent.TimeUnit.DAYS; import static org.joda.time.DateTimeZone.UTC; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/DateTimeFormat.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/DateTimeFormat.java index 1353b9d3b53a..3434fa11673c 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/DateTimeFormat.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/DateTimeFormat.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kafka.encoder.json.format; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Locale; import java.util.Optional; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/ISO8601DateTimeFormatter.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/ISO8601DateTimeFormatter.java index 7287b5482027..abd764cd6eda 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/ISO8601DateTimeFormatter.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/ISO8601DateTimeFormatter.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.kafka.encoder.json.format; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimeWithTimeZone; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimeWithTimeZone; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.Type; import java.time.Instant; import java.time.LocalDate; @@ -26,20 +26,20 @@ import java.time.LocalTime; import java.time.ZoneOffset; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.NANOSECONDS_PER_MICROSECOND; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.getMicrosOfSecond; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.getMillisOfSecond; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.getNanosOfDay; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.scaleEpochMicrosToSeconds; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.scaleEpochMillisToSeconds; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.scalePicosToMillis; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.scalePicosToNanos; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimeType.TIME_MILLIS; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.NANOSECONDS_PER_MICROSECOND; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.NANOSECONDS_PER_MILLISECOND; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.getMicrosOfSecond; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.getMillisOfSecond; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.getNanosOfDay; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.scaleEpochMicrosToSeconds; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.scaleEpochMillisToSeconds; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.scalePicosToMillis; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.scalePicosToNanos; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimeType.TIME_MILLIS; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; import static java.time.ZoneOffset.UTC; import static java.time.format.DateTimeFormatter.ISO_OFFSET_DATE_TIME; import static java.time.format.DateTimeFormatter.ISO_OFFSET_TIME; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/JsonDateTimeFormatter.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/JsonDateTimeFormatter.java index 5438681f9217..8421e468eef5 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/JsonDateTimeFormatter.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/JsonDateTimeFormatter.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.kafka.encoder.json.format; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimeWithTimeZone; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimeWithTimeZone; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; public interface JsonDateTimeFormatter { diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/MillisecondsSinceEpochFormatter.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/MillisecondsSinceEpochFormatter.java index a823f17db905..96ea7b056c91 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/MillisecondsSinceEpochFormatter.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/MillisecondsSinceEpochFormatter.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.kafka.encoder.json.format; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.Type; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.scalePicosToMillis; -import static io.prestosql.spi.type.TimeType.TIME_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.scalePicosToMillis; +import static io.trino.spi.type.TimeType.TIME_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; public class MillisecondsSinceEpochFormatter implements JsonDateTimeFormatter diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/RFC2822DateTimeFormatter.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/RFC2822DateTimeFormatter.java index 2c58cf4dff3a..6e1023133a5b 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/RFC2822DateTimeFormatter.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/RFC2822DateTimeFormatter.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.kafka.encoder.json.format; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.Type; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.chrono.ISOChronology; @@ -24,8 +24,8 @@ import java.util.Locale; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; import static org.joda.time.DateTimeZone.UTC; public class RFC2822DateTimeFormatter diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/SecondsSinceEpochFormatter.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/SecondsSinceEpochFormatter.java index cec6e98ce1de..49b12605cb61 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/SecondsSinceEpochFormatter.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/SecondsSinceEpochFormatter.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.kafka.encoder.json.format; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.Type; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.scaleEpochMillisToSeconds; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.scalePicosToSeconds; -import static io.prestosql.spi.type.TimeType.TIME_MILLIS; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.scaleEpochMillisToSeconds; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.scalePicosToSeconds; +import static io.trino.spi.type.TimeType.TIME_MILLIS; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; public class SecondsSinceEpochFormatter implements JsonDateTimeFormatter diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/util/TimeConversions.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/util/TimeConversions.java index f654aaa9b34c..e17e5d0aa7b5 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/util/TimeConversions.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/json/format/util/TimeConversions.java @@ -14,7 +14,7 @@ package io.trino.plugin.kafka.encoder.json.format.util; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_DAY; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_DAY; import static java.lang.Math.floorMod; public final class TimeConversions diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/raw/RawRowEncoder.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/raw/RawRowEncoder.java index 0e3d478373b9..e515c7c1168f 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/raw/RawRowEncoder.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/raw/RawRowEncoder.java @@ -15,11 +15,11 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.kafka.encoder.AbstractRowEncoder; -import io.prestosql.plugin.kafka.encoder.EncoderColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.kafka.encoder.AbstractRowEncoder; +import io.trino.plugin.kafka.encoder.EncoderColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; @@ -33,13 +33,13 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Integer.parseInt; import static java.lang.String.format; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/raw/RawRowEncoderFactory.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/raw/RawRowEncoderFactory.java index 8f7b7ca7b4ce..07a5675eb928 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/raw/RawRowEncoderFactory.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/encoder/raw/RawRowEncoderFactory.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.kafka.encoder.raw; -import io.prestosql.plugin.kafka.encoder.EncoderColumnHandle; -import io.prestosql.plugin.kafka.encoder.RowEncoder; -import io.prestosql.plugin.kafka.encoder.RowEncoderFactory; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.kafka.encoder.EncoderColumnHandle; +import io.trino.plugin.kafka.encoder.RowEncoder; +import io.trino.plugin.kafka.encoder.RowEncoderFactory; +import io.trino.spi.connector.ConnectorSession; import java.util.List; import java.util.Optional; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/AbstractContentSchemaReader.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/AbstractContentSchemaReader.java index 7e45a2581c1e..23cdbaedf8b2 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/AbstractContentSchemaReader.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/AbstractContentSchemaReader.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kafka.schema; -import io.prestosql.plugin.kafka.KafkaTableHandle; +import io.trino.plugin.kafka.KafkaTableHandle; import java.util.Optional; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/ContentSchemaReader.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/ContentSchemaReader.java index f6d1490f406c..20457c4ef21a 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/ContentSchemaReader.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/ContentSchemaReader.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kafka.schema; -import io.prestosql.plugin.kafka.KafkaTableHandle; +import io.trino.plugin.kafka.KafkaTableHandle; import java.util.Optional; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/MapBasedTableDescriptionSupplier.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/MapBasedTableDescriptionSupplier.java index 83b61afc6fe7..1291401a5988 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/MapBasedTableDescriptionSupplier.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/MapBasedTableDescriptionSupplier.java @@ -15,9 +15,9 @@ package io.trino.plugin.kafka.schema; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.kafka.KafkaTopicDescription; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.kafka.KafkaTopicDescription; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; import java.util.Map; import java.util.Optional; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/TableDescriptionSupplier.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/TableDescriptionSupplier.java index 70b180ce69a1..f9994fbfd72d 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/TableDescriptionSupplier.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/TableDescriptionSupplier.java @@ -14,9 +14,9 @@ package io.trino.plugin.kafka.schema; -import io.prestosql.plugin.kafka.KafkaTopicDescription; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.kafka.KafkaTopicDescription; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; import java.util.Optional; import java.util.Set; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/AvroConfluentContentSchemaReader.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/AvroConfluentContentSchemaReader.java index e479e8a459e4..27866b412669 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/AvroConfluentContentSchemaReader.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/AvroConfluentContentSchemaReader.java @@ -15,8 +15,8 @@ import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient; import io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException; -import io.prestosql.plugin.kafka.schema.AbstractContentSchemaReader; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.kafka.schema.AbstractContentSchemaReader; +import io.trino.spi.PrestoException; import javax.inject.Inject; @@ -24,7 +24,7 @@ import java.util.Optional; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/AvroSchemaConverter.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/AvroSchemaConverter.java index cac3b767d7d8..1b60ce9599c6 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/AvroSchemaConverter.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/AvroSchemaConverter.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.avro.Schema; import org.apache.avro.Schema.Field; @@ -39,7 +39,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.apache.avro.Schema.Type.ARRAY; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/AvroSchemaParser.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/AvroSchemaParser.java index 175766a29155..902c6fa07e01 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/AvroSchemaParser.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/AvroSchemaParser.java @@ -14,12 +14,12 @@ package io.trino.plugin.kafka.schema.confluent; import com.google.common.collect.ImmutableList; -import io.prestosql.decoder.avro.AvroRowDecoderFactory; -import io.prestosql.plugin.kafka.KafkaTopicFieldDescription; -import io.prestosql.plugin.kafka.KafkaTopicFieldGroup; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.decoder.avro.AvroRowDecoderFactory; +import io.trino.plugin.kafka.KafkaTopicFieldDescription; +import io.trino.plugin.kafka.KafkaTopicFieldGroup; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.avro.Schema; import javax.inject.Inject; @@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.kafka.schema.confluent.ConfluentSessionProperties.getEmptyFieldStrategy; +import static io.trino.plugin.kafka.schema.confluent.ConfluentSessionProperties.getEmptyFieldStrategy; import static java.util.Objects.requireNonNull; public class AvroSchemaParser diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentAvroReaderSupplier.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentAvroReaderSupplier.java index 138e7b433213..9dd2b143313a 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentAvroReaderSupplier.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentAvroReaderSupplier.java @@ -18,8 +18,8 @@ import com.google.common.cache.LoadingCache; import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient; import io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException; -import io.prestosql.decoder.avro.AvroReaderSupplier; -import io.prestosql.spi.PrestoException; +import io.trino.decoder.avro.AvroReaderSupplier; +import io.trino.spi.PrestoException; import org.apache.avro.Schema; import org.apache.avro.generic.GenericDatumReader; import org.apache.avro.io.DatumReader; @@ -30,7 +30,7 @@ import java.nio.ByteBuffer; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentModule.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentModule.java index bf19d39f1a07..a6f75e9f619e 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentModule.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentModule.java @@ -25,20 +25,20 @@ import io.confluent.kafka.schemaregistry.avro.AvroSchemaProvider; import io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient; import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient; -import io.prestosql.decoder.DecoderModule; -import io.prestosql.decoder.RowDecoderFactory; -import io.prestosql.decoder.avro.AvroBytesDeserializer; -import io.prestosql.decoder.avro.AvroDeserializer; -import io.prestosql.decoder.avro.AvroReaderSupplier; -import io.prestosql.decoder.avro.AvroRowDecoderFactory; -import io.prestosql.plugin.kafka.SessionPropertiesProvider; -import io.prestosql.plugin.kafka.encoder.EncoderModule; -import io.prestosql.plugin.kafka.encoder.RowEncoderFactory; -import io.prestosql.plugin.kafka.encoder.avro.AvroRowEncoder; -import io.prestosql.plugin.kafka.schema.ContentSchemaReader; -import io.prestosql.plugin.kafka.schema.TableDescriptionSupplier; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.PrestoException; +import io.trino.decoder.DecoderModule; +import io.trino.decoder.RowDecoderFactory; +import io.trino.decoder.avro.AvroBytesDeserializer; +import io.trino.decoder.avro.AvroDeserializer; +import io.trino.decoder.avro.AvroReaderSupplier; +import io.trino.decoder.avro.AvroRowDecoderFactory; +import io.trino.plugin.kafka.SessionPropertiesProvider; +import io.trino.plugin.kafka.encoder.EncoderModule; +import io.trino.plugin.kafka.encoder.RowEncoderFactory; +import io.trino.plugin.kafka.encoder.avro.AvroRowEncoder; +import io.trino.plugin.kafka.schema.ContentSchemaReader; +import io.trino.plugin.kafka.schema.TableDescriptionSupplier; +import io.trino.spi.HostAddress; +import io.trino.spi.PrestoException; import javax.inject.Singleton; @@ -48,8 +48,8 @@ import static com.google.inject.multibindings.MapBinder.newMapBinder; import static com.google.inject.multibindings.Multibinder.newSetBinder; import static io.airlift.configuration.ConfigBinder.configBinder; -import static io.prestosql.plugin.kafka.encoder.EncoderModule.encoderFactory; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.kafka.encoder.EncoderModule.encoderFactory; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; public class ConfluentModule extends AbstractConfigurationAwareModule diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentSchemaRegistryConfig.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentSchemaRegistryConfig.java index 3284adfc6460..bf4c1f0dda6d 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentSchemaRegistryConfig.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentSchemaRegistryConfig.java @@ -20,8 +20,8 @@ import io.airlift.units.Duration; import io.airlift.units.MaxDuration; import io.airlift.units.MinDuration; -import io.prestosql.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy; -import io.prestosql.spi.HostAddress; +import io.trino.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy; +import io.trino.spi.HostAddress; import javax.validation.constraints.Max; import javax.validation.constraints.Min; @@ -31,7 +31,7 @@ import java.util.stream.StreamSupport; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy.IGNORE; +import static io.trino.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy.IGNORE; import static java.util.concurrent.TimeUnit.SECONDS; public class ConfluentSchemaRegistryConfig diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentSchemaRegistryTableDescriptionSupplier.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentSchemaRegistryTableDescriptionSupplier.java index f95c94bf4848..89947b71aaf9 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentSchemaRegistryTableDescriptionSupplier.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentSchemaRegistryTableDescriptionSupplier.java @@ -20,13 +20,13 @@ import io.confluent.kafka.schemaregistry.client.SchemaMetadata; import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient; import io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException; -import io.prestosql.plugin.kafka.KafkaConfig; -import io.prestosql.plugin.kafka.KafkaTopicDescription; -import io.prestosql.plugin.kafka.KafkaTopicFieldGroup; -import io.prestosql.plugin.kafka.schema.TableDescriptionSupplier; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.kafka.KafkaConfig; +import io.trino.plugin.kafka.KafkaTopicDescription; +import io.trino.plugin.kafka.KafkaTopicFieldGroup; +import io.trino.plugin.kafka.schema.TableDescriptionSupplier; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; import javax.inject.Inject; import javax.inject.Provider; @@ -44,7 +44,7 @@ import static com.google.common.base.Suppliers.memoizeWithExpiration; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentSessionProperties.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentSessionProperties.java index e9747a64e7e7..638b29e6c11d 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentSessionProperties.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentSessionProperties.java @@ -14,16 +14,16 @@ package io.trino.plugin.kafka.schema.confluent; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.kafka.SessionPropertiesProvider; -import io.prestosql.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.plugin.kafka.SessionPropertiesProvider; +import io.trino.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; import java.util.List; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.enumProperty; import static java.util.Objects.requireNonNull; public class ConfluentSessionProperties diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/SchemaParser.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/SchemaParser.java index 3e14f9e26a76..a789914c66f5 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/SchemaParser.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/SchemaParser.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.kafka.schema.confluent; -import io.prestosql.plugin.kafka.KafkaTopicFieldGroup; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.kafka.KafkaTopicFieldGroup; +import io.trino.spi.connector.ConnectorSession; public interface SchemaParser { diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/file/FileContentSchemaReader.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/file/FileContentSchemaReader.java index 2d38b13f0168..f7110c0fa1c4 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/file/FileContentSchemaReader.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/file/FileContentSchemaReader.java @@ -14,8 +14,8 @@ package io.trino.plugin.kafka.schema.file; import com.google.common.io.CharStreams; -import io.prestosql.plugin.kafka.schema.AbstractContentSchemaReader; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.kafka.schema.AbstractContentSchemaReader; +import io.trino.spi.PrestoException; import java.io.FileInputStream; import java.io.IOException; @@ -27,7 +27,7 @@ import java.util.Optional; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/file/FileTableDescriptionSupplier.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/file/FileTableDescriptionSupplier.java index 8841f8a5e394..cd68b9223ad3 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/file/FileTableDescriptionSupplier.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/file/FileTableDescriptionSupplier.java @@ -19,13 +19,13 @@ import com.google.common.collect.ImmutableSet; import io.airlift.json.JsonCodec; import io.airlift.log.Logger; -import io.prestosql.decoder.dummy.DummyRowDecoder; -import io.prestosql.plugin.kafka.KafkaConfig; -import io.prestosql.plugin.kafka.KafkaTopicDescription; -import io.prestosql.plugin.kafka.KafkaTopicFieldGroup; -import io.prestosql.plugin.kafka.schema.MapBasedTableDescriptionSupplier; -import io.prestosql.plugin.kafka.schema.TableDescriptionSupplier; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.decoder.dummy.DummyRowDecoder; +import io.trino.plugin.kafka.KafkaConfig; +import io.trino.plugin.kafka.KafkaTopicDescription; +import io.trino.plugin.kafka.KafkaTopicFieldGroup; +import io.trino.plugin.kafka.schema.MapBasedTableDescriptionSupplier; +import io.trino.plugin.kafka.schema.TableDescriptionSupplier; +import io.trino.spi.connector.SchemaTableName; import javax.inject.Inject; import javax.inject.Provider; diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/file/FileTableDescriptionSupplierModule.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/file/FileTableDescriptionSupplierModule.java index dd334edf15e7..cd34f9843856 100644 --- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/file/FileTableDescriptionSupplierModule.java +++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/file/FileTableDescriptionSupplierModule.java @@ -16,10 +16,10 @@ import com.google.inject.Binder; import com.google.inject.Scopes; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.decoder.DecoderModule; -import io.prestosql.plugin.kafka.encoder.EncoderModule; -import io.prestosql.plugin.kafka.schema.ContentSchemaReader; -import io.prestosql.plugin.kafka.schema.TableDescriptionSupplier; +import io.trino.decoder.DecoderModule; +import io.trino.plugin.kafka.encoder.EncoderModule; +import io.trino.plugin.kafka.schema.ContentSchemaReader; +import io.trino.plugin.kafka.schema.TableDescriptionSupplier; import static io.airlift.configuration.ConfigBinder.configBinder; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/KafkaQueryRunner.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/KafkaQueryRunner.java index f70d59edae14..643d4814ba32 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/KafkaQueryRunner.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/KafkaQueryRunner.java @@ -20,19 +20,19 @@ import io.airlift.json.JsonCodec; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.decoder.DecoderModule; -import io.prestosql.metadata.Metadata; -import io.prestosql.plugin.kafka.encoder.EncoderModule; -import io.prestosql.plugin.kafka.schema.ContentSchemaReader; -import io.prestosql.plugin.kafka.schema.MapBasedTableDescriptionSupplier; -import io.prestosql.plugin.kafka.schema.TableDescriptionSupplier; -import io.prestosql.plugin.kafka.schema.file.FileContentSchemaReader; -import io.prestosql.plugin.kafka.util.CodecSupplier; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.kafka.BasicTestingKafka; -import io.prestosql.testing.kafka.TestingKafka; +import io.trino.decoder.DecoderModule; +import io.trino.metadata.Metadata; +import io.trino.plugin.kafka.encoder.EncoderModule; +import io.trino.plugin.kafka.schema.ContentSchemaReader; +import io.trino.plugin.kafka.schema.MapBasedTableDescriptionSupplier; +import io.trino.plugin.kafka.schema.TableDescriptionSupplier; +import io.trino.plugin.kafka.schema.file.FileContentSchemaReader; +import io.trino.plugin.kafka.util.CodecSupplier; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.spi.connector.SchemaTableName; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.kafka.BasicTestingKafka; +import io.trino.testing.kafka.TestingKafka; import io.trino.tpch.TpchTable; import java.io.IOException; @@ -46,7 +46,7 @@ import static io.airlift.configuration.ConditionalModule.installModuleIf; import static io.airlift.configuration.ConfigurationAwareModule.combine; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.plugin.kafka.util.TestUtils.loadTpchTopicDescription; +import static io.trino.plugin.kafka.util.TestUtils.loadTpchTopicDescription; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/KafkaQueryRunnerBuilder.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/KafkaQueryRunnerBuilder.java index dc6ab73ddf10..aeba7765dd94 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/KafkaQueryRunnerBuilder.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/KafkaQueryRunnerBuilder.java @@ -17,15 +17,15 @@ import com.google.inject.Module; import io.airlift.log.Level; import io.airlift.log.Logging; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.kafka.TestingKafka; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.kafka.TestingKafka; import java.util.HashMap; import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.plugin.kafka.KafkaPlugin.DEFAULT_EXTENSION; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.kafka.KafkaPlugin.DEFAULT_EXTENSION; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Objects.requireNonNull; public abstract class KafkaQueryRunnerBuilder diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaConfig.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaConfig.java index 1a9989004a60..ffa1e0ec83ed 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaConfig.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaConfig.java @@ -14,7 +14,7 @@ package io.trino.plugin.kafka; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.kafka.schema.file.FileTableDescriptionSupplier; +import io.trino.plugin.kafka.schema.file.FileTableDescriptionSupplier; import org.testng.annotations.Test; import java.util.Map; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaDistributed.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaDistributed.java index a36778bd43ce..60c9144756e3 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaDistributed.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaDistributed.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.kafka; -import io.prestosql.testing.AbstractTestQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.kafka.BasicTestingKafka; +import io.trino.testing.AbstractTestQueries; +import io.trino.testing.QueryRunner; +import io.trino.testing.kafka.BasicTestingKafka; import io.trino.tpch.TpchTable; import org.testng.annotations.AfterClass; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaDistributedLatest.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaDistributedLatest.java index bd7d48451a6e..d135b7bd943c 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaDistributedLatest.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaDistributedLatest.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.kafka; -import io.prestosql.testing.AbstractTestQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.kafka.BasicTestingKafka; +import io.trino.testing.AbstractTestQueries; +import io.trino.testing.QueryRunner; +import io.trino.testing.kafka.BasicTestingKafka; import io.trino.tpch.TpchTable; import org.testng.annotations.AfterClass; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaFilterManager.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaFilterManager.java index 114e62768d35..c7a15c20f5eb 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaFilterManager.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaFilterManager.java @@ -14,15 +14,15 @@ package io.trino.plugin.kafka; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.SortedRangeSet; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.SortedRangeSet; import org.testng.annotations.Test; import java.util.Set; -import static io.prestosql.spi.predicate.Domain.multipleValues; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.predicate.Domain.multipleValues; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationPushDown.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationPushDown.java index 41c76df6dd05..b68a2ecfdbbe 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationPushDown.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationPushDown.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.util.concurrent.Futures; -import io.prestosql.Session; -import io.prestosql.execution.QueryInfo; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.ResultWithQueryId; -import io.prestosql.testing.kafka.BasicTestingKafka; +import io.trino.Session; +import io.trino.execution.QueryInfo; +import io.trino.spi.connector.SchemaTableName; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; +import io.trino.testing.ResultWithQueryId; +import io.trino.testing.kafka.BasicTestingKafka; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.clients.producer.RecordMetadata; @@ -41,7 +41,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; -import static io.prestosql.plugin.kafka.util.TestUtils.createEmptyTopicDescription; +import static io.trino.plugin.kafka.util.TestUtils.createEmptyTopicDescription; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationSmokeTest.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationSmokeTest.java index 2fc2c1bd2098..de2db608e030 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationSmokeTest.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationSmokeTest.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.kafka.BasicTestingKafka; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Type; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.QueryRunner; +import io.trino.testing.kafka.BasicTestingKafka; import io.trino.tpch.TpchTable; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerRecord; @@ -38,22 +38,22 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.CUSTOM_DATE_TIME; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.ISO8601; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.MILLISECONDS_SINCE_EPOCH; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.RFC2822; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.SECONDS_SINCE_EPOCH; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.DataProviders.toDataProvider; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.CUSTOM_DATE_TIME; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.ISO8601; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.MILLISECONDS_SINCE_EPOCH; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.RFC2822; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.SECONDS_SINCE_EPOCH; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampType.TIMESTAMP; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.DataProviders.toDataProvider; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaInternalFieldManager.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaInternalFieldManager.java index 7e302580525e..a6a04c33b8c7 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaInternalFieldManager.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaInternalFieldManager.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.kafka; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.BigintType; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.BigintType; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.kafka.KafkaInternalFieldManager.PARTITION_ID_FIELD; +import static io.trino.plugin.kafka.KafkaInternalFieldManager.PARTITION_ID_FIELD; import static org.assertj.core.api.Assertions.assertThat; public class TestKafkaInternalFieldManager diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaPlugin.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaPlugin.java index 638d74f38d48..bf453b946944 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaPlugin.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaPlugin.java @@ -14,9 +14,9 @@ package io.trino.plugin.kafka; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestMinimalFunctionality.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestMinimalFunctionality.java index 2fe281df84ff..5117dc9d6679 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestMinimalFunctionality.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestMinimalFunctionality.java @@ -14,11 +14,11 @@ package io.trino.plugin.kafka; import com.google.common.collect.ImmutableMap; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.kafka.BasicTestingKafka; +import io.trino.metadata.QualifiedObjectName; +import io.trino.spi.connector.SchemaTableName; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; +import io.trino.testing.kafka.BasicTestingKafka; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerRecord; import org.testng.annotations.AfterClass; @@ -26,7 +26,7 @@ import java.util.UUID; -import static io.prestosql.plugin.kafka.util.TestUtils.createEmptyTopicDescription; +import static io.trino.plugin.kafka.util.TestUtils.createEmptyTopicDescription; import static org.testng.Assert.assertTrue; @Test(singleThreaded = true) diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestCustomJsonDateTimeFormatter.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestCustomJsonDateTimeFormatter.java index 4165e89ca9ad..4bd3e1073b4a 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestCustomJsonDateTimeFormatter.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestCustomJsonDateTimeFormatter.java @@ -13,25 +13,25 @@ */ package io.trino.plugin.kafka.encoder.json; -import io.prestosql.plugin.kafka.encoder.json.format.JsonDateTimeFormatter; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimeWithTimeZone; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.plugin.kafka.encoder.json.format.JsonDateTimeFormatter; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimeWithTimeZone; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.CUSTOM_DATE_TIME; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.testing.DateTimeTestingUtils.sqlDateOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimeOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimeWithTimeZoneOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampWithTimeZoneOf; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.CUSTOM_DATE_TIME; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.testing.DateTimeTestingUtils.sqlDateOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimeOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimeWithTimeZoneOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampWithTimeZoneOf; +import static io.trino.testing.assertions.Assert.assertEquals; public class TestCustomJsonDateTimeFormatter { diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestISO8601JsonDateTimeFormatter.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestISO8601JsonDateTimeFormatter.java index 0e9d1caea7c5..a0a5b15f63a2 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestISO8601JsonDateTimeFormatter.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestISO8601JsonDateTimeFormatter.java @@ -13,25 +13,25 @@ */ package io.trino.plugin.kafka.encoder.json; -import io.prestosql.plugin.kafka.encoder.json.format.JsonDateTimeFormatter; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTime; -import io.prestosql.spi.type.SqlTimeWithTimeZone; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.plugin.kafka.encoder.json.format.JsonDateTimeFormatter; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTime; +import io.trino.spi.type.SqlTimeWithTimeZone; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.ISO8601; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.testing.DateTimeTestingUtils.sqlDateOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimeOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimeWithTimeZoneOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampWithTimeZoneOf; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.ISO8601; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.testing.DateTimeTestingUtils.sqlDateOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimeOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimeWithTimeZoneOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampWithTimeZoneOf; +import static io.trino.testing.assertions.Assert.assertEquals; public class TestISO8601JsonDateTimeFormatter { diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestJsonEncoder.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestJsonEncoder.java index 0186e408d5ea..378293819e6e 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestJsonEncoder.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestJsonEncoder.java @@ -15,37 +15,37 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.kafka.KafkaColumnHandle; -import io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.plugin.kafka.KafkaColumnHandle; +import io.trino.plugin.kafka.encoder.json.format.DateTimeFormat; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.testing.TestingConnectorSession; import org.assertj.core.api.ThrowableAssert; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.CUSTOM_DATE_TIME; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.ISO8601; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.MILLISECONDS_SINCE_EPOCH; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.RFC2822; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.SECONDS_SINCE_EPOCH; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.CUSTOM_DATE_TIME; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.ISO8601; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.MILLISECONDS_SINCE_EPOCH; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.RFC2822; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.SECONDS_SINCE_EPOCH; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampType.TIMESTAMP; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.util.Objects.requireNonNull; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestMillisecondsJsonDateTimeFormatter.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestMillisecondsJsonDateTimeFormatter.java index 7c866c310874..5aec346a8f4b 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestMillisecondsJsonDateTimeFormatter.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestMillisecondsJsonDateTimeFormatter.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.kafka.encoder.json; -import io.prestosql.plugin.kafka.encoder.json.format.JsonDateTimeFormatter; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.plugin.kafka.encoder.json.format.JsonDateTimeFormatter; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -24,12 +24,12 @@ import java.time.ZonedDateTime; import java.util.Optional; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.MILLISECONDS_SINCE_EPOCH; -import static io.prestosql.plugin.kafka.encoder.json.format.util.TimeConversions.scaleNanosToMillis; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimeOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.MILLISECONDS_SINCE_EPOCH; +import static io.trino.plugin.kafka.encoder.json.format.util.TimeConversions.scaleNanosToMillis; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.testing.DateTimeTestingUtils.sqlTimeOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.time.temporal.ChronoField.EPOCH_DAY; import static java.time.temporal.ChronoField.MILLI_OF_DAY; import static java.time.temporal.ChronoField.NANO_OF_DAY; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestRFC2822JsonDateTimeFormatter.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestRFC2822JsonDateTimeFormatter.java index cc2b9b890623..5f150975506b 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestRFC2822JsonDateTimeFormatter.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestRFC2822JsonDateTimeFormatter.java @@ -13,19 +13,19 @@ */ package io.trino.plugin.kafka.encoder.json; -import io.prestosql.plugin.kafka.encoder.json.format.JsonDateTimeFormatter; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.plugin.kafka.encoder.json.format.JsonDateTimeFormatter; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.RFC2822; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampWithTimeZoneOf; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.RFC2822; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampWithTimeZoneOf; +import static io.trino.testing.assertions.Assert.assertEquals; public class TestRFC2822JsonDateTimeFormatter { diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestSecondsJsonDateTimeFormatter.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestSecondsJsonDateTimeFormatter.java index 02a862f39d11..00727bfa23b6 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestSecondsJsonDateTimeFormatter.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/json/TestSecondsJsonDateTimeFormatter.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.kafka.encoder.json; -import io.prestosql.plugin.kafka.encoder.json.format.JsonDateTimeFormatter; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.plugin.kafka.encoder.json.format.JsonDateTimeFormatter; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -24,11 +24,11 @@ import java.time.ZonedDateTime; import java.util.Optional; -import static io.prestosql.plugin.kafka.encoder.json.format.DateTimeFormat.SECONDS_SINCE_EPOCH; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimeOf; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.kafka.encoder.json.format.DateTimeFormat.SECONDS_SINCE_EPOCH; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.testing.DateTimeTestingUtils.sqlTimeOf; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.time.ZoneOffset.UTC; public class TestSecondsJsonDateTimeFormatter diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/raw/TestRawEncoderMapping.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/raw/TestRawEncoderMapping.java index bbbee2ccaf38..c8a4c8f11136 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/raw/TestRawEncoderMapping.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/encoder/raw/TestRawEncoderMapping.java @@ -15,22 +15,22 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.plugin.kafka.KafkaColumnHandle; -import io.prestosql.plugin.kafka.encoder.EncoderColumnHandle; -import io.prestosql.plugin.kafka.encoder.RowEncoder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LongArrayBlockBuilder; -import io.prestosql.spi.block.VariableWidthBlockBuilder; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.plugin.kafka.KafkaColumnHandle; +import io.trino.plugin.kafka.encoder.EncoderColumnHandle; +import io.trino.plugin.kafka.encoder.RowEncoder; +import io.trino.spi.block.Block; +import io.trino.spi.block.LongArrayBlockBuilder; +import io.trino.spi.block.VariableWidthBlockBuilder; +import io.trino.testing.TestingConnectorSession; import org.testng.annotations.Test; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static org.testng.Assert.assertEquals; public class TestRawEncoderMapping diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/KafkaWithConfluentSchemaRegistryQueryRunner.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/KafkaWithConfluentSchemaRegistryQueryRunner.java index 500bfe5fb2bc..c45145eaa039 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/KafkaWithConfluentSchemaRegistryQueryRunner.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/KafkaWithConfluentSchemaRegistryQueryRunner.java @@ -15,9 +15,9 @@ import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.plugin.kafka.KafkaQueryRunnerBuilder; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.kafka.TestingKafkaWithSchemaRegistry; +import io.trino.plugin.kafka.KafkaQueryRunnerBuilder; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.kafka.TestingKafkaWithSchemaRegistry; import java.util.HashMap; import java.util.Map; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestAvroConfluentContentSchemaReader.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestAvroConfluentContentSchemaReader.java index 7dba0132b001..39df183bfea4 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestAvroConfluentContentSchemaReader.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestAvroConfluentContentSchemaReader.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import io.confluent.kafka.schemaregistry.client.MockSchemaRegistryClient; -import io.prestosql.decoder.avro.AvroRowDecoderFactory; -import io.prestosql.plugin.kafka.KafkaTableHandle; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.decoder.avro.AvroRowDecoderFactory; +import io.trino.plugin.kafka.KafkaTableHandle; +import io.trino.spi.PrestoException; +import io.trino.spi.predicate.TupleDomain; import org.apache.avro.Schema; import org.apache.avro.SchemaBuilder; import org.testng.annotations.Test; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestAvroConfluentRowDecoder.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestAvroConfluentRowDecoder.java index 3ce237fd9698..922ba823c1db 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestAvroConfluentRowDecoder.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestAvroConfluentRowDecoder.java @@ -17,12 +17,12 @@ import com.google.common.collect.ImmutableSet; import io.confluent.kafka.schemaregistry.client.MockSchemaRegistryClient; import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.decoder.avro.AvroBytesDeserializer; -import io.prestosql.decoder.avro.AvroRowDecoderFactory; -import io.prestosql.plugin.kafka.KafkaColumnHandle; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; +import io.trino.decoder.avro.AvroBytesDeserializer; +import io.trino.decoder.avro.AvroRowDecoderFactory; +import io.trino.plugin.kafka.KafkaColumnHandle; import org.apache.avro.Schema; import org.apache.avro.SchemaBuilder; import org.apache.avro.generic.GenericDatumWriter; @@ -44,11 +44,11 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.decoder.avro.AvroRowDecoderFactory.DATA_SCHEMA; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.decoder.avro.AvroRowDecoderFactory.DATA_SCHEMA; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestAvroSchemaConverter.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestAvroSchemaConverter.java index e4c48e8aa4a0..06acd92e6c84 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestAvroSchemaConverter.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestAvroSchemaConverter.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TestingTypeManager; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TestingTypeManager; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import org.apache.avro.Schema; import org.apache.avro.SchemaBuilder; import org.apache.avro.generic.GenericRecordBuilder; @@ -31,17 +31,17 @@ import java.util.Optional; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.kafka.schema.confluent.AvroSchemaConverter.DUMMY_FIELD_NAME; -import static io.prestosql.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy.ADD_DUMMY; -import static io.prestosql.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy.FAIL; -import static io.prestosql.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy.IGNORE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.kafka.schema.confluent.AvroSchemaConverter.DUMMY_FIELD_NAME; +import static io.trino.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy.ADD_DUMMY; +import static io.trino.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy.FAIL; +import static io.trino.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy.IGNORE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestConfluentSchemaRegistryConfig.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestConfluentSchemaRegistryConfig.java index d62f5ac35745..81c9bf59a82e 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestConfluentSchemaRegistryConfig.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestConfluentSchemaRegistryConfig.java @@ -22,8 +22,8 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertFullMapping; import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; -import static io.prestosql.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy.ADD_DUMMY; -import static io.prestosql.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy.IGNORE; +import static io.trino.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy.ADD_DUMMY; +import static io.trino.plugin.kafka.schema.confluent.AvroSchemaConverter.EmptyFieldStrategy.IGNORE; import static java.util.concurrent.TimeUnit.SECONDS; public class TestConfluentSchemaRegistryConfig diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestKafkaWithConfluentSchemaRegistryMinimalFunctionality.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestKafkaWithConfluentSchemaRegistryMinimalFunctionality.java index 95afa20b5482..268e194e693b 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestKafkaWithConfluentSchemaRegistryMinimalFunctionality.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/schema/confluent/TestKafkaWithConfluentSchemaRegistryMinimalFunctionality.java @@ -21,9 +21,9 @@ import io.confluent.kafka.serializers.json.KafkaJsonSchemaSerializer; import io.confluent.kafka.serializers.subject.RecordNameStrategy; import io.confluent.kafka.serializers.subject.TopicRecordNameStrategy; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.kafka.TestingKafkaWithSchemaRegistry; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; +import io.trino.testing.kafka.TestingKafkaWithSchemaRegistry; import net.jodah.failsafe.Failsafe; import net.jodah.failsafe.RetryPolicy; import org.apache.avro.Schema; @@ -42,7 +42,7 @@ import static io.airlift.units.Duration.succinctDuration; import static io.confluent.kafka.serializers.AbstractKafkaAvroSerDeConfig.VALUE_SUBJECT_NAME_STRATEGY; -import static io.prestosql.testing.assertions.Assert.assertEventually; +import static io.trino.testing.assertions.Assert.assertEventually; import static java.lang.Math.multiplyExact; import static java.lang.String.format; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/util/CodecSupplier.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/util/CodecSupplier.java index ee404fc13ba2..21ed12411708 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/util/CodecSupplier.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/util/CodecSupplier.java @@ -19,9 +19,9 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; import java.util.function.Supplier; diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/util/TestUtils.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/util/TestUtils.java index 2447d1b80528..9bac9a3f6550 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/util/TestUtils.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/util/TestUtils.java @@ -15,8 +15,8 @@ import com.google.common.io.ByteStreams; import io.airlift.json.JsonCodec; -import io.prestosql.plugin.kafka.KafkaTopicDescription; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.kafka.KafkaTopicDescription; +import io.trino.spi.connector.SchemaTableName; import java.io.IOException; import java.util.AbstractMap; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisColumnHandle.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisColumnHandle.java index e01e863b7323..34a541cf7eb4 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisColumnHandle.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisColumnHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import javax.annotation.Nullable; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisConnector.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisConnector.java index 5a8023492327..00d700a3df7f 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisConnector.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisConnector.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import java.util.List; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; public class KinesisConnector diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisConnectorFactory.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisConnectorFactory.java index 162ed1b9d1e4..6b88966e0061 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisConnectorFactory.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisConnectorFactory.java @@ -18,13 +18,13 @@ import com.google.inject.TypeLiteral; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.TypeManager; import java.util.Map; import java.util.function.Supplier; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisErrorCode.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisErrorCode.java index 5d1a58dcb92e..a53fa7a0c91b 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisErrorCode.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisErrorCode.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.kinesis; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; -import static io.prestosql.spi.ErrorType.INTERNAL_ERROR; +import static io.trino.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.INTERNAL_ERROR; /** * Kinesis connector specific error codes. diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisHandleResolver.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisHandleResolver.java index db2a1690bce9..9d7c2c683e72 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisHandleResolver.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.kinesis; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import javax.inject.Inject; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisInternalFieldDescription.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisInternalFieldDescription.java index c5041952dc34..d8ea1a96ff16 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisInternalFieldDescription.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisInternalFieldDescription.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.kinesis; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.util.Map; import java.util.Optional; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisMetadata.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisMetadata.java index b5b4a907310e..60b08ec5467a 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisMetadata.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisMetadata.java @@ -16,17 +16,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.inject.Inject; -import io.prestosql.decoder.dummy.DummyRowDecoder; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.TableNotFoundException; +import io.trino.decoder.dummy.DummyRowDecoder; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.TableNotFoundException; import java.util.List; import java.util.Map; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisModule.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisModule.java index 0062062be870..14c675ba4c47 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisModule.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisModule.java @@ -19,11 +19,11 @@ import com.google.inject.Module; import com.google.inject.Scopes; import com.google.inject.multibindings.Multibinder; -import io.prestosql.decoder.DecoderModule; -import io.prestosql.plugin.kinesis.s3config.S3TableConfigClient; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.decoder.DecoderModule; +import io.trino.plugin.kinesis.s3config.S3TableConfigClient; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisPlugin.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisPlugin.java index ca73936f2017..b137175f0d51 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisPlugin.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.kinesis; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class KinesisPlugin implements Plugin diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisRecordSet.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisRecordSet.java index 981d775d490e..b7552442b98f 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisRecordSet.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisRecordSet.java @@ -24,15 +24,15 @@ import io.airlift.log.Logger; import io.airlift.slice.Slice; import io.airlift.units.Duration; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.nio.ByteBuffer; import java.util.Date; @@ -44,17 +44,17 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.decoder.FieldValueProviders.booleanValueProvider; -import static io.prestosql.decoder.FieldValueProviders.bytesValueProvider; -import static io.prestosql.decoder.FieldValueProviders.longValueProvider; -import static io.prestosql.plugin.kinesis.KinesisSessionProperties.getBatchSize; -import static io.prestosql.plugin.kinesis.KinesisSessionProperties.getCheckpointLogicalName; -import static io.prestosql.plugin.kinesis.KinesisSessionProperties.getIterationNumber; -import static io.prestosql.plugin.kinesis.KinesisSessionProperties.getIteratorOffsetSeconds; -import static io.prestosql.plugin.kinesis.KinesisSessionProperties.getIteratorStartTimestamp; -import static io.prestosql.plugin.kinesis.KinesisSessionProperties.getMaxBatches; -import static io.prestosql.plugin.kinesis.KinesisSessionProperties.isCheckpointEnabled; -import static io.prestosql.plugin.kinesis.KinesisSessionProperties.isIteratorFromTimestamp; +import static io.trino.decoder.FieldValueProviders.booleanValueProvider; +import static io.trino.decoder.FieldValueProviders.bytesValueProvider; +import static io.trino.decoder.FieldValueProviders.longValueProvider; +import static io.trino.plugin.kinesis.KinesisSessionProperties.getBatchSize; +import static io.trino.plugin.kinesis.KinesisSessionProperties.getCheckpointLogicalName; +import static io.trino.plugin.kinesis.KinesisSessionProperties.getIterationNumber; +import static io.trino.plugin.kinesis.KinesisSessionProperties.getIteratorOffsetSeconds; +import static io.trino.plugin.kinesis.KinesisSessionProperties.getIteratorStartTimestamp; +import static io.trino.plugin.kinesis.KinesisSessionProperties.getMaxBatches; +import static io.trino.plugin.kinesis.KinesisSessionProperties.isCheckpointEnabled; +import static io.trino.plugin.kinesis.KinesisSessionProperties.isIteratorFromTimestamp; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisRecordSetProvider.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisRecordSetProvider.java index 2bbe0b89718e..e92c7ef7692c 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisRecordSetProvider.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisRecordSetProvider.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import io.prestosql.decoder.DispatchingRowDecoderFactory; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.decoder.DispatchingRowDecoderFactory; +import io.trino.decoder.RowDecoder; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import java.util.HashMap; import java.util.List; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisSessionProperties.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisSessionProperties.java index b2522175892a..2dda6cb853c2 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisSessionProperties.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisSessionProperties.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import java.text.ParsePosition; import java.text.SimpleDateFormat; @@ -24,9 +24,9 @@ import java.util.List; import java.util.TimeZone; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; public final class KinesisSessionProperties { diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisSplit.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisSplit.java index cb99a6b00515..6c73e9832ed1 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisSplit.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisSplitManager.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisSplitManager.java index 9fef64fcdfab..29334d2521d9 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisSplitManager.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisSplitManager.java @@ -20,14 +20,14 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; import io.airlift.units.Duration; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import java.util.ArrayList; import java.util.Collections; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisStreamFieldDescription.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisStreamFieldDescription.java index 6788419b715d..7d5649b5251e 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisStreamFieldDescription.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisStreamFieldDescription.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisTableDescriptionSupplier.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisTableDescriptionSupplier.java index daf7ae256371..57680faeb269 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisTableDescriptionSupplier.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisTableDescriptionSupplier.java @@ -18,9 +18,9 @@ import com.google.inject.Inject; import io.airlift.json.JsonCodec; import io.airlift.log.Logger; -import io.prestosql.plugin.kinesis.s3config.S3TableConfigClient; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.kinesis.s3config.S3TableConfigClient; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaTableName; import javax.annotation.PreDestroy; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisTableHandle.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisTableHandle.java index 95ba52d92ae5..82a9f5cdecd1 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisTableHandle.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisTableHandle.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; import java.util.Objects; diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisTransactionHandle.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisTransactionHandle.java index fe4ca2b481d5..528ee8e8a3ba 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisTransactionHandle.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/KinesisTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kinesis; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum KinesisTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/s3config/S3TableConfigClient.java b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/s3config/S3TableConfigClient.java index f29a2ff938f2..f91769ed6740 100644 --- a/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/s3config/S3TableConfigClient.java +++ b/plugin/trino-kinesis/src/main/java/io/trino/plugin/kinesis/s3config/S3TableConfigClient.java @@ -26,10 +26,10 @@ import com.google.inject.Inject; import io.airlift.json.JsonCodec; import io.airlift.log.Logger; -import io.prestosql.plugin.kinesis.KinesisClientProvider; -import io.prestosql.plugin.kinesis.KinesisConfig; -import io.prestosql.plugin.kinesis.KinesisStreamDescription; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.kinesis.KinesisClientProvider; +import io.trino.plugin.kinesis.KinesisConfig; +import io.trino.plugin.kinesis.KinesisStreamDescription; +import io.trino.spi.connector.SchemaTableName; import javax.annotation.PostConstruct; diff --git a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisPlugin.java b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisPlugin.java index 122f6125b404..fd8256927c3a 100644 --- a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisPlugin.java +++ b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisPlugin.java @@ -14,16 +14,16 @@ package io.trino.plugin.kinesis; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.kinesis.util.TestUtils; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.plugin.kinesis.util.TestUtils; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisTableDescriptionSupplier.java b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisTableDescriptionSupplier.java index 674604ef2b02..1c53854b2a76 100644 --- a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisTableDescriptionSupplier.java +++ b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisTableDescriptionSupplier.java @@ -14,21 +14,21 @@ package io.trino.plugin.kinesis; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.kinesis.util.KinesisTestClientManager; -import io.prestosql.plugin.kinesis.util.MockKinesisClient; -import io.prestosql.plugin.kinesis.util.TestUtils; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.kinesis.util.KinesisTestClientManager; +import io.trino.plugin.kinesis.util.MockKinesisClient; +import io.trino.plugin.kinesis.util.TestUtils; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SchemaTableName; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.List; import java.util.Map; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestMinimalFunctionality.java b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestMinimalFunctionality.java index 9c709207abdd..f3fde7a124c0 100644 --- a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestMinimalFunctionality.java +++ b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestMinimalFunctionality.java @@ -15,18 +15,18 @@ import com.amazonaws.services.kinesis.model.PutRecordsRequest; import com.amazonaws.services.kinesis.model.PutRecordsRequestEntry; -import io.prestosql.Session; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.kinesis.util.EmbeddedKinesisStream; -import io.prestosql.plugin.kinesis.util.TestUtils; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.type.BigintType; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.StandaloneQueryRunner; +import io.trino.Session; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.SessionPropertyManager; +import io.trino.metadata.TableHandle; +import io.trino.plugin.kinesis.util.EmbeddedKinesisStream; +import io.trino.plugin.kinesis.util.TestUtils; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.QueryId; +import io.trino.spi.security.Identity; +import io.trino.spi.type.BigintType; +import io.trino.testing.MaterializedResult; +import io.trino.testing.StandaloneQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; @@ -45,9 +45,9 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.testing.assertions.Assert.assertEquals; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.testing.assertions.Assert.assertEquals; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Locale.ENGLISH; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestRecordAccess.java b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestRecordAccess.java index cc1766ae7800..3f649ef47dc7 100644 --- a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestRecordAccess.java +++ b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestRecordAccess.java @@ -16,17 +16,17 @@ import com.amazonaws.services.kinesis.model.PutRecordsRequest; import com.amazonaws.services.kinesis.model.PutRecordsRequestEntry; import io.airlift.log.Logger; -import io.prestosql.Session; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.kinesis.util.MockKinesisClient; -import io.prestosql.plugin.kinesis.util.TestUtils; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.StandaloneQueryRunner; +import io.trino.Session; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.kinesis.util.MockKinesisClient; +import io.trino.plugin.kinesis.util.TestUtils; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.Type; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.StandaloneQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -37,8 +37,8 @@ import java.util.Optional; import java.util.UUID; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestingKinesisConnectorFactory.java b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestingKinesisConnectorFactory.java index 320bfe660b68..8d9f5792704d 100644 --- a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestingKinesisConnectorFactory.java +++ b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestingKinesisConnectorFactory.java @@ -18,11 +18,11 @@ import com.google.inject.TypeLiteral; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.TypeManager; import java.util.Map; import java.util.function.Supplier; diff --git a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/s3config/TestS3TableConfigClient.java b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/s3config/TestS3TableConfigClient.java index f3dc9ad8ac0d..e7979d357817 100644 --- a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/s3config/TestS3TableConfigClient.java +++ b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/s3config/TestS3TableConfigClient.java @@ -16,20 +16,20 @@ import com.amazonaws.services.s3.AmazonS3URI; import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; -import io.prestosql.plugin.kinesis.KinesisConnector; -import io.prestosql.plugin.kinesis.KinesisMetadata; -import io.prestosql.plugin.kinesis.KinesisPlugin; -import io.prestosql.plugin.kinesis.KinesisTableHandle; -import io.prestosql.plugin.kinesis.util.TestUtils; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.kinesis.KinesisConnector; +import io.trino.plugin.kinesis.KinesisMetadata; +import io.trino.plugin.kinesis.KinesisPlugin; +import io.trino.plugin.kinesis.KinesisTableHandle; +import io.trino.plugin.kinesis.util.TestUtils; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SchemaTableName; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import java.util.Map; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/util/KinesisTestClientManager.java b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/util/KinesisTestClientManager.java index 1ce48e9c9da0..4ad4d4c1520a 100644 --- a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/util/KinesisTestClientManager.java +++ b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/util/KinesisTestClientManager.java @@ -16,7 +16,7 @@ import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient; import com.amazonaws.services.kinesis.AmazonKinesisClient; import com.amazonaws.services.s3.AmazonS3Client; -import io.prestosql.plugin.kinesis.KinesisClientProvider; +import io.trino.plugin.kinesis.KinesisClientProvider; /** * Test implementation of KinesisClientProvider that incorporates a mock Kinesis client. diff --git a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/util/TestUtils.java b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/util/TestUtils.java index d0842331b839..98265fca5c17 100644 --- a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/util/TestUtils.java +++ b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/util/TestUtils.java @@ -14,14 +14,14 @@ package io.trino.plugin.kinesis.util; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.kinesis.KinesisConnector; -import io.prestosql.plugin.kinesis.KinesisConnectorFactory; -import io.prestosql.plugin.kinesis.KinesisPlugin; -import io.prestosql.plugin.kinesis.TestingKinesisConnectorFactory; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.plugin.kinesis.KinesisConnector; +import io.trino.plugin.kinesis.KinesisConnectorFactory; +import io.trino.plugin.kinesis.KinesisPlugin; +import io.trino.plugin.kinesis.TestingKinesisConnectorFactory; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.QueryRunner; +import io.trino.testing.TestingConnectorContext; import java.util.Map; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduBucketFunction.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduBucketFunction.java index a0221ce56631..490551b62dd5 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduBucketFunction.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduBucketFunction.java @@ -16,10 +16,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.type.Type; import org.apache.kudu.Schema; import org.apache.kudu.client.KeyEncoderAccessor; import org.apache.kudu.client.KuduTable; @@ -31,13 +31,13 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduBucketedSplitSource.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduBucketedSplitSource.java index 3ee25c7f5f79..44c4cb753bf5 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduBucketedSplitSource.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduBucketedSplitSource.java @@ -14,8 +14,8 @@ package io.trino.plugin.kudu; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorSplitSource; import java.util.List; import java.util.Map; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduClientSession.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduClientSession.java index 861b37c154d4..dc9417c60642 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduClientSession.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduClientSession.java @@ -15,31 +15,31 @@ import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; -import io.prestosql.plugin.kudu.properties.ColumnDesign; -import io.prestosql.plugin.kudu.properties.HashPartitionDefinition; -import io.prestosql.plugin.kudu.properties.KuduTableProperties; -import io.prestosql.plugin.kudu.properties.PartitionDesign; -import io.prestosql.plugin.kudu.properties.RangePartition; -import io.prestosql.plugin.kudu.properties.RangePartitionDefinition; -import io.prestosql.plugin.kudu.schema.SchemaEmulation; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.DiscreteValues; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.EquatableValueSet; -import io.prestosql.spi.predicate.Marker; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.Ranges; -import io.prestosql.spi.predicate.SortedRangeSet; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.DecimalType; +import io.trino.plugin.kudu.properties.ColumnDesign; +import io.trino.plugin.kudu.properties.HashPartitionDefinition; +import io.trino.plugin.kudu.properties.KuduTableProperties; +import io.trino.plugin.kudu.properties.PartitionDesign; +import io.trino.plugin.kudu.properties.RangePartition; +import io.trino.plugin.kudu.properties.RangePartitionDefinition; +import io.trino.plugin.kudu.schema.SchemaEmulation; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.DiscreteValues; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.EquatableValueSet; +import io.trino.spi.predicate.Marker; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.Ranges; +import io.trino.spi.predicate.SortedRangeSet; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.DecimalType; import org.apache.kudu.ColumnSchema; import org.apache.kudu.ColumnTypeAttributes; import org.apache.kudu.Schema; @@ -66,10 +66,10 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.QUERY_REJECTED; -import static io.prestosql.spi.predicate.Marker.Bound.ABOVE; -import static io.prestosql.spi.predicate.Marker.Bound.BELOW; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.QUERY_REJECTED; +import static io.trino.spi.predicate.Marker.Bound.ABOVE; +import static io.trino.spi.predicate.Marker.Bound.BELOW; import static java.util.stream.Collectors.toList; import static org.apache.kudu.client.KuduPredicate.ComparisonOp.GREATER; import static org.apache.kudu.client.KuduPredicate.ComparisonOp.GREATER_EQUAL; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduColumnHandle.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduColumnHandle.java index 362d72b2fdbf..35c1f639c936 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduColumnHandle.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduColumnHandle.java @@ -15,10 +15,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; import java.util.Objects; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduConnector.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduConnector.java index 3f8941443b5c..188d56337e2f 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduConnector.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduConnector.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableSet; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.plugin.kudu.properties.KuduTableProperties; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.plugin.kudu.properties.KuduTableProperties; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; import java.util.List; import java.util.Set; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; public class KuduConnector diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduConnectorFactory.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduConnectorFactory.java index 39c57a6ad058..a37bcf00daeb 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduConnectorFactory.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduConnectorFactory.java @@ -16,10 +16,10 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import java.util.Map; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduHandleResolver.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduHandleResolver.java index 3938c4098f8c..d0a040a4fa48 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduHandleResolver.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduHandleResolver.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.kudu; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class KuduHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduInsertTableHandle.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduInsertTableHandle.java index 5f5ba73ea752..550dc0bfd735 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduInsertTableHandle.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduInsertTableHandle.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Type; import org.apache.kudu.client.KuduTable; import java.util.List; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduMetadata.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduMetadata.java index fcc36c1994c6..f7abb5f6aa69 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduMetadata.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduMetadata.java @@ -17,38 +17,38 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.plugin.kudu.properties.KuduTableProperties; -import io.prestosql.plugin.kudu.properties.PartitionDesign; -import io.prestosql.plugin.kudu.schema.KuduRangePartition; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.Assignment; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTablePartitioning; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.LimitApplicationResult; -import io.prestosql.spi.connector.LocalProperty; -import io.prestosql.spi.connector.NotFoundException; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.kudu.properties.KuduTableProperties; +import io.trino.plugin.kudu.properties.PartitionDesign; +import io.trino.plugin.kudu.schema.KuduRangePartition; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.Assignment; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTablePartitioning; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.LimitApplicationResult; +import io.trino.spi.connector.LocalProperty; +import io.trino.spi.connector.NotFoundException; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.kudu.ColumnSchema; import org.apache.kudu.Schema; import org.apache.kudu.client.KuduTable; @@ -70,8 +70,8 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.kudu.KuduSessionProperties.isKuduGroupedExecutionEnabled; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.plugin.kudu.KuduSessionProperties.isKuduGroupedExecutionEnabled; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.util.Objects.requireNonNull; public class KuduMetadata diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduModule.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduModule.java index 81b3dfbbd16c..0b9022023879 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduModule.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduModule.java @@ -18,19 +18,19 @@ import com.google.inject.Scopes; import com.google.inject.multibindings.Multibinder; import com.google.inject.multibindings.ProvidesIntoSet; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeNodePartitioningProvider; -import io.prestosql.plugin.base.classloader.ForClassLoaderSafe; -import io.prestosql.plugin.kudu.procedures.RangePartitionProcedures; -import io.prestosql.plugin.kudu.properties.KuduTableProperties; -import io.prestosql.plugin.kudu.schema.NoSchemaEmulation; -import io.prestosql.plugin.kudu.schema.SchemaEmulation; -import io.prestosql.plugin.kudu.schema.SchemaEmulationByTableNameConvention; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.classloader.ClassLoaderSafeNodePartitioningProvider; +import io.trino.plugin.base.classloader.ForClassLoaderSafe; +import io.trino.plugin.kudu.procedures.RangePartitionProcedures; +import io.trino.plugin.kudu.properties.KuduTableProperties; +import io.trino.plugin.kudu.schema.NoSchemaEmulation; +import io.trino.plugin.kudu.schema.SchemaEmulation; +import io.trino.plugin.kudu.schema.SchemaEmulationByTableNameConvention; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.type.TypeManager; import org.apache.kudu.client.KuduClient; import javax.inject.Singleton; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduNodePartitioningProvider.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduNodePartitioningProvider.java index 05c08a25f85d..37e8d98c6e0c 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduNodePartitioningProvider.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduNodePartitioningProvider.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.kudu; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.connector.ConnectorBucketNodeMap; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.connector.ConnectorBucketNodeMap; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Type; import javax.inject.Inject; @@ -31,7 +31,7 @@ import java.util.stream.IntStream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.connector.ConnectorBucketNodeMap.createBucketNodeMap; +import static io.trino.spi.connector.ConnectorBucketNodeMap.createBucketNodeMap; import static java.util.Objects.requireNonNull; public class KuduNodePartitioningProvider diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduOutputTableHandle.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduOutputTableHandle.java index 5f5c0aebfcba..49f659c4c5c3 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduOutputTableHandle.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduOutputTableHandle.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Type; import org.apache.kudu.client.KuduTable; import java.util.List; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPageSink.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPageSink.java index 7a4e4c3170b9..47c4f39839a8 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPageSink.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPageSink.java @@ -17,15 +17,15 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlDecimal; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlDecimal; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.kudu.client.KuduException; import org.apache.kudu.client.KuduSession; import org.apache.kudu.client.KuduTable; @@ -43,17 +43,17 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.truncateEpochMicrosToMillis; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.truncateEpochMicrosToMillis; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; import static java.lang.String.format; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPageSinkProvider.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPageSinkProvider.java index 1b616cde8e96..eff964c67a78 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPageSinkProvider.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPageSinkProvider.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.kudu; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import javax.inject.Inject; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPageSourceProvider.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPageSourceProvider.java index 95d103d75d44..d3571cafad3c 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPageSourceProvider.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPageSourceProvider.java @@ -14,15 +14,15 @@ package io.trino.plugin.kudu; import com.google.inject.Inject; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.predicate.TupleDomain; import java.util.List; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPartitionHandle.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPartitionHandle.java index 742163d4c199..8f9ec545e346 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPartitionHandle.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPartitionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kudu; -import io.prestosql.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorPartitionHandle; import java.util.Objects; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPartitioningHandle.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPartitioningHandle.java index f73c3a5c4203..0f69edbe7148 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPartitioningHandle.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPartitioningHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.plugin.kudu.schema.KuduRangePartition; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.type.Type; +import io.trino.plugin.kudu.schema.KuduRangePartition; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.type.Type; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPlugin.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPlugin.java index dc87eda70329..b6e4ccfd8480 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPlugin.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.kudu; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class KuduPlugin implements Plugin diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduRecordCursor.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduRecordCursor.java index 9255dbc245ef..3696547c2c5f 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduRecordCursor.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduRecordCursor.java @@ -18,9 +18,9 @@ import io.airlift.log.Logger; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.Type; import org.apache.kudu.client.KeyEncoderAccessor; import org.apache.kudu.client.KuduException; import org.apache.kudu.client.KuduScanner; @@ -33,8 +33,8 @@ import java.util.List; import java.util.Map; -import static io.prestosql.plugin.kudu.KuduColumnHandle.ROW_ID_POSITION; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.plugin.kudu.KuduColumnHandle.ROW_ID_POSITION; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.util.Objects.requireNonNull; public class KuduRecordCursor diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduRecordSet.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduRecordSet.java index 11fa57757f11..a2241f96437c 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduRecordSet.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduRecordSet.java @@ -14,10 +14,10 @@ package io.trino.plugin.kudu; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import org.apache.kudu.Schema; import org.apache.kudu.client.KuduScanner; import org.apache.kudu.client.KuduTable; @@ -25,7 +25,7 @@ import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.kudu.KuduColumnHandle.ROW_ID_POSITION; +import static io.trino.plugin.kudu.KuduColumnHandle.ROW_ID_POSITION; public class KuduRecordSet implements RecordSet diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduRecordSetProvider.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduRecordSetProvider.java index a0f7986e33b9..27e545e76e69 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduRecordSetProvider.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduRecordSetProvider.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.kudu; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import javax.inject.Inject; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduSessionProperties.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduSessionProperties.java index c8aeabbf1115..4a84e79a6bde 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduSessionProperties.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduSessionProperties.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.Duration; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; import java.util.List; -import static io.prestosql.plugin.base.session.PropertyMetadataUtil.durationProperty; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.plugin.base.session.PropertyMetadataUtil.durationProperty; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; public final class KuduSessionProperties { diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduSplit.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduSplit.java index bb5304613450..5e2c73fec2b7 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduSplit.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduSplitManager.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduSplitManager.java index 3f32e5264c9d..9f273fa3d590 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduSplitManager.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduSplitManager.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.kudu; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import javax.inject.Inject; @@ -28,8 +28,8 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; -import static io.prestosql.plugin.kudu.KuduSessionProperties.getDynamicFilteringWaitTimeout; -import static io.prestosql.spi.connector.DynamicFilter.NOT_BLOCKED; +import static io.trino.plugin.kudu.KuduSessionProperties.getDynamicFilteringWaitTimeout; +import static io.trino.spi.connector.DynamicFilter.NOT_BLOCKED; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduTableHandle.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduTableHandle.java index 7120bda773f2..3feb5ee3608b 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduTableHandle.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduTableHandle.java @@ -15,10 +15,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import org.apache.kudu.client.KuduTable; import java.util.List; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduTableMapping.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduTableMapping.java index 45e252f04154..252aed5665bb 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduTableMapping.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduTableMapping.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kudu; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduTransactionHandle.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduTransactionHandle.java index d6afdbad5fa8..a30bb5ec7ade 100755 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduTransactionHandle.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kudu; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum KuduTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduUpdatablePageSource.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduUpdatablePageSource.java index fb546214fdbc..e761e794f72d 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduUpdatablePageSource.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/KuduUpdatablePageSource.java @@ -14,10 +14,10 @@ package io.trino.plugin.kudu; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.connector.UpdatablePageSource; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.connector.UpdatablePageSource; import org.apache.kudu.Schema; import org.apache.kudu.client.Delete; import org.apache.kudu.client.KeyEncoderAccessor; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/TypeHelper.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/TypeHelper.java index d1f1cc8d8a8c..da953511bb87 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/TypeHelper.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/TypeHelper.java @@ -15,21 +15,21 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.kudu.ColumnSchema; import org.apache.kudu.ColumnTypeAttributes; import org.apache.kudu.client.RowResult; @@ -37,10 +37,10 @@ import java.math.BigDecimal; import java.math.BigInteger; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.Decimals.decodeUnscaledValue; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.truncateEpochMicrosToMillis; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.Decimals.decodeUnscaledValue; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.truncateEpochMicrosToMillis; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/procedures/RangePartitionProcedures.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/procedures/RangePartitionProcedures.java index 4af13f1f5170..171c49e9c139 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/procedures/RangePartitionProcedures.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/procedures/RangePartitionProcedures.java @@ -14,19 +14,19 @@ package io.trino.plugin.kudu.procedures; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.kudu.KuduClientSession; -import io.prestosql.plugin.kudu.properties.KuduTableProperties; -import io.prestosql.plugin.kudu.properties.RangePartition; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.procedure.Procedure.Argument; +import io.trino.plugin.kudu.KuduClientSession; +import io.trino.plugin.kudu.properties.KuduTableProperties; +import io.trino.plugin.kudu.properties.RangePartition; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.procedure.Procedure.Argument; import javax.inject.Inject; import java.lang.invoke.MethodHandle; -import static io.prestosql.spi.block.MethodHandleUtil.methodHandle; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.block.MethodHandleUtil.methodHandle; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Objects.requireNonNull; public class RangePartitionProcedures diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/properties/KuduTableProperties.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/properties/KuduTableProperties.java index f8656b47c3d0..fb571028e865 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/properties/KuduTableProperties.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/properties/KuduTableProperties.java @@ -17,9 +17,9 @@ import com.google.common.base.Predicates; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterators; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.ArrayType; +import io.trino.spi.PrestoException; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.ArrayType; import org.apache.kudu.ColumnSchema; import org.apache.kudu.Schema; import org.apache.kudu.Type; @@ -48,11 +48,11 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.GENERIC_USER_ERROR; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.StandardErrorCode.GENERIC_USER_ERROR; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/NoSchemaEmulation.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/NoSchemaEmulation.java index 1b62b6a6eac1..e9051883337e 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/NoSchemaEmulation.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/NoSchemaEmulation.java @@ -14,15 +14,15 @@ package io.trino.plugin.kudu.schema; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; import org.apache.kudu.client.KuduClient; import java.util.List; -import static io.prestosql.plugin.kudu.KuduClientSession.DEFAULT_SCHEMA; -import static io.prestosql.spi.StandardErrorCode.GENERIC_USER_ERROR; +import static io.trino.plugin.kudu.KuduClientSession.DEFAULT_SCHEMA; +import static io.trino.spi.StandardErrorCode.GENERIC_USER_ERROR; public class NoSchemaEmulation implements SchemaEmulation diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/SchemaAlreadyExistsException.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/SchemaAlreadyExistsException.java index 7dcdf0d3a89a..03f507b230da 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/SchemaAlreadyExistsException.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/SchemaAlreadyExistsException.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.kudu.schema; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; import static java.lang.String.format; public class SchemaAlreadyExistsException diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/SchemaEmulation.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/SchemaEmulation.java index 0b55295166f7..6d1cd2d39394 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/SchemaEmulation.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/SchemaEmulation.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kudu.schema; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import org.apache.kudu.client.KuduClient; import java.util.List; diff --git a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/SchemaEmulationByTableNameConvention.java b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/SchemaEmulationByTableNameConvention.java index 5b39c499c2db..175dfc64c42a 100644 --- a/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/SchemaEmulationByTableNameConvention.java +++ b/plugin/trino-kudu/src/main/java/io/trino/plugin/kudu/schema/SchemaEmulationByTableNameConvention.java @@ -14,9 +14,9 @@ package io.trino.plugin.kudu.schema; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; import org.apache.kudu.ColumnSchema; import org.apache.kudu.Schema; import org.apache.kudu.Type; @@ -38,9 +38,9 @@ import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.kudu.KuduClientSession.DEFAULT_SCHEMA; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.GENERIC_USER_ERROR; +import static io.trino.plugin.kudu.KuduClientSession.DEFAULT_SCHEMA; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.GENERIC_USER_ERROR; public class SchemaEmulationByTableNameConvention implements SchemaEmulation diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/AbstractKuduIntegrationSmokeTest.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/AbstractKuduIntegrationSmokeTest.java index d7f573b56aaa..42e070e9866e 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/AbstractKuduIntegrationSmokeTest.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/AbstractKuduIntegrationSmokeTest.java @@ -13,20 +13,20 @@ */ package io.trino.plugin.kudu; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; import java.util.Optional; import java.util.regex.Pattern; -import static io.prestosql.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunnerTpch; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunnerTpch; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.NATION; import static io.trino.tpch.TpchTable.ORDERS; diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/KuduQueryRunnerFactory.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/KuduQueryRunnerFactory.java index 959f09801dbc..a63dcbdd4ad2 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/KuduQueryRunnerFactory.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/KuduQueryRunnerFactory.java @@ -16,20 +16,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.net.HostAndPort; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import java.util.Map; import java.util.Optional; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.Session.SessionBuilder; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.Session.SessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class KuduQueryRunnerFactory { diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduDistributedQueries.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduDistributedQueries.java index e67a02890547..6ff5128c0d5b 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduDistributedQueries.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduDistributedQueries.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.kudu; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.TestTable; import io.trino.tpch.TpchTable; import org.testng.SkipException; import org.testng.annotations.AfterClass; @@ -24,10 +24,10 @@ import java.util.Optional; -import static io.prestosql.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunnerTpch; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunnerTpch; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; public class TestKuduDistributedQueries extends AbstractTestDistributedQueries diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationDecimalColumns.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationDecimalColumns.java index 3b078ca07711..7e6aac117d06 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationDecimalColumns.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationDecimalColumns.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.kudu; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; -import static io.prestosql.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunner; +import static io.trino.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunner; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; 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 42f685703ddf..24cecaba67b4 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 @@ -15,27 +15,27 @@ import com.google.common.collect.ImmutableMap; import com.google.common.primitives.Ints; -import io.prestosql.Session; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.QueryStats; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.Split; -import io.prestosql.metadata.TableHandle; -import io.prestosql.operator.OperatorStats; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.split.SplitSource; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.ResultWithQueryId; -import io.prestosql.transaction.TransactionId; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.execution.Lifespan; +import io.trino.execution.QueryStats; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.Split; +import io.trino.metadata.TableHandle; +import io.trino.operator.OperatorStats; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.predicate.TupleDomain; +import io.trino.split.SplitSource; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.testing.ResultWithQueryId; import io.trino.tpch.TpchTable; +import io.trino.transaction.TransactionId; +import io.trino.transaction.TransactionManager; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -47,13 +47,13 @@ import java.util.concurrent.TimeUnit; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunnerTpch; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.prestosql.sql.analyzer.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.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-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationGroupedExecution.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationGroupedExecution.java index 87635666c627..a7a11245c22d 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationGroupedExecution.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationGroupedExecution.java @@ -13,27 +13,27 @@ */ package io.trino.plugin.kudu; -import io.prestosql.Session; -import io.prestosql.cost.StatsAndCosts; -import io.prestosql.metadata.Metadata; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.cost.StatsAndCosts; +import io.trino.metadata.Metadata; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; import java.util.function.Consumer; -import static io.prestosql.SystemSessionProperties.COLOCATED_JOIN; -import static io.prestosql.SystemSessionProperties.CONCURRENT_LIFESPANS_PER_NODE; -import static io.prestosql.SystemSessionProperties.DYNAMIC_SCHEDULE_FOR_GROUPED_EXECUTION; -import static io.prestosql.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; -import static io.prestosql.SystemSessionProperties.GROUPED_EXECUTION; -import static io.prestosql.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunner; -import static io.prestosql.plugin.kudu.KuduQueryRunnerFactory.createSession; -import static io.prestosql.sql.planner.optimizations.PlanNodeSearcher.searchFrom; -import static io.prestosql.sql.planner.planprinter.PlanPrinter.textLogicalPlan; +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; +import static io.trino.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; +import static io.trino.SystemSessionProperties.GROUPED_EXECUTION; +import static io.trino.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunner; +import static io.trino.plugin.kudu.KuduQueryRunnerFactory.createSession; +import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; +import static io.trino.sql.planner.planprinter.PlanPrinter.textLogicalPlan; import static java.lang.String.format; public class TestKuduIntegrationGroupedExecution diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationHashPartitioning.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationHashPartitioning.java index 7249fdadb1d7..71aebc8bf3de 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationHashPartitioning.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationHashPartitioning.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.kudu; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; -import static io.prestosql.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunner; +import static io.trino.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunner; import static org.testng.Assert.assertEquals; public class TestKuduIntegrationHashPartitioning diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationIntegerColumns.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationIntegerColumns.java index 25229afdaf1b..81e3a25c0302 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationIntegerColumns.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationIntegerColumns.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.kudu; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; -import static io.prestosql.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunner; +import static io.trino.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunner; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationRangePartitioning.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationRangePartitioning.java index 9fcfd1e4c288..04dcbada496b 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationRangePartitioning.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationRangePartitioning.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.kudu; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; -import static io.prestosql.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunner; +import static io.trino.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunner; import static java.lang.String.join; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationSchemaNotExisting.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationSchemaNotExisting.java index 028df9354757..d7efe317f048 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationSchemaNotExisting.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationSchemaNotExisting.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.kudu; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; -import static io.prestosql.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunner; +import static io.trino.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunner; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduPlugin.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduPlugin.java index e1d1d6656e8e..387b29b1c216 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduPlugin.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduPlugin.java @@ -14,9 +14,9 @@ package io.trino.plugin.kudu; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/schema/TestSchemaEmulation.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/schema/TestSchemaEmulation.java index 58e921341c2f..612d267e2bdf 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/schema/TestSchemaEmulation.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/schema/TestSchemaEmulation.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.kudu.schema; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/DataLocation.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/DataLocation.java index 603f090c93f8..49f286ea3b4b 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/DataLocation.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/DataLocation.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.io.File; import java.io.IOException; @@ -28,8 +28,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.localfile.LocalFileErrorCode.LOCAL_FILE_FILESYSTEM_ERROR; -import static io.prestosql.plugin.localfile.LocalFileErrorCode.LOCAL_FILE_NO_FILES; +import static io.trino.plugin.localfile.LocalFileErrorCode.LOCAL_FILE_FILESYSTEM_ERROR; +import static io.trino.plugin.localfile.LocalFileErrorCode.LOCAL_FILE_NO_FILES; import static java.nio.file.Files.newDirectoryStream; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileColumnHandle.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileColumnHandle.java index 705aea0b683e..c67157c7d37c 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileColumnHandle.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileColumnHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileConnector.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileConnector.java index 74e3cf406547..62feb6a0306a 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileConnector.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileConnector.java @@ -14,17 +14,17 @@ package io.trino.plugin.localfile; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; public class LocalFileConnector diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileConnectorFactory.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileConnectorFactory.java index cf40e85c60bd..12bdc7747d75 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileConnectorFactory.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileConnectorFactory.java @@ -15,11 +15,11 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import java.util.Map; diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileErrorCode.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileErrorCode.java index 6919fb822261..e1cc5e4633c3 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileErrorCode.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileErrorCode.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.localfile; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.EXTERNAL; public enum LocalFileErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileHandleResolver.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileHandleResolver.java index cf2f81a50bc8..157c5055d7f1 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileHandleResolver.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.localfile; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class LocalFileHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileMetadata.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileMetadata.java index 3896fe377c01..8fb6055e405d 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileMetadata.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileMetadata.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; @@ -34,9 +34,9 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.plugin.localfile.LocalFileColumnHandle.SERVER_ADDRESS_COLUMN_NAME; -import static io.prestosql.plugin.localfile.LocalFileColumnHandle.SERVER_ADDRESS_ORDINAL_POSITION; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.localfile.LocalFileColumnHandle.SERVER_ADDRESS_COLUMN_NAME; +import static io.trino.plugin.localfile.LocalFileColumnHandle.SERVER_ADDRESS_ORDINAL_POSITION; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class LocalFileMetadata diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFilePlugin.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFilePlugin.java index fae960d6582e..2da4efadb0d9 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFilePlugin.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFilePlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.localfile; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class LocalFilePlugin implements Plugin diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileRecordCursor.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileRecordCursor.java index 6b948edfe08b..9e8c86a2351e 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileRecordCursor.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileRecordCursor.java @@ -19,13 +19,13 @@ import com.google.common.collect.Iterables; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.spi.HostAddress; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import java.io.BufferedReader; import java.io.File; @@ -48,15 +48,15 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.localfile.LocalFileColumnHandle.SERVER_ADDRESS_ORDINAL_POSITION; -import static io.prestosql.plugin.localfile.LocalFileErrorCode.LOCAL_FILE_READ_ERROR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.localfile.LocalFileColumnHandle.SERVER_ADDRESS_ORDINAL_POSITION; +import static io.trino.plugin.localfile.LocalFileErrorCode.LOCAL_FILE_READ_ERROR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.time.format.DateTimeFormatter.ISO_OFFSET_DATE_TIME; diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileRecordSet.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileRecordSet.java index cde0c390a0fc..6484f12d38b9 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileRecordSet.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileRecordSet.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileRecordSetProvider.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileRecordSetProvider.java index 60c2b58a7412..85b644f19ba6 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileRecordSetProvider.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileRecordSetProvider.java @@ -14,13 +14,13 @@ package io.trino.plugin.localfile; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import javax.inject.Inject; diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileSplit.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileSplit.java index 97492b466401..d78d056339b5 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileSplit.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileSplitManager.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileSplitManager.java index d82b0415a46a..8b5f3ee5c517 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileSplitManager.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileSplitManager.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.localfile; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import javax.inject.Inject; diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileTableHandle.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileTableHandle.java index 9fe947d2531a..e35f6e8155d8 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileTableHandle.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileTableHandle.java @@ -15,10 +15,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.Objects; import java.util.OptionalInt; diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileTables.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileTables.java index cba6e5e3ccd2..1fb2524ccd8e 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileTables.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileTables.java @@ -19,9 +19,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.util.concurrent.UncheckedExecutionException; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.SchemaTableName; import javax.inject.Inject; @@ -33,14 +33,14 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Throwables.throwIfInstanceOf; -import static io.prestosql.plugin.localfile.LocalFileMetadata.PRESTO_LOGS_SCHEMA; -import static io.prestosql.plugin.localfile.LocalFileMetadata.SERVER_ADDRESS_COLUMN; -import static io.prestosql.plugin.localfile.LocalFileTables.HttpRequestLogTable.getSchemaTableName; -import static io.prestosql.plugin.localfile.LocalFileTables.HttpRequestLogTable.getServerAddressColumn; -import static io.prestosql.plugin.localfile.LocalFileTables.HttpRequestLogTable.getTimestampColumn; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.localfile.LocalFileMetadata.PRESTO_LOGS_SCHEMA; +import static io.trino.plugin.localfile.LocalFileMetadata.SERVER_ADDRESS_COLUMN; +import static io.trino.plugin.localfile.LocalFileTables.HttpRequestLogTable.getSchemaTableName; +import static io.trino.plugin.localfile.LocalFileTables.HttpRequestLogTable.getServerAddressColumn; +import static io.trino.plugin.localfile.LocalFileTables.HttpRequestLogTable.getTimestampColumn; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.concurrent.TimeUnit.SECONDS; public class LocalFileTables diff --git a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileTransactionHandle.java b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileTransactionHandle.java index fcc8c0fbd219..c8e6d93c9011 100644 --- a/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileTransactionHandle.java +++ b/plugin/trino-local-file/src/main/java/io/trino/plugin/localfile/LocalFileTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.localfile; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum LocalFileTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/MetadataUtil.java b/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/MetadataUtil.java index 2c738437ff69..d1b5a7d554c4 100644 --- a/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/MetadataUtil.java +++ b/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/MetadataUtil.java @@ -19,18 +19,18 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; import java.util.Map; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; final class MetadataUtil { diff --git a/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/TestLocalFileColumnHandle.java b/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/TestLocalFileColumnHandle.java index 04d4d4937fce..70a7a65e8d08 100644 --- a/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/TestLocalFileColumnHandle.java +++ b/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/TestLocalFileColumnHandle.java @@ -18,13 +18,13 @@ import java.util.List; -import static io.prestosql.plugin.localfile.MetadataUtil.COLUMN_CODEC; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.localfile.MetadataUtil.COLUMN_CODEC; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static org.testng.Assert.assertEquals; public class TestLocalFileColumnHandle diff --git a/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/TestLocalFileRecordSet.java b/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/TestLocalFileRecordSet.java index d35e4ab9fc50..9cf5e8342d4e 100644 --- a/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/TestLocalFileRecordSet.java +++ b/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/TestLocalFileRecordSet.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.localfile; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; import org.testng.annotations.Test; import java.util.List; import java.util.OptionalInt; import java.util.stream.Collectors; -import static io.prestosql.plugin.localfile.LocalFileTables.HttpRequestLogTable.getSchemaTableName; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.localfile.LocalFileTables.HttpRequestLogTable.getSchemaTableName; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/TestLocalFileSplit.java b/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/TestLocalFileSplit.java index f487a37ee217..47d1129e2ab0 100644 --- a/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/TestLocalFileSplit.java +++ b/plugin/trino-local-file/src/test/java/io/trino/plugin/localfile/TestLocalFileSplit.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.json.JsonCodec; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import org.testng.annotations.Test; import static io.airlift.json.JsonCodec.jsonCodec; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/ColumnInfo.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/ColumnInfo.java index a91cbee0b5b2..9e702da30f9f 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/ColumnInfo.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/ColumnInfo.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.memory; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryColumnHandle.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryColumnHandle.java index 60c4915cb493..ac77f1977051 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryColumnHandle.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryColumnHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnHandle; import java.util.Objects; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryConnector.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryConnector.java index 8dffcd3daadc..eb95fce1cfc5 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryConnector.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryConnector.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.memory; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryConnectorFactory.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryConnectorFactory.java index 34164c831d2e..de01d58e4a53 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryConnectorFactory.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryConnectorFactory.java @@ -16,10 +16,10 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import java.util.Map; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryDataFragment.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryDataFragment.java index 106c83e38d58..b936609e4f7d 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryDataFragment.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryDataFragment.java @@ -18,7 +18,7 @@ import io.airlift.json.JsonCodec; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.json.JsonCodec.jsonCodec; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryErrorCode.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryErrorCode.java index 10f9f9449ae3..7d39cd137b49 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryErrorCode.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryErrorCode.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.memory; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.EXTERNAL; public enum MemoryErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryHandleResolver.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryHandleResolver.java index f1508196253b..43afe1addeb3 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryHandleResolver.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryHandleResolver.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.memory; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public final class MemoryHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryInsertTableHandle.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryInsertTableHandle.java index 7176ca8ffe55..493cabd5bf16 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryInsertTableHandle.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryInsertTableHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; import java.util.Set; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryMetadata.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryMetadata.java index 47636793d130..f35e8fcb6d20 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryMetadata.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryMetadata.java @@ -18,31 +18,31 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; import io.airlift.slice.Slice; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.CatalogSchemaName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.LimitApplicationResult; -import io.prestosql.spi.connector.SampleType; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.ViewNotFoundException; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.statistics.ComputedStatistics; +import io.trino.spi.HostAddress; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.CatalogSchemaName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.LimitApplicationResult; +import io.trino.spi.connector.SampleType; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.ViewNotFoundException; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.statistics.ComputedStatistics; import javax.annotation.concurrent.ThreadSafe; import javax.inject.Inject; @@ -61,10 +61,10 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.SCHEMA_NOT_EMPTY; -import static io.prestosql.spi.connector.SampleType.SYSTEM; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.SCHEMA_NOT_EMPTY; +import static io.trino.spi.connector.SampleType.SYSTEM; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toMap; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryModule.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryModule.java index 6c0017b1dd5f..bb5b0d175958 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryModule.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryModule.java @@ -16,8 +16,8 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.NodeManager; +import io.trino.spi.type.TypeManager; import static io.airlift.configuration.ConfigBinder.configBinder; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryOutputTableHandle.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryOutputTableHandle.java index fa3d4a4e3dcd..940ca4837875 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryOutputTableHandle.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryOutputTableHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; import java.util.Set; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPageSinkProvider.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPageSinkProvider.java index 7d6300cd4e1e..cb737d4c9450 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPageSinkProvider.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPageSinkProvider.java @@ -16,15 +16,15 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.HostAddress; +import io.trino.spi.NodeManager; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import javax.inject.Inject; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPageSourceProvider.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPageSourceProvider.java index 3f3acf8338b1..311701423f4f 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPageSourceProvider.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPageSourceProvider.java @@ -13,19 +13,19 @@ */ package io.trino.plugin.memory; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeUtils; +import io.trino.spi.Page; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeUtils; import javax.inject.Inject; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPagesStore.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPagesStore.java index 9953c3f3d2a6..c42a46ffb8a1 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPagesStore.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPagesStore.java @@ -14,9 +14,9 @@ package io.trino.plugin.memory; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; @@ -33,8 +33,8 @@ import java.util.Set; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.plugin.memory.MemoryErrorCode.MEMORY_LIMIT_EXCEEDED; -import static io.prestosql.plugin.memory.MemoryErrorCode.MISSING_DATA; +import static io.trino.plugin.memory.MemoryErrorCode.MEMORY_LIMIT_EXCEEDED; +import static io.trino.plugin.memory.MemoryErrorCode.MISSING_DATA; import static java.lang.String.format; @ThreadSafe diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPlugin.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPlugin.java index a505411c9c65..2bc5cffc4923 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPlugin.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.memory; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public final class MemoryPlugin implements Plugin diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemorySplit.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemorySplit.java index ae83729afb51..1cc6f82e431e 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemorySplit.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemorySplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemorySplitManager.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemorySplitManager.java index cc7c178c8f63..6d206054e2c6 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemorySplitManager.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemorySplitManager.java @@ -14,14 +14,14 @@ package io.trino.plugin.memory; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import javax.inject.Inject; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryTableHandle.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryTableHandle.java index 578d3a30c16e..bcd09cac88e9 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryTableHandle.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryTableHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableHandle; import java.util.Objects; import java.util.OptionalDouble; diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryTransactionHandle.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryTransactionHandle.java index 57860f036bce..729b0a7ded05 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryTransactionHandle.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/MemoryTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.memory; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum MemoryTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/TableInfo.java b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/TableInfo.java index 2ee70c8c8ca7..08b46f41f160 100644 --- a/plugin/trino-memory/src/main/java/io/trino/plugin/memory/TableInfo.java +++ b/plugin/trino-memory/src/main/java/io/trino/plugin/memory/TableInfo.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; import java.util.List; import java.util.Map; diff --git a/plugin/trino-memory/src/test/java/io/trino/plugin/memory/MemoryQueryRunner.java b/plugin/trino-memory/src/test/java/io/trino/plugin/memory/MemoryQueryRunner.java index eecce10a11cb..b7795b1aa3aa 100644 --- a/plugin/trino-memory/src/test/java/io/trino/plugin/memory/MemoryQueryRunner.java +++ b/plugin/trino-memory/src/test/java/io/trino/plugin/memory/MemoryQueryRunner.java @@ -16,17 +16,17 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; import io.trino.tpch.TpchTable; import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class MemoryQueryRunner { diff --git a/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryMetadata.java b/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryMetadata.java index 34f952523b36..63f1cf4258d8 100644 --- a/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryMetadata.java +++ b/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryMetadata.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.ConnectorViewDefinition.ViewColumn; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.testing.TestingNodeManager; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.ConnectorViewDefinition.ViewColumn; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.testing.TestingNodeManager; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -33,12 +33,12 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotEquals; diff --git a/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryPagesStore.java b/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryPagesStore.java index 039c35f85438..3773f3554a21 100644 --- a/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryPagesStore.java +++ b/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryPagesStore.java @@ -16,21 +16,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; +import io.trino.spi.HostAddress; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import java.util.OptionalDouble; import java.util.OptionalLong; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.TestingConnectorSession.SESSION; 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/TestMemorySmoke.java b/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemorySmoke.java index 1c53d692f455..c885ae4e7f5a 100644 --- a/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemorySmoke.java +++ b/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemorySmoke.java @@ -15,32 +15,32 @@ import com.google.common.collect.ImmutableMap; import com.google.common.primitives.Ints; -import io.prestosql.Session; -import io.prestosql.execution.QueryStats; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.operator.OperatorStats; -import io.prestosql.spi.QueryId; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.ResultWithQueryId; -import io.prestosql.testng.services.Flaky; +import io.trino.Session; +import io.trino.execution.QueryStats; +import io.trino.metadata.QualifiedObjectName; +import io.trino.operator.OperatorStats; +import io.trino.spi.QueryId; +import io.trino.sql.analyzer.FeaturesConfig; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; +import io.trino.testing.ResultWithQueryId; +import io.trino.testng.services.Flaky; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.SystemSessionProperties.ENABLE_LARGE_DYNAMIC_FILTERS; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.PARTITIONED; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; -import static io.prestosql.testing.assertions.Assert.assertEquals; +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.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.assertions.Assert.assertEquals; import static java.lang.String.format; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryWorkerCrash.java b/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryWorkerCrash.java index f2a9c7bc1d05..544751547e81 100644 --- a/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryWorkerCrash.java +++ b/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryWorkerCrash.java @@ -14,9 +14,9 @@ package io.trino.plugin.memory; import io.airlift.units.Duration; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; import static io.airlift.testing.Assertions.assertLessThan; diff --git a/plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlClient.java b/plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlClient.java index 01cd249c4238..be11eb6a9cdf 100644 --- a/plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlClient.java +++ b/plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlClient.java @@ -14,26 +14,26 @@ package io.trino.plugin.memsql; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.jdbc.BaseJdbcClient; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ColumnMapping; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.plugin.jdbc.PredicatePushdownController; -import io.prestosql.plugin.jdbc.WriteMapping; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.jdbc.BaseJdbcClient; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ColumnMapping; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.plugin.jdbc.PredicatePushdownController; +import io.trino.plugin.jdbc.WriteMapping; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.VarcharType; import javax.inject.Inject; @@ -49,29 +49,29 @@ import static com.google.common.base.Verify.verify; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.base.util.JsonTypeUtil.jsonParse; -import static io.prestosql.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.getDecimalDefaultScale; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.getDecimalRounding; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.getDecimalRoundingMode; -import static io.prestosql.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.PUSHDOWN_AND_KEEP; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.decimalColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.realWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.timestampWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varbinaryWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharReadFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.plugin.base.util.JsonTypeUtil.jsonParse; +import static io.trino.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.getDecimalDefaultScale; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.getDecimalRounding; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.getDecimalRoundingMode; +import static io.trino.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; +import static io.trino.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; +import static io.trino.plugin.jdbc.PredicatePushdownController.PUSHDOWN_AND_KEEP; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.decimalColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.realWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.timestampWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varbinaryWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharReadFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.Math.min; import static java.lang.String.format; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlClientModule.java b/plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlClientModule.java index 2d6969ecd573..75964c09d575 100644 --- a/plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlClientModule.java +++ b/plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlClientModule.java @@ -18,13 +18,13 @@ import com.google.inject.Provides; import com.google.inject.Scopes; import com.google.inject.Singleton; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.DecimalModule; -import io.prestosql.plugin.jdbc.DriverConnectionFactory; -import io.prestosql.plugin.jdbc.ForBaseJdbc; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.credential.CredentialProvider; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.DecimalModule; +import io.trino.plugin.jdbc.DriverConnectionFactory; +import io.trino.plugin.jdbc.ForBaseJdbc; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.credential.CredentialProvider; import org.mariadb.jdbc.Driver; import java.util.Properties; diff --git a/plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlPlugin.java b/plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlPlugin.java index 2e6abc2abc67..12959da5758c 100644 --- a/plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlPlugin.java +++ b/plugin/trino-memsql/src/main/java/io/trino/plugin/memsql/MemSqlPlugin.java @@ -14,7 +14,7 @@ package io.trino.plugin.memsql; -import io.prestosql.plugin.jdbc.JdbcPlugin; +import io.trino.plugin.jdbc.JdbcPlugin; public class MemSqlPlugin extends JdbcPlugin diff --git a/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/MemSqlQueryRunner.java b/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/MemSqlQueryRunner.java index e529765761b6..26d2cf4fd964 100644 --- a/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/MemSqlQueryRunner.java +++ b/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/MemSqlQueryRunner.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import java.util.HashMap; import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingSession.testSessionBuilder; public class MemSqlQueryRunner { diff --git a/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlCaseInsensitiveMapping.java b/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlCaseInsensitiveMapping.java index b2eadd435430..a151da7d9f71 100644 --- a/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlCaseInsensitiveMapping.java +++ b/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlCaseInsensitiveMapping.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; import java.util.stream.Stream; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.memsql.MemSqlQueryRunner.createMemSqlQueryRunner; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.memsql.MemSqlQueryRunner.createMemSqlQueryRunner; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlDistributedQueries.java b/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlDistributedQueries.java index 9d08cc26e2ab..42c88d2d030d 100644 --- a/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlDistributedQueries.java +++ b/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlDistributedQueries.java @@ -14,17 +14,17 @@ package io.trino.plugin.memsql; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.SqlExecutor; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.SqlExecutor; +import io.trino.testing.sql.TestTable; import io.trino.tpch.TpchTable; import org.testng.SkipException; import java.util.Optional; import static com.google.common.base.Strings.nullToEmpty; -import static io.prestosql.plugin.memsql.MemSqlQueryRunner.createMemSqlQueryRunner; +import static io.trino.plugin.memsql.MemSqlQueryRunner.createMemSqlQueryRunner; public class TestMemSqlDistributedQueries extends AbstractTestDistributedQueries diff --git a/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlIntegrationSmokeTest.java b/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlIntegrationSmokeTest.java index 94d88375f388..8f638519ac1a 100644 --- a/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlIntegrationSmokeTest.java +++ b/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlIntegrationSmokeTest.java @@ -13,20 +13,20 @@ */ package io.trino.plugin.memsql; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.memsql.MemSqlQueryRunner.createMemSqlQueryRunner; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.memsql.MemSqlQueryRunner.createMemSqlQueryRunner; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.NATION; import static io.trino.tpch.TpchTable.ORDERS; diff --git a/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlPlugin.java b/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlPlugin.java index e6d308a93f21..f8664fcd476c 100644 --- a/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlPlugin.java +++ b/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlPlugin.java @@ -14,9 +14,9 @@ package io.trino.plugin.memsql; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; diff --git a/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlTypeMapping.java b/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlTypeMapping.java index 768e76e977d9..605cf67c5ed6 100644 --- a/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlTypeMapping.java +++ b/plugin/trino-memsql/src/test/java/io/trino/plugin/memsql/TestMemSqlTypeMapping.java @@ -14,20 +14,20 @@ package io.trino.plugin.memsql; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.plugin.jdbc.UnsupportedTypeHandling; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.datatype.CreateAndInsertDataSetup; -import io.prestosql.testing.datatype.CreateAsSelectDataSetup; -import io.prestosql.testing.datatype.DataSetup; -import io.prestosql.testing.datatype.DataType; -import io.prestosql.testing.datatype.DataTypeTest; -import io.prestosql.testing.sql.PrestoSqlExecutor; -import io.prestosql.testing.sql.SqlExecutor; -import io.prestosql.testing.sql.TestTable; +import io.trino.Session; +import io.trino.plugin.jdbc.UnsupportedTypeHandling; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.VarcharType; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; +import io.trino.testing.datatype.CreateAndInsertDataSetup; +import io.trino.testing.datatype.CreateAsSelectDataSetup; +import io.trino.testing.datatype.DataSetup; +import io.trino.testing.datatype.DataType; +import io.trino.testing.datatype.DataTypeTest; +import io.trino.testing.sql.PrestoSqlExecutor; +import io.trino.testing.sql.SqlExecutor; +import io.trino.testing.sql.TestTable; import org.testng.SkipException; import org.testng.annotations.AfterClass; import org.testng.annotations.DataProvider; @@ -42,39 +42,39 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; -import static io.prestosql.plugin.jdbc.DecimalConfig.DecimalMapping.STRICT; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_DEFAULT_SCALE; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_MAPPING; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_ROUNDING_MODE; -import static io.prestosql.plugin.jdbc.TypeHandlingJdbcSessionProperties.UNSUPPORTED_TYPE_HANDLING; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; -import static io.prestosql.plugin.memsql.MemSqlClient.MEMSQL_VARCHAR_MAX_LENGTH; -import static io.prestosql.plugin.memsql.MemSqlQueryRunner.createMemSqlQueryRunner; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.datatype.DataType.bigintDataType; -import static io.prestosql.testing.datatype.DataType.charDataType; -import static io.prestosql.testing.datatype.DataType.dataType; -import static io.prestosql.testing.datatype.DataType.dateDataType; -import static io.prestosql.testing.datatype.DataType.decimalDataType; -import static io.prestosql.testing.datatype.DataType.doubleDataType; -import static io.prestosql.testing.datatype.DataType.formatStringLiteral; -import static io.prestosql.testing.datatype.DataType.integerDataType; -import static io.prestosql.testing.datatype.DataType.realDataType; -import static io.prestosql.testing.datatype.DataType.smallintDataType; -import static io.prestosql.testing.datatype.DataType.stringDataType; -import static io.prestosql.testing.datatype.DataType.tinyintDataType; -import static io.prestosql.testing.datatype.DataType.varcharDataType; -import static io.prestosql.type.JsonType.JSON; +import static io.trino.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; +import static io.trino.plugin.jdbc.DecimalConfig.DecimalMapping.STRICT; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_DEFAULT_SCALE; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_MAPPING; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_ROUNDING_MODE; +import static io.trino.plugin.jdbc.TypeHandlingJdbcSessionProperties.UNSUPPORTED_TYPE_HANDLING; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; +import static io.trino.plugin.memsql.MemSqlClient.MEMSQL_VARCHAR_MAX_LENGTH; +import static io.trino.plugin.memsql.MemSqlQueryRunner.createMemSqlQueryRunner; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.datatype.DataType.bigintDataType; +import static io.trino.testing.datatype.DataType.charDataType; +import static io.trino.testing.datatype.DataType.dataType; +import static io.trino.testing.datatype.DataType.dateDataType; +import static io.trino.testing.datatype.DataType.decimalDataType; +import static io.trino.testing.datatype.DataType.doubleDataType; +import static io.trino.testing.datatype.DataType.formatStringLiteral; +import static io.trino.testing.datatype.DataType.integerDataType; +import static io.trino.testing.datatype.DataType.realDataType; +import static io.trino.testing.datatype.DataType.smallintDataType; +import static io.trino.testing.datatype.DataType.stringDataType; +import static io.trino.testing.datatype.DataType.tinyintDataType; +import static io.trino.testing.datatype.DataType.varcharDataType; +import static io.trino.type.JsonType.JSON; import static java.lang.String.format; import static java.math.RoundingMode.HALF_UP; import static java.math.RoundingMode.UNNECESSARY; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/ClassifierFeatureTransformer.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/ClassifierFeatureTransformer.java index 280ff5402d2b..2e745bbd5eb2 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/ClassifierFeatureTransformer.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/ClassifierFeatureTransformer.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.ml; -import io.prestosql.plugin.ml.type.ClassifierType; -import io.prestosql.plugin.ml.type.ModelType; +import io.trino.plugin.ml.type.ClassifierType; +import io.trino.plugin.ml.type.ModelType; import java.util.List; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsAggregation.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsAggregation.java index d4c8e7ca4762..98fdeb31651c 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsAggregation.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsAggregation.java @@ -15,15 +15,15 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import java.util.Locale; import java.util.Map; @@ -31,7 +31,7 @@ import static com.google.common.collect.Sets.union; import static io.airlift.slice.SizeOf.SIZE_OF_INT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsState.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsState.java index 980113f1022c..d364e36202e1 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsState.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsState.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.ml; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; import java.util.Map; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsStateFactory.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsStateFactory.java index bc739ddd1819..3de2de7b1774 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsStateFactory.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsStateFactory.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.ml; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.GroupedAccumulatorState; +import io.trino.array.ObjectBigArray; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.GroupedAccumulatorState; import org.openjdk.jol.info.ClassLayout; import java.util.HashMap; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsStateSerializer.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsStateSerializer.java index 68cbb0355dee..a755e16e984b 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsStateSerializer.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/EvaluateClassifierPredictionsStateSerializer.java @@ -20,17 +20,17 @@ import io.airlift.json.ObjectMapperProvider; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.Type; import java.io.IOException; import java.io.UncheckedIOException; import java.util.HashMap; import java.util.Map; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.VARCHAR; public class EvaluateClassifierPredictionsStateSerializer implements AccumulatorStateSerializer diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/FeatureUnitNormalizer.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/FeatureUnitNormalizer.java index 06b47fdae5bc..11456ab66cd3 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/FeatureUnitNormalizer.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/FeatureUnitNormalizer.java @@ -18,7 +18,7 @@ import io.airlift.slice.SliceInput; import io.airlift.slice.SliceOutput; import io.airlift.slice.Slices; -import io.prestosql.plugin.ml.type.ModelType; +import io.trino.plugin.ml.type.ModelType; import it.unimi.dsi.fastutil.ints.Int2DoubleMap; import it.unimi.dsi.fastutil.ints.Int2DoubleOpenHashMap; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/FeatureVectorUnitNormalizer.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/FeatureVectorUnitNormalizer.java index 7e8efdfe74e6..c6d3a3051e29 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/FeatureVectorUnitNormalizer.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/FeatureVectorUnitNormalizer.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.ml; -import io.prestosql.plugin.ml.type.ModelType; +import io.trino.plugin.ml.type.ModelType; import java.util.HashMap; import java.util.Map; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnClassifierAggregation.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnClassifierAggregation.java index 52897221ef37..983bfdbf5ebb 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnClassifierAggregation.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnClassifierAggregation.java @@ -14,17 +14,17 @@ package io.trino.plugin.ml; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; -import static io.prestosql.spi.type.StandardTypes.BIGINT; -import static io.prestosql.spi.type.StandardTypes.DOUBLE; +import static io.trino.spi.type.StandardTypes.BIGINT; +import static io.trino.spi.type.StandardTypes.DOUBLE; @AggregationFunction(value = "learn_classifier", decomposable = false) public final class LearnClassifierAggregation diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnLibSvmClassifierAggregation.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnLibSvmClassifierAggregation.java index af581bddad19..52d03aa12cdd 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnLibSvmClassifierAggregation.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnLibSvmClassifierAggregation.java @@ -14,20 +14,20 @@ package io.trino.plugin.ml; import io.airlift.slice.Slice; -import io.prestosql.plugin.ml.type.ClassifierType; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; +import io.trino.plugin.ml.type.ClassifierType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; -import static io.prestosql.spi.type.StandardTypes.BIGINT; -import static io.prestosql.spi.type.StandardTypes.DOUBLE; -import static io.prestosql.spi.type.StandardTypes.VARCHAR; +import static io.trino.spi.type.StandardTypes.BIGINT; +import static io.trino.spi.type.StandardTypes.DOUBLE; +import static io.trino.spi.type.StandardTypes.VARCHAR; @AggregationFunction(value = "learn_libsvm_classifier", decomposable = false) public final class LearnLibSvmClassifierAggregation diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnLibSvmRegressorAggregation.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnLibSvmRegressorAggregation.java index 005eabbcad59..de8c97ef5851 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnLibSvmRegressorAggregation.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnLibSvmRegressorAggregation.java @@ -14,19 +14,19 @@ package io.trino.plugin.ml; import io.airlift.slice.Slice; -import io.prestosql.plugin.ml.type.RegressorType; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; +import io.trino.plugin.ml.type.RegressorType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; -import static io.prestosql.spi.type.StandardTypes.BIGINT; -import static io.prestosql.spi.type.StandardTypes.DOUBLE; -import static io.prestosql.spi.type.StandardTypes.VARCHAR; +import static io.trino.spi.type.StandardTypes.BIGINT; +import static io.trino.spi.type.StandardTypes.DOUBLE; +import static io.trino.spi.type.StandardTypes.VARCHAR; @AggregationFunction(value = "learn_libsvm_regressor", decomposable = false) public final class LearnLibSvmRegressorAggregation diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnLibSvmVarcharClassifierAggregation.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnLibSvmVarcharClassifierAggregation.java index 95ad9aaef9fc..59264ca4abbe 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnLibSvmVarcharClassifierAggregation.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnLibSvmVarcharClassifierAggregation.java @@ -14,17 +14,17 @@ package io.trino.plugin.ml; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; -import static io.prestosql.plugin.ml.type.ClassifierType.VARCHAR_CLASSIFIER; -import static io.prestosql.spi.type.StandardTypes.VARCHAR; +import static io.trino.plugin.ml.type.ClassifierType.VARCHAR_CLASSIFIER; +import static io.trino.spi.type.StandardTypes.VARCHAR; @AggregationFunction(value = "learn_libsvm_classifier", decomposable = false) public final class LearnLibSvmVarcharClassifierAggregation diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnRegressorAggregation.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnRegressorAggregation.java index bd954897dca3..ff2cbfa95cf1 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnRegressorAggregation.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnRegressorAggregation.java @@ -14,18 +14,18 @@ package io.trino.plugin.ml; import io.airlift.slice.Slices; -import io.prestosql.plugin.ml.type.RegressorType; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; +import io.trino.plugin.ml.type.RegressorType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; -import static io.prestosql.spi.type.StandardTypes.BIGINT; -import static io.prestosql.spi.type.StandardTypes.DOUBLE; +import static io.trino.spi.type.StandardTypes.BIGINT; +import static io.trino.spi.type.StandardTypes.DOUBLE; @AggregationFunction(value = "learn_regressor", decomposable = false) public final class LearnRegressorAggregation diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnState.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnState.java index 3cc9ad822389..b99b974b8189 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnState.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnState.java @@ -15,8 +15,8 @@ import com.google.common.collect.BiMap; import io.airlift.slice.Slice; -import io.prestosql.spi.function.AccumulatorState; -import io.prestosql.spi.function.AccumulatorStateMetadata; +import io.trino.spi.function.AccumulatorState; +import io.trino.spi.function.AccumulatorStateMetadata; import java.util.List; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnStateFactory.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnStateFactory.java index 9111cf0061a2..2fcd810fa38e 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnStateFactory.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnStateFactory.java @@ -16,10 +16,10 @@ import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; import io.airlift.slice.Slice; -import io.prestosql.array.ObjectBigArray; -import io.prestosql.array.SliceBigArray; -import io.prestosql.spi.function.AccumulatorStateFactory; -import io.prestosql.spi.function.GroupedAccumulatorState; +import io.trino.array.ObjectBigArray; +import io.trino.array.SliceBigArray; +import io.trino.spi.function.AccumulatorStateFactory; +import io.trino.spi.function.GroupedAccumulatorState; import libsvm.svm_parameter; import org.openjdk.jol.info.ClassLayout; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnStateSerializer.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnStateSerializer.java index 2077ad0d76b9..c2c6d579505c 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnStateSerializer.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnStateSerializer.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.ml; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AccumulatorStateSerializer; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AccumulatorStateSerializer; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.Type; public class LearnStateSerializer implements AccumulatorStateSerializer diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnVarcharClassifierAggregation.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnVarcharClassifierAggregation.java index db4c9df2b08a..383618403fab 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnVarcharClassifierAggregation.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LearnVarcharClassifierAggregation.java @@ -15,16 +15,16 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; -import static io.prestosql.spi.type.StandardTypes.VARCHAR; +import static io.trino.spi.type.StandardTypes.VARCHAR; @AggregationFunction(value = "learn_classifier", decomposable = false) public final class LearnVarcharClassifierAggregation diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LibSvmUtils.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LibSvmUtils.java index 820531e65c7c..b2de98c63227 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LibSvmUtils.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/LibSvmUtils.java @@ -14,11 +14,11 @@ package io.trino.plugin.ml; import com.google.common.base.Splitter; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import libsvm.svm_parameter; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; import static java.lang.String.format; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLFeaturesFunctions.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLFeaturesFunctions.java index 97d2fe8916d8..f4ebb38d0e8b 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLFeaturesFunctions.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLFeaturesFunctions.java @@ -14,16 +14,16 @@ package io.trino.plugin.ml; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLFunctions.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLFunctions.java index c92ad21ff3db..80aef99f0b1e 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLFunctions.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLFunctions.java @@ -18,16 +18,16 @@ import com.google.common.hash.HashCode; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.plugin.ml.type.RegressorType; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.plugin.ml.type.RegressorType; +import io.trino.spi.block.Block; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.ml.type.ClassifierType.BIGINT_CLASSIFIER; -import static io.prestosql.plugin.ml.type.ClassifierType.VARCHAR_CLASSIFIER; -import static io.prestosql.plugin.ml.type.RegressorType.REGRESSOR; +import static io.trino.plugin.ml.type.ClassifierType.BIGINT_CLASSIFIER; +import static io.trino.plugin.ml.type.ClassifierType.VARCHAR_CLASSIFIER; +import static io.trino.plugin.ml.type.RegressorType.REGRESSOR; public final class MLFunctions { diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLPlugin.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLPlugin.java index b851055d7cc9..998d0d846b03 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLPlugin.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLPlugin.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.ml.type.ClassifierParametricType; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.ml.type.ClassifierParametricType; +import io.trino.spi.Plugin; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.Type; import java.util.Set; -import static io.prestosql.plugin.ml.MLFeaturesFunctions.ML_FEATURE_FUNCTIONS; -import static io.prestosql.plugin.ml.type.ModelType.MODEL; -import static io.prestosql.plugin.ml.type.RegressorType.REGRESSOR; +import static io.trino.plugin.ml.MLFeaturesFunctions.ML_FEATURE_FUNCTIONS; +import static io.trino.plugin.ml.type.ModelType.MODEL; +import static io.trino.plugin.ml.type.RegressorType.REGRESSOR; public class MLPlugin implements Plugin diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/Model.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/Model.java index ad14b569967b..fac8e5f06c80 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/Model.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/Model.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.ml; -import io.prestosql.plugin.ml.type.ModelType; +import io.trino.plugin.ml.type.ModelType; public interface Model { diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/ModelUtils.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/ModelUtils.java index 3b6f91c56655..04ad212984e9 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/ModelUtils.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/ModelUtils.java @@ -21,7 +21,7 @@ import com.google.common.hash.Hashing; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -34,8 +34,8 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.SizeOf.SIZE_OF_INT; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/RegressorFeatureTransformer.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/RegressorFeatureTransformer.java index 8c108123d196..5b85e20869ad 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/RegressorFeatureTransformer.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/RegressorFeatureTransformer.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.ml; -import io.prestosql.plugin.ml.type.ModelType; -import io.prestosql.plugin.ml.type.RegressorType; +import io.trino.plugin.ml.type.ModelType; +import io.trino.plugin.ml.type.RegressorType; import java.util.List; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/StringClassifierAdapter.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/StringClassifierAdapter.java index 459c35ea2dc9..936399e7dc2c 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/StringClassifierAdapter.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/StringClassifierAdapter.java @@ -18,14 +18,14 @@ import io.airlift.slice.DynamicSliceOutput; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.plugin.ml.type.ModelType; +import io.trino.plugin.ml.type.ModelType; import java.util.HashMap; import java.util.Map; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.ml.ModelUtils.serialize; -import static io.prestosql.plugin.ml.type.ClassifierType.VARCHAR_CLASSIFIER; +import static io.trino.plugin.ml.ModelUtils.serialize; +import static io.trino.plugin.ml.type.ClassifierType.VARCHAR_CLASSIFIER; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/SvmClassifier.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/SvmClassifier.java index a61ce5697086..5d016f12917f 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/SvmClassifier.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/SvmClassifier.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.ml; -import io.prestosql.plugin.ml.type.ModelType; +import io.trino.plugin.ml.type.ModelType; import libsvm.svm; import libsvm.svm_model; import libsvm.svm_parameter; @@ -24,7 +24,7 @@ import java.io.InputStreamReader; import java.io.UncheckedIOException; -import static io.prestosql.plugin.ml.type.ClassifierType.BIGINT_CLASSIFIER; +import static io.trino.plugin.ml.type.ClassifierType.BIGINT_CLASSIFIER; import static java.util.Objects.requireNonNull; public class SvmClassifier diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/SvmRegressor.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/SvmRegressor.java index 6f147ab13823..1f32520c9c3b 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/SvmRegressor.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/SvmRegressor.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.ml; -import io.prestosql.plugin.ml.type.ModelType; +import io.trino.plugin.ml.type.ModelType; import libsvm.svm; import libsvm.svm_model; import libsvm.svm_parameter; @@ -24,7 +24,7 @@ import java.io.InputStreamReader; import java.io.UncheckedIOException; -import static io.prestosql.plugin.ml.type.RegressorType.REGRESSOR; +import static io.trino.plugin.ml.type.RegressorType.REGRESSOR; import static java.util.Objects.requireNonNull; public class SvmRegressor diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/ClassifierParametricType.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/ClassifierParametricType.java index fef12aea0f4a..aed8f2b363cf 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/ClassifierParametricType.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/ClassifierParametricType.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.ml.type; -import io.prestosql.spi.type.ParameterKind; -import io.prestosql.spi.type.ParametricType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeParameter; +import io.trino.spi.type.ParameterKind; +import io.trino.spi.type.ParametricType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeParameter; import java.util.List; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/ClassifierType.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/ClassifierType.java index 513e10dc9a36..b33910b05be8 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/ClassifierType.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/ClassifierType.java @@ -14,15 +14,15 @@ package io.trino.plugin.ml.type; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; // Layout is :, where // size: is an int describing the length of the model bytes diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/ModelType.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/ModelType.java index 844f246f9f20..c84168005ce0 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/ModelType.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/ModelType.java @@ -14,11 +14,11 @@ package io.trino.plugin.ml.type; import io.airlift.slice.Slice; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.TypeSignature; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/RegressorType.java b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/RegressorType.java index ca6d361fcdd3..926eff6377e5 100644 --- a/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/RegressorType.java +++ b/plugin/trino-ml/src/main/java/io/trino/plugin/ml/type/RegressorType.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.ml.type; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignature; // Layout is :, where // size: is an int describing the length of the model bytes diff --git a/plugin/trino-ml/src/test/java/io/trino/plugin/ml/AbstractTestMLFunctions.java b/plugin/trino-ml/src/test/java/io/trino/plugin/ml/AbstractTestMLFunctions.java index 718ab738a6e5..1c7d1a4f2d10 100644 --- a/plugin/trino-ml/src/test/java/io/trino/plugin/ml/AbstractTestMLFunctions.java +++ b/plugin/trino-ml/src/test/java/io/trino/plugin/ml/AbstractTestMLFunctions.java @@ -14,10 +14,10 @@ package io.trino.plugin.ml; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.BeforeClass; -import static io.prestosql.metadata.FunctionExtractor.extractFunctions; +import static io.trino.metadata.FunctionExtractor.extractFunctions; abstract class AbstractTestMLFunctions extends AbstractTestFunctions diff --git a/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestEvaluateClassifierPredictions.java b/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestEvaluateClassifierPredictions.java index 7dfc419da01d..e24532650f04 100644 --- a/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestEvaluateClassifierPredictions.java +++ b/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestEvaluateClassifierPredictions.java @@ -15,24 +15,24 @@ import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; -import io.prestosql.RowPageBuilder; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.aggregation.Accumulator; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.RowPageBuilder; +import io.trino.metadata.Metadata; +import io.trino.operator.aggregation.Accumulator; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.sql.tree.QualifiedName; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; -import static io.prestosql.metadata.FunctionExtractor.extractFunctions; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.metadata.FunctionExtractor.extractFunctions; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static org.testng.Assert.assertEquals; public class TestEvaluateClassifierPredictions diff --git a/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestFeatureTransformations.java b/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestFeatureTransformations.java index b515dfc506f4..47c8c8627b20 100644 --- a/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestFeatureTransformations.java +++ b/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestFeatureTransformations.java @@ -22,7 +22,7 @@ import java.util.List; import java.util.Set; -import static io.prestosql.plugin.ml.TestUtils.getDataset; +import static io.trino.plugin.ml.TestUtils.getDataset; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestLearnAggregations.java b/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestLearnAggregations.java index 2f9b7b41cefa..0521866b9c38 100644 --- a/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestLearnAggregations.java +++ b/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestLearnAggregations.java @@ -17,37 +17,37 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.RowPageBuilder; -import io.prestosql.metadata.BoundSignature; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionDependencies; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.operator.aggregation.Accumulator; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.aggregation.ParametricAggregation; -import io.prestosql.plugin.ml.type.ClassifierParametricType; -import io.prestosql.plugin.ml.type.ModelType; -import io.prestosql.plugin.ml.type.RegressorType; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarcharType; +import io.trino.RowPageBuilder; +import io.trino.metadata.BoundSignature; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionDependencies; +import io.trino.metadata.MetadataManager; +import io.trino.operator.aggregation.Accumulator; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.aggregation.ParametricAggregation; +import io.trino.plugin.ml.type.ClassifierParametricType; +import io.trino.plugin.ml.type.ModelType; +import io.trino.plugin.ml.type.RegressorType; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarcharType; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; import java.util.Random; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.aggregation.AggregationFromAnnotationsParser.parseFunctionDefinitionWithTypesConstraint; -import static io.prestosql.plugin.ml.type.ClassifierType.BIGINT_CLASSIFIER; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.StructuralTestUtil.mapBlockOf; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.aggregation.AggregationFromAnnotationsParser.parseFunctionDefinitionWithTypesConstraint; +import static io.trino.plugin.ml.type.ClassifierType.BIGINT_CLASSIFIER; +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.testing.StructuralTestUtil.mapBlockOf; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestMLQueries.java b/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestMLQueries.java index 21dc60337041..76e935e54db0 100644 --- a/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestMLQueries.java +++ b/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestMLQueries.java @@ -14,15 +14,15 @@ package io.trino.plugin.ml; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestMLQueries extends AbstractTestQueryFramework diff --git a/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestModelSerialization.java b/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestModelSerialization.java index 1004893ad3ad..4242eda8b2b3 100644 --- a/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestModelSerialization.java +++ b/plugin/trino-ml/src/test/java/io/trino/plugin/ml/TestModelSerialization.java @@ -16,7 +16,7 @@ import io.airlift.slice.Slice; import org.testng.annotations.Test; -import static io.prestosql.plugin.ml.TestUtils.getDataset; +import static io.trino.plugin.ml.TestUtils.getDataset; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoClientModule.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoClientModule.java index 2ab9ae241630..bfdefc43d677 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoClientModule.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoClientModule.java @@ -19,7 +19,7 @@ import com.google.inject.Scopes; import com.mongodb.MongoClient; import com.mongodb.MongoClientOptions; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.type.TypeManager; import javax.inject.Singleton; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoColumnHandle.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoColumnHandle.java index c4c9d1cfa082..09e311e65d93 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoColumnHandle.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoColumnHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import org.bson.Document; import java.util.Objects; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoConnector.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoConnector.java index d3ea5e65d101..1d83fb2f88bf 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoConnector.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoConnector.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.mongodb; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; @@ -27,8 +27,8 @@ import java.util.concurrent.ConcurrentMap; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.transaction.IsolationLevel.READ_UNCOMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.transaction.IsolationLevel.READ_UNCOMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; public class MongoConnector diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoConnectorFactory.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoConnectorFactory.java index f19045b1bdd8..b520f8d9410d 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoConnectorFactory.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoConnectorFactory.java @@ -16,11 +16,11 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.type.TypeManager; import java.util.Map; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoHandleResolver.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoHandleResolver.java index 13ee737dde61..def15af83970 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoHandleResolver.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoHandleResolver.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.mongodb; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class MongoHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoIndex.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoIndex.java index fb18b8a67d2a..b357bff4a75b 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoIndex.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoIndex.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import com.mongodb.client.ListIndexesIterable; -import io.prestosql.spi.connector.SortOrder; +import io.trino.spi.connector.SortOrder; import org.bson.Document; import java.util.List; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoInsertTableHandle.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoInsertTableHandle.java index 672da106c858..3747aee4c9d0 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoInsertTableHandle.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoInsertTableHandle.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.SchemaTableName; import java.util.List; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoMetadata.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoMetadata.java index 85c506b70da5..2e4ace62f516 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoMetadata.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoMetadata.java @@ -17,29 +17,29 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.slice.Slice; -import io.prestosql.plugin.mongodb.MongoIndex.MongodbIndexKey; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.LimitApplicationResult; -import io.prestosql.spi.connector.LocalProperty; -import io.prestosql.spi.connector.NotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.SortingProperty; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.ComputedStatistics; +import io.trino.plugin.mongodb.MongoIndex.MongodbIndexKey; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.LimitApplicationResult; +import io.trino.spi.connector.LocalProperty; +import io.trino.spi.connector.NotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.SortingProperty; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.ComputedStatistics; import java.util.Collection; import java.util.List; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoOutputTableHandle.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoOutputTableHandle.java index 22b7a4d5f9bf..bcbeab4e4bfb 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoOutputTableHandle.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoOutputTableHandle.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.SchemaTableName; import java.util.List; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSink.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSink.java index 4aa9f334a659..58487b2bcaa4 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSink.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSink.java @@ -19,29 +19,29 @@ import com.mongodb.client.MongoCollection; import com.mongodb.client.model.InsertManyOptions; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.bson.Document; import org.bson.types.Binary; import org.bson.types.ObjectId; @@ -56,18 +56,18 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; -import static io.prestosql.plugin.mongodb.ObjectIdType.OBJECT_ID; -import static io.prestosql.plugin.mongodb.TypeUtils.isArrayType; -import static io.prestosql.plugin.mongodb.TypeUtils.isMapType; -import static io.prestosql.plugin.mongodb.TypeUtils.isRowType; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.Decimals.readBigDecimal; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.roundDiv; +import static io.trino.plugin.mongodb.ObjectIdType.OBJECT_ID; +import static io.trino.plugin.mongodb.TypeUtils.isArrayType; +import static io.trino.plugin.mongodb.TypeUtils.isMapType; +import static io.trino.plugin.mongodb.TypeUtils.isRowType; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.Decimals.readBigDecimal; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.roundDiv; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.floorDiv; import static java.lang.Math.toIntExact; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSinkProvider.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSinkProvider.java index 0ea349e366a0..e2a614eec15f 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSinkProvider.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSinkProvider.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.mongodb; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import javax.inject.Inject; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSource.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSource.java index 69f128e759a3..2b909a647b23 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSource.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSource.java @@ -17,18 +17,18 @@ import com.google.common.primitives.SignedBytes; import com.mongodb.client.MongoCursor; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.bson.Document; import org.bson.types.Binary; import org.bson.types.Decimal128; @@ -46,27 +46,27 @@ import static com.google.common.base.Verify.verify; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.plugin.mongodb.ObjectIdType.OBJECT_ID; -import static io.prestosql.plugin.mongodb.TypeUtils.isArrayType; -import static io.prestosql.plugin.mongodb.TypeUtils.isMapType; -import static io.prestosql.plugin.mongodb.TypeUtils.isRowType; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.Chars.truncateToLengthAndTrimSpaces; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.spi.type.Decimals.encodeShortScaledValue; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.TinyintType.TINYINT; +import static io.trino.plugin.mongodb.ObjectIdType.OBJECT_ID; +import static io.trino.plugin.mongodb.TypeUtils.isArrayType; +import static io.trino.plugin.mongodb.TypeUtils.isMapType; +import static io.trino.plugin.mongodb.TypeUtils.isRowType; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.Chars.truncateToLengthAndTrimSpaces; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.Decimals.encodeShortScaledValue; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.TinyintType.TINYINT; import static java.lang.Float.floatToIntBits; import static java.lang.Math.multiplyExact; import static java.lang.String.join; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSourceProvider.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSourceProvider.java index 3c08369d7422..991f6378e4be 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSourceProvider.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPageSourceProvider.java @@ -14,14 +14,14 @@ package io.trino.plugin.mongodb; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPlugin.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPlugin.java index ed164364a580..35177f6818da 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPlugin.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPlugin.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.type.Type; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.type.Type; import java.util.Set; -import static io.prestosql.plugin.mongodb.ObjectIdType.OBJECT_ID; +import static io.trino.plugin.mongodb.ObjectIdType.OBJECT_ID; public class MongoPlugin implements Plugin diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoSession.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoSession.java index c6b9d0b3a622..6413fab937fc 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoSession.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoSession.java @@ -33,24 +33,24 @@ import com.mongodb.client.result.DeleteResult; import io.airlift.log.Logger; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.RowFieldName; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.RowFieldName; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.spi.type.VarcharType; import org.bson.Document; import org.bson.types.ObjectId; @@ -70,14 +70,14 @@ import static com.google.common.base.Throwables.throwIfInstanceOf; import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.mongodb.ObjectIdType.OBJECT_ID; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.mongodb.ObjectIdType.OBJECT_ID; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoSplit.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoSplit.java index 93e73dc69aeb..6d081e4b045a 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoSplit.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoSplitManager.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoSplitManager.java index d50517af4ea1..2186f0f3091d 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoSplitManager.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoSplitManager.java @@ -14,20 +14,20 @@ package io.trino.plugin.mongodb; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import javax.inject.Inject; import java.util.List; -import static io.prestosql.spi.HostAddress.fromParts; +import static io.trino.spi.HostAddress.fromParts; import static java.util.stream.Collectors.toList; public class MongoSplitManager diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoTableHandle.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoTableHandle.java index cf7bb5d64878..709a982c9abe 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoTableHandle.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoTableHandle.java @@ -15,10 +15,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.Objects; import java.util.OptionalInt; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoTransactionHandle.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoTransactionHandle.java index fd348e503483..ca5f3816200e 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoTransactionHandle.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoTransactionHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Objects; import java.util.UUID; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/ObjectIdFunctions.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/ObjectIdFunctions.java index 02e6d82786a3..65ab7ef91128 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/ObjectIdFunctions.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/ObjectIdFunctions.java @@ -16,19 +16,19 @@ import com.google.common.base.CharMatcher; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameter; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameter; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import org.bson.types.ObjectId; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.function.OperatorType.CAST; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.function.OperatorType.CAST; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; import static java.lang.Math.toIntExact; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/ObjectIdType.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/ObjectIdType.java index a656d86177aa..fd8dc9ebfab9 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/ObjectIdType.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/ObjectIdType.java @@ -19,25 +19,25 @@ import com.fasterxml.jackson.databind.SerializerProvider; import io.airlift.slice.Slice; import io.airlift.slice.XxHash64; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.BlockIndex; -import io.prestosql.spi.function.BlockPosition; -import io.prestosql.spi.function.ScalarOperator; -import io.prestosql.spi.type.AbstractVariableWidthType; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.TypeOperatorDeclaration; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spi.type.TypeSignature; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.BlockIndex; +import io.trino.spi.function.BlockPosition; +import io.trino.spi.function.ScalarOperator; +import io.trino.spi.type.AbstractVariableWidthType; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.TypeOperatorDeclaration; +import io.trino.spi.type.TypeOperators; +import io.trino.spi.type.TypeSignature; import org.bson.types.ObjectId; import java.io.IOException; -import static io.prestosql.spi.function.OperatorType.COMPARISON; -import static io.prestosql.spi.function.OperatorType.EQUAL; -import static io.prestosql.spi.function.OperatorType.XX_HASH_64; -import static io.prestosql.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; +import static io.trino.spi.function.OperatorType.COMPARISON; +import static io.trino.spi.function.OperatorType.EQUAL; +import static io.trino.spi.function.OperatorType.XX_HASH_64; +import static io.trino.spi.type.TypeOperatorDeclaration.extractOperatorDeclaration; import static java.lang.invoke.MethodHandles.lookup; public class ObjectIdType diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/TypeUtils.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/TypeUtils.java index 6ef1f470c9dc..49031bffc1c7 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/TypeUtils.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/TypeUtils.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.mongodb; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.Type; public final class TypeUtils { diff --git a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/BaseMongoDistributedQueries.java b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/BaseMongoDistributedQueries.java index c511cd59d0fa..6b53a119a518 100644 --- a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/BaseMongoDistributedQueries.java +++ b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/BaseMongoDistributedQueries.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.mongodb; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.sql.TestTable; import org.testng.SkipException; import org.testng.annotations.Test; diff --git a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/MongoQueryRunner.java b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/MongoQueryRunner.java index e2b91581cc58..d94eba687554 100644 --- a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/MongoQueryRunner.java +++ b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/MongoQueryRunner.java @@ -18,17 +18,17 @@ import com.mongodb.MongoClient; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; import io.trino.tpch.TpchTable; import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class MongoQueryRunner { diff --git a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongo3DistributedQueriesLatest.java b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongo3DistributedQueriesLatest.java index 5d1af7d62495..32901a4af6a2 100644 --- a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongo3DistributedQueriesLatest.java +++ b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongo3DistributedQueriesLatest.java @@ -14,10 +14,10 @@ package io.trino.plugin.mongodb; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; -import static io.prestosql.plugin.mongodb.MongoQueryRunner.createMongoQueryRunner; +import static io.trino.plugin.mongodb.MongoQueryRunner.createMongoQueryRunner; public class TestMongo3DistributedQueriesLatest extends BaseMongoDistributedQueries diff --git a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongo4DistributedQueriesLatest.java b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongo4DistributedQueriesLatest.java index efdc260d9d05..90670b022f7d 100644 --- a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongo4DistributedQueriesLatest.java +++ b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongo4DistributedQueriesLatest.java @@ -14,10 +14,10 @@ package io.trino.plugin.mongodb; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; -import static io.prestosql.plugin.mongodb.MongoQueryRunner.createMongoQueryRunner; +import static io.trino.plugin.mongodb.MongoQueryRunner.createMongoQueryRunner; public class TestMongo4DistributedQueriesLatest extends BaseMongoDistributedQueries diff --git a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoDistributedQueries.java b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoDistributedQueries.java index fee6e4f80bc2..d01b4c5dacb0 100644 --- a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoDistributedQueries.java +++ b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoDistributedQueries.java @@ -14,10 +14,10 @@ package io.trino.plugin.mongodb; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; -import static io.prestosql.plugin.mongodb.MongoQueryRunner.createMongoQueryRunner; +import static io.trino.plugin.mongodb.MongoQueryRunner.createMongoQueryRunner; public class TestMongoDistributedQueries extends BaseMongoDistributedQueries diff --git a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoIntegrationSmokeTest.java b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoIntegrationSmokeTest.java index 9f82019a3fc1..24f9c42e0360 100644 --- a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoIntegrationSmokeTest.java +++ b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoIntegrationSmokeTest.java @@ -17,11 +17,11 @@ import com.google.common.collect.ImmutableMap; import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; -import io.prestosql.sql.planner.plan.LimitNode; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; +import io.trino.sql.planner.plan.LimitNode; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; import org.bson.Document; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -30,8 +30,8 @@ import java.time.LocalDateTime; import java.util.Arrays; -import static io.prestosql.plugin.mongodb.MongoQueryRunner.createMongoClient; -import static io.prestosql.plugin.mongodb.MongoQueryRunner.createMongoQueryRunner; +import static io.trino.plugin.mongodb.MongoQueryRunner.createMongoClient; +import static io.trino.plugin.mongodb.MongoQueryRunner.createMongoQueryRunner; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.NATION; import static io.trino.tpch.TpchTable.ORDERS; diff --git a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoPlugin.java b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoPlugin.java index 2bd29408bc10..79ea98fc01c6 100644 --- a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoPlugin.java +++ b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoPlugin.java @@ -14,16 +14,16 @@ package io.trino.plugin.mongodb; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.type.Type; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.mongodb.ObjectIdType.OBJECT_ID; +import static io.trino.plugin.mongodb.ObjectIdType.OBJECT_ID; import static org.testng.Assert.assertEquals; public class TestMongoPlugin diff --git a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoSession.java b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoSession.java index a060ff85b27b..e5774c2dcc66 100644 --- a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoSession.java +++ b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoSession.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; import org.bson.Document; import org.testng.annotations.Test; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.predicate.Range.equal; -import static io.prestosql.spi.predicate.Range.greaterThan; -import static io.prestosql.spi.predicate.Range.greaterThanOrEqual; -import static io.prestosql.spi.predicate.Range.lessThan; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.predicate.Range.equal; +import static io.trino.spi.predicate.Range.greaterThan; +import static io.trino.spi.predicate.Range.greaterThanOrEqual; +import static io.trino.spi.predicate.Range.lessThan; +import static io.trino.spi.predicate.Range.range; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Arrays.asList; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoTableHandle.java b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoTableHandle.java index 6327f749b17d..ac43b7df55db 100644 --- a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoTableHandle.java +++ b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoTableHandle.java @@ -14,7 +14,7 @@ package io.trino.plugin.mongodb; import io.airlift.json.JsonCodec; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestObjectIdFunctions.java b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestObjectIdFunctions.java index 3f0c8c5945c0..ee14b6cbac33 100644 --- a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestObjectIdFunctions.java +++ b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestObjectIdFunctions.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.mongodb; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.type.SqlTimestampWithTimeZone; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.type.SqlTimestampWithTimeZone; +import io.trino.spi.type.TimeZoneKey; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.time.ZonedDateTime; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; import static java.time.ZoneOffset.UTC; public class TestObjectIdFunctions diff --git a/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/ImplementAvgBigint.java b/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/ImplementAvgBigint.java index bcf3c4b295ff..491129efe28d 100644 --- a/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/ImplementAvgBigint.java +++ b/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/ImplementAvgBigint.java @@ -13,28 +13,28 @@ */ package io.trino.plugin.mysql; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRule; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.Variable; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.plugin.jdbc.expression.AggregateFunctionRule; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.Variable; import java.sql.Types; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.variable; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.matching.Capture.newCapture; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.variable; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.String.format; public class ImplementAvgBigint diff --git a/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlClient.java b/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlClient.java index 65a2d8376653..772e958b847d 100644 --- a/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlClient.java +++ b/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlClient.java @@ -15,38 +15,38 @@ import com.google.common.collect.ImmutableSet; import com.mysql.jdbc.Statement; -import io.prestosql.plugin.jdbc.BaseJdbcClient; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ColumnMapping; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.plugin.jdbc.PredicatePushdownController; -import io.prestosql.plugin.jdbc.WriteMapping; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRewriter; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRule; -import io.prestosql.plugin.jdbc.expression.ImplementAvgDecimal; -import io.prestosql.plugin.jdbc.expression.ImplementAvgFloatingPoint; -import io.prestosql.plugin.jdbc.expression.ImplementCount; -import io.prestosql.plugin.jdbc.expression.ImplementCountAll; -import io.prestosql.plugin.jdbc.expression.ImplementMinMax; -import io.prestosql.plugin.jdbc.expression.ImplementSum; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.jdbc.BaseJdbcClient; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ColumnMapping; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.plugin.jdbc.PredicatePushdownController; +import io.trino.plugin.jdbc.WriteMapping; +import io.trino.plugin.jdbc.expression.AggregateFunctionRewriter; +import io.trino.plugin.jdbc.expression.AggregateFunctionRule; +import io.trino.plugin.jdbc.expression.ImplementAvgDecimal; +import io.trino.plugin.jdbc.expression.ImplementAvgFloatingPoint; +import io.trino.plugin.jdbc.expression.ImplementCount; +import io.trino.plugin.jdbc.expression.ImplementCountAll; +import io.trino.plugin.jdbc.expression.ImplementMinMax; +import io.trino.plugin.jdbc.expression.ImplementSum; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.VarcharType; import javax.inject.Inject; @@ -67,55 +67,55 @@ import static com.mysql.jdbc.SQLError.SQL_STATE_ER_TABLE_EXISTS_ERROR; import static com.mysql.jdbc.SQLError.SQL_STATE_SYNTAX_ERROR; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.base.util.JsonTypeUtil.jsonParse; -import static io.prestosql.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.getDecimalDefaultScale; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.getDecimalRounding; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.getDecimalRoundingMode; -import static io.prestosql.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.FULL_PUSHDOWN; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.PUSHDOWN_AND_KEEP; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.charWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.dateColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.dateWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.decimalColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.defaultCharColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.doubleColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.doubleWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.longDecimalWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.realColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.realWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.shortDecimalWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.timestampWriteFunctionUsingSqlTimestamp; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.tinyintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varbinaryReadFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varbinaryWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharReadFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.plugin.base.util.JsonTypeUtil.jsonParse; +import static io.trino.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.getDecimalDefaultScale; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.getDecimalRounding; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.getDecimalRoundingMode; +import static io.trino.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; +import static io.trino.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; +import static io.trino.plugin.jdbc.PredicatePushdownController.FULL_PUSHDOWN; +import static io.trino.plugin.jdbc.PredicatePushdownController.PUSHDOWN_AND_KEEP; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.charWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.dateColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.dateWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.decimalColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.defaultCharColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.doubleColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.doubleWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.longDecimalWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.realColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.realWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.shortDecimalWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.timestampWriteFunctionUsingSqlTimestamp; +import static io.trino.plugin.jdbc.StandardColumnMappings.tinyintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varbinaryReadFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varbinaryWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharReadFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.Math.max; import static java.lang.Math.min; import static java.lang.String.format; diff --git a/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlClientModule.java b/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlClientModule.java index 5b72481d08c3..2f8f3908a835 100644 --- a/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlClientModule.java +++ b/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlClientModule.java @@ -19,13 +19,13 @@ import com.google.inject.Scopes; import com.google.inject.Singleton; import com.mysql.jdbc.Driver; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.DecimalModule; -import io.prestosql.plugin.jdbc.DriverConnectionFactory; -import io.prestosql.plugin.jdbc.ForBaseJdbc; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.credential.CredentialProvider; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.DecimalModule; +import io.trino.plugin.jdbc.DriverConnectionFactory; +import io.trino.plugin.jdbc.ForBaseJdbc; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.credential.CredentialProvider; import java.sql.SQLException; import java.util.Properties; diff --git a/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlJdbcConfig.java b/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlJdbcConfig.java index 649a50cf3d1a..fe707ca3f2a8 100644 --- a/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlJdbcConfig.java +++ b/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlJdbcConfig.java @@ -14,7 +14,7 @@ package io.trino.plugin.mysql; import com.mysql.jdbc.Driver; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.BaseJdbcConfig; import javax.validation.constraints.AssertTrue; diff --git a/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlPlugin.java b/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlPlugin.java index 9aa1bf89ad6e..2f13de05a9c5 100644 --- a/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlPlugin.java +++ b/plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlPlugin.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.mysql; -import io.prestosql.plugin.jdbc.JdbcPlugin; +import io.trino.plugin.jdbc.JdbcPlugin; public class MySqlPlugin extends JdbcPlugin diff --git a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlIntegrationSmokeTest.java b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlIntegrationSmokeTest.java index 660a8add622d..e4ec730a1afc 100644 --- a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlIntegrationSmokeTest.java +++ b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlIntegrationSmokeTest.java @@ -13,21 +13,21 @@ */ package io.trino.plugin.mysql; -import io.prestosql.Session; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; +import io.trino.Session; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertFalse; diff --git a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/MySqlQueryRunner.java b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/MySqlQueryRunner.java index 8393075e1f42..83e9ffe191ca 100644 --- a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/MySqlQueryRunner.java +++ b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/MySqlQueryRunner.java @@ -17,19 +17,19 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import java.util.HashMap; import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class MySqlQueryRunner { diff --git a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestCredentialPassthrough.java b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestCredentialPassthrough.java index e083ae18a7c7..a5afb07e03fe 100644 --- a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestCredentialPassthrough.java +++ b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestCredentialPassthrough.java @@ -14,10 +14,10 @@ package io.trino.plugin.mysql; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.spi.security.Identity; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.spi.security.Identity; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -25,7 +25,7 @@ import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestCredentialPassthrough { diff --git a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestGlobalTransactionMySqlIntegrationSmokeTest.java b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestGlobalTransactionMySqlIntegrationSmokeTest.java index 3d5bf876d22f..538fa5118964 100644 --- a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestGlobalTransactionMySqlIntegrationSmokeTest.java +++ b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestGlobalTransactionMySqlIntegrationSmokeTest.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.mysql; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; -import static io.prestosql.plugin.mysql.MySqlQueryRunner.createMySqlQueryRunner; +import static io.trino.plugin.mysql.MySqlQueryRunner.createMySqlQueryRunner; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.NATION; import static io.trino.tpch.TpchTable.ORDERS; diff --git a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlCaseInsensitiveMapping.java b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlCaseInsensitiveMapping.java index a20dca7e7d14..6dfc9f528180 100644 --- a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlCaseInsensitiveMapping.java +++ b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlCaseInsensitiveMapping.java @@ -16,16 +16,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; import java.util.stream.Stream; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.mysql.MySqlQueryRunner.createMySqlQueryRunner; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.mysql.MySqlQueryRunner.createMySqlQueryRunner; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlClient.java b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlClient.java index ac26d270f568..61cbc9bbd874 100644 --- a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlClient.java +++ b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlClient.java @@ -13,19 +13,19 @@ */ package io.trino.plugin.mysql; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ColumnMapping; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.InternalTypeManager; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ColumnMapping; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Variable; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.type.InternalTypeManager; import org.testng.annotations.Test; import java.sql.Types; @@ -33,12 +33,12 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.assertions.Assert.assertEquals; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlDistributedQueries.java b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlDistributedQueries.java index 98ca5bebe829..225618c05462 100644 --- a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlDistributedQueries.java +++ b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlDistributedQueries.java @@ -14,20 +14,20 @@ package io.trino.plugin.mysql; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.TestTable; import io.trino.tpch.TpchTable; import org.testng.annotations.AfterClass; import java.util.Optional; import static com.google.common.base.Strings.nullToEmpty; -import static io.prestosql.plugin.mysql.MySqlQueryRunner.createMySqlQueryRunner; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.mysql.MySqlQueryRunner.createMySqlQueryRunner; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; public class TestMySqlDistributedQueries extends AbstractTestDistributedQueries diff --git a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlIntegrationSmokeTest.java b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlIntegrationSmokeTest.java index 8013fe2bf70d..6f2203d773ae 100644 --- a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlIntegrationSmokeTest.java +++ b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlIntegrationSmokeTest.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.mysql; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; -import static io.prestosql.plugin.mysql.MySqlQueryRunner.createMySqlQueryRunner; +import static io.trino.plugin.mysql.MySqlQueryRunner.createMySqlQueryRunner; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.NATION; import static io.trino.tpch.TpchTable.ORDERS; diff --git a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlPlugin.java b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlPlugin.java index 30941d773e04..7607ca52e961 100644 --- a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlPlugin.java +++ b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlPlugin.java @@ -14,9 +14,9 @@ package io.trino.plugin.mysql; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; diff --git a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlTypeMapping.java b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlTypeMapping.java index bbdae4abfcc4..ad6ee94d1ee6 100644 --- a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlTypeMapping.java +++ b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlTypeMapping.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.jdbc.UnsupportedTypeHandling; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.datatype.CreateAndInsertDataSetup; -import io.prestosql.testing.datatype.CreateAsSelectDataSetup; -import io.prestosql.testing.datatype.DataSetup; -import io.prestosql.testing.datatype.DataType; -import io.prestosql.testing.datatype.DataTypeTest; -import io.prestosql.testing.datatype.SqlDataTypeTest; -import io.prestosql.testing.sql.PrestoSqlExecutor; -import io.prestosql.testing.sql.SqlExecutor; -import io.prestosql.testing.sql.TestTable; +import io.trino.Session; +import io.trino.plugin.jdbc.UnsupportedTypeHandling; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.VarcharType; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; +import io.trino.testing.datatype.CreateAndInsertDataSetup; +import io.trino.testing.datatype.CreateAsSelectDataSetup; +import io.trino.testing.datatype.DataSetup; +import io.trino.testing.datatype.DataType; +import io.trino.testing.datatype.DataTypeTest; +import io.trino.testing.datatype.SqlDataTypeTest; +import io.trino.testing.sql.PrestoSqlExecutor; +import io.trino.testing.sql.SqlExecutor; +import io.trino.testing.sql.TestTable; import org.testng.annotations.AfterClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -49,33 +49,33 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static com.google.common.io.BaseEncoding.base16; -import static io.prestosql.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; -import static io.prestosql.plugin.jdbc.DecimalConfig.DecimalMapping.STRICT; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_DEFAULT_SCALE; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_MAPPING; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_ROUNDING_MODE; -import static io.prestosql.plugin.jdbc.TypeHandlingJdbcSessionProperties.UNSUPPORTED_TYPE_HANDLING; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; -import static io.prestosql.plugin.mysql.MySqlQueryRunner.createMySqlQueryRunner; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.datatype.DataType.bigintDataType; -import static io.prestosql.testing.datatype.DataType.charDataType; -import static io.prestosql.testing.datatype.DataType.dataType; -import static io.prestosql.testing.datatype.DataType.dateDataType; -import static io.prestosql.testing.datatype.DataType.decimalDataType; -import static io.prestosql.testing.datatype.DataType.doubleDataType; -import static io.prestosql.testing.datatype.DataType.formatStringLiteral; -import static io.prestosql.testing.datatype.DataType.integerDataType; -import static io.prestosql.testing.datatype.DataType.realDataType; -import static io.prestosql.testing.datatype.DataType.smallintDataType; -import static io.prestosql.testing.datatype.DataType.stringDataType; -import static io.prestosql.testing.datatype.DataType.tinyintDataType; -import static io.prestosql.testing.datatype.DataType.varcharDataType; -import static io.prestosql.type.JsonType.JSON; +import static io.trino.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; +import static io.trino.plugin.jdbc.DecimalConfig.DecimalMapping.STRICT; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_DEFAULT_SCALE; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_MAPPING; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_ROUNDING_MODE; +import static io.trino.plugin.jdbc.TypeHandlingJdbcSessionProperties.UNSUPPORTED_TYPE_HANDLING; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; +import static io.trino.plugin.mysql.MySqlQueryRunner.createMySqlQueryRunner; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.datatype.DataType.bigintDataType; +import static io.trino.testing.datatype.DataType.charDataType; +import static io.trino.testing.datatype.DataType.dataType; +import static io.trino.testing.datatype.DataType.dateDataType; +import static io.trino.testing.datatype.DataType.decimalDataType; +import static io.trino.testing.datatype.DataType.doubleDataType; +import static io.trino.testing.datatype.DataType.formatStringLiteral; +import static io.trino.testing.datatype.DataType.integerDataType; +import static io.trino.testing.datatype.DataType.realDataType; +import static io.trino.testing.datatype.DataType.smallintDataType; +import static io.trino.testing.datatype.DataType.stringDataType; +import static io.trino.testing.datatype.DataType.tinyintDataType; +import static io.trino.testing.datatype.DataType.varcharDataType; +import static io.trino.type.JsonType.JSON; import static java.lang.String.format; import static java.math.RoundingMode.HALF_UP; import static java.math.RoundingMode.UNNECESSARY; diff --git a/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OracleClient.java b/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OracleClient.java index f04930a09e42..bbdd64ef1ac6 100644 --- a/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OracleClient.java +++ b/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OracleClient.java @@ -15,26 +15,26 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.jdbc.BaseJdbcClient; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ColumnMapping; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.DoubleWriteFunction; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.plugin.jdbc.LongWriteFunction; -import io.prestosql.plugin.jdbc.SliceWriteFunction; -import io.prestosql.plugin.jdbc.WriteMapping; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.Chars; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.jdbc.BaseJdbcClient; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ColumnMapping; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.DoubleWriteFunction; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.plugin.jdbc.LongWriteFunction; +import io.trino.plugin.jdbc.SliceWriteFunction; +import io.trino.plugin.jdbc.WriteMapping; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.CharType; +import io.trino.spi.type.Chars; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import oracle.jdbc.OraclePreparedStatement; import oracle.jdbc.OracleTypes; @@ -61,46 +61,46 @@ import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.FULL_PUSHDOWN; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.charReadFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.charWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.longDecimalReadFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.longDecimalWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.shortDecimalReadFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.shortDecimalWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varbinaryWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; -import static io.prestosql.plugin.jdbc.TypeHandlingJdbcSessionProperties.getUnsupportedTypeHandling; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; -import static io.prestosql.plugin.oracle.OracleSessionProperties.getNumberDefaultScale; -import static io.prestosql.plugin.oracle.OracleSessionProperties.getNumberRoundingMode; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.epochMicrosToMillisWithRounding; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; +import static io.trino.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; +import static io.trino.plugin.jdbc.PredicatePushdownController.FULL_PUSHDOWN; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.charReadFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.charWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.longDecimalReadFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.longDecimalWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.shortDecimalReadFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.shortDecimalWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varbinaryWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; +import static io.trino.plugin.jdbc.TypeHandlingJdbcSessionProperties.getUnsupportedTypeHandling; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; +import static io.trino.plugin.oracle.OracleSessionProperties.getNumberDefaultScale; +import static io.trino.plugin.oracle.OracleSessionProperties.getNumberRoundingMode; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.epochMicrosToMillisWithRounding; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.max; diff --git a/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OracleClientModule.java b/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OracleClientModule.java index 083012e713f2..119704fdfea7 100644 --- a/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OracleClientModule.java +++ b/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OracleClientModule.java @@ -19,14 +19,14 @@ import com.google.inject.Provides; import com.google.inject.Scopes; import com.google.inject.Singleton; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.DriverConnectionFactory; -import io.prestosql.plugin.jdbc.ForBaseJdbc; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.MaxDomainCompactionThreshold; -import io.prestosql.plugin.jdbc.RetryingConnectionFactory; -import io.prestosql.plugin.jdbc.credential.CredentialProvider; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.DriverConnectionFactory; +import io.trino.plugin.jdbc.ForBaseJdbc; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.MaxDomainCompactionThreshold; +import io.trino.plugin.jdbc.RetryingConnectionFactory; +import io.trino.plugin.jdbc.credential.CredentialProvider; import oracle.jdbc.OracleConnection; import oracle.jdbc.OracleDriver; @@ -35,8 +35,8 @@ import static com.google.inject.multibindings.OptionalBinder.newOptionalBinder; import static io.airlift.configuration.ConfigBinder.configBinder; -import static io.prestosql.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider; -import static io.prestosql.plugin.oracle.OracleClient.ORACLE_MAX_LIST_EXPRESSIONS; +import static io.trino.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider; +import static io.trino.plugin.oracle.OracleClient.ORACLE_MAX_LIST_EXPRESSIONS; public class OracleClientModule implements Module diff --git a/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OraclePlugin.java b/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OraclePlugin.java index 07d3365a00f9..c58e251ba08f 100644 --- a/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OraclePlugin.java +++ b/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OraclePlugin.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.oracle; -import io.prestosql.plugin.jdbc.JdbcPlugin; +import io.trino.plugin.jdbc.JdbcPlugin; public class OraclePlugin extends JdbcPlugin diff --git a/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OraclePoolConnectionFactory.java b/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OraclePoolConnectionFactory.java index bb6f8ded7042..deb8a15fe2ed 100644 --- a/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OraclePoolConnectionFactory.java +++ b/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OraclePoolConnectionFactory.java @@ -14,9 +14,9 @@ package io.trino.plugin.oracle; import io.airlift.units.Duration; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.credential.CredentialProvider; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.credential.CredentialProvider; +import io.trino.spi.connector.ConnectorSession; import oracle.jdbc.pool.OracleDataSource; import oracle.ucp.jdbc.PoolDataSource; import oracle.ucp.jdbc.PoolDataSourceFactory; diff --git a/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OracleSessionProperties.java b/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OracleSessionProperties.java index c66222df8cf8..86552edc04cd 100644 --- a/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OracleSessionProperties.java +++ b/plugin/trino-oracle/src/main/java/io/trino/plugin/oracle/OracleSessionProperties.java @@ -14,9 +14,9 @@ package io.trino.plugin.oracle; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.jdbc.SessionPropertiesProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.plugin.jdbc.SessionPropertiesProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; @@ -24,8 +24,8 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; public final class OracleSessionProperties implements SessionPropertiesProvider diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/AbstractTestOracleTypeMapping.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/AbstractTestOracleTypeMapping.java index 8b83cf98f1c6..c20815430588 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/AbstractTestOracleTypeMapping.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/AbstractTestOracleTypeMapping.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.jdbc.UnsupportedTypeHandling; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.TestingSession; -import io.prestosql.testing.datatype.CreateAndInsertDataSetup; -import io.prestosql.testing.datatype.CreateAsSelectDataSetup; -import io.prestosql.testing.datatype.DataSetup; -import io.prestosql.testing.datatype.DataType; -import io.prestosql.testing.datatype.DataTypeTest; -import io.prestosql.testing.datatype.SqlDataTypeTest; -import io.prestosql.testing.sql.PrestoSqlExecutor; -import io.prestosql.testing.sql.SqlExecutor; -import io.prestosql.testing.sql.TestTable; +import io.trino.Session; +import io.trino.plugin.jdbc.UnsupportedTypeHandling; +import io.trino.spi.type.TimeZoneKey; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.TestingSession; +import io.trino.testing.datatype.CreateAndInsertDataSetup; +import io.trino.testing.datatype.CreateAsSelectDataSetup; +import io.trino.testing.datatype.DataSetup; +import io.trino.testing.datatype.DataType; +import io.trino.testing.datatype.DataTypeTest; +import io.trino.testing.datatype.SqlDataTypeTest; +import io.trino.testing.sql.PrestoSqlExecutor; +import io.trino.testing.sql.SqlExecutor; +import io.trino.testing.sql.TestTable; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -48,44 +48,44 @@ import java.util.function.ToIntFunction; import static com.google.common.base.Verify.verify; -import static io.prestosql.plugin.jdbc.TypeHandlingJdbcSessionProperties.UNSUPPORTED_TYPE_HANDLING; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.IGNORE; -import static io.prestosql.plugin.oracle.OracleDataTypes.CharacterSemantics.BYTE; -import static io.prestosql.plugin.oracle.OracleDataTypes.CharacterSemantics.CHAR; -import static io.prestosql.plugin.oracle.OracleDataTypes.MAX_CHAR_ON_READ; -import static io.prestosql.plugin.oracle.OracleDataTypes.MAX_CHAR_ON_WRITE; -import static io.prestosql.plugin.oracle.OracleDataTypes.MAX_NCHAR; -import static io.prestosql.plugin.oracle.OracleDataTypes.MAX_NVARCHAR2; -import static io.prestosql.plugin.oracle.OracleDataTypes.MAX_VARCHAR2_ON_READ; -import static io.prestosql.plugin.oracle.OracleDataTypes.MAX_VARCHAR2_ON_WRITE; -import static io.prestosql.plugin.oracle.OracleDataTypes.binaryDoubleDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.binaryFloatDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.booleanDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.charDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.clobDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.dateDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.doubleDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.integerDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.ncharDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.nclobDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.numberDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.nvarchar2DataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.oracleFloatDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.oracleTimestamp3TimeZoneDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.prestoTimestampWithTimeZoneDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.realDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.tooLargeCharDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.tooLargeVarcharDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.unspecifiedNumberDataType; -import static io.prestosql.plugin.oracle.OracleDataTypes.varchar2DataType; -import static io.prestosql.plugin.oracle.OracleSessionProperties.NUMBER_DEFAULT_SCALE; -import static io.prestosql.plugin.oracle.OracleSessionProperties.NUMBER_ROUNDING_MODE; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.testing.datatype.DataType.timestampDataType; -import static io.prestosql.testing.datatype.DataType.varcharDataType; +import static io.trino.plugin.jdbc.TypeHandlingJdbcSessionProperties.UNSUPPORTED_TYPE_HANDLING; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.IGNORE; +import static io.trino.plugin.oracle.OracleDataTypes.CharacterSemantics.BYTE; +import static io.trino.plugin.oracle.OracleDataTypes.CharacterSemantics.CHAR; +import static io.trino.plugin.oracle.OracleDataTypes.MAX_CHAR_ON_READ; +import static io.trino.plugin.oracle.OracleDataTypes.MAX_CHAR_ON_WRITE; +import static io.trino.plugin.oracle.OracleDataTypes.MAX_NCHAR; +import static io.trino.plugin.oracle.OracleDataTypes.MAX_NVARCHAR2; +import static io.trino.plugin.oracle.OracleDataTypes.MAX_VARCHAR2_ON_READ; +import static io.trino.plugin.oracle.OracleDataTypes.MAX_VARCHAR2_ON_WRITE; +import static io.trino.plugin.oracle.OracleDataTypes.binaryDoubleDataType; +import static io.trino.plugin.oracle.OracleDataTypes.binaryFloatDataType; +import static io.trino.plugin.oracle.OracleDataTypes.booleanDataType; +import static io.trino.plugin.oracle.OracleDataTypes.charDataType; +import static io.trino.plugin.oracle.OracleDataTypes.clobDataType; +import static io.trino.plugin.oracle.OracleDataTypes.dateDataType; +import static io.trino.plugin.oracle.OracleDataTypes.doubleDataType; +import static io.trino.plugin.oracle.OracleDataTypes.integerDataType; +import static io.trino.plugin.oracle.OracleDataTypes.ncharDataType; +import static io.trino.plugin.oracle.OracleDataTypes.nclobDataType; +import static io.trino.plugin.oracle.OracleDataTypes.numberDataType; +import static io.trino.plugin.oracle.OracleDataTypes.nvarchar2DataType; +import static io.trino.plugin.oracle.OracleDataTypes.oracleFloatDataType; +import static io.trino.plugin.oracle.OracleDataTypes.oracleTimestamp3TimeZoneDataType; +import static io.trino.plugin.oracle.OracleDataTypes.prestoTimestampWithTimeZoneDataType; +import static io.trino.plugin.oracle.OracleDataTypes.realDataType; +import static io.trino.plugin.oracle.OracleDataTypes.tooLargeCharDataType; +import static io.trino.plugin.oracle.OracleDataTypes.tooLargeVarcharDataType; +import static io.trino.plugin.oracle.OracleDataTypes.unspecifiedNumberDataType; +import static io.trino.plugin.oracle.OracleDataTypes.varchar2DataType; +import static io.trino.plugin.oracle.OracleSessionProperties.NUMBER_DEFAULT_SCALE; +import static io.trino.plugin.oracle.OracleSessionProperties.NUMBER_ROUNDING_MODE; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.testing.datatype.DataType.timestampDataType; +import static io.trino.testing.datatype.DataType.varcharDataType; import static java.lang.String.format; import static java.math.RoundingMode.HALF_EVEN; import static java.math.RoundingMode.HALF_UP; diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/BaseOracleIntegrationSmokeTest.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/BaseOracleIntegrationSmokeTest.java index a1e0b97dc182..b3e0681af0e6 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/BaseOracleIntegrationSmokeTest.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/BaseOracleIntegrationSmokeTest.java @@ -14,18 +14,18 @@ package io.trino.plugin.oracle; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.sql.SqlExecutor; -import io.prestosql.testing.sql.TestTable; +import io.trino.Session; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.sql.SqlExecutor; +import io.trino.testing.sql.TestTable; import org.testng.annotations.Test; -import static io.prestosql.plugin.oracle.TestingOracleServer.TEST_USER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.assertions.Assert.assertEquals; -import static io.prestosql.testing.sql.TestTable.randomTableSuffix; +import static io.trino.plugin.oracle.TestingOracleServer.TEST_USER; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.assertions.Assert.assertEquals; +import static io.trino.testing.sql.TestTable.randomTableSuffix; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertFalse; diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/BaseTestOracleDistributedQueries.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/BaseTestOracleDistributedQueries.java index c8cc0e118bfc..ec867150f518 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/BaseTestOracleDistributedQueries.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/BaseTestOracleDistributedQueries.java @@ -13,20 +13,20 @@ */ package io.trino.plugin.oracle; -import io.prestosql.Session; -import io.prestosql.execution.QueryInfo; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.ResultWithQueryId; -import io.prestosql.testing.sql.SqlExecutor; -import io.prestosql.testing.sql.TestTable; +import io.trino.Session; +import io.trino.execution.QueryInfo; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.MaterializedResult; +import io.trino.testing.ResultWithQueryId; +import io.trino.testing.sql.SqlExecutor; +import io.trino.testing.sql.TestTable; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.sql.TestTable.randomTableSuffix; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.sql.TestTable.randomTableSuffix; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/OracleDataTypes.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/OracleDataTypes.java index f8cdafab7d2c..6c5314ea6289 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/OracleDataTypes.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/OracleDataTypes.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.oracle; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.testing.datatype.DataType; -import io.prestosql.testing.datatype.SqlDataTypeTest; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.testing.datatype.DataType; +import io.trino.testing.datatype.SqlDataTypeTest; import java.math.BigDecimal; import java.math.RoundingMode; @@ -33,11 +33,11 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.io.BaseEncoding.base16; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.datatype.DataType.stringDataType; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.datatype.DataType.stringDataType; import static java.lang.Math.max; import static java.lang.String.format; import static java.math.RoundingMode.UNNECESSARY; diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/OracleQueryRunner.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/OracleQueryRunner.java index e49e3b469f4b..03a2933295f8 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/OracleQueryRunner.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/OracleQueryRunner.java @@ -16,21 +16,21 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; import io.trino.tpch.TpchTable; import java.util.HashMap; import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.plugin.oracle.TestingOracleServer.TEST_PASS; -import static io.prestosql.plugin.oracle.TestingOracleServer.TEST_SCHEMA; -import static io.prestosql.plugin.oracle.TestingOracleServer.TEST_USER; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.oracle.TestingOracleServer.TEST_PASS; +import static io.trino.plugin.oracle.TestingOracleServer.TEST_SCHEMA; +import static io.trino.plugin.oracle.TestingOracleServer.TEST_USER; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class OracleQueryRunner { diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOracleDistributedQueries.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOracleDistributedQueries.java index f9006b34a864..6582c71f924d 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOracleDistributedQueries.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOracleDistributedQueries.java @@ -14,13 +14,13 @@ package io.trino.plugin.oracle; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.SqlExecutor; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.SqlExecutor; import io.trino.tpch.TpchTable; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; -import static io.prestosql.testing.sql.TestTable.randomTableSuffix; +import static io.trino.testing.sql.TestTable.randomTableSuffix; import static org.assertj.core.api.Assertions.assertThat; public class TestOracleDistributedQueries diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOracleIntegrationSmokeTest.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOracleIntegrationSmokeTest.java index 54e32bbe2b08..e48975b6329f 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOracleIntegrationSmokeTest.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOracleIntegrationSmokeTest.java @@ -16,8 +16,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.testing.Closeables; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.SqlExecutor; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.SqlExecutor; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOraclePlugin.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOraclePlugin.java index 15e20c09658c..7b13e1914a85 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOraclePlugin.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOraclePlugin.java @@ -14,9 +14,9 @@ package io.trino.plugin.oracle; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOraclePoolIntegrationSmokeTest.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOraclePoolIntegrationSmokeTest.java index 8b2d1da94ec7..f49c0305aebc 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOraclePoolIntegrationSmokeTest.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOraclePoolIntegrationSmokeTest.java @@ -16,8 +16,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.testing.Closeables; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.SqlExecutor; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.SqlExecutor; import org.testng.annotations.AfterClass; import java.io.IOException; diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOracleTypeMapping.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOracleTypeMapping.java index 774e7c59d51f..6cb121d0b2c9 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOracleTypeMapping.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOracleTypeMapping.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.SqlExecutor; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.SqlExecutor; import org.testng.annotations.AfterClass; public class TestOracleTypeMapping diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestRemarksReportingOracleDistributedQueries.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestRemarksReportingOracleDistributedQueries.java index 21161b80710b..9f8db2867911 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestRemarksReportingOracleDistributedQueries.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestRemarksReportingOracleDistributedQueries.java @@ -14,8 +14,8 @@ package io.trino.plugin.oracle; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.SqlExecutor; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.SqlExecutor; import io.trino.tpch.TpchTable; import org.testng.annotations.AfterClass; diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestRemarksReportingOraclePoolIntegrationSmokeTest.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestRemarksReportingOraclePoolIntegrationSmokeTest.java index ba603532024d..d89e7703ee5e 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestRemarksReportingOraclePoolIntegrationSmokeTest.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestRemarksReportingOraclePoolIntegrationSmokeTest.java @@ -16,8 +16,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.testing.Closeables; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.SqlExecutor; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.SqlExecutor; import org.testng.annotations.AfterClass; import java.io.IOException; diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestSynonym.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestSynonym.java index 83b4c67a89d1..a92d7e0925e2 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestSynonym.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestSynonym.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.oracle; -import io.prestosql.testing.sql.SqlExecutor; +import io.trino.testing.sql.SqlExecutor; import java.io.Closeable; -import static io.prestosql.testing.sql.TestTable.randomTableSuffix; +import static io.trino.testing.sql.TestTable.randomTableSuffix; import static java.lang.String.format; public class TestSynonym diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestView.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestView.java index 4e2bddca8d68..c965d46f981e 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestView.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestView.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.oracle; -import io.prestosql.testing.sql.SqlExecutor; +import io.trino.testing.sql.SqlExecutor; import java.io.Closeable; -import static io.prestosql.testing.sql.TestTable.randomTableSuffix; +import static io.trino.testing.sql.TestTable.randomTableSuffix; import static java.lang.String.format; public class TestView diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestingOracleServer.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestingOracleServer.java index f8a04ebd0067..41ecd0c21452 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestingOracleServer.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestingOracleServer.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.oracle; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.DriverConnectionFactory; -import io.prestosql.plugin.jdbc.RetryingConnectionFactory; -import io.prestosql.plugin.jdbc.credential.StaticCredentialProvider; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.DriverConnectionFactory; +import io.trino.plugin.jdbc.RetryingConnectionFactory; +import io.trino.plugin.jdbc.credential.StaticCredentialProvider; import oracle.jdbc.OracleDriver; import org.testcontainers.containers.OracleContainer; import org.testcontainers.utility.MountableFile; @@ -28,7 +28,7 @@ import java.sql.SQLException; import java.sql.Statement; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.lang.String.format; public class TestingOracleServer diff --git a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/PasswordAuthenticatorPlugin.java b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/PasswordAuthenticatorPlugin.java index 02e652567637..a1b4648904e3 100644 --- a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/PasswordAuthenticatorPlugin.java +++ b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/PasswordAuthenticatorPlugin.java @@ -14,13 +14,13 @@ package io.trino.plugin.password; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.password.file.FileAuthenticatorFactory; -import io.prestosql.plugin.password.file.FileGroupProviderFactory; -import io.prestosql.plugin.password.ldap.LdapAuthenticatorFactory; -import io.prestosql.plugin.password.salesforce.SalesforceAuthenticatorFactory; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.security.GroupProviderFactory; -import io.prestosql.spi.security.PasswordAuthenticatorFactory; +import io.trino.plugin.password.file.FileAuthenticatorFactory; +import io.trino.plugin.password.file.FileGroupProviderFactory; +import io.trino.plugin.password.ldap.LdapAuthenticatorFactory; +import io.trino.plugin.password.salesforce.SalesforceAuthenticatorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.security.GroupProviderFactory; +import io.trino.spi.security.PasswordAuthenticatorFactory; public class PasswordAuthenticatorPlugin implements Plugin diff --git a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileAuthenticator.java b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileAuthenticator.java index f63f4ba78583..65574a09f288 100644 --- a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileAuthenticator.java +++ b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileAuthenticator.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.password.file; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.BasicPrincipal; -import io.prestosql.spi.security.PasswordAuthenticator; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.BasicPrincipal; +import io.trino.spi.security.PasswordAuthenticator; import javax.inject.Inject; diff --git a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileAuthenticatorFactory.java b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileAuthenticatorFactory.java index b5291f97eee0..4416358799eb 100644 --- a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileAuthenticatorFactory.java +++ b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileAuthenticatorFactory.java @@ -16,8 +16,8 @@ import com.google.inject.Injector; import com.google.inject.Scopes; import io.airlift.bootstrap.Bootstrap; -import io.prestosql.spi.security.PasswordAuthenticator; -import io.prestosql.spi.security.PasswordAuthenticatorFactory; +import io.trino.spi.security.PasswordAuthenticator; +import io.trino.spi.security.PasswordAuthenticatorFactory; import java.util.Map; diff --git a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileGroupProvider.java b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileGroupProvider.java index 3e9a96bbd67c..78b3768d3ffe 100644 --- a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileGroupProvider.java +++ b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileGroupProvider.java @@ -17,8 +17,8 @@ import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Multimap; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.security.GroupProvider; +import io.trino.spi.PrestoException; +import io.trino.spi.security.GroupProvider; import javax.inject.Inject; @@ -34,8 +34,8 @@ import static com.google.common.base.Suppliers.memoizeWithExpiration; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.spi.StandardErrorCode.CONFIGURATION_INVALID; -import static io.prestosql.spi.StandardErrorCode.CONFIGURATION_UNAVAILABLE; +import static io.trino.spi.StandardErrorCode.CONFIGURATION_INVALID; +import static io.trino.spi.StandardErrorCode.CONFIGURATION_UNAVAILABLE; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileGroupProviderFactory.java b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileGroupProviderFactory.java index 315837184568..0eb3d5c6bd86 100644 --- a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileGroupProviderFactory.java +++ b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/FileGroupProviderFactory.java @@ -16,8 +16,8 @@ import com.google.inject.Injector; import com.google.inject.Scopes; import io.airlift.bootstrap.Bootstrap; -import io.prestosql.spi.security.GroupProvider; -import io.prestosql.spi.security.GroupProviderFactory; +import io.trino.spi.security.GroupProvider; +import io.trino.spi.security.GroupProviderFactory; import java.util.Map; diff --git a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/HashedPasswordException.java b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/HashedPasswordException.java index 5145abb6ab40..3d39882c6b7a 100644 --- a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/HashedPasswordException.java +++ b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/HashedPasswordException.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.password.file; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; -import static io.prestosql.spi.StandardErrorCode.CONFIGURATION_INVALID; +import static io.trino.spi.StandardErrorCode.CONFIGURATION_INVALID; public class HashedPasswordException extends PrestoException diff --git a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/PasswordStore.java b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/PasswordStore.java index 1e027d4f248d..c556f09e19a0 100644 --- a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/PasswordStore.java +++ b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/file/PasswordStore.java @@ -19,8 +19,8 @@ import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.password.Credential; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.password.Credential; +import io.trino.spi.PrestoException; import java.io.File; import java.io.IOException; @@ -29,11 +29,11 @@ import java.util.List; import java.util.Map; -import static io.prestosql.plugin.password.file.EncryptionUtil.doesBCryptPasswordMatch; -import static io.prestosql.plugin.password.file.EncryptionUtil.doesPBKDF2PasswordMatch; -import static io.prestosql.plugin.password.file.EncryptionUtil.getHashingAlgorithm; -import static io.prestosql.spi.StandardErrorCode.CONFIGURATION_INVALID; -import static io.prestosql.spi.StandardErrorCode.CONFIGURATION_UNAVAILABLE; +import static io.trino.plugin.password.file.EncryptionUtil.doesBCryptPasswordMatch; +import static io.trino.plugin.password.file.EncryptionUtil.doesPBKDF2PasswordMatch; +import static io.trino.plugin.password.file.EncryptionUtil.getHashingAlgorithm; +import static io.trino.spi.StandardErrorCode.CONFIGURATION_INVALID; +import static io.trino.spi.StandardErrorCode.CONFIGURATION_UNAVAILABLE; import static java.lang.String.format; public class PasswordStore diff --git a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/ldap/JdkLdapAuthenticatorClient.java b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/ldap/JdkLdapAuthenticatorClient.java index cccb63a81e95..7e0d5f2af8ad 100644 --- a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/ldap/JdkLdapAuthenticatorClient.java +++ b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/ldap/JdkLdapAuthenticatorClient.java @@ -17,7 +17,7 @@ import com.google.common.collect.ImmutableSet; import io.airlift.log.Logger; import io.airlift.security.pem.PemReader; -import io.prestosql.spi.security.AccessDeniedException; +import io.trino.spi.security.AccessDeniedException; import javax.inject.Inject; import javax.naming.AuthenticationException; @@ -40,7 +40,7 @@ import java.util.Optional; import java.util.Set; -import static io.prestosql.plugin.password.jndi.JndiUtils.createDirContext; +import static io.trino.plugin.password.jndi.JndiUtils.createDirContext; import static java.util.Objects.requireNonNull; import static javax.naming.Context.INITIAL_CONTEXT_FACTORY; import static javax.naming.Context.PROVIDER_URL; diff --git a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/ldap/LdapAuthenticator.java b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/ldap/LdapAuthenticator.java index 0528db99ae48..89b418a6cf8b 100644 --- a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/ldap/LdapAuthenticator.java +++ b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/ldap/LdapAuthenticator.java @@ -20,11 +20,11 @@ import com.google.common.cache.LoadingCache; import com.google.common.util.concurrent.UncheckedExecutionException; import io.airlift.log.Logger; -import io.prestosql.plugin.password.Credential; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.BasicPrincipal; -import io.prestosql.spi.security.PasswordAuthenticator; +import io.trino.plugin.password.Credential; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.BasicPrincipal; +import io.trino.spi.security.PasswordAuthenticator; import javax.inject.Inject; import javax.naming.NamingException; diff --git a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/ldap/LdapAuthenticatorFactory.java b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/ldap/LdapAuthenticatorFactory.java index 22329ea4784b..598a768a472b 100644 --- a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/ldap/LdapAuthenticatorFactory.java +++ b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/ldap/LdapAuthenticatorFactory.java @@ -16,8 +16,8 @@ import com.google.inject.Injector; import com.google.inject.Scopes; import io.airlift.bootstrap.Bootstrap; -import io.prestosql.spi.security.PasswordAuthenticator; -import io.prestosql.spi.security.PasswordAuthenticatorFactory; +import io.trino.spi.security.PasswordAuthenticator; +import io.trino.spi.security.PasswordAuthenticatorFactory; import java.util.Map; diff --git a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/salesforce/SalesforceAuthenticatorFactory.java b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/salesforce/SalesforceAuthenticatorFactory.java index 3b5123148af7..3cea9090b744 100644 --- a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/salesforce/SalesforceAuthenticatorFactory.java +++ b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/salesforce/SalesforceAuthenticatorFactory.java @@ -16,8 +16,8 @@ import com.google.inject.Injector; import com.google.inject.Scopes; import io.airlift.bootstrap.Bootstrap; -import io.prestosql.spi.security.PasswordAuthenticator; -import io.prestosql.spi.security.PasswordAuthenticatorFactory; +import io.trino.spi.security.PasswordAuthenticator; +import io.trino.spi.security.PasswordAuthenticatorFactory; import java.util.Map; diff --git a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/salesforce/SalesforceBasicAuthenticator.java b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/salesforce/SalesforceBasicAuthenticator.java index 3dcbe2136dd2..b512e7994f5a 100644 --- a/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/salesforce/SalesforceBasicAuthenticator.java +++ b/plugin/trino-password-authenticators/src/main/java/io/trino/plugin/password/salesforce/SalesforceBasicAuthenticator.java @@ -23,10 +23,10 @@ import io.airlift.http.client.Request; import io.airlift.http.client.StringResponseHandler; import io.airlift.log.Logger; -import io.prestosql.plugin.password.Credential; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.BasicPrincipal; -import io.prestosql.spi.security.PasswordAuthenticator; +import io.trino.plugin.password.Credential; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.BasicPrincipal; +import io.trino.spi.security.PasswordAuthenticator; import org.w3c.dom.Document; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; diff --git a/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/file/TestEncryptionUtil.java b/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/file/TestEncryptionUtil.java index a363ba19e776..2315882d7ef9 100644 --- a/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/file/TestEncryptionUtil.java +++ b/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/file/TestEncryptionUtil.java @@ -15,9 +15,9 @@ import org.testng.annotations.Test; -import static io.prestosql.plugin.password.file.EncryptionUtil.getHashingAlgorithm; -import static io.prestosql.plugin.password.file.HashingAlgorithm.BCRYPT; -import static io.prestosql.plugin.password.file.HashingAlgorithm.PBKDF2; +import static io.trino.plugin.password.file.EncryptionUtil.getHashingAlgorithm; +import static io.trino.plugin.password.file.HashingAlgorithm.BCRYPT; +import static io.trino.plugin.password.file.HashingAlgorithm.PBKDF2; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/file/TestFileGroupProvider.java b/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/file/TestFileGroupProvider.java index 106f18088899..e1749ecc9081 100644 --- a/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/file/TestFileGroupProvider.java +++ b/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/file/TestFileGroupProvider.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.io.Resources; -import io.prestosql.spi.security.GroupProvider; +import io.trino.spi.security.GroupProvider; import org.testng.annotations.Test; import java.io.File; diff --git a/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/ldap/TestLdapAuthenticator.java b/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/ldap/TestLdapAuthenticator.java index a5d9255317f3..8b107e60b31a 100644 --- a/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/ldap/TestLdapAuthenticator.java +++ b/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/ldap/TestLdapAuthenticator.java @@ -15,9 +15,9 @@ import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.password.Credential; -import io.prestosql.spi.security.AccessDeniedException; -import io.prestosql.spi.security.BasicPrincipal; +import io.trino.plugin.password.Credential; +import io.trino.spi.security.AccessDeniedException; +import io.trino.spi.security.BasicPrincipal; import org.testng.annotations.Test; import javax.naming.NamingException; diff --git a/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/salesforce/TestSalesforceBasicAuthenticator.java b/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/salesforce/TestSalesforceBasicAuthenticator.java index 2ff3450e9606..397059225b3e 100644 --- a/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/salesforce/TestSalesforceBasicAuthenticator.java +++ b/plugin/trino-password-authenticators/src/test/java/io/trino/plugin/password/salesforce/TestSalesforceBasicAuthenticator.java @@ -18,7 +18,7 @@ import io.airlift.http.client.jetty.JettyHttpClient; import io.airlift.http.client.testing.TestingHttpClient; import io.airlift.units.Duration; -import io.prestosql.spi.security.AccessDeniedException; +import io.trino.spi.security.AccessDeniedException; import org.testng.SkipException; import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/MetadataUtil.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/MetadataUtil.java index babf97ecd78b..bed4282a39bb 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/MetadataUtil.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/MetadataUtil.java @@ -17,7 +17,7 @@ import java.util.Optional; -import static io.prestosql.plugin.phoenix.PhoenixMetadata.DEFAULT_SCHEMA; +import static io.trino.plugin.phoenix.PhoenixMetadata.DEFAULT_SCHEMA; import static org.apache.phoenix.query.QueryConstants.NULL_SCHEMA_NAME; public final class MetadataUtil diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixClient.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixClient.java index cdc1ae56b1ec..dbdd1e1e88d4 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixClient.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixClient.java @@ -16,33 +16,33 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.jdbc.BaseJdbcClient; -import io.prestosql.plugin.jdbc.ColumnMapping; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcOutputTableHandle; -import io.prestosql.plugin.jdbc.JdbcSplit; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.plugin.jdbc.ObjectReadFunction; -import io.prestosql.plugin.jdbc.ObjectWriteFunction; -import io.prestosql.plugin.jdbc.QueryBuilder; -import io.prestosql.plugin.jdbc.WriteFunction; -import io.prestosql.plugin.jdbc.WriteMapping; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.jdbc.BaseJdbcClient; +import io.trino.plugin.jdbc.ColumnMapping; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcOutputTableHandle; +import io.trino.plugin.jdbc.JdbcSplit; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.plugin.jdbc.ObjectReadFunction; +import io.trino.plugin.jdbc.ObjectWriteFunction; +import io.trino.plugin.jdbc.QueryBuilder; +import io.trino.plugin.jdbc.WriteFunction; +import io.trino.plugin.jdbc.WriteMapping; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaNotFoundException; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HConstants; @@ -103,61 +103,61 @@ import static com.google.common.base.MoreObjects.firstNonNull; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Verify.verify; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.booleanColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.booleanWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.charWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.dateColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.dateWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.decimalColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.defaultCharColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.defaultVarcharColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.doubleColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.doubleWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.longDecimalWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.realColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.realWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.shortDecimalWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.timeWriteFunctionUsingSqlTime; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.tinyintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varbinaryColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varbinaryWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; -import static io.prestosql.plugin.jdbc.TypeHandlingJdbcSessionProperties.getUnsupportedTypeHandling; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; -import static io.prestosql.plugin.phoenix.MetadataUtil.getEscapedTableName; -import static io.prestosql.plugin.phoenix.MetadataUtil.toPhoenixSchemaName; -import static io.prestosql.plugin.phoenix.PhoenixClientModule.getConnectionProperties; -import static io.prestosql.plugin.phoenix.PhoenixColumnProperties.isPrimaryKey; -import static io.prestosql.plugin.phoenix.PhoenixErrorCode.PHOENIX_METADATA_ERROR; -import static io.prestosql.plugin.phoenix.PhoenixErrorCode.PHOENIX_QUERY_ERROR; -import static io.prestosql.plugin.phoenix.PhoenixMetadata.DEFAULT_SCHEMA; -import static io.prestosql.plugin.phoenix.TypeUtils.getArrayElementPhoenixTypeName; -import static io.prestosql.plugin.phoenix.TypeUtils.getJdbcObjectArray; -import static io.prestosql.plugin.phoenix.TypeUtils.jdbcObjectArrayToBlock; -import static io.prestosql.plugin.phoenix.TypeUtils.toBoxedArray; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.booleanColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.booleanWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.charWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.dateColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.dateWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.decimalColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.defaultCharColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.defaultVarcharColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.doubleColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.doubleWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.longDecimalWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.realColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.realWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.shortDecimalWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.timeWriteFunctionUsingSqlTime; +import static io.trino.plugin.jdbc.StandardColumnMappings.tinyintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varbinaryColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.varbinaryWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; +import static io.trino.plugin.jdbc.TypeHandlingJdbcSessionProperties.getUnsupportedTypeHandling; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; +import static io.trino.plugin.phoenix.MetadataUtil.getEscapedTableName; +import static io.trino.plugin.phoenix.MetadataUtil.toPhoenixSchemaName; +import static io.trino.plugin.phoenix.PhoenixClientModule.getConnectionProperties; +import static io.trino.plugin.phoenix.PhoenixColumnProperties.isPrimaryKey; +import static io.trino.plugin.phoenix.PhoenixErrorCode.PHOENIX_METADATA_ERROR; +import static io.trino.plugin.phoenix.PhoenixErrorCode.PHOENIX_QUERY_ERROR; +import static io.trino.plugin.phoenix.PhoenixMetadata.DEFAULT_SCHEMA; +import static io.trino.plugin.phoenix.TypeUtils.getArrayElementPhoenixTypeName; +import static io.trino.plugin.phoenix.TypeUtils.getJdbcObjectArray; +import static io.trino.plugin.phoenix.TypeUtils.jdbcObjectArrayToBlock; +import static io.trino.plugin.phoenix.TypeUtils.toBoxedArray; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_TZ_MILLIS; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.lang.Math.max; import static java.lang.String.format; import static java.lang.String.join; diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixClientModule.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixClientModule.java index 6b5a3b2088f3..6135a8f96730 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixClientModule.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixClientModule.java @@ -20,30 +20,30 @@ import com.google.inject.Singleton; import io.airlift.configuration.AbstractConfigurationAwareModule; import io.airlift.log.Logger; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorMetadata; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorPageSinkProvider; -import io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorSplitManager; -import io.prestosql.plugin.base.classloader.ForClassLoaderSafe; -import io.prestosql.plugin.base.util.LoggingInvocationHandler; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.DriverConnectionFactory; -import io.prestosql.plugin.jdbc.ForwardingJdbcClient; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.JdbcMetadataConfig; -import io.prestosql.plugin.jdbc.JdbcMetadataSessionProperties; -import io.prestosql.plugin.jdbc.JdbcPageSinkProvider; -import io.prestosql.plugin.jdbc.JdbcRecordSetProvider; -import io.prestosql.plugin.jdbc.MaxDomainCompactionThreshold; -import io.prestosql.plugin.jdbc.TypeHandlingJdbcConfig; -import io.prestosql.plugin.jdbc.TypeHandlingJdbcSessionProperties; -import io.prestosql.plugin.jdbc.credential.EmptyCredentialProvider; -import io.prestosql.plugin.jdbc.jmx.StatisticsAwareConnectionFactory; -import io.prestosql.plugin.jdbc.jmx.StatisticsAwareJdbcClient; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorPageSinkProvider; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorSplitManager; +import io.trino.plugin.base.classloader.ForClassLoaderSafe; +import io.trino.plugin.base.util.LoggingInvocationHandler; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.DriverConnectionFactory; +import io.trino.plugin.jdbc.ForwardingJdbcClient; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.JdbcMetadataConfig; +import io.trino.plugin.jdbc.JdbcMetadataSessionProperties; +import io.trino.plugin.jdbc.JdbcPageSinkProvider; +import io.trino.plugin.jdbc.JdbcRecordSetProvider; +import io.trino.plugin.jdbc.MaxDomainCompactionThreshold; +import io.trino.plugin.jdbc.TypeHandlingJdbcConfig; +import io.trino.plugin.jdbc.TypeHandlingJdbcSessionProperties; +import io.trino.plugin.jdbc.credential.EmptyCredentialProvider; +import io.trino.plugin.jdbc.jmx.StatisticsAwareConnectionFactory; +import io.trino.plugin.jdbc.jmx.StatisticsAwareJdbcClient; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.phoenix.jdbc.PhoenixDriver; @@ -58,9 +58,9 @@ import static com.google.common.reflect.Reflection.newProxy; import static com.google.inject.multibindings.OptionalBinder.newOptionalBinder; import static io.airlift.configuration.ConfigBinder.configBinder; -import static io.prestosql.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider; -import static io.prestosql.plugin.jdbc.JdbcModule.bindTablePropertiesProvider; -import static io.prestosql.plugin.phoenix.PhoenixErrorCode.PHOENIX_CONFIG_ERROR; +import static io.trino.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider; +import static io.trino.plugin.jdbc.JdbcModule.bindTablePropertiesProvider; +import static io.trino.plugin.phoenix.PhoenixErrorCode.PHOENIX_CONFIG_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.weakref.jmx.guice.ExportBinder.newExporter; diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixColumnProperties.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixColumnProperties.java index 34e82ea27046..c32b33613f04 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixColumnProperties.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixColumnProperties.java @@ -14,8 +14,8 @@ package io.trino.plugin.phoenix; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; @@ -23,8 +23,8 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.plugin.phoenix.PhoenixTableProperties.getRowkeys; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.plugin.phoenix.PhoenixTableProperties.getRowkeys; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; public class PhoenixColumnProperties { diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixConnector.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixConnector.java index 428ceadda98b..74a4fce5d612 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixConnector.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixConnector.java @@ -15,17 +15,17 @@ import com.google.inject.Inject; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.plugin.jdbc.JdbcTransactionHandle; -import io.prestosql.plugin.jdbc.SessionPropertiesProvider; -import io.prestosql.plugin.jdbc.TablePropertiesProvider; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.plugin.jdbc.JdbcTransactionHandle; +import io.trino.plugin.jdbc.SessionPropertiesProvider; +import io.trino.plugin.jdbc.TablePropertiesProvider; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import java.util.List; import java.util.Set; diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixConnectorFactory.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixConnectorFactory.java index 81f0e89592f4..99a7cdbf094e 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixConnectorFactory.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixConnectorFactory.java @@ -16,13 +16,13 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.plugin.base.jmx.MBeanServerModule; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.jmx.MBeanServerModule; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.type.TypeManager; import org.weakref.jmx.guice.MBeanModule; import java.util.Map; diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixErrorCode.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixErrorCode.java index 75a164b183dd..0b0316e3de04 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixErrorCode.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixErrorCode.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.phoenix; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; -import static io.prestosql.spi.ErrorType.INTERNAL_ERROR; +import static io.trino.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.INTERNAL_ERROR; public enum PhoenixErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixHandleResolver.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixHandleResolver.java index ab82e0100336..fcfd688541fe 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixHandleResolver.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixHandleResolver.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.phoenix; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.plugin.jdbc.JdbcTransactionHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.plugin.jdbc.JdbcTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class PhoenixHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixMetadata.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixMetadata.java index dba625c52281..aab695cf90a1 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixMetadata.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixMetadata.java @@ -14,25 +14,25 @@ package io.trino.plugin.phoenix; import io.airlift.slice.Slice; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcMetadata; -import io.prestosql.plugin.jdbc.JdbcMetadataConfig; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.AggregationApplicationResult; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.statistics.ComputedStatistics; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcMetadata; +import io.trino.plugin.jdbc.JdbcMetadataConfig; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.AggregationApplicationResult; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.statistics.ComputedStatistics; import javax.inject.Inject; @@ -45,10 +45,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.phoenix.MetadataUtil.getEscapedTableName; -import static io.prestosql.plugin.phoenix.MetadataUtil.toPrestoSchemaName; -import static io.prestosql.plugin.phoenix.PhoenixErrorCode.PHOENIX_METADATA_ERROR; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.phoenix.MetadataUtil.getEscapedTableName; +import static io.trino.plugin.phoenix.MetadataUtil.toPrestoSchemaName; +import static io.trino.plugin.phoenix.PhoenixErrorCode.PHOENIX_METADATA_ERROR; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixOutputTableHandle.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixOutputTableHandle.java index e652cadd57f0..38686cab2cc2 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixOutputTableHandle.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixOutputTableHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.plugin.jdbc.JdbcOutputTableHandle; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.spi.type.Type; +import io.trino.plugin.jdbc.JdbcOutputTableHandle; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.spi.type.Type; import java.util.List; import java.util.Optional; diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixPlugin.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixPlugin.java index 9d36224e2be5..3929c323d5ba 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixPlugin.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.phoenix; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class PhoenixPlugin implements Plugin diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixSplit.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixSplit.java index 4d3444fa6d83..b4b81369c349 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixSplit.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixSplit.java @@ -16,10 +16,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.plugin.jdbc.JdbcSplit; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.jdbc.JdbcSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.TupleDomain; import org.apache.phoenix.mapreduce.PhoenixInputSplit; import java.util.List; diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixSplitManager.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixSplitManager.java index b522102b3cc1..19ccdcb7fcb1 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixSplitManager.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixSplitManager.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.plugin.jdbc.QueryBuilder; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.plugin.jdbc.QueryBuilder; +import io.trino.spi.HostAddress; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import org.apache.hadoop.hbase.HRegionLocation; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.RegionLocator; @@ -50,8 +50,8 @@ import java.util.function.Function; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.phoenix.PhoenixErrorCode.PHOENIX_INTERNAL_ERROR; -import static io.prestosql.plugin.phoenix.PhoenixErrorCode.PHOENIX_SPLIT_ERROR; +import static io.trino.plugin.phoenix.PhoenixErrorCode.PHOENIX_INTERNAL_ERROR; +import static io.trino.plugin.phoenix.PhoenixErrorCode.PHOENIX_SPLIT_ERROR; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; import static org.apache.phoenix.coprocessor.BaseScannerRegionObserver.EXPECTED_UPPER_REGION_KEY; diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixTableProperties.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixTableProperties.java index d8884f26b747..b652442a71d1 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixTableProperties.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/PhoenixTableProperties.java @@ -14,8 +14,8 @@ package io.trino.plugin.phoenix; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.jdbc.TablePropertiesProvider; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.plugin.jdbc.TablePropertiesProvider; +import io.trino.spi.session.PropertyMetadata; import org.apache.hadoop.hbase.io.compress.Compression; import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding; import org.apache.hadoop.hbase.regionserver.BloomType; @@ -29,10 +29,10 @@ import java.util.Optional; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; import static java.util.Objects.requireNonNull; /** diff --git a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/TypeUtils.java b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/TypeUtils.java index e9bcdf3dc0f5..9e29372bb531 100644 --- a/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/TypeUtils.java +++ b/plugin/trino-phoenix/src/main/java/io/trino/plugin/phoenix/TypeUtils.java @@ -17,15 +17,15 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.joda.time.DateTimeZone; import org.joda.time.chrono.ISOChronology; @@ -37,20 +37,20 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.decodeUnscaledValue; -import static io.prestosql.spi.type.Decimals.encodeScaledValue; -import static io.prestosql.spi.type.Decimals.encodeShortScaledValue; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; -import static io.prestosql.spi.type.TypeUtils.writeNativeValue; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.decodeUnscaledValue; +import static io.trino.spi.type.Decimals.encodeScaledValue; +import static io.trino.spi.type.Decimals.encodeShortScaledValue; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TypeUtils.readNativeValue; +import static io.trino.spi.type.TypeUtils.writeNativeValue; import static java.lang.Float.floatToRawIntBits; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; diff --git a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/PhoenixQueryRunner.java b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/PhoenixQueryRunner.java index 9d517fbe5b41..931868146e44 100644 --- a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/PhoenixQueryRunner.java +++ b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/PhoenixQueryRunner.java @@ -16,11 +16,11 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.metadata.QualifiedObjectName; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import org.intellij.lang.annotations.Language; @@ -31,8 +31,8 @@ import java.util.Map; import java.util.Properties; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingSession.testSessionBuilder; import static io.trino.tpch.TpchTable.LINE_ITEM; import static io.trino.tpch.TpchTable.ORDERS; import static io.trino.tpch.TpchTable.PART_SUPPLIER; diff --git a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/PhoenixSqlExecutor.java b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/PhoenixSqlExecutor.java index 1690bcf91cdf..8ff6b44f39e4 100644 --- a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/PhoenixSqlExecutor.java +++ b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/PhoenixSqlExecutor.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.phoenix; -import io.prestosql.testing.sql.SqlExecutor; +import io.trino.testing.sql.SqlExecutor; import java.sql.Connection; import java.sql.DriverManager; diff --git a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixDistributedQueries.java b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixDistributedQueries.java index cf4a49de99e0..210e725930ed 100644 --- a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixDistributedQueries.java +++ b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixDistributedQueries.java @@ -14,13 +14,13 @@ package io.trino.plugin.phoenix; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.TestTable; import org.testng.SkipException; import org.testng.annotations.AfterClass; -import static io.prestosql.plugin.phoenix.PhoenixQueryRunner.createPhoenixQueryRunner; +import static io.trino.plugin.phoenix.PhoenixQueryRunner.createPhoenixQueryRunner; public class TestPhoenixDistributedQueries extends AbstractTestDistributedQueries diff --git a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixIntegrationSmokeTest.java b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixIntegrationSmokeTest.java index 581d6404852f..3f9ef9ce2742 100644 --- a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixIntegrationSmokeTest.java +++ b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixIntegrationSmokeTest.java @@ -14,10 +14,10 @@ package io.trino.plugin.phoenix; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.jdbc.UnsupportedTypeHandling; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.plugin.jdbc.UnsupportedTypeHandling; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -26,9 +26,9 @@ import java.sql.SQLException; import java.sql.Statement; -import static io.prestosql.plugin.jdbc.TypeHandlingJdbcSessionProperties.UNSUPPORTED_TYPE_HANDLING; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; -import static io.prestosql.plugin.phoenix.PhoenixQueryRunner.createPhoenixQueryRunner; +import static io.trino.plugin.jdbc.TypeHandlingJdbcSessionProperties.UNSUPPORTED_TYPE_HANDLING; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; +import static io.trino.plugin.phoenix.PhoenixQueryRunner.createPhoenixQueryRunner; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; diff --git a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixSplit.java b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixSplit.java index 2d994c391b87..0ee5a109a879 100644 --- a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixSplit.java +++ b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.HostAddress; +import io.trino.spi.predicate.TupleDomain; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.util.Bytes; import org.apache.phoenix.mapreduce.PhoenixInputSplit; diff --git a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixTypeMapping.java b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixTypeMapping.java index e847339a2343..3a4732989e19 100644 --- a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixTypeMapping.java +++ b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestPhoenixTypeMapping.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.datatype.CreateAndInsertDataSetup; -import io.prestosql.testing.datatype.CreateAsSelectDataSetup; -import io.prestosql.testing.datatype.DataSetup; -import io.prestosql.testing.datatype.DataType; -import io.prestosql.testing.datatype.DataTypeTest; -import io.prestosql.testing.datatype.SqlDataTypeTest; -import io.prestosql.testing.sql.PrestoSqlExecutor; +import io.trino.Session; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.TimeZoneKey; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; +import io.trino.testing.datatype.CreateAndInsertDataSetup; +import io.trino.testing.datatype.CreateAsSelectDataSetup; +import io.trino.testing.datatype.DataSetup; +import io.trino.testing.datatype.DataType; +import io.trino.testing.datatype.DataTypeTest; +import io.trino.testing.datatype.SqlDataTypeTest; +import io.trino.testing.sql.PrestoSqlExecutor; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -41,22 +41,22 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; -import static io.prestosql.plugin.phoenix.PhoenixQueryRunner.createPhoenixQueryRunner; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.testing.datatype.DataType.bigintDataType; -import static io.prestosql.testing.datatype.DataType.booleanDataType; -import static io.prestosql.testing.datatype.DataType.dataType; -import static io.prestosql.testing.datatype.DataType.dateDataType; -import static io.prestosql.testing.datatype.DataType.doubleDataType; -import static io.prestosql.testing.datatype.DataType.integerDataType; -import static io.prestosql.testing.datatype.DataType.realDataType; -import static io.prestosql.testing.datatype.DataType.smallintDataType; -import static io.prestosql.testing.datatype.DataType.tinyintDataType; -import static io.prestosql.testing.datatype.DataType.varcharDataType; +import static io.trino.plugin.phoenix.PhoenixQueryRunner.createPhoenixQueryRunner; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.testing.datatype.DataType.bigintDataType; +import static io.trino.testing.datatype.DataType.booleanDataType; +import static io.trino.testing.datatype.DataType.dataType; +import static io.trino.testing.datatype.DataType.dateDataType; +import static io.trino.testing.datatype.DataType.doubleDataType; +import static io.trino.testing.datatype.DataType.integerDataType; +import static io.trino.testing.datatype.DataType.realDataType; +import static io.trino.testing.datatype.DataType.smallintDataType; +import static io.trino.testing.datatype.DataType.tinyintDataType; +import static io.trino.testing.datatype.DataType.varcharDataType; import static java.lang.String.format; import static java.math.RoundingMode.UNNECESSARY; import static java.util.Arrays.asList; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotBrokerPageSource.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotBrokerPageSource.java index b629ee6d5716..9318f539ef97 100644 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotBrokerPageSource.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotBrokerPageSource.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.pinot; -import io.prestosql.pinot.client.PinotClient; -import io.prestosql.pinot.client.PinotClient.BrokerResultRow; -import io.prestosql.pinot.decoders.Decoder; -import io.prestosql.pinot.decoders.DecoderFactory; -import io.prestosql.pinot.query.PinotQuery; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.PageBuilderStatus; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.pinot.client.PinotClient; +import io.trino.plugin.pinot.client.PinotClient.BrokerResultRow; +import io.trino.plugin.pinot.decoders.Decoder; +import io.trino.plugin.pinot.decoders.DecoderFactory; +import io.trino.plugin.pinot.query.PinotQuery; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.PageBuilderStatus; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; import java.util.Arrays; import java.util.Iterator; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotColumn.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotColumn.java index c9221d86387c..ea618795a7c3 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotColumn.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotColumn.java @@ -15,15 +15,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.pinot.spi.data.FieldSpec; import org.apache.pinot.spi.data.FieldSpec.DataType; import org.apache.pinot.spi.data.Schema; @@ -35,7 +35,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.pinot.PinotErrorCode.PINOT_UNSUPPORTED_COLUMN_TYPE; +import static io.trino.plugin.pinot.PinotErrorCode.PINOT_UNSUPPORTED_COLUMN_TYPE; import static java.util.Objects.requireNonNull; public class PinotColumn diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotColumnHandle.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotColumnHandle.java index 5ebc908a898f..7a56e6f48f24 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotColumnHandle.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotColumnHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotConnector.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotConnector.java index e30fdfbb9922..ce7c37ee7eb0 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotConnector.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotConnector.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotConnectorFactory.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotConnectorFactory.java index f028748f10e0..e6fae31ba5bc 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotConnectorFactory.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotConnectorFactory.java @@ -18,10 +18,10 @@ import com.google.inject.Module; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import org.weakref.jmx.guice.MBeanModule; import java.util.Map; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotErrorCode.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotErrorCode.java index f9239c5c588d..20414406b2d6 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotErrorCode.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotErrorCode.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.pinot; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; -import static io.prestosql.spi.ErrorType.INTERNAL_ERROR; +import static io.trino.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.INTERNAL_ERROR; public enum PinotErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotException.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotException.java index 34e7a62b47d3..2f94bca6050b 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotException.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotException.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.pinot; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.util.Optional; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotHandleResolver.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotHandleResolver.java index 600f134c62d6..c96144f5c1d6 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotHandleResolver.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.pinot; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class PinotHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotInsufficientServerResponseException.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotInsufficientServerResponseException.java index 7c20d52be108..3a2888d8b1c5 100644 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotInsufficientServerResponseException.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotInsufficientServerResponseException.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.pinot; -import io.prestosql.pinot.query.PinotQuery; +import io.trino.plugin.pinot.query.PinotQuery; import java.util.Optional; -import static io.prestosql.pinot.PinotErrorCode.PINOT_INSUFFICIENT_SERVER_RESPONSE; +import static io.trino.plugin.pinot.PinotErrorCode.PINOT_INSUFFICIENT_SERVER_RESPONSE; import static java.lang.String.format; public class PinotInsufficientServerResponseException diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotMetadata.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotMetadata.java index 85d14f4d2ac9..22587c488f5c 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotMetadata.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotMetadata.java @@ -19,25 +19,25 @@ import com.google.common.cache.LoadingCache; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.pinot.client.PinotClient; -import io.prestosql.pinot.query.AggregationExpression; -import io.prestosql.pinot.query.DynamicTable; -import io.prestosql.pinot.query.DynamicTableBuilder; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ColumnNotFoundException; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.LimitApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.pinot.client.PinotClient; +import io.trino.plugin.pinot.query.AggregationExpression; +import io.trino.plugin.pinot.query.DynamicTable; +import io.trino.plugin.pinot.query.DynamicTableBuilder; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ColumnNotFoundException; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.LimitApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.TupleDomain; import org.apache.pinot.spi.data.Schema; import javax.inject.Inject; @@ -53,11 +53,11 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.cache.CacheLoader.asyncReloading; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.pinot.PinotColumn.getPinotColumnsForPinotSchema; -import static io.prestosql.pinot.query.DynamicTableBuilder.BIGINT_AGGREGATIONS; -import static io.prestosql.pinot.query.DynamicTableBuilder.DOUBLE_AGGREGATIONS; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.plugin.pinot.PinotColumn.getPinotColumnsForPinotSchema; +import static io.trino.plugin.pinot.query.DynamicTableBuilder.BIGINT_AGGREGATIONS; +import static io.trino.plugin.pinot.query.DynamicTableBuilder.DOUBLE_AGGREGATIONS; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotModule.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotModule.java index ded37d473b2c..2846b9db885a 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotModule.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotModule.java @@ -24,16 +24,16 @@ import com.google.inject.Scopes; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.pinot.client.IdentityPinotHostMapper; -import io.prestosql.pinot.client.PinotClient; -import io.prestosql.pinot.client.PinotHostMapper; -import io.prestosql.pinot.client.PinotQueryClient; -import io.prestosql.plugin.base.jmx.RebindSafeMBeanServer; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.jmx.RebindSafeMBeanServer; +import io.trino.plugin.pinot.client.IdentityPinotHostMapper; +import io.trino.plugin.pinot.client.PinotClient; +import io.trino.plugin.pinot.client.PinotHostMapper; +import io.trino.plugin.pinot.client.PinotQueryClient; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import org.apache.pinot.common.utils.DataSchema; import javax.inject.Inject; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotNodePartitioningProvider.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotNodePartitioningProvider.java index 0f78fdcd49b2..31905dd60e5e 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotNodePartitioningProvider.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotNodePartitioningProvider.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.pinot; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.connector.ConnectorBucketNodeMap; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.connector.ConnectorBucketNodeMap; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.type.Type; import java.util.List; import java.util.function.ToIntFunction; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotPageSourceProvider.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotPageSourceProvider.java index 5ccab707e8bc..cff2b4369ae3 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotPageSourceProvider.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotPageSourceProvider.java @@ -13,26 +13,26 @@ */ package io.trino.plugin.pinot; -import io.prestosql.pinot.client.PinotClient; -import io.prestosql.pinot.client.PinotQueryClient; -import io.prestosql.pinot.query.DynamicTable; -import io.prestosql.pinot.query.PinotQuery; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.pinot.client.PinotClient; +import io.trino.plugin.pinot.client.PinotQueryClient; +import io.trino.plugin.pinot.query.DynamicTable; +import io.trino.plugin.pinot.query.PinotQuery; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; import java.util.ArrayList; import java.util.List; -import static io.prestosql.pinot.query.DynamicTablePqlExtractor.extractPql; -import static io.prestosql.pinot.query.PinotQueryBuilder.generatePql; +import static io.trino.plugin.pinot.query.DynamicTablePqlExtractor.extractPql; +import static io.trino.plugin.pinot.query.PinotQueryBuilder.generatePql; import static java.util.Objects.requireNonNull; public class PinotPageSourceProvider diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotPlugin.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotPlugin.java index f594644a52f2..912b83d6fd83 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotPlugin.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotPlugin.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Module; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; import java.util.Optional; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSegmentPageSource.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSegmentPageSource.java index 5cf6fb6c2ecb..62f6831a0e94 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSegmentPageSource.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSegmentPageSource.java @@ -17,17 +17,17 @@ import io.airlift.log.Logger; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.pinot.client.PinotQueryClient; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.pinot.client.PinotQueryClient; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.commons.codec.DecoderException; import org.apache.commons.codec.binary.Hex; import org.apache.pinot.common.utils.DataSchema; @@ -46,9 +46,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Strings.isNullOrEmpty; -import static io.prestosql.pinot.PinotErrorCode.PINOT_DECODE_ERROR; -import static io.prestosql.pinot.PinotErrorCode.PINOT_EXCEPTION; -import static io.prestosql.pinot.PinotErrorCode.PINOT_UNSUPPORTED_COLUMN_TYPE; +import static io.trino.plugin.pinot.PinotErrorCode.PINOT_DECODE_ERROR; +import static io.trino.plugin.pinot.PinotErrorCode.PINOT_EXCEPTION; +import static io.trino.plugin.pinot.PinotErrorCode.PINOT_UNSUPPORTED_COLUMN_TYPE; import static java.lang.Float.floatToIntBits; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSessionProperties.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSessionProperties.java index 86f46921bb74..a710ce980974 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSessionProperties.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSessionProperties.java @@ -16,17 +16,17 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import io.airlift.units.Duration; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.base.session.PropertyMetadataUtil.durationProperty; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; +import static io.trino.plugin.base.session.PropertyMetadataUtil.durationProperty; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; public class PinotSessionProperties { diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSplit.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSplit.java index 44ff6ef69bed..02620476415f 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSplit.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; import java.util.Optional; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSplitManager.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSplitManager.java index eb0405001414..5fea51b24652 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSplitManager.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotSplitManager.java @@ -15,19 +15,19 @@ import com.google.common.collect.Iterables; import io.airlift.log.Logger; -import io.prestosql.pinot.client.PinotClient; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.plugin.pinot.client.PinotClient; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import javax.inject.Inject; @@ -38,11 +38,11 @@ import java.util.Optional; import java.util.function.Supplier; -import static io.prestosql.pinot.PinotSessionProperties.getNonAggregateLimitForBrokerQueries; -import static io.prestosql.pinot.PinotSessionProperties.isPreferBrokerQueries; -import static io.prestosql.pinot.PinotSplit.createBrokerSplit; -import static io.prestosql.pinot.PinotSplit.createSegmentSplit; -import static io.prestosql.spi.ErrorType.USER_ERROR; +import static io.trino.plugin.pinot.PinotSessionProperties.getNonAggregateLimitForBrokerQueries; +import static io.trino.plugin.pinot.PinotSessionProperties.isPreferBrokerQueries; +import static io.trino.plugin.pinot.PinotSplit.createBrokerSplit; +import static io.trino.plugin.pinot.PinotSplit.createSegmentSplit; +import static io.trino.spi.ErrorType.USER_ERROR; import static java.lang.String.format; import static java.util.Collections.singletonList; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotTableHandle.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotTableHandle.java index f2f3d8c68b2c..948ee50e535a 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotTableHandle.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotTableHandle.java @@ -15,11 +15,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.pinot.query.DynamicTable; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.pinot.query.DynamicTable; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotTransactionHandle.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotTransactionHandle.java index af8dbe3e1bb4..c4bd0e281ec6 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotTransactionHandle.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/PinotTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.pinot; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum PinotTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/client/PinotClient.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/client/PinotClient.java index 784ce7682758..4abf3456787e 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/client/PinotClient.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/client/PinotClient.java @@ -34,15 +34,15 @@ import io.airlift.json.JsonCodecBinder; import io.airlift.json.JsonCodecFactory; import io.airlift.log.Logger; -import io.prestosql.pinot.ForPinot; -import io.prestosql.pinot.PinotColumnHandle; -import io.prestosql.pinot.PinotConfig; -import io.prestosql.pinot.PinotErrorCode; -import io.prestosql.pinot.PinotException; -import io.prestosql.pinot.PinotInsufficientServerResponseException; -import io.prestosql.pinot.PinotSessionProperties; -import io.prestosql.pinot.query.PinotQuery; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.plugin.pinot.ForPinot; +import io.trino.plugin.pinot.PinotColumnHandle; +import io.trino.plugin.pinot.PinotConfig; +import io.trino.plugin.pinot.PinotErrorCode; +import io.trino.plugin.pinot.PinotException; +import io.trino.plugin.pinot.PinotInsufficientServerResponseException; +import io.trino.plugin.pinot.PinotSessionProperties; +import io.trino.plugin.pinot.query.PinotQuery; +import io.trino.spi.connector.ConnectorSession; import org.apache.pinot.common.response.broker.BrokerResponseNative; import org.apache.pinot.common.response.broker.ResultTable; import org.apache.pinot.spi.data.Schema; @@ -69,9 +69,9 @@ import static io.airlift.http.client.JsonResponseHandler.createJsonResponseHandler; import static io.airlift.json.JsonCodec.listJsonCodec; import static io.airlift.json.JsonCodec.mapJsonCodec; -import static io.prestosql.pinot.PinotErrorCode.PINOT_EXCEPTION; -import static io.prestosql.pinot.PinotErrorCode.PINOT_INVALID_CONFIGURATION; -import static io.prestosql.pinot.PinotErrorCode.PINOT_UNABLE_TO_FIND_BROKER; +import static io.trino.plugin.pinot.PinotErrorCode.PINOT_EXCEPTION; +import static io.trino.plugin.pinot.PinotErrorCode.PINOT_INVALID_CONFIGURATION; +import static io.trino.plugin.pinot.PinotErrorCode.PINOT_UNABLE_TO_FIND_BROKER; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.apache.pinot.spi.utils.builder.TableNameBuilder.extractRawTableName; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/client/PinotQueryClient.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/client/PinotQueryClient.java index 30f907bf57a3..8d084f437377 100644 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/client/PinotQueryClient.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/client/PinotQueryClient.java @@ -14,7 +14,7 @@ package io.trino.plugin.pinot.client; import com.yammer.metrics.core.MetricsRegistry; -import io.prestosql.pinot.PinotException; +import io.trino.plugin.pinot.PinotException; import org.apache.helix.model.InstanceConfig; import org.apache.pinot.common.metrics.BrokerMetrics; import org.apache.pinot.common.request.BrokerRequest; @@ -40,8 +40,8 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.function.Function; -import static io.prestosql.pinot.PinotErrorCode.PINOT_EXCEPTION; -import static io.prestosql.pinot.PinotErrorCode.PINOT_INVALID_PQL_GENERATED; +import static io.trino.plugin.pinot.PinotErrorCode.PINOT_EXCEPTION; +import static io.trino.plugin.pinot.PinotErrorCode.PINOT_INVALID_PQL_GENERATED; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/ArrayDecoder.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/ArrayDecoder.java index e82c7e2e5b34..45a29cba4a72 100644 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/ArrayDecoder.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/ArrayDecoder.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.pinot.decoders; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; import java.util.List; import java.util.function.Supplier; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.pinot.decoders.DecoderFactory.createDecoder; +import static io.trino.plugin.pinot.decoders.DecoderFactory.createDecoder; import static java.util.Objects.requireNonNull; public class ArrayDecoder diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/BigintDecoder.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/BigintDecoder.java index 5949f133dc85..094c59c28754 100644 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/BigintDecoder.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/BigintDecoder.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.pinot.decoders; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; import java.util.function.Supplier; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; public class BigintDecoder implements Decoder diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/BooleanDecoder.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/BooleanDecoder.java index 4023b3a23630..2f6bf69a773e 100644 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/BooleanDecoder.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/BooleanDecoder.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.pinot.decoders; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; import java.util.function.Supplier; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.BooleanType.BOOLEAN; import static java.lang.Boolean.parseBoolean; public class BooleanDecoder diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/Decoder.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/Decoder.java index 0e641f868dbb..2456267d2941 100644 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/Decoder.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/Decoder.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.pinot.decoders; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; import java.util.function.Supplier; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/DecoderFactory.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/DecoderFactory.java index 9bb5aeeeb6c7..dfc9e02ea0bd 100644 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/DecoderFactory.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/DecoderFactory.java @@ -13,20 +13,20 @@ */ package io.trino.plugin.pinot.decoders; -import io.prestosql.pinot.PinotException; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.FixedWidthType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.pinot.PinotException; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.FixedWidthType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.Type; import java.util.Optional; -import static io.prestosql.pinot.PinotErrorCode.PINOT_DECODE_ERROR; -import static io.prestosql.pinot.PinotErrorCode.PINOT_UNSUPPORTED_COLUMN_TYPE; +import static io.trino.plugin.pinot.PinotErrorCode.PINOT_DECODE_ERROR; +import static io.trino.plugin.pinot.PinotErrorCode.PINOT_UNSUPPORTED_COLUMN_TYPE; import static java.util.Objects.requireNonNull; public class DecoderFactory diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/DoubleDecoder.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/DoubleDecoder.java index 9affcdcd2607..c3f6c7172f5a 100644 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/DoubleDecoder.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/DoubleDecoder.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.pinot.decoders; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; import java.util.function.Supplier; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.DoubleType.DOUBLE; public class DoubleDecoder implements Decoder diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/IntegerDecoder.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/IntegerDecoder.java index 5e44632e807e..603bc2fcad5c 100644 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/IntegerDecoder.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/IntegerDecoder.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.pinot.decoders; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; import java.util.function.Supplier; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/RealDecoder.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/RealDecoder.java index a3d7a310b329..3cf1c0e930fb 100644 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/RealDecoder.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/RealDecoder.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.pinot.decoders; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; import java.util.function.Supplier; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/VarcharDecoder.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/VarcharDecoder.java index 10f6969aa400..7bd701c1dc9e 100644 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/VarcharDecoder.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/decoders/VarcharDecoder.java @@ -15,7 +15,7 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.BlockBuilder; import java.util.function.Supplier; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/DynamicTableBuilder.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/DynamicTableBuilder.java index 787ad5152da1..92da619978e1 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/DynamicTableBuilder.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/DynamicTableBuilder.java @@ -15,11 +15,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.pinot.PinotColumnHandle; -import io.prestosql.pinot.PinotMetadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnNotFoundException; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.pinot.PinotColumnHandle; +import io.trino.plugin.pinot.PinotMetadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnNotFoundException; +import io.trino.spi.connector.SchemaTableName; import org.apache.pinot.common.request.AggregationInfo; import org.apache.pinot.common.request.BrokerRequest; import org.apache.pinot.common.request.SelectionSort; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/DynamicTablePqlExtractor.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/DynamicTablePqlExtractor.java index 105daa4d42ff..1e9b915e7c4d 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/DynamicTablePqlExtractor.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/DynamicTablePqlExtractor.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.pinot.query; -import io.prestosql.pinot.PinotColumnHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.pinot.PinotColumnHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.TupleDomain; import java.util.List; import java.util.Optional; -import static io.prestosql.pinot.query.FilterToPqlConverter.encloseInParentheses; -import static io.prestosql.pinot.query.PinotQueryBuilder.getFilterClause; +import static io.trino.plugin.pinot.query.FilterToPqlConverter.encloseInParentheses; +import static io.trino.plugin.pinot.query.PinotQueryBuilder.getFilterClause; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/FilterToPqlConverter.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/FilterToPqlConverter.java index 3b5019f84923..9adf9fd6687c 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/FilterToPqlConverter.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/FilterToPqlConverter.java @@ -14,8 +14,8 @@ package io.trino.plugin.pinot.query; import com.google.common.collect.ImmutableMap; -import io.prestosql.pinot.PinotColumnHandle; -import io.prestosql.spi.connector.ColumnHandle; +import io.trino.plugin.pinot.PinotColumnHandle; +import io.trino.spi.connector.ColumnHandle; import org.apache.pinot.common.request.FilterOperator; import org.apache.pinot.common.request.FilterQuery; import org.apache.pinot.common.request.FilterQueryMap; diff --git a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/PinotQueryBuilder.java b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/PinotQueryBuilder.java index d7b23e29f498..1b4cae897ca7 100755 --- a/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/PinotQueryBuilder.java +++ b/plugin/trino-pinot/src/main/java/io/trino/plugin/pinot/query/PinotQueryBuilder.java @@ -16,12 +16,12 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.pinot.PinotColumnHandle; -import io.prestosql.pinot.PinotTableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.pinot.PinotColumnHandle; +import io.trino.plugin.pinot.PinotTableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; import java.util.ArrayList; import java.util.List; diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/MetadataUtil.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/MetadataUtil.java index 8330f40f157c..9e8f30cb3c15 100755 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/MetadataUtil.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/MetadataUtil.java @@ -20,19 +20,19 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.pinot.client.PinotClient; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; +import io.trino.plugin.pinot.client.PinotClient; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; import org.apache.pinot.common.response.broker.BrokerResponseNative; import org.apache.pinot.common.utils.DataSchema; import java.util.Map; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/MockPinotClient.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/MockPinotClient.java index b799d9ea0f67..b93ce18ec74c 100755 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/MockPinotClient.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/MockPinotClient.java @@ -18,19 +18,19 @@ import io.airlift.http.client.Request; import io.airlift.http.client.testing.TestingHttpClient; import io.airlift.json.JsonCodec; -import io.prestosql.pinot.client.IdentityPinotHostMapper; -import io.prestosql.pinot.client.PinotClient; +import io.trino.plugin.pinot.client.IdentityPinotHostMapper; +import io.trino.plugin.pinot.client.PinotClient; import org.apache.pinot.spi.data.Schema; import java.util.List; import java.util.Map; import java.util.Optional; -import static io.prestosql.pinot.MetadataUtil.BROKERS_FOR_TABLE_JSON_CODEC; -import static io.prestosql.pinot.MetadataUtil.BROKER_RESPONSE_NATIVE_JSON_CODEC; -import static io.prestosql.pinot.MetadataUtil.TABLES_JSON_CODEC; -import static io.prestosql.pinot.MetadataUtil.TEST_TABLE; -import static io.prestosql.pinot.MetadataUtil.TIME_BOUNDARY_JSON_CODEC; +import static io.trino.plugin.pinot.MetadataUtil.BROKERS_FOR_TABLE_JSON_CODEC; +import static io.trino.plugin.pinot.MetadataUtil.BROKER_RESPONSE_NATIVE_JSON_CODEC; +import static io.trino.plugin.pinot.MetadataUtil.TABLES_JSON_CODEC; +import static io.trino.plugin.pinot.MetadataUtil.TEST_TABLE; +import static io.trino.plugin.pinot.MetadataUtil.TIME_BOUNDARY_JSON_CODEC; public class MockPinotClient extends PinotClient diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/PinotQueryRunner.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/PinotQueryRunner.java index 19e29491b95d..f2b3d4c2be96 100755 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/PinotQueryRunner.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/PinotQueryRunner.java @@ -17,14 +17,14 @@ import com.google.inject.Module; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.metadata.SessionPropertyManager; +import io.trino.testing.DistributedQueryRunner; import java.util.Map; import java.util.Optional; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; public class PinotQueryRunner { diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestBrokerQueries.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestBrokerQueries.java index efb452c579cd..38b847e5ad74 100644 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestBrokerQueries.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestBrokerQueries.java @@ -14,12 +14,12 @@ package io.trino.plugin.pinot; import com.google.common.collect.ImmutableList; -import io.prestosql.pinot.client.PinotClient; -import io.prestosql.pinot.client.PinotClient.BrokerResultRow; -import io.prestosql.pinot.client.PinotClient.ResultsIterator; -import io.prestosql.pinot.query.PinotQuery; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; +import io.trino.plugin.pinot.client.PinotClient; +import io.trino.plugin.pinot.client.PinotClient.BrokerResultRow; +import io.trino.plugin.pinot.client.PinotClient.ResultsIterator; +import io.trino.plugin.pinot.query.PinotQuery; +import io.trino.spi.Page; +import io.trino.spi.block.Block; import org.apache.pinot.common.response.broker.BrokerResponseNative; import org.apache.pinot.common.response.broker.ResultTable; import org.apache.pinot.common.utils.DataSchema; @@ -30,10 +30,10 @@ import java.util.List; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.pinot.TestPinotSplitManager.createSessionWithNumSplits; -import static io.prestosql.pinot.client.PinotClient.fromResultTable; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.pinot.TestPinotSplitManager.createSessionWithNumSplits; +import static io.trino.plugin.pinot.client.PinotClient.fromResultTable; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.apache.pinot.common.utils.DataSchema.ColumnDataType.LONG; import static org.apache.pinot.common.utils.DataSchema.ColumnDataType.STRING; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestDynamicTable.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestDynamicTable.java index 6bba182d2f98..90e4862da222 100755 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestDynamicTable.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestDynamicTable.java @@ -16,24 +16,24 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slices; -import io.prestosql.pinot.query.AggregationExpression; -import io.prestosql.pinot.query.DynamicTable; -import io.prestosql.pinot.query.OrderByExpression; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; +import io.trino.plugin.pinot.query.AggregationExpression; +import io.trino.plugin.pinot.query.DynamicTable; +import io.trino.plugin.pinot.query.OrderByExpression; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; import org.testng.annotations.Test; import java.util.List; -import static io.prestosql.pinot.query.DynamicTableBuilder.OFFLINE_SUFFIX; -import static io.prestosql.pinot.query.DynamicTableBuilder.REALTIME_SUFFIX; -import static io.prestosql.pinot.query.DynamicTableBuilder.buildFromPql; -import static io.prestosql.pinot.query.DynamicTablePqlExtractor.extractPql; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.pinot.query.DynamicTableBuilder.OFFLINE_SUFFIX; +import static io.trino.plugin.pinot.query.DynamicTableBuilder.REALTIME_SUFFIX; +import static io.trino.plugin.pinot.query.DynamicTableBuilder.buildFromPql; +import static io.trino.plugin.pinot.query.DynamicTablePqlExtractor.extractPql; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.stream.Collectors.joining; diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestMinimalFunctionality.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestMinimalFunctionality.java index a9fb213c1317..f07b393eeba3 100644 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestMinimalFunctionality.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestMinimalFunctionality.java @@ -17,12 +17,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.pinot.client.PinotHostMapper; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.kafka.BasicTestingKafka; -import io.prestosql.testing.kafka.TestingKafka; +import io.trino.plugin.pinot.client.PinotHostMapper; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.testing.kafka.BasicTestingKafka; +import io.trino.testing.kafka.TestingKafka; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerRecord; import org.testng.annotations.AfterClass; @@ -37,9 +37,9 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.inject.multibindings.OptionalBinder.newOptionalBinder; import static io.airlift.testing.Closeables.closeAllRuntimeException; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotClient.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotClient.java index 45f5b83c39d6..3fc2e6f7a67c 100755 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotClient.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotClient.java @@ -20,9 +20,9 @@ import io.airlift.http.client.testing.TestingHttpClient; import io.airlift.http.client.testing.TestingResponse; import io.airlift.units.Duration; -import io.prestosql.pinot.client.IdentityPinotHostMapper; -import io.prestosql.pinot.client.PinotClient; -import io.prestosql.testing.assertions.Assert; +import io.trino.plugin.pinot.client.IdentityPinotHostMapper; +import io.trino.plugin.pinot.client.PinotClient; +import io.trino.testing.assertions.Assert; import org.testng.annotations.Test; import java.util.concurrent.TimeUnit; diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotColumnHandle.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotColumnHandle.java index 67af4b6809e9..e7ee4f70acdd 100755 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotColumnHandle.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotColumnHandle.java @@ -16,9 +16,9 @@ import io.airlift.testing.EquivalenceTester; import org.testng.annotations.Test; -import static io.prestosql.pinot.MetadataUtil.COLUMN_CODEC; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.pinot.MetadataUtil.COLUMN_CODEC; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertEquals; public class TestPinotColumnHandle diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotMetadata.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotMetadata.java index 398b138f6a38..7aa0dacfa792 100755 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotMetadata.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotMetadata.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; import java.util.concurrent.Executors; -import static io.prestosql.pinot.MetadataUtil.TEST_TABLE; +import static io.trino.plugin.pinot.MetadataUtil.TEST_TABLE; import static org.testng.Assert.assertEquals; public class TestPinotMetadata diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotQueryBase.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotQueryBase.java index 93b2811da0d8..f02b68b1a888 100755 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotQueryBase.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotQueryBase.java @@ -14,7 +14,7 @@ package io.trino.plugin.pinot; import com.google.common.collect.ImmutableMap; -import io.prestosql.pinot.client.PinotClient; +import io.trino.plugin.pinot.client.PinotClient; import org.apache.pinot.spi.data.FieldSpec.DataType; import org.apache.pinot.spi.data.Schema; import org.apache.pinot.spi.data.Schema.SchemaBuilder; diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotSessionProperties.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotSessionProperties.java index a025313b1caf..16bf27fa4ae7 100755 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotSessionProperties.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotSessionProperties.java @@ -14,8 +14,8 @@ package io.trino.plugin.pinot; import io.airlift.units.Duration; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.spi.connector.ConnectorSession; +import io.trino.testing.TestingConnectorSession; import org.testng.annotations.Test; import java.util.concurrent.TimeUnit; diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotSplitManager.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotSplitManager.java index 35f96696271b..70359cbc99ed 100755 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotSplitManager.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotSplitManager.java @@ -14,13 +14,13 @@ package io.trino.plugin.pinot; import com.google.common.collect.ImmutableMap; -import io.prestosql.pinot.query.DynamicTable; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.testing.TestingConnectorSession; +import io.trino.plugin.pinot.query.DynamicTable; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; +import io.trino.testing.TestingConnectorSession; import org.testng.annotations.Test; import java.time.Instant; @@ -30,12 +30,12 @@ import java.util.OptionalLong; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.pinot.PinotSplit.SplitType.BROKER; -import static io.prestosql.pinot.PinotSplit.SplitType.SEGMENT; -import static io.prestosql.pinot.query.DynamicTableBuilder.buildFromPql; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.plugin.pinot.PinotSplit.SplitType.BROKER; +import static io.trino.plugin.pinot.PinotSplit.SplitType.SEGMENT; +import static io.trino.plugin.pinot.query.DynamicTableBuilder.buildFromPql; +import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; import static java.lang.String.format; import static java.util.stream.Collectors.toList; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestingPinotHostMapper.java b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestingPinotHostMapper.java index ff4644c8219a..168213da70c6 100644 --- a/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestingPinotHostMapper.java +++ b/plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestingPinotHostMapper.java @@ -14,7 +14,7 @@ package io.trino.plugin.pinot; import com.google.common.net.HostAndPort; -import io.prestosql.pinot.client.PinotHostMapper; +import io.trino.plugin.pinot.client.PinotHostMapper; import org.apache.helix.model.InstanceConfig; import org.apache.pinot.core.transport.ServerInstance; diff --git a/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/ImplementAvgBigint.java b/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/ImplementAvgBigint.java index d5aad62826ed..1fcc11f80d02 100644 --- a/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/ImplementAvgBigint.java +++ b/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/ImplementAvgBigint.java @@ -13,28 +13,28 @@ */ package io.trino.plugin.postgresql; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRule; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.Variable; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.plugin.jdbc.expression.AggregateFunctionRule; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.Variable; import java.sql.Types; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.variable; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.matching.Capture.newCapture; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.variable; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.String.format; public class ImplementAvgBigint diff --git a/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlClient.java b/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlClient.java index 2134abe50e5e..1b4a855c8c57 100644 --- a/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlClient.java +++ b/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlClient.java @@ -19,59 +19,59 @@ import com.google.common.math.LongMath; import io.airlift.log.Logger; import io.airlift.slice.Slice; -import io.prestosql.plugin.jdbc.BaseJdbcClient; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.BooleanReadFunction; -import io.prestosql.plugin.jdbc.ColumnMapping; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.DoubleReadFunction; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.plugin.jdbc.LongReadFunction; -import io.prestosql.plugin.jdbc.LongWriteFunction; -import io.prestosql.plugin.jdbc.ObjectReadFunction; -import io.prestosql.plugin.jdbc.ObjectWriteFunction; -import io.prestosql.plugin.jdbc.ReadFunction; -import io.prestosql.plugin.jdbc.SliceReadFunction; -import io.prestosql.plugin.jdbc.SliceWriteFunction; -import io.prestosql.plugin.jdbc.UnsupportedTypeHandling; -import io.prestosql.plugin.jdbc.WriteMapping; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRewriter; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRule; -import io.prestosql.plugin.jdbc.expression.ImplementAvgDecimal; -import io.prestosql.plugin.jdbc.expression.ImplementAvgFloatingPoint; -import io.prestosql.plugin.jdbc.expression.ImplementCount; -import io.prestosql.plugin.jdbc.expression.ImplementCountAll; -import io.prestosql.plugin.jdbc.expression.ImplementMinMax; -import io.prestosql.plugin.jdbc.expression.ImplementSum; -import io.prestosql.plugin.postgresql.PostgreSqlConfig.ArrayMapping; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.SingleMapBlock; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.LongTimestamp; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.jdbc.BaseJdbcClient; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.BooleanReadFunction; +import io.trino.plugin.jdbc.ColumnMapping; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.DoubleReadFunction; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.plugin.jdbc.LongReadFunction; +import io.trino.plugin.jdbc.LongWriteFunction; +import io.trino.plugin.jdbc.ObjectReadFunction; +import io.trino.plugin.jdbc.ObjectWriteFunction; +import io.trino.plugin.jdbc.ReadFunction; +import io.trino.plugin.jdbc.SliceReadFunction; +import io.trino.plugin.jdbc.SliceWriteFunction; +import io.trino.plugin.jdbc.UnsupportedTypeHandling; +import io.trino.plugin.jdbc.WriteMapping; +import io.trino.plugin.jdbc.expression.AggregateFunctionRewriter; +import io.trino.plugin.jdbc.expression.AggregateFunctionRule; +import io.trino.plugin.jdbc.expression.ImplementAvgDecimal; +import io.trino.plugin.jdbc.expression.ImplementAvgFloatingPoint; +import io.trino.plugin.jdbc.expression.ImplementCount; +import io.trino.plugin.jdbc.expression.ImplementCountAll; +import io.trino.plugin.jdbc.expression.ImplementMinMax; +import io.trino.plugin.jdbc.expression.ImplementSum; +import io.trino.plugin.postgresql.PostgreSqlConfig.ArrayMapping; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.SingleMapBlock; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.LongTimestamp; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.MapType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.VarcharType; import org.postgresql.core.TypeInfo; import org.postgresql.jdbc.PgConnection; @@ -105,80 +105,80 @@ import static io.airlift.slice.SizeOf.SIZE_OF_LONG; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedLongArray; -import static io.prestosql.plugin.base.util.JsonTypeUtil.jsonParse; -import static io.prestosql.plugin.base.util.JsonTypeUtil.toJsonValue; -import static io.prestosql.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.getDecimalDefaultScale; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.getDecimalRounding; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.getDecimalRoundingMode; -import static io.prestosql.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.booleanColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.booleanWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.charWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.dateColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.dateWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.decimalColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.defaultCharColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.defaultVarcharColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.doubleColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.doubleWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.fromPrestoTimestamp; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.longDecimalWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.realColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.realWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.shortDecimalWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.timestampReadFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varbinaryColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varbinaryWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; -import static io.prestosql.plugin.jdbc.TypeHandlingJdbcSessionProperties.getUnsupportedTypeHandling; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.IGNORE; -import static io.prestosql.plugin.postgresql.PostgreSqlConfig.ArrayMapping.AS_ARRAY; -import static io.prestosql.plugin.postgresql.PostgreSqlConfig.ArrayMapping.AS_JSON; -import static io.prestosql.plugin.postgresql.PostgreSqlConfig.ArrayMapping.DISABLED; -import static io.prestosql.plugin.postgresql.PostgreSqlSessionProperties.getArrayMapping; -import static io.prestosql.plugin.postgresql.TypeUtils.arrayDepth; -import static io.prestosql.plugin.postgresql.TypeUtils.getArrayElementPgTypeName; -import static io.prestosql.plugin.postgresql.TypeUtils.getJdbcObjectArray; -import static io.prestosql.plugin.postgresql.TypeUtils.toPgTimestamp; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.StandardTypes.JSON; -import static io.prestosql.spi.type.TimeType.createTimeType; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.Timestamps.MILLISECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_DAY; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_DAY; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.spi.type.Timestamps.round; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.base.util.JsonTypeUtil.jsonParse; +import static io.trino.plugin.base.util.JsonTypeUtil.toJsonValue; +import static io.trino.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.getDecimalDefaultScale; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.getDecimalRounding; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.getDecimalRoundingMode; +import static io.trino.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; +import static io.trino.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.booleanColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.booleanWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.charWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.dateColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.dateWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.decimalColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.defaultCharColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.defaultVarcharColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.doubleColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.doubleWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.fromPrestoTimestamp; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.longDecimalWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.realColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.realWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.shortDecimalWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.timestampReadFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varbinaryColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.varbinaryWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; +import static io.trino.plugin.jdbc.TypeHandlingJdbcSessionProperties.getUnsupportedTypeHandling; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.IGNORE; +import static io.trino.plugin.postgresql.PostgreSqlConfig.ArrayMapping.AS_ARRAY; +import static io.trino.plugin.postgresql.PostgreSqlConfig.ArrayMapping.AS_JSON; +import static io.trino.plugin.postgresql.PostgreSqlConfig.ArrayMapping.DISABLED; +import static io.trino.plugin.postgresql.PostgreSqlSessionProperties.getArrayMapping; +import static io.trino.plugin.postgresql.TypeUtils.arrayDepth; +import static io.trino.plugin.postgresql.TypeUtils.getArrayElementPgTypeName; +import static io.trino.plugin.postgresql.TypeUtils.getJdbcObjectArray; +import static io.trino.plugin.postgresql.TypeUtils.toPgTimestamp; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.StandardTypes.JSON; +import static io.trino.spi.type.TimeType.createTimeType; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.Timestamps.MILLISECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_DAY; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_DAY; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MICROSECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.spi.type.Timestamps.round; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Math.max; import static java.lang.Math.min; import static java.lang.String.format; diff --git a/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlClientModule.java b/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlClientModule.java index 34846eff67c6..a965a6b5bfbf 100644 --- a/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlClientModule.java +++ b/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlClientModule.java @@ -18,17 +18,17 @@ import com.google.inject.Provides; import com.google.inject.Scopes; import com.google.inject.Singleton; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.DecimalModule; -import io.prestosql.plugin.jdbc.DriverConnectionFactory; -import io.prestosql.plugin.jdbc.ForBaseJdbc; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.credential.CredentialProvider; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.DecimalModule; +import io.trino.plugin.jdbc.DriverConnectionFactory; +import io.trino.plugin.jdbc.ForBaseJdbc; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.credential.CredentialProvider; import org.postgresql.Driver; import static io.airlift.configuration.ConfigBinder.configBinder; -import static io.prestosql.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider; +import static io.trino.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider; public class PostgreSqlClientModule implements Module diff --git a/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlPlugin.java b/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlPlugin.java index d91a7c43c675..7cf3b8578c23 100644 --- a/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlPlugin.java +++ b/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlPlugin.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.postgresql; -import io.prestosql.plugin.jdbc.JdbcPlugin; +import io.trino.plugin.jdbc.JdbcPlugin; public class PostgreSqlPlugin extends JdbcPlugin diff --git a/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlSessionProperties.java b/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlSessionProperties.java index 4e5080ba3a17..9214877fd8b3 100644 --- a/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlSessionProperties.java +++ b/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlSessionProperties.java @@ -14,16 +14,16 @@ package io.trino.plugin.postgresql; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.jdbc.SessionPropertiesProvider; -import io.prestosql.plugin.postgresql.PostgreSqlConfig.ArrayMapping; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.plugin.jdbc.SessionPropertiesProvider; +import io.trino.plugin.postgresql.PostgreSqlConfig.ArrayMapping; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; import java.util.List; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.enumProperty; public final class PostgreSqlSessionProperties implements SessionPropertiesProvider diff --git a/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/TypeUtils.java b/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/TypeUtils.java index eb36b3e173cf..bb59a8178c77 100644 --- a/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/TypeUtils.java +++ b/plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/TypeUtils.java @@ -16,17 +16,17 @@ import com.google.common.primitives.Shorts; import com.google.common.primitives.SignedBytes; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.joda.time.DateTimeZone; import org.postgresql.util.PGobject; @@ -42,23 +42,23 @@ import java.time.OffsetDateTime; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.fromPrestoTimestamp; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.decodeUnscaledValue; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.Timestamps.MILLISECONDS_PER_SECOND; -import static io.prestosql.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.TypeUtils.readNativeValue; +import static io.trino.plugin.jdbc.StandardColumnMappings.fromPrestoTimestamp; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.decodeUnscaledValue; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.Timestamps.MILLISECONDS_PER_SECOND; +import static io.trino.spi.type.Timestamps.NANOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_NANOSECOND; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.TypeUtils.readNativeValue; import static java.lang.Float.intBitsToFloat; import static java.lang.Math.toIntExact; import static java.util.concurrent.TimeUnit.DAYS; diff --git a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/PostgreSqlQueryRunner.java b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/PostgreSqlQueryRunner.java index 6ea18cadeed4..21147108f693 100644 --- a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/PostgreSqlQueryRunner.java +++ b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/PostgreSqlQueryRunner.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; import io.trino.tpch.TpchTable; import java.util.HashMap; import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class PostgreSqlQueryRunner { diff --git a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlCaseInsensitiveMapping.java b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlCaseInsensitiveMapping.java index 147a04ef979e..3911ea2ab402 100644 --- a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlCaseInsensitiveMapping.java +++ b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlCaseInsensitiveMapping.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; import java.sql.Connection; @@ -25,7 +25,7 @@ import java.util.stream.Stream; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlClient.java b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlClient.java index d981033767eb..ea83e8e152c9 100644 --- a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlClient.java +++ b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlClient.java @@ -13,19 +13,19 @@ */ package io.trino.plugin.postgresql; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ColumnMapping; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.InternalTypeManager; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ColumnMapping; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Variable; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.type.InternalTypeManager; import org.testng.annotations.Test; import java.sql.Types; @@ -33,12 +33,12 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.assertions.Assert.assertEquals; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlDistributedQueries.java b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlDistributedQueries.java index cd45b4e51bad..32d6a2d09463 100644 --- a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlDistributedQueries.java +++ b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlDistributedQueries.java @@ -14,13 +14,13 @@ package io.trino.plugin.postgresql; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.JdbcSqlExecutor; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.JdbcSqlExecutor; +import io.trino.testing.sql.TestTable; import io.trino.tpch.TpchTable; -import static io.prestosql.plugin.postgresql.PostgreSqlQueryRunner.createPostgreSqlQueryRunner; +import static io.trino.plugin.postgresql.PostgreSqlQueryRunner.createPostgreSqlQueryRunner; public class TestPostgreSqlDistributedQueries extends AbstractTestDistributedQueries diff --git a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlIntegrationSmokeTest.java b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlIntegrationSmokeTest.java index 7229c28a2928..651bfa65ff45 100644 --- a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlIntegrationSmokeTest.java +++ b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlIntegrationSmokeTest.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.postgresql; -import io.prestosql.Session; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -30,8 +30,8 @@ import java.util.Map; import java.util.UUID; -import static io.prestosql.plugin.postgresql.PostgreSqlQueryRunner.createPostgreSqlQueryRunner; -import static io.prestosql.testing.sql.TestTable.randomTableSuffix; +import static io.trino.plugin.postgresql.PostgreSqlQueryRunner.createPostgreSqlQueryRunner; +import static io.trino.testing.sql.TestTable.randomTableSuffix; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.NATION; import static io.trino.tpch.TpchTable.ORDERS; diff --git a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlPlugin.java b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlPlugin.java index 39409f1bef5c..606cbd320da0 100644 --- a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlPlugin.java +++ b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlPlugin.java @@ -14,9 +14,9 @@ package io.trino.plugin.postgresql; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; diff --git a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlTypeMapping.java b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlTypeMapping.java index d3e078d76c1f..11f50eff94de 100644 --- a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlTypeMapping.java +++ b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlTypeMapping.java @@ -17,27 +17,27 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.json.JsonCodec; -import io.prestosql.Session; -import io.prestosql.plugin.jdbc.UnsupportedTypeHandling; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DataProviders; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.TestingSession; -import io.prestosql.testing.datatype.CreateAndInsertDataSetup; -import io.prestosql.testing.datatype.CreateAndPrestoInsertDataSetup; -import io.prestosql.testing.datatype.CreateAsSelectDataSetup; -import io.prestosql.testing.datatype.DataSetup; -import io.prestosql.testing.datatype.DataType; -import io.prestosql.testing.datatype.DataTypeTest; -import io.prestosql.testing.datatype.SqlDataTypeTest; -import io.prestosql.testing.sql.JdbcSqlExecutor; -import io.prestosql.testing.sql.PrestoSqlExecutor; -import io.prestosql.testing.sql.TestTable; +import io.trino.Session; +import io.trino.plugin.jdbc.UnsupportedTypeHandling; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DataProviders; +import io.trino.testing.QueryRunner; +import io.trino.testing.TestingSession; +import io.trino.testing.datatype.CreateAndInsertDataSetup; +import io.trino.testing.datatype.CreateAndPrestoInsertDataSetup; +import io.trino.testing.datatype.CreateAsSelectDataSetup; +import io.trino.testing.datatype.DataSetup; +import io.trino.testing.datatype.DataType; +import io.trino.testing.datatype.DataTypeTest; +import io.trino.testing.datatype.SqlDataTypeTest; +import io.trino.testing.sql.JdbcSqlExecutor; +import io.trino.testing.sql.PrestoSqlExecutor; +import io.trino.testing.sql.TestTable; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -65,48 +65,48 @@ import static com.google.common.io.BaseEncoding.base16; import static io.airlift.json.JsonCodec.listJsonCodec; import static io.airlift.json.JsonCodec.mapJsonCodec; -import static io.prestosql.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; -import static io.prestosql.plugin.jdbc.DecimalConfig.DecimalMapping.STRICT; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_DEFAULT_SCALE; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_MAPPING; -import static io.prestosql.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_ROUNDING_MODE; -import static io.prestosql.plugin.jdbc.TypeHandlingJdbcSessionProperties.UNSUPPORTED_TYPE_HANDLING; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; -import static io.prestosql.plugin.jdbc.UnsupportedTypeHandling.IGNORE; -import static io.prestosql.plugin.postgresql.PostgreSqlConfig.ArrayMapping.AS_ARRAY; -import static io.prestosql.plugin.postgresql.PostgreSqlConfig.ArrayMapping.AS_JSON; -import static io.prestosql.plugin.postgresql.PostgreSqlConfig.ArrayMapping.DISABLED; -import static io.prestosql.plugin.postgresql.PostgreSqlQueryRunner.createPostgreSqlQueryRunner; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.datatype.DataType.bigintDataType; -import static io.prestosql.testing.datatype.DataType.booleanDataType; -import static io.prestosql.testing.datatype.DataType.dataType; -import static io.prestosql.testing.datatype.DataType.dateDataType; -import static io.prestosql.testing.datatype.DataType.decimalDataType; -import static io.prestosql.testing.datatype.DataType.doubleDataType; -import static io.prestosql.testing.datatype.DataType.formatStringLiteral; -import static io.prestosql.testing.datatype.DataType.integerDataType; -import static io.prestosql.testing.datatype.DataType.jsonDataType; -import static io.prestosql.testing.datatype.DataType.realDataType; -import static io.prestosql.testing.datatype.DataType.smallintDataType; -import static io.prestosql.testing.datatype.DataType.timeDataType; -import static io.prestosql.testing.datatype.DataType.timestampDataType; -import static io.prestosql.testing.datatype.DataType.varcharDataType; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.type.UuidType.UUID; +import static io.trino.plugin.jdbc.DecimalConfig.DecimalMapping.ALLOW_OVERFLOW; +import static io.trino.plugin.jdbc.DecimalConfig.DecimalMapping.STRICT; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_DEFAULT_SCALE; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_MAPPING; +import static io.trino.plugin.jdbc.DecimalSessionSessionProperties.DECIMAL_ROUNDING_MODE; +import static io.trino.plugin.jdbc.TypeHandlingJdbcSessionProperties.UNSUPPORTED_TYPE_HANDLING; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.CONVERT_TO_VARCHAR; +import static io.trino.plugin.jdbc.UnsupportedTypeHandling.IGNORE; +import static io.trino.plugin.postgresql.PostgreSqlConfig.ArrayMapping.AS_ARRAY; +import static io.trino.plugin.postgresql.PostgreSqlConfig.ArrayMapping.AS_JSON; +import static io.trino.plugin.postgresql.PostgreSqlConfig.ArrayMapping.DISABLED; +import static io.trino.plugin.postgresql.PostgreSqlQueryRunner.createPostgreSqlQueryRunner; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.datatype.DataType.bigintDataType; +import static io.trino.testing.datatype.DataType.booleanDataType; +import static io.trino.testing.datatype.DataType.dataType; +import static io.trino.testing.datatype.DataType.dateDataType; +import static io.trino.testing.datatype.DataType.decimalDataType; +import static io.trino.testing.datatype.DataType.doubleDataType; +import static io.trino.testing.datatype.DataType.formatStringLiteral; +import static io.trino.testing.datatype.DataType.integerDataType; +import static io.trino.testing.datatype.DataType.jsonDataType; +import static io.trino.testing.datatype.DataType.realDataType; +import static io.trino.testing.datatype.DataType.smallintDataType; +import static io.trino.testing.datatype.DataType.timeDataType; +import static io.trino.testing.datatype.DataType.timestampDataType; +import static io.trino.testing.datatype.DataType.varcharDataType; +import static io.trino.type.JsonType.JSON; +import static io.trino.type.UuidType.UUID; import static java.lang.String.format; import static java.math.RoundingMode.HALF_UP; import static java.math.RoundingMode.UNNECESSARY; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusClient.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusClient.java index 021cb14a4e81..2e0cb537b1c7 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusClient.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusClient.java @@ -17,10 +17,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.json.JsonCodec; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.PrestoException; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; import okhttp3.OkHttpClient; import okhttp3.OkHttpClient.Builder; import okhttp3.Request; @@ -38,11 +38,11 @@ import java.util.Set; import java.util.function.Supplier; -import static io.prestosql.plugin.prometheus.PrometheusErrorCode.PROMETHEUS_TABLES_METRICS_RETRIEVE_ERROR; -import static io.prestosql.plugin.prometheus.PrometheusErrorCode.PROMETHEUS_UNKNOWN_ERROR; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.prometheus.PrometheusErrorCode.PROMETHEUS_TABLES_METRICS_RETRIEVE_ERROR; +import static io.trino.plugin.prometheus.PrometheusErrorCode.PROMETHEUS_UNKNOWN_ERROR; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.file.Files.readString; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusColumn.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusColumn.java index ccab0bf9b32f..b7c7ed852e98 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusColumn.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusColumn.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusColumnHandle.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusColumnHandle.java index ab0d1d34de22..d3970c734625 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusColumnHandle.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusColumnHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import static com.google.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusConnector.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusConnector.java index 1acc15f7bede..af584db8a96f 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusConnector.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusConnector.java @@ -15,16 +15,16 @@ import io.airlift.bootstrap.LifeCycleManager; import io.airlift.log.Logger; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; -import static io.prestosql.plugin.prometheus.PrometheusTransactionHandle.INSTANCE; +import static io.trino.plugin.prometheus.PrometheusTransactionHandle.INSTANCE; import static java.util.Objects.requireNonNull; public class PrometheusConnector diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusConnectorFactory.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusConnectorFactory.java index 68fdc10e1f40..95fa093f4ffb 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusConnectorFactory.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusConnectorFactory.java @@ -16,10 +16,10 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; import java.util.Map; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusErrorCode.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusErrorCode.java index a7530848cced..dd7786cf62cb 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusErrorCode.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusErrorCode.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.prometheus; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; -import static io.prestosql.spi.ErrorType.USER_ERROR; +import static io.trino.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.USER_ERROR; public enum PrometheusErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusHandleResolver.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusHandleResolver.java index f8c6d7097abb..884887893370 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusHandleResolver.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.prometheus; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class PrometheusHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusMetadata.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusMetadata.java index d6916c0f15c3..8f9b586d0b26 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusMetadata.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusMetadata.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.TableNotFoundException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.TableNotFoundException; import javax.inject.Inject; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusModule.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusModule.java index e089264d2d79..98bc62ac7045 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusModule.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusModule.java @@ -18,9 +18,9 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusPlugin.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusPlugin.java index c263c7735869..4abc4734024f 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusPlugin.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.prometheus; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class PrometheusPlugin implements Plugin diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusQueryResponseParse.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusQueryResponseParse.java index 7b9cc0839f68..d933d5217bfb 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusQueryResponseParse.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusQueryResponseParse.java @@ -20,7 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.io.IOException; import java.io.InputStream; @@ -28,7 +28,7 @@ import java.util.List; import java.util.Map; -import static io.prestosql.plugin.prometheus.PrometheusErrorCode.PROMETHEUS_PARSE_ERROR; +import static io.trino.plugin.prometheus.PrometheusErrorCode.PROMETHEUS_PARSE_ERROR; import static java.util.Collections.singletonList; public class PrometheusQueryResponseParse diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusRecordCursor.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusRecordCursor.java index b4c889d5a48b..090a0d0c996d 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusRecordCursor.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusRecordCursor.java @@ -19,15 +19,15 @@ import com.google.common.io.CountingInputStream; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeUtils; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeUtils; +import io.trino.spi.type.VarcharType; import java.io.IOException; import java.io.UncheckedIOException; @@ -41,16 +41,16 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Objects.requireNonNull; public class PrometheusRecordCursor diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusRecordSet.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusRecordSet.java index d787834ab527..ff7a1290f9ed 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusRecordSet.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusRecordSet.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.ByteSource; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusRecordSetProvider.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusRecordSetProvider.java index 93197b595f93..f63481815f46 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusRecordSetProvider.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusRecordSetProvider.java @@ -14,13 +14,13 @@ package io.trino.plugin.prometheus; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import javax.inject.Inject; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusSplit.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusSplit.java index 16f406a7300c..0a9cf391e727 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusSplit.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.net.URI; import java.util.List; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusSplitManager.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusSplitManager.java index 27ae3f71f5be..dea7903da080 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusSplitManager.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusSplitManager.java @@ -16,20 +16,20 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import io.airlift.units.Duration; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Marker; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Marker; +import io.trino.spi.predicate.TupleDomain; import org.apache.http.NameValuePair; import org.apache.http.client.utils.URIBuilder; import org.apache.http.message.BasicNameValuePair; @@ -49,9 +49,9 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; -import static io.prestosql.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; -import static io.prestosql.plugin.prometheus.PrometheusErrorCode.PROMETHEUS_UNKNOWN_ERROR; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; +import static io.trino.plugin.prometheus.PrometheusErrorCode.PROMETHEUS_UNKNOWN_ERROR; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; import static java.time.Instant.ofEpochMilli; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusStandardizedRow.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusStandardizedRow.java index c24c1f70c46e..0ad038807453 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusStandardizedRow.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusStandardizedRow.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.prometheus; -import io.prestosql.spi.block.Block; +import io.trino.spi.block.Block; import java.time.Instant; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTable.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTable.java index 04ce363f3953..3afcf518f812 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTable.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTable.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ColumnMetadata; import java.util.List; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTableHandle.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTableHandle.java index 8bf7c6a8a2aa..5457623b1199 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTableHandle.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTableHandle.java @@ -15,10 +15,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTimestampDeserializer.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTimestampDeserializer.java index 770d63c43de0..5ef48828f49b 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTimestampDeserializer.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTimestampDeserializer.java @@ -16,12 +16,12 @@ import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import java.io.IOException; import java.time.Instant; -import static io.prestosql.plugin.prometheus.PrometheusErrorCode.PROMETHEUS_UNKNOWN_ERROR; +import static io.trino.plugin.prometheus.PrometheusErrorCode.PROMETHEUS_UNKNOWN_ERROR; import static java.time.Instant.ofEpochMilli; public class PrometheusTimestampDeserializer diff --git a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTransactionHandle.java b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTransactionHandle.java index a107bda48e92..1f46a7b321f3 100644 --- a/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTransactionHandle.java +++ b/plugin/trino-prometheus/src/main/java/io/trino/plugin/prometheus/PrometheusTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.prometheus; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum PrometheusTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/MetadataUtil.java b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/MetadataUtil.java index 027b554b12fc..b125b5cc40a2 100644 --- a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/MetadataUtil.java +++ b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/MetadataUtil.java @@ -19,24 +19,24 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.InternalTypeManager; +import io.trino.metadata.Metadata; +import io.trino.spi.type.MapType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.type.InternalTypeManager; import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TypeSignature.mapType; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TypeSignature.mapType; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Locale.ENGLISH; public final class MetadataUtil diff --git a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/PrometheusHttpServer.java b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/PrometheusHttpServer.java index 59c7f959dcb0..eaeb0bd7a628 100644 --- a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/PrometheusHttpServer.java +++ b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/PrometheusHttpServer.java @@ -36,7 +36,7 @@ import java.net.URL; import java.util.Map; -import static io.prestosql.plugin.prometheus.PrometheusClient.METRICS_ENDPOINT; +import static io.trino.plugin.prometheus.PrometheusClient.METRICS_ENDPOINT; public class PrometheusHttpServer { diff --git a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/PrometheusQueryRunner.java b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/PrometheusQueryRunner.java index a505bc1f563f..9afd85d3a903 100644 --- a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/PrometheusQueryRunner.java +++ b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/PrometheusQueryRunner.java @@ -17,19 +17,19 @@ import io.airlift.log.Logger; import io.airlift.log.Logging; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.type.InternalTypeManager; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.testing.DistributedQueryRunner; +import io.trino.type.InternalTypeManager; import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.prometheus.MetadataUtil.METRIC_CODEC; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.prometheus.MetadataUtil.METRIC_CODEC; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class PrometheusQueryRunner { diff --git a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusColumnHandle.java b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusColumnHandle.java index 96d988ce1dfd..a8c49c2bd863 100644 --- a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusColumnHandle.java +++ b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusColumnHandle.java @@ -16,9 +16,9 @@ import io.airlift.testing.EquivalenceTester; import org.testng.annotations.Test; -import static io.prestosql.plugin.prometheus.MetadataUtil.COLUMN_CODEC; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.prometheus.MetadataUtil.COLUMN_CODEC; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static org.testng.Assert.assertEquals; public class TestPrometheusColumnHandle diff --git a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusIntegrationMetrics.java b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusIntegrationMetrics.java index 80c8948190c8..9da818512e42 100644 --- a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusIntegrationMetrics.java +++ b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusIntegrationMetrics.java @@ -15,23 +15,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.DoubleType; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.DoubleType; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.net.URI; -import static io.prestosql.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; -import static io.prestosql.plugin.prometheus.PrometheusQueryRunner.createPrometheusClient; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; +import static io.trino.plugin.prometheus.PrometheusQueryRunner.createPrometheusClient; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusIntegrationSchema.java b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusIntegrationSchema.java index 43010d3dcad1..9d8f66e37096 100644 --- a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusIntegrationSchema.java +++ b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusIntegrationSchema.java @@ -17,13 +17,13 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.units.Duration; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.TableNotFoundException; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.TableNotFoundException; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -31,13 +31,13 @@ import java.util.Optional; import java.util.concurrent.TimeUnit; -import static io.prestosql.plugin.prometheus.MetadataUtil.varcharMapType; -import static io.prestosql.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; -import static io.prestosql.plugin.prometheus.PrometheusQueryRunner.createPrometheusClient; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.plugin.prometheus.MetadataUtil.varcharMapType; +import static io.trino.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; +import static io.trino.plugin.prometheus.PrometheusQueryRunner.createPrometheusClient; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusIntegrationStatus.java b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusIntegrationStatus.java index 23f072870217..d2461cda905f 100644 --- a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusIntegrationStatus.java +++ b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusIntegrationStatus.java @@ -14,10 +14,10 @@ package io.trino.plugin.prometheus; import io.airlift.log.Logger; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; import okhttp3.Request; @@ -25,7 +25,7 @@ import java.util.concurrent.TimeUnit; -import static io.prestosql.plugin.prometheus.PrometheusQueryRunner.createPrometheusQueryRunner; +import static io.trino.plugin.prometheus.PrometheusQueryRunner.createPrometheusQueryRunner; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusQueryMatrixResponseParse.java b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusQueryMatrixResponseParse.java index 50e136957aac..4264aae6f536 100644 --- a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusQueryMatrixResponseParse.java +++ b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusQueryMatrixResponseParse.java @@ -14,7 +14,7 @@ package io.trino.plugin.prometheus; import com.google.common.io.Resources; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusRecordSet.java b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusRecordSet.java index 11e4665ef39b..f7bdcfe7cbb6 100644 --- a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusRecordSet.java +++ b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusRecordSet.java @@ -15,13 +15,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.InternalTypeManager; +import io.trino.spi.block.Block; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.type.InternalTypeManager; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -31,12 +31,12 @@ import java.util.ArrayList; import java.util.List; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.prometheus.MetadataUtil.METRIC_CODEC; -import static io.prestosql.plugin.prometheus.MetadataUtil.varcharMapType; -import static io.prestosql.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; -import static io.prestosql.plugin.prometheus.PrometheusRecordCursor.getBlockFromMap; -import static io.prestosql.plugin.prometheus.PrometheusRecordCursor.getMapFromBlock; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.prometheus.MetadataUtil.METRIC_CODEC; +import static io.trino.plugin.prometheus.MetadataUtil.varcharMapType; +import static io.trino.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; +import static io.trino.plugin.prometheus.PrometheusRecordCursor.getBlockFromMap; +import static io.trino.plugin.prometheus.PrometheusRecordCursor.getMapFromBlock; import static java.time.Instant.ofEpochMilli; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusRecordSetProvider.java b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusRecordSetProvider.java index c675c4bfe92b..ed97413c4787 100644 --- a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusRecordSetProvider.java +++ b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusRecordSetProvider.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.InternalTypeManager; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.type.InternalTypeManager; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -32,12 +32,12 @@ import java.util.LinkedHashMap; import java.util.Map; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.prometheus.MetadataUtil.METRIC_CODEC; -import static io.prestosql.plugin.prometheus.MetadataUtil.varcharMapType; -import static io.prestosql.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; -import static io.prestosql.plugin.prometheus.PrometheusRecordCursor.getMapFromBlock; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.prometheus.MetadataUtil.METRIC_CODEC; +import static io.trino.plugin.prometheus.MetadataUtil.varcharMapType; +import static io.trino.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; +import static io.trino.plugin.prometheus.PrometheusRecordCursor.getMapFromBlock; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.time.Instant.ofEpochMilli; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusSplit.java b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusSplit.java index b91e49d08621..a427cd8675a1 100644 --- a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusSplit.java +++ b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusSplit.java @@ -17,19 +17,19 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import io.airlift.json.JsonCodec; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.InternalTypeManager; +import io.trino.metadata.Metadata; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.type.InternalTypeManager; import org.apache.http.NameValuePair; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -49,15 +49,15 @@ import java.util.stream.Collectors; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.prometheus.MetadataUtil.METRIC_CODEC; -import static io.prestosql.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; -import static io.prestosql.plugin.prometheus.PrometheusClock.fixedClockAt; -import static io.prestosql.plugin.prometheus.PrometheusSplitManager.OFFSET_MILLIS; -import static io.prestosql.plugin.prometheus.PrometheusSplitManager.decimalSecondString; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.TimeZoneKey.UTC_KEY; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.prometheus.MetadataUtil.METRIC_CODEC; +import static io.trino.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; +import static io.trino.plugin.prometheus.PrometheusClock.fixedClockAt; +import static io.trino.plugin.prometheus.PrometheusSplitManager.OFFSET_MILLIS; +import static io.trino.plugin.prometheus.PrometheusSplitManager.decimalSecondString; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.TimeZoneKey.UTC_KEY; import static java.time.Instant.ofEpochMilli; import static java.time.ZoneOffset.UTC; import static org.apache.http.client.utils.URLEncodedUtils.parse; diff --git a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusTable.java b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusTable.java index 77b69bad36be..aa1ea1aa43c6 100644 --- a/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusTable.java +++ b/plugin/trino-prometheus/src/test/java/io/trino/plugin/prometheus/TestPrometheusTable.java @@ -14,13 +14,13 @@ package io.trino.plugin.prometheus; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.DoubleType; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.DoubleType; import org.testng.annotations.Test; -import static io.prestosql.plugin.prometheus.MetadataUtil.TABLE_CODEC; -import static io.prestosql.plugin.prometheus.MetadataUtil.varcharMapType; -import static io.prestosql.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; +import static io.trino.plugin.prometheus.MetadataUtil.TABLE_CODEC; +import static io.trino.plugin.prometheus.MetadataUtil.varcharMapType; +import static io.trino.plugin.prometheus.PrometheusClient.TIMESTAMP_COLUMN_TYPE; import static org.testng.Assert.assertEquals; public class TestPrometheusTable diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/NodeSupplier.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/NodeSupplier.java index 6c1aa5740764..db05b7a04b16 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/NodeSupplier.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/NodeSupplier.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.raptor.legacy; -import io.prestosql.spi.Node; +import io.trino.spi.Node; import java.util.Set; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorBucketFunction.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorBucketFunction.java index 3630da9e732f..933eb2287f7e 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorBucketFunction.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorBucketFunction.java @@ -14,19 +14,19 @@ package io.trino.plugin.raptor.legacy; import io.airlift.slice.XxHash64; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; public class RaptorBucketFunction implements BucketFunction diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorColumnHandle.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorColumnHandle.java index 3bf0727446f0..47cbaf4c58d6 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorColumnHandle.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorColumnHandle.java @@ -15,14 +15,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.type.Type; import java.util.Objects; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.util.Objects.requireNonNull; public final class RaptorColumnHandle diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorConnector.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorConnector.java index 44f2686dc40f..b56bb4fecbd5 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorConnector.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorConnector.java @@ -17,20 +17,20 @@ import com.google.common.collect.SetMultimap; import io.airlift.bootstrap.LifeCycleManager; import io.airlift.log.Logger; -import io.prestosql.plugin.raptor.legacy.metadata.ForMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorAccessControl; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.plugin.raptor.legacy.metadata.ForMetadata; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorAccessControl; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import org.skife.jdbi.v2.IDBI; import javax.annotation.PostConstruct; @@ -47,9 +47,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Verify.verify; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorConnectorFactory.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorConnectorFactory.java index 233fa839a778..f5a1aad0dfb1 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorConnectorFactory.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorConnectorFactory.java @@ -18,18 +18,18 @@ import com.google.inject.Module; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.plugin.base.jmx.ConnectorObjectNameGeneratorModule; -import io.prestosql.plugin.base.jmx.MBeanServerModule; -import io.prestosql.plugin.raptor.legacy.backup.BackupModule; -import io.prestosql.plugin.raptor.legacy.security.RaptorSecurityModule; -import io.prestosql.plugin.raptor.legacy.storage.StorageModule; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.jmx.ConnectorObjectNameGeneratorModule; +import io.trino.plugin.base.jmx.MBeanServerModule; +import io.trino.plugin.raptor.legacy.backup.BackupModule; +import io.trino.plugin.raptor.legacy.security.RaptorSecurityModule; +import io.trino.plugin.raptor.legacy.storage.StorageModule; +import io.trino.spi.NodeManager; +import io.trino.spi.PageSorter; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.type.TypeManager; import org.weakref.jmx.guice.MBeanModule; import java.util.Map; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorErrorCode.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorErrorCode.java index 6227ef4f985d..e16ba20ef687 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorErrorCode.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorErrorCode.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.raptor.legacy; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.EXTERNAL; public enum RaptorErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorHandleResolver.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorHandleResolver.java index 37bd5d37bddb..63d3b299d325 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorHandleResolver.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorHandleResolver.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.raptor.legacy; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class RaptorHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorInsertTableHandle.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorInsertTableHandle.java index 8dc385ee4439..551e7c4647f7 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorInsertTableHandle.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorInsertTableHandle.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; import java.util.List; import java.util.Optional; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorMetadata.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorMetadata.java index 10a41044702b..e7ba0bb58620 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorMetadata.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorMetadata.java @@ -24,42 +24,42 @@ import io.airlift.json.ObjectMapperProvider; import io.airlift.log.Logger; import io.airlift.slice.Slice; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnInfo; -import io.prestosql.plugin.raptor.legacy.metadata.Distribution; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.ShardDelta; -import io.prestosql.plugin.raptor.legacy.metadata.ShardInfo; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.Table; -import io.prestosql.plugin.raptor.legacy.metadata.TableColumn; -import io.prestosql.plugin.raptor.legacy.metadata.ViewResult; -import io.prestosql.plugin.raptor.legacy.systemtables.ColumnRangesSystemTable; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputMetadata; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTablePartitioning; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.connector.ViewNotFoundException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.type.Type; +import io.trino.plugin.raptor.legacy.metadata.ColumnInfo; +import io.trino.plugin.raptor.legacy.metadata.Distribution; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.ShardDelta; +import io.trino.plugin.raptor.legacy.metadata.ShardInfo; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.Table; +import io.trino.plugin.raptor.legacy.metadata.TableColumn; +import io.trino.plugin.raptor.legacy.metadata.ViewResult; +import io.trino.plugin.raptor.legacy.systemtables.ColumnRangesSystemTable; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputMetadata; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTablePartitioning; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.connector.ViewNotFoundException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.type.Type; import org.skife.jdbi.v2.IDBI; import java.util.ArrayList; @@ -81,42 +81,42 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.collect.MoreCollectors.toOptional; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.plugin.raptor.legacy.RaptorBucketFunction.validateBucketType; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.BUCKET_NUMBER_COLUMN_NAME; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.SHARD_UUID_COLUMN_NAME; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.SHARD_UUID_COLUMN_TYPE; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.bucketNumberColumnHandle; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.isHiddenColumn; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.shardRowIdHandle; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.shardUuidColumnHandle; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; -import static io.prestosql.plugin.raptor.legacy.RaptorSessionProperties.getExternalBatchId; -import static io.prestosql.plugin.raptor.legacy.RaptorSessionProperties.getOneSplitPerBucketThreshold; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.BUCKETED_ON_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.BUCKET_COUNT_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.DISTRIBUTION_NAME_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.ORDERING_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.ORGANIZED_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.TEMPORAL_COLUMN_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.getBucketColumns; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.getBucketCount; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.getDistributionName; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.getSortColumns; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.getTemporalColumn; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.isOrganized; -import static io.prestosql.plugin.raptor.legacy.systemtables.ColumnRangesSystemTable.getSourceTable; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.daoTransaction; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.runIgnoringConstraintViolation; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.runTransaction; -import static io.prestosql.spi.StandardErrorCode.ALREADY_EXISTS; -import static io.prestosql.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; -import static io.prestosql.spi.StandardErrorCode.NOT_FOUND; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.plugin.raptor.legacy.RaptorBucketFunction.validateBucketType; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.BUCKET_NUMBER_COLUMN_NAME; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.SHARD_UUID_COLUMN_NAME; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.SHARD_UUID_COLUMN_TYPE; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.bucketNumberColumnHandle; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.isHiddenColumn; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.shardRowIdHandle; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.shardUuidColumnHandle; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; +import static io.trino.plugin.raptor.legacy.RaptorSessionProperties.getExternalBatchId; +import static io.trino.plugin.raptor.legacy.RaptorSessionProperties.getOneSplitPerBucketThreshold; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.BUCKETED_ON_PROPERTY; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.BUCKET_COUNT_PROPERTY; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.DISTRIBUTION_NAME_PROPERTY; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.ORDERING_PROPERTY; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.ORGANIZED_PROPERTY; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.TEMPORAL_COLUMN_PROPERTY; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.getBucketColumns; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.getBucketCount; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.getDistributionName; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.getSortColumns; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.getTemporalColumn; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.isOrganized; +import static io.trino.plugin.raptor.legacy.systemtables.ColumnRangesSystemTable.getSourceTable; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.daoTransaction; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.runIgnoringConstraintViolation; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.runTransaction; +import static io.trino.spi.StandardErrorCode.ALREADY_EXISTS; +import static io.trino.spi.StandardErrorCode.INVALID_TABLE_PROPERTY; +import static io.trino.spi.StandardErrorCode.NOT_FOUND; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; import static java.lang.String.format; import static java.util.Collections.nCopies; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorMetadataFactory.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorMetadataFactory.java index a9c81fe3f57f..3d4e9a34275f 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorMetadataFactory.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorMetadataFactory.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.raptor.legacy; -import io.prestosql.plugin.raptor.legacy.metadata.ForMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.ForMetadata; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; import org.skife.jdbi.v2.IDBI; import javax.inject.Inject; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorModule.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorModule.java index 0e2f987730bd..5302a5751bea 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorModule.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorModule.java @@ -18,15 +18,15 @@ import com.google.inject.Provides; import com.google.inject.Scopes; import com.google.inject.multibindings.Multibinder; -import io.prestosql.plugin.raptor.legacy.metadata.Distribution; -import io.prestosql.plugin.raptor.legacy.metadata.ForMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.TableColumn; -import io.prestosql.plugin.raptor.legacy.systemtables.ShardMetadataSystemTable; -import io.prestosql.plugin.raptor.legacy.systemtables.TableMetadataSystemTable; -import io.prestosql.plugin.raptor.legacy.systemtables.TableStatsSystemTable; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.raptor.legacy.metadata.Distribution; +import io.trino.plugin.raptor.legacy.metadata.ForMetadata; +import io.trino.plugin.raptor.legacy.metadata.TableColumn; +import io.trino.plugin.raptor.legacy.systemtables.ShardMetadataSystemTable; +import io.trino.plugin.raptor.legacy.systemtables.TableMetadataSystemTable; +import io.trino.plugin.raptor.legacy.systemtables.TableStatsSystemTable; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.type.TypeManager; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.IDBI; import org.skife.jdbi.v2.tweak.ConnectionFactory; @@ -34,7 +34,7 @@ import javax.inject.Singleton; import static com.google.inject.multibindings.Multibinder.newSetBinder; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; import static java.util.Objects.requireNonNull; public class RaptorModule diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorNodePartitioningProvider.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorNodePartitioningProvider.java index 309bfaad0e7e..c64739139b8c 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorNodePartitioningProvider.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorNodePartitioningProvider.java @@ -14,16 +14,16 @@ package io.trino.plugin.raptor.legacy; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Node; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.connector.ConnectorBucketNodeMap; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.Node; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.connector.ConnectorBucketNodeMap; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.type.Type; import javax.inject.Inject; @@ -32,8 +32,8 @@ import java.util.function.ToIntFunction; import static com.google.common.collect.Maps.uniqueIndex; -import static io.prestosql.spi.StandardErrorCode.NO_NODES_AVAILABLE; -import static io.prestosql.spi.connector.ConnectorBucketNodeMap.createBucketNodeMap; +import static io.trino.spi.StandardErrorCode.NO_NODES_AVAILABLE; +import static io.trino.spi.connector.ConnectorBucketNodeMap.createBucketNodeMap; import static java.util.Objects.requireNonNull; public class RaptorNodePartitioningProvider diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorOutputTableHandle.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorOutputTableHandle.java index b4d024643093..e512eb06fcee 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorOutputTableHandle.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorOutputTableHandle.java @@ -16,17 +16,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; import java.util.List; import java.util.Optional; import java.util.OptionalInt; import java.util.OptionalLong; -import static io.prestosql.plugin.raptor.legacy.util.MetadataUtil.checkSchemaName; -import static io.prestosql.plugin.raptor.legacy.util.MetadataUtil.checkTableName; +import static io.trino.plugin.raptor.legacy.util.MetadataUtil.checkSchemaName; +import static io.trino.plugin.raptor.legacy.util.MetadataUtil.checkTableName; import static java.util.Objects.requireNonNull; public class RaptorOutputTableHandle diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPageSink.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPageSink.java index c6ef0a0e7360..4fcf604e268f 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPageSink.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPageSink.java @@ -18,19 +18,19 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.units.DataSize; -import io.prestosql.plugin.raptor.legacy.metadata.ShardInfo; -import io.prestosql.plugin.raptor.legacy.storage.StorageManager; -import io.prestosql.plugin.raptor.legacy.storage.organization.TemporalFunction; -import io.prestosql.plugin.raptor.legacy.util.PageBuffer; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; +import io.trino.plugin.raptor.legacy.metadata.ShardInfo; +import io.trino.plugin.raptor.legacy.storage.StorageManager; +import io.trino.plugin.raptor.legacy.storage.organization.TemporalFunction; +import io.trino.plugin.raptor.legacy.util.PageBuffer; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.PageSorter; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; import it.unimi.dsi.fastutil.longs.Long2ObjectMap; import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; @@ -44,8 +44,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.concurrent.MoreFutures.allAsList; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPageSinkProvider.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPageSinkProvider.java index 54145df38eff..2202ce5e76e2 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPageSinkProvider.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPageSinkProvider.java @@ -14,15 +14,15 @@ package io.trino.plugin.raptor.legacy; import io.airlift.units.DataSize; -import io.prestosql.plugin.raptor.legacy.storage.StorageManager; -import io.prestosql.plugin.raptor.legacy.storage.StorageManagerConfig; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.plugin.raptor.legacy.storage.StorageManager; +import io.trino.plugin.raptor.legacy.storage.StorageManagerConfig; +import io.trino.spi.PageSorter; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import javax.inject.Inject; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPageSourceProvider.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPageSourceProvider.java index 52e112fef3d5..cdbf0308fc32 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPageSourceProvider.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPageSourceProvider.java @@ -13,18 +13,18 @@ */ package io.trino.plugin.raptor.legacy; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.plugin.raptor.legacy.storage.StorageManager; -import io.prestosql.plugin.raptor.legacy.util.ConcatPageSource; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.raptor.legacy.storage.StorageManager; +import io.trino.plugin.raptor.legacy.util.ConcatPageSource; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import javax.inject.Inject; @@ -34,11 +34,11 @@ import java.util.OptionalLong; import java.util.UUID; -import static io.prestosql.plugin.raptor.legacy.RaptorSessionProperties.getReaderMaxMergeDistance; -import static io.prestosql.plugin.raptor.legacy.RaptorSessionProperties.getReaderMaxReadSize; -import static io.prestosql.plugin.raptor.legacy.RaptorSessionProperties.getReaderStreamBufferSize; -import static io.prestosql.plugin.raptor.legacy.RaptorSessionProperties.getReaderTinyStripeThreshold; -import static io.prestosql.plugin.raptor.legacy.RaptorSessionProperties.isReaderLazyReadSmallRanges; +import static io.trino.plugin.raptor.legacy.RaptorSessionProperties.getReaderMaxMergeDistance; +import static io.trino.plugin.raptor.legacy.RaptorSessionProperties.getReaderMaxReadSize; +import static io.trino.plugin.raptor.legacy.RaptorSessionProperties.getReaderStreamBufferSize; +import static io.trino.plugin.raptor.legacy.RaptorSessionProperties.getReaderTinyStripeThreshold; +import static io.trino.plugin.raptor.legacy.RaptorSessionProperties.isReaderLazyReadSmallRanges; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPartitioningHandle.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPartitioningHandle.java index faae144a8ba9..ca6055e1bcd2 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPartitioningHandle.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPartitioningHandle.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPlugin.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPlugin.java index a62ebb092fd1..f3e33b82f846 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPlugin.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorPlugin.java @@ -16,9 +16,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.inject.Module; -import io.prestosql.plugin.raptor.legacy.metadata.DatabaseMetadataModule; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.plugin.raptor.legacy.metadata.DatabaseMetadataModule; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; import java.util.Map; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorSessionProperties.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorSessionProperties.java index 52012f077496..188dc127c3e4 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorSessionProperties.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorSessionProperties.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.plugin.raptor.legacy.storage.StorageManagerConfig; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.plugin.raptor.legacy.storage.StorageManagerConfig; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; import java.util.List; import java.util.Optional; -import static io.prestosql.plugin.base.session.PropertyMetadataUtil.dataSizeProperty; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; -import static io.prestosql.spi.session.PropertyMetadata.stringProperty; +import static io.trino.plugin.base.session.PropertyMetadataUtil.dataSizeProperty; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.session.PropertyMetadata.stringProperty; public class RaptorSessionProperties { diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorSplit.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorSplit.java index e0fe611474f6..6e3416f7ec6e 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorSplit.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorSplit.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; import java.util.OptionalInt; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorSplitManager.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorSplitManager.java index bd0f6d69ed6a..b1d8afedbf9a 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorSplitManager.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorSplitManager.java @@ -14,23 +14,23 @@ package io.trino.plugin.raptor.legacy; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.raptor.legacy.backup.BackupService; -import io.prestosql.plugin.raptor.legacy.metadata.BucketShards; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.ShardNodes; -import io.prestosql.plugin.raptor.legacy.util.SynchronizedResultIterator; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.Node; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.raptor.legacy.backup.BackupService; +import io.trino.plugin.raptor.legacy.metadata.BucketShards; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.ShardNodes; +import io.trino.plugin.raptor.legacy.util.SynchronizedResultIterator; +import io.trino.spi.HostAddress; +import io.trino.spi.Node; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.predicate.TupleDomain; import org.skife.jdbi.v2.ResultIterator; import javax.annotation.PreDestroy; @@ -53,9 +53,9 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.collect.Maps.uniqueIndex; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_NO_HOST_FOR_SHARD; -import static io.prestosql.plugin.raptor.legacy.RaptorSessionProperties.getOneSplitPerBucketThreshold; -import static io.prestosql.spi.StandardErrorCode.NO_NODES_AVAILABLE; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_NO_HOST_FOR_SHARD; +import static io.trino.plugin.raptor.legacy.RaptorSessionProperties.getOneSplitPerBucketThreshold; +import static io.trino.spi.StandardErrorCode.NO_NODES_AVAILABLE; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.CompletableFuture.supplyAsync; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorTableHandle.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorTableHandle.java index 4bc1544f8238..987ef917ef6f 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorTableHandle.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorTableHandle.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.predicate.TupleDomain; import java.util.List; import java.util.Objects; @@ -27,8 +27,8 @@ import java.util.OptionalLong; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.raptor.legacy.util.MetadataUtil.checkSchemaName; -import static io.prestosql.plugin.raptor.legacy.util.MetadataUtil.checkTableName; +import static io.trino.plugin.raptor.legacy.util.MetadataUtil.checkSchemaName; +import static io.trino.plugin.raptor.legacy.util.MetadataUtil.checkTableName; import static java.util.Objects.requireNonNull; public final class RaptorTableHandle diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorTableProperties.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorTableProperties.java index 6a5940040c0f..6d848a167320 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorTableProperties.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorTableProperties.java @@ -14,9 +14,9 @@ package io.trino.plugin.raptor.legacy; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeSignatureParameter; import javax.inject.Inject; @@ -24,10 +24,10 @@ import java.util.Map; import java.util.OptionalInt; -import static io.prestosql.spi.session.PropertyMetadata.booleanProperty; -import static io.prestosql.spi.session.PropertyMetadata.integerProperty; -import static io.prestosql.spi.type.StandardTypes.ARRAY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.session.PropertyMetadata.booleanProperty; +import static io.trino.spi.session.PropertyMetadata.integerProperty; +import static io.trino.spi.type.StandardTypes.ARRAY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Locale.ENGLISH; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorTransactionHandle.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorTransactionHandle.java index 9fe37ddf5278..66f058dc30cc 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorTransactionHandle.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/RaptorTransactionHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import java.util.Objects; import java.util.UUID; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/BackupManager.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/BackupManager.java index 5b45ef77b806..2799541d0784 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/BackupManager.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/BackupManager.java @@ -17,9 +17,9 @@ import io.airlift.log.Logger; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.plugin.raptor.legacy.storage.BackupStats; -import io.prestosql.plugin.raptor.legacy.storage.StorageService; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.raptor.legacy.storage.BackupStats; +import io.trino.plugin.raptor.legacy.storage.StorageService; +import io.trino.spi.PrestoException; import org.weakref.jmx.Flatten; import org.weakref.jmx.Managed; @@ -37,7 +37,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_CORRUPTION; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_CORRUPTION; import static java.util.Objects.requireNonNull; import static java.util.concurrent.CompletableFuture.completedFuture; import static java.util.concurrent.CompletableFuture.runAsync; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/BackupModule.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/BackupModule.java index b4155e1e8f3e..86b808b9e12b 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/BackupModule.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/BackupModule.java @@ -22,7 +22,7 @@ import io.airlift.bootstrap.LifeCycleManager; import io.airlift.configuration.AbstractConfigurationAwareModule; import io.airlift.configuration.ConfigurationAwareModule; -import io.prestosql.plugin.raptor.legacy.RaptorConnectorId; +import io.trino.plugin.raptor.legacy.RaptorConnectorId; import org.weakref.jmx.MBeanExporter; import javax.annotation.Nullable; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/BackupOperationStats.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/BackupOperationStats.java index 36f734d57efe..3e1696001e6c 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/BackupOperationStats.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/BackupOperationStats.java @@ -15,14 +15,14 @@ import io.airlift.stats.CounterStat; import io.airlift.stats.TimeStat; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; import java.util.function.Supplier; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_NOT_FOUND; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_TIMEOUT; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_NOT_FOUND; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_TIMEOUT; import static java.util.concurrent.TimeUnit.MILLISECONDS; public class BackupOperationStats diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/FileBackupStore.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/FileBackupStore.java index 2f6edc1317ee..58960042bce5 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/FileBackupStore.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/FileBackupStore.java @@ -14,7 +14,7 @@ package io.trino.plugin.raptor.legacy.backup; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import javax.annotation.PostConstruct; import javax.inject.Inject; @@ -27,9 +27,9 @@ import java.io.InputStream; import java.util.UUID; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_ERROR; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_NOT_FOUND; -import static io.prestosql.plugin.raptor.legacy.storage.FileStorageService.getFileSystemPath; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_ERROR; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_NOT_FOUND; +import static io.trino.plugin.raptor.legacy.storage.FileStorageService.getFileSystemPath; import static java.nio.file.Files.deleteIfExists; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/HttpBackupStore.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/HttpBackupStore.java index b252e76a69b1..34f90e764430 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/HttpBackupStore.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/HttpBackupStore.java @@ -22,8 +22,8 @@ import io.airlift.http.client.ResponseHandler; import io.airlift.http.client.StatusResponseHandler.StatusResponse; import io.airlift.slice.XxHash64; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PrestoException; +import io.trino.spi.NodeManager; +import io.trino.spi.PrestoException; import javax.inject.Inject; @@ -45,7 +45,7 @@ import static io.airlift.http.client.Request.Builder.preparePut; import static io.airlift.http.client.ResponseHandlerUtils.propagate; import static io.airlift.http.client.StatusResponseHandler.createStatusResponseHandler; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_ERROR; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_ERROR; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/TimeoutBackupStore.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/TimeoutBackupStore.java index fbae689ed3ef..10dd79b0af72 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/TimeoutBackupStore.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/backup/TimeoutBackupStore.java @@ -19,7 +19,7 @@ import io.airlift.concurrent.BoundedExecutor; import io.airlift.concurrent.ExecutorServiceAdapter; import io.airlift.units.Duration; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import javax.annotation.PreDestroy; @@ -28,7 +28,7 @@ import java.util.concurrent.ExecutorService; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_TIMEOUT; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_TIMEOUT; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/AssignmentLimiter.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/AssignmentLimiter.java index a7908094fb62..28f3f9c90018 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/AssignmentLimiter.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/AssignmentLimiter.java @@ -16,9 +16,9 @@ import com.google.common.base.Ticker; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.plugin.raptor.legacy.NodeSupplier; -import io.prestosql.spi.Node; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.raptor.legacy.NodeSupplier; +import io.trino.spi.Node; +import io.trino.spi.PrestoException; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; @@ -34,8 +34,8 @@ import java.util.concurrent.atomic.AtomicBoolean; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_REASSIGNMENT_DELAY; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_REASSIGNMENT_THROTTLE; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_REASSIGNMENT_DELAY; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_REASSIGNMENT_THROTTLE; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ColumnInfo.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ColumnInfo.java index 93dff7375bd0..d4f6b36cce8f 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ColumnInfo.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ColumnInfo.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.raptor.legacy.metadata; -import io.prestosql.plugin.raptor.legacy.RaptorColumnHandle; -import io.prestosql.spi.type.Type; +import io.trino.plugin.raptor.legacy.RaptorColumnHandle; +import io.trino.spi.type.Type; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ColumnMetadataRow.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ColumnMetadataRow.java index 95e7267543a2..ae9c2bfbaed5 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ColumnMetadataRow.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ColumnMetadataRow.java @@ -20,7 +20,7 @@ import java.sql.SQLException; import java.util.OptionalInt; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.getOptionalInt; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.getOptionalInt; import static java.util.Objects.requireNonNull; public class ColumnMetadataRow diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/DatabaseMetadataModule.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/DatabaseMetadataModule.java index 9be862656aa2..139e620492ef 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/DatabaseMetadataModule.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/DatabaseMetadataModule.java @@ -28,7 +28,7 @@ import io.airlift.dbpool.MySqlDataSourceConfig; import io.airlift.discovery.client.ServiceDescriptor; import io.airlift.discovery.client.testing.StaticServiceSelector; -import io.prestosql.plugin.raptor.legacy.util.DaoSupplier; +import io.trino.plugin.raptor.legacy.util.DaoSupplier; import org.skife.jdbi.v2.IDBI; import org.skife.jdbi.v2.tweak.ConnectionFactory; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/DatabaseShardManager.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/DatabaseShardManager.java index 8bd0f4f6f567..740c4fb0d319 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/DatabaseShardManager.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/DatabaseShardManager.java @@ -25,14 +25,14 @@ import com.google.common.util.concurrent.UncheckedExecutionException; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.plugin.raptor.legacy.NodeSupplier; -import io.prestosql.plugin.raptor.legacy.RaptorColumnHandle; -import io.prestosql.plugin.raptor.legacy.storage.organization.ShardOrganizerDao; -import io.prestosql.plugin.raptor.legacy.util.DaoSupplier; -import io.prestosql.spi.Node; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.plugin.raptor.legacy.NodeSupplier; +import io.trino.plugin.raptor.legacy.RaptorColumnHandle; +import io.trino.plugin.raptor.legacy.storage.organization.ShardOrganizerDao; +import io.trino.plugin.raptor.legacy.util.DaoSupplier; +import io.trino.spi.Node; +import io.trino.spi.PrestoException; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import org.h2.jdbc.JdbcConnection; import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.IDBI; @@ -65,24 +65,24 @@ import static com.google.common.base.Throwables.throwIfInstanceOf; import static com.google.common.base.Verify.verify; import static com.google.common.collect.Iterables.partition; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_EXTERNAL_BATCH_ALREADY_EXISTS; -import static io.prestosql.plugin.raptor.legacy.storage.ColumnIndexStatsUtils.jdbcType; -import static io.prestosql.plugin.raptor.legacy.storage.ShardStats.MAX_BINARY_INDEX_SIZE; -import static io.prestosql.plugin.raptor.legacy.util.ArrayUtil.intArrayFromBytes; -import static io.prestosql.plugin.raptor.legacy.util.ArrayUtil.intArrayToBytes; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.bindOptionalInt; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.isSyntaxOrAccessError; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.isTransactionCacheFullError; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.metadataError; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.runIgnoringConstraintViolation; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.runTransaction; -import static io.prestosql.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; -import static io.prestosql.plugin.raptor.legacy.util.UuidUtil.uuidToBytes; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.NO_NODES_AVAILABLE; -import static io.prestosql.spi.StandardErrorCode.SERVER_STARTING_UP; -import static io.prestosql.spi.StandardErrorCode.TRANSACTION_CONFLICT; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_EXTERNAL_BATCH_ALREADY_EXISTS; +import static io.trino.plugin.raptor.legacy.storage.ColumnIndexStatsUtils.jdbcType; +import static io.trino.plugin.raptor.legacy.storage.ShardStats.MAX_BINARY_INDEX_SIZE; +import static io.trino.plugin.raptor.legacy.util.ArrayUtil.intArrayFromBytes; +import static io.trino.plugin.raptor.legacy.util.ArrayUtil.intArrayToBytes; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.bindOptionalInt; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.isSyntaxOrAccessError; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.isTransactionCacheFullError; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.metadataError; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.runIgnoringConstraintViolation; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.runTransaction; +import static io.trino.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; +import static io.trino.plugin.raptor.legacy.util.UuidUtil.uuidToBytes; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.NO_NODES_AVAILABLE; +import static io.trino.spi.StandardErrorCode.SERVER_STARTING_UP; +import static io.trino.spi.StandardErrorCode.TRANSACTION_CONFLICT; import static java.lang.Boolean.TRUE; import static java.lang.Math.multiplyExact; import static java.lang.String.format; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/DatabaseShardRecorder.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/DatabaseShardRecorder.java index e603648ace3e..6a0e36410d3a 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/DatabaseShardRecorder.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/DatabaseShardRecorder.java @@ -14,16 +14,16 @@ package io.trino.plugin.raptor.legacy.metadata; import io.airlift.log.Logger; -import io.prestosql.plugin.raptor.legacy.util.DaoSupplier; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.raptor.legacy.util.DaoSupplier; +import io.trino.spi.PrestoException; import javax.inject.Inject; import java.util.UUID; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.metadataError; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.runIgnoringConstraintViolation; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.metadataError; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.runIgnoringConstraintViolation; import static java.util.concurrent.TimeUnit.MILLISECONDS; public class DatabaseShardRecorder diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/Distribution.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/Distribution.java index fc83653b92da..80e4a6b6628b 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/Distribution.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/Distribution.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import io.airlift.json.JsonCodec; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import org.skife.jdbi.v2.StatementContext; import org.skife.jdbi.v2.tweak.ResultSetMapper; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/H2ShardDao.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/H2ShardDao.java index 55d1e24fb84c..8cd257479362 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/H2ShardDao.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/H2ShardDao.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.raptor.legacy.metadata; -import io.prestosql.plugin.raptor.legacy.util.UuidUtil.UuidArgumentFactory; -import io.prestosql.plugin.raptor.legacy.util.UuidUtil.UuidMapperFactory; +import io.trino.plugin.raptor.legacy.util.UuidUtil.UuidArgumentFactory; +import io.trino.plugin.raptor.legacy.util.UuidUtil.UuidMapperFactory; import org.skife.jdbi.v2.sqlobject.Bind; import org.skife.jdbi.v2.sqlobject.SqlBatch; import org.skife.jdbi.v2.sqlobject.SqlUpdate; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/IndexInserter.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/IndexInserter.java index cd51672ae86e..f0872d3efec1 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/IndexInserter.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/IndexInserter.java @@ -31,14 +31,14 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.isHiddenColumn; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.maxColumn; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.minColumn; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; -import static io.prestosql.plugin.raptor.legacy.metadata.ShardPredicate.bindValue; -import static io.prestosql.plugin.raptor.legacy.storage.ColumnIndexStatsUtils.jdbcType; -import static io.prestosql.plugin.raptor.legacy.util.ArrayUtil.intArrayToBytes; -import static io.prestosql.plugin.raptor.legacy.util.UuidUtil.uuidToBytes; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.isHiddenColumn; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.maxColumn; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.minColumn; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; +import static io.trino.plugin.raptor.legacy.metadata.ShardPredicate.bindValue; +import static io.trino.plugin.raptor.legacy.storage.ColumnIndexStatsUtils.jdbcType; +import static io.trino.plugin.raptor.legacy.util.ArrayUtil.intArrayToBytes; +import static io.trino.plugin.raptor.legacy.util.UuidUtil.uuidToBytes; class IndexInserter implements AutoCloseable diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/MetadataDao.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/MetadataDao.java index 6ab392f9450d..559d94b5087c 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/MetadataDao.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/MetadataDao.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.raptor.legacy.metadata; -import io.prestosql.plugin.raptor.legacy.metadata.Table.TableMapper; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.plugin.raptor.legacy.metadata.Table.TableMapper; +import io.trino.spi.connector.SchemaTableName; import org.skife.jdbi.v2.sqlobject.Bind; import org.skife.jdbi.v2.sqlobject.GetGeneratedKeys; import org.skife.jdbi.v2.sqlobject.SqlQuery; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/MySqlShardDao.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/MySqlShardDao.java index 74889dac5b8b..5f59f1ecba01 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/MySqlShardDao.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/MySqlShardDao.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.raptor.legacy.metadata; -import io.prestosql.plugin.raptor.legacy.util.UuidUtil.UuidArgumentFactory; -import io.prestosql.plugin.raptor.legacy.util.UuidUtil.UuidMapperFactory; +import io.trino.plugin.raptor.legacy.util.UuidUtil.UuidArgumentFactory; +import io.trino.plugin.raptor.legacy.util.UuidUtil.UuidMapperFactory; import org.skife.jdbi.v2.sqlobject.Bind; import org.skife.jdbi.v2.sqlobject.SqlBatch; import org.skife.jdbi.v2.sqlobject.SqlUpdate; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/SchemaTableNameMapper.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/SchemaTableNameMapper.java index 1c900889b85f..dcd707bf8f83 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/SchemaTableNameMapper.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/SchemaTableNameMapper.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.raptor.legacy.metadata; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import org.skife.jdbi.v2.StatementContext; import org.skife.jdbi.v2.tweak.ResultSetMapper; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardCleaner.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardCleaner.java index 1a2cf6e2a75d..d2036ebc1f6c 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardCleaner.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardCleaner.java @@ -20,10 +20,10 @@ import io.airlift.log.Logger; import io.airlift.stats.CounterStat; import io.airlift.units.Duration; -import io.prestosql.plugin.raptor.legacy.backup.BackupStore; -import io.prestosql.plugin.raptor.legacy.storage.StorageService; -import io.prestosql.plugin.raptor.legacy.util.DaoSupplier; -import io.prestosql.spi.NodeManager; +import io.trino.plugin.raptor.legacy.backup.BackupStore; +import io.trino.plugin.raptor.legacy.storage.StorageService; +import io.trino.plugin.raptor.legacy.util.DaoSupplier; +import io.trino.spi.NodeManager; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -53,8 +53,8 @@ import static com.google.common.collect.Sets.difference; import static com.google.common.collect.Sets.newConcurrentHashSet; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.raptor.legacy.metadata.ShardDao.CLEANABLE_SHARDS_BATCH_SIZE; -import static io.prestosql.plugin.raptor.legacy.metadata.ShardDao.CLEANUP_TRANSACTIONS_BATCH_SIZE; +import static io.trino.plugin.raptor.legacy.metadata.ShardDao.CLEANABLE_SHARDS_BATCH_SIZE; +import static io.trino.plugin.raptor.legacy.metadata.ShardDao.CLEANUP_TRANSACTIONS_BATCH_SIZE; import static java.lang.Math.min; import static java.util.Objects.requireNonNull; import static java.util.concurrent.CompletableFuture.runAsync; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardDao.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardDao.java index 27fa002d3b1f..9afcd20c6134 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardDao.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardDao.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.raptor.legacy.metadata; -import io.prestosql.plugin.raptor.legacy.util.UuidUtil.UuidArgumentFactory; -import io.prestosql.plugin.raptor.legacy.util.UuidUtil.UuidMapperFactory; +import io.trino.plugin.raptor.legacy.util.UuidUtil.UuidArgumentFactory; +import io.trino.plugin.raptor.legacy.util.UuidUtil.UuidMapperFactory; import org.skife.jdbi.v2.sqlobject.Bind; import org.skife.jdbi.v2.sqlobject.GetGeneratedKeys; import org.skife.jdbi.v2.sqlobject.SqlBatch; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardIterator.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardIterator.java index 08112096ff14..fc2be5569fed 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardIterator.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardIterator.java @@ -16,9 +16,9 @@ import com.google.common.collect.AbstractIterator; import com.google.common.collect.ImmutableSet; import io.airlift.log.Logger; -import io.prestosql.plugin.raptor.legacy.RaptorColumnHandle; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.raptor.legacy.RaptorColumnHandle; +import io.trino.spi.PrestoException; +import io.trino.spi.predicate.TupleDomain; import org.skife.jdbi.v2.IDBI; import org.skife.jdbi.v2.ResultIterator; @@ -36,13 +36,13 @@ import java.util.UUID; import java.util.function.Function; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; -import static io.prestosql.plugin.raptor.legacy.util.ArrayUtil.intArrayFromBytes; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.enableStreamingResults; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.metadataError; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; -import static io.prestosql.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; +import static io.trino.plugin.raptor.legacy.util.ArrayUtil.intArrayFromBytes; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.enableStreamingResults; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.metadataError; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; +import static io.trino.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; import static java.lang.String.format; import static java.util.stream.Collectors.toSet; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardManager.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardManager.java index 7f26d4d01e0e..d72ed934b83d 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardManager.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardManager.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.raptor.legacy.metadata; -import io.prestosql.plugin.raptor.legacy.RaptorColumnHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.raptor.legacy.RaptorColumnHandle; +import io.trino.spi.predicate.TupleDomain; import org.skife.jdbi.v2.ResultIterator; import java.util.Collection; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardMetadata.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardMetadata.java index b881f5bc6a3f..816a2dd4bdcc 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardMetadata.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardMetadata.java @@ -27,9 +27,9 @@ import static com.google.common.base.MoreObjects.ToStringHelper; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.getOptionalInt; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.getOptionalLong; -import static io.prestosql.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.getOptionalInt; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.getOptionalLong; +import static io.trino.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardNodeId.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardNodeId.java index fb51a517d994..2d25a91ffe0c 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardNodeId.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardNodeId.java @@ -21,7 +21,7 @@ import java.util.Objects; import java.util.UUID; -import static io.prestosql.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; +import static io.trino.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; import static java.util.Objects.requireNonNull; public class ShardNodeId diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardPredicate.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardPredicate.java index 8b5ff93663e2..4b222816be07 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardPredicate.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ShardPredicate.java @@ -16,13 +16,13 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.plugin.raptor.legacy.RaptorColumnHandle; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.Ranges; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.plugin.raptor.legacy.RaptorColumnHandle; +import io.trino.spi.PrestoException; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.Ranges; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import java.sql.JDBCType; import java.sql.PreparedStatement; @@ -33,12 +33,12 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.maxColumn; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.minColumn; -import static io.prestosql.plugin.raptor.legacy.storage.ColumnIndexStatsUtils.jdbcType; -import static io.prestosql.plugin.raptor.legacy.storage.ShardStats.truncateIndexValue; -import static io.prestosql.plugin.raptor.legacy.util.UuidUtil.uuidStringToBytes; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.maxColumn; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.minColumn; +import static io.trino.plugin.raptor.legacy.storage.ColumnIndexStatsUtils.jdbcType; +import static io.trino.plugin.raptor.legacy.storage.ShardStats.truncateIndexValue; +import static io.trino.plugin.raptor.legacy.util.UuidUtil.uuidStringToBytes; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/Table.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/Table.java index 0f700113a917..9e8a1a3b4ef4 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/Table.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/Table.java @@ -23,9 +23,9 @@ import java.util.OptionalLong; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.getBoxedLong; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.getOptionalInt; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.getOptionalLong; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.getBoxedLong; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.getOptionalInt; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.getOptionalLong; import static java.util.Objects.requireNonNull; public final class Table diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/TableColumn.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/TableColumn.java index c7c3aa791d13..a6f06be6ff2f 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/TableColumn.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/TableColumn.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.raptor.legacy.metadata; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import org.skife.jdbi.v2.StatementContext; import org.skife.jdbi.v2.tweak.ResultSetMapper; @@ -28,7 +28,7 @@ import java.util.OptionalInt; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.getOptionalInt; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.getOptionalInt; import static java.util.Objects.requireNonNull; public class TableColumn diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/TableMetadataRow.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/TableMetadataRow.java index 4793f25301de..663ee97af7a7 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/TableMetadataRow.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/TableMetadataRow.java @@ -22,8 +22,8 @@ import java.util.OptionalInt; import java.util.OptionalLong; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.getOptionalInt; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.getOptionalLong; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.getOptionalInt; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.getOptionalLong; import static java.util.Objects.requireNonNull; public class TableMetadataRow diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ViewResult.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ViewResult.java index 9b3a28dc6e11..eed3ed2a4711 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ViewResult.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/metadata/ViewResult.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.raptor.legacy.metadata; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import org.skife.jdbi.v2.StatementContext; import org.skife.jdbi.v2.tweak.ResultSetMapper; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/security/RaptorSecurityModule.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/security/RaptorSecurityModule.java index 58a672cd3c32..1200ad3d0470 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/security/RaptorSecurityModule.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/security/RaptorSecurityModule.java @@ -16,9 +16,9 @@ import com.google.inject.Binder; import com.google.inject.Module; import io.airlift.configuration.AbstractConfigurationAwareModule; -import io.prestosql.plugin.base.security.AllowAllAccessControlModule; -import io.prestosql.plugin.base.security.FileBasedAccessControlModule; -import io.prestosql.plugin.base.security.ReadOnlySecurityModule; +import io.trino.plugin.base.security.AllowAllAccessControlModule; +import io.trino.plugin.base.security.FileBasedAccessControlModule; +import io.trino.plugin.base.security.ReadOnlySecurityModule; import static io.airlift.configuration.ConditionalModule.installModuleIf; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/BackupStats.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/BackupStats.java index ec2a2b59dd3b..d4419453d9ca 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/BackupStats.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/BackupStats.java @@ -22,7 +22,7 @@ import javax.annotation.concurrent.ThreadSafe; -import static io.prestosql.plugin.raptor.legacy.storage.ShardRecoveryManager.dataRate; +import static io.trino.plugin.raptor.legacy.storage.ShardRecoveryManager.dataRate; @ThreadSafe public class BackupStats diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/BucketBalancer.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/BucketBalancer.java index 909a868cdd27..df19384b4654 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/BucketBalancer.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/BucketBalancer.java @@ -25,14 +25,14 @@ import io.airlift.log.Logger; import io.airlift.stats.CounterStat; import io.airlift.units.Duration; -import io.prestosql.plugin.raptor.legacy.NodeSupplier; -import io.prestosql.plugin.raptor.legacy.RaptorConnectorId; -import io.prestosql.plugin.raptor.legacy.backup.BackupService; -import io.prestosql.plugin.raptor.legacy.metadata.BucketNode; -import io.prestosql.plugin.raptor.legacy.metadata.Distribution; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; +import io.trino.plugin.raptor.legacy.NodeSupplier; +import io.trino.plugin.raptor.legacy.RaptorConnectorId; +import io.trino.plugin.raptor.legacy.backup.BackupService; +import io.trino.plugin.raptor.legacy.metadata.BucketNode; +import io.trino.plugin.raptor.legacy.metadata.Distribution; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ColumnIndexStatsUtils.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ColumnIndexStatsUtils.java index 1d845afba913..57a643b112ea 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ColumnIndexStatsUtils.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ColumnIndexStatsUtils.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.raptor.legacy.storage; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.sql.JDBCType; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; public final class ColumnIndexStatsUtils { diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/FileStorageService.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/FileStorageService.java index 17b9b42bf18f..78b401116fd4 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/FileStorageService.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/FileStorageService.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.log.Logger; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; @@ -32,7 +32,7 @@ import java.util.UUID; import java.util.regex.Pattern; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcFileMetadata.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcFileMetadata.java index b3ccd657ba64..b96994e9ca7c 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcFileMetadata.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcFileMetadata.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.TypeId; +import io.trino.spi.type.TypeId; import java.util.Map; import java.util.Objects; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcFileRewriter.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcFileRewriter.java index df4bf179fc5d..ec77cf02cb88 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcFileRewriter.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcFileRewriter.java @@ -14,8 +14,8 @@ package io.trino.plugin.raptor.legacy.storage; import io.airlift.log.Logger; -import io.prestosql.plugin.raptor.legacy.util.Closer; -import io.prestosql.plugin.raptor.legacy.util.SyncingFileSystem; +import io.trino.plugin.raptor.legacy.util.Closer; +import io.trino.plugin.raptor.legacy.util.SyncingFileSystem; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; @@ -45,7 +45,7 @@ import static io.airlift.slice.SizeOf.SIZE_OF_DOUBLE; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.plugin.raptor.legacy.util.Closer.closer; +import static io.trino.plugin.raptor.legacy.util.Closer.closer; import static java.lang.Math.toIntExact; import static org.apache.hadoop.hive.ql.io.orc.OrcFile.createReader; import static org.apache.hadoop.hive.ql.io.orc.OrcFile.createWriter; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcFileWriter.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcFileWriter.java index 2f056312b1b9..fcc093a27711 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcFileWriter.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcFileWriter.java @@ -19,15 +19,15 @@ import com.google.common.collect.ImmutableMap; import io.airlift.json.JsonCodec; import io.airlift.slice.Slice; -import io.prestosql.plugin.raptor.legacy.util.SyncingFileSystem; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.raptor.legacy.util.SyncingFileSystem; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; @@ -61,14 +61,14 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; -import static io.prestosql.plugin.raptor.legacy.storage.Row.extractRow; -import static io.prestosql.plugin.raptor.legacy.storage.StorageType.arrayOf; -import static io.prestosql.plugin.raptor.legacy.storage.StorageType.mapOf; -import static io.prestosql.plugin.raptor.legacy.util.Types.isArrayType; -import static io.prestosql.plugin.raptor.legacy.util.Types.isMapType; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; +import static io.trino.plugin.raptor.legacy.storage.Row.extractRow; +import static io.trino.plugin.raptor.legacy.storage.StorageType.arrayOf; +import static io.trino.plugin.raptor.legacy.storage.StorageType.mapOf; +import static io.trino.plugin.raptor.legacy.util.Types.isArrayType; +import static io.trino.plugin.raptor.legacy.util.Types.isMapType; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; import static org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcPageSource.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcPageSource.java index e2d1183cdf89..af340b30cfe6 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcPageSource.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcPageSource.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcRecordReader; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.RunLengthEncodedBlock; -import io.prestosql.spi.connector.UpdatablePageSource; -import io.prestosql.spi.type.Type; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcRecordReader; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.RunLengthEncodedBlock; +import io.trino.spi.connector.UpdatablePageSource; +import io.trino.spi.type.Type; import java.io.IOException; import java.util.BitSet; @@ -39,10 +39,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.SHARD_UUID_COLUMN_TYPE; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.SHARD_UUID_COLUMN_TYPE; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcStorageManager.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcStorageManager.java index 5854ae2a5832..4441e5084af3 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcStorageManager.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/OrcStorageManager.java @@ -22,47 +22,47 @@ import io.airlift.slice.XxHash64; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.memory.context.AggregatedMemoryContext; -import io.prestosql.orc.FileOrcDataSource; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcPredicate; -import io.prestosql.orc.OrcReader; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.orc.OrcRecordReader; -import io.prestosql.orc.TupleDomainOrcPredicate; -import io.prestosql.orc.TupleDomainOrcPredicate.TupleDomainOrcPredicateBuilder; -import io.prestosql.orc.metadata.ColumnMetadata; -import io.prestosql.orc.metadata.OrcColumnId; -import io.prestosql.orc.metadata.OrcType; -import io.prestosql.plugin.raptor.legacy.RaptorColumnHandle; -import io.prestosql.plugin.raptor.legacy.RaptorConnectorId; -import io.prestosql.plugin.raptor.legacy.backup.BackupManager; -import io.prestosql.plugin.raptor.legacy.backup.BackupStore; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnInfo; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnStats; -import io.prestosql.plugin.raptor.legacy.metadata.ShardDelta; -import io.prestosql.plugin.raptor.legacy.metadata.ShardInfo; -import io.prestosql.plugin.raptor.legacy.metadata.ShardRecorder; -import io.prestosql.plugin.raptor.legacy.storage.OrcFileRewriter.OrcFileInfo; -import io.prestosql.plugin.raptor.legacy.storage.OrcPageSource.ColumnAdaptation; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.NamedTypeSignature; -import io.prestosql.spi.type.RowFieldName; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.RowType.Field; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeSignature; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.memory.context.AggregatedMemoryContext; +import io.trino.orc.FileOrcDataSource; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcPredicate; +import io.trino.orc.OrcReader; +import io.trino.orc.OrcReaderOptions; +import io.trino.orc.OrcRecordReader; +import io.trino.orc.TupleDomainOrcPredicate; +import io.trino.orc.TupleDomainOrcPredicate.TupleDomainOrcPredicateBuilder; +import io.trino.orc.metadata.ColumnMetadata; +import io.trino.orc.metadata.OrcColumnId; +import io.trino.orc.metadata.OrcType; +import io.trino.plugin.raptor.legacy.RaptorColumnHandle; +import io.trino.plugin.raptor.legacy.RaptorConnectorId; +import io.trino.plugin.raptor.legacy.backup.BackupManager; +import io.trino.plugin.raptor.legacy.backup.BackupStore; +import io.trino.plugin.raptor.legacy.metadata.ColumnInfo; +import io.trino.plugin.raptor.legacy.metadata.ColumnStats; +import io.trino.plugin.raptor.legacy.metadata.ShardDelta; +import io.trino.plugin.raptor.legacy.metadata.ShardInfo; +import io.trino.plugin.raptor.legacy.metadata.ShardRecorder; +import io.trino.plugin.raptor.legacy.storage.OrcFileRewriter.OrcFileInfo; +import io.trino.plugin.raptor.legacy.storage.OrcPageSource.ColumnAdaptation; +import io.trino.spi.NodeManager; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.NamedTypeSignature; +import io.trino.spi.type.RowFieldName; +import io.trino.spi.type.RowType; +import io.trino.spi.type.RowType.Field; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeSignature; +import io.trino.spi.type.TypeSignatureParameter; import javax.annotation.PreDestroy; import javax.inject.Inject; @@ -101,26 +101,26 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.json.JsonCodec.jsonCodec; import static io.airlift.units.DataSize.Unit.PETABYTE; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcReader.INITIAL_BATCH_SIZE; -import static io.prestosql.orc.metadata.OrcColumnId.ROOT_COLUMN; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.isBucketNumberColumn; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.isHiddenColumn; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.isShardRowIdColumn; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.isShardUuidColumn; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_LOCAL_DISK_FULL; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_RECOVERY_ERROR; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_RECOVERY_TIMEOUT; -import static io.prestosql.plugin.raptor.legacy.storage.ShardStats.computeColumnStats; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcReader.INITIAL_BATCH_SIZE; +import static io.trino.orc.metadata.OrcColumnId.ROOT_COLUMN; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.isBucketNumberColumn; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.isHiddenColumn; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.isShardRowIdColumn; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.isShardUuidColumn; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_LOCAL_DISK_FULL; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_RECOVERY_ERROR; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_RECOVERY_TIMEOUT; +import static io.trino.plugin.raptor.legacy.storage.ShardStats.computeColumnStats; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.Math.min; import static java.nio.file.StandardCopyOption.ATOMIC_MOVE; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/Row.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/Row.java index 6e0a3e89bde1..fa49034f653b 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/Row.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/Row.java @@ -14,13 +14,13 @@ package io.trino.plugin.raptor.legacy.storage; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.apache.hadoop.hive.common.type.HiveDecimal; import java.math.BigInteger; @@ -34,9 +34,9 @@ import static io.airlift.slice.SizeOf.SIZE_OF_BYTE; import static io.airlift.slice.SizeOf.SIZE_OF_DOUBLE; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; -import static io.prestosql.plugin.raptor.legacy.util.Types.isArrayType; -import static io.prestosql.plugin.raptor.legacy.util.Types.isMapType; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.plugin.raptor.legacy.util.Types.isArrayType; +import static io.trino.plugin.raptor.legacy.util.Types.isMapType; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; import static java.util.Objects.requireNonNull; public class Row diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ShardEjector.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ShardEjector.java index 2951d9717ee5..1218d310260c 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ShardEjector.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ShardEjector.java @@ -17,13 +17,13 @@ import io.airlift.log.Logger; import io.airlift.stats.CounterStat; import io.airlift.units.Duration; -import io.prestosql.plugin.raptor.legacy.NodeSupplier; -import io.prestosql.plugin.raptor.legacy.RaptorConnectorId; -import io.prestosql.plugin.raptor.legacy.backup.BackupStore; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.ShardMetadata; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; +import io.trino.plugin.raptor.legacy.NodeSupplier; +import io.trino.plugin.raptor.legacy.RaptorConnectorId; +import io.trino.plugin.raptor.legacy.backup.BackupStore; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.ShardMetadata; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ShardRecoveryManager.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ShardRecoveryManager.java index bd634bc3fc3b..1063f2dcc585 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ShardRecoveryManager.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ShardRecoveryManager.java @@ -22,12 +22,12 @@ import io.airlift.log.Logger; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.plugin.raptor.legacy.backup.BackupStore; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.ShardMetadata; -import io.prestosql.plugin.raptor.legacy.util.PrioritizedFifoExecutor; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.raptor.legacy.backup.BackupStore; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.ShardMetadata; +import io.trino.plugin.raptor.legacy.util.PrioritizedFifoExecutor; +import io.trino.spi.NodeManager; +import io.trino.spi.PrestoException; import org.weakref.jmx.Flatten; import org.weakref.jmx.Managed; @@ -60,10 +60,10 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.DataSize.succinctBytes; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_CORRUPTION; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_RECOVERY_ERROR; -import static io.prestosql.plugin.raptor.legacy.storage.OrcStorageManager.xxhash64; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_CORRUPTION; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_RECOVERY_ERROR; +import static io.trino.plugin.raptor.legacy.storage.OrcStorageManager.xxhash64; import static java.nio.file.StandardCopyOption.ATOMIC_MOVE; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ShardStats.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ShardStats.java index 17e947e76e5a..b4cc14aa8e56 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ShardStats.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/ShardStats.java @@ -15,31 +15,31 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.orc.OrcColumn; -import io.prestosql.orc.OrcPredicate; -import io.prestosql.orc.OrcReader; -import io.prestosql.orc.OrcRecordReader; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnStats; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.VarcharType; +import io.trino.orc.OrcColumn; +import io.trino.orc.OrcPredicate; +import io.trino.orc.OrcReader; +import io.trino.orc.OrcRecordReader; +import io.trino.plugin.raptor.legacy.metadata.ColumnStats; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.VarcharType; import java.io.IOException; import java.util.List; import java.util.Optional; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcReader.INITIAL_BATCH_SIZE; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; -import static io.prestosql.plugin.raptor.legacy.storage.OrcStorageManager.toOrcFileType; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcReader.INITIAL_BATCH_SIZE; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_ERROR; +import static io.trino.plugin.raptor.legacy.storage.OrcStorageManager.toOrcFileType; import static java.lang.Double.isInfinite; import static java.lang.Double.isNaN; import static org.joda.time.DateTimeZone.UTC; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StorageManager.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StorageManager.java index 25eab297e245..97d43cb18024 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StorageManager.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StorageManager.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.raptor.legacy.storage; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.plugin.raptor.legacy.RaptorColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.raptor.legacy.RaptorColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import java.util.List; import java.util.OptionalInt; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StorageManagerConfig.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StorageManagerConfig.java index b786affdc0dd..3a71d4285b4e 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StorageManagerConfig.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StorageManagerConfig.java @@ -22,7 +22,7 @@ import io.airlift.units.MaxDataSize; import io.airlift.units.MinDataSize; import io.airlift.units.MinDuration; -import io.prestosql.orc.OrcReaderOptions; +import io.trino.orc.OrcReaderOptions; import javax.validation.constraints.Max; import javax.validation.constraints.Min; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StorageModule.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StorageModule.java index 92a99de7ee55..f476ee266403 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StorageModule.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StorageModule.java @@ -17,21 +17,21 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.plugin.raptor.legacy.backup.BackupManager; -import io.prestosql.plugin.raptor.legacy.metadata.AssignmentLimiter; -import io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardRecorder; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataConfig; -import io.prestosql.plugin.raptor.legacy.metadata.ShardCleaner; -import io.prestosql.plugin.raptor.legacy.metadata.ShardCleanerConfig; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.ShardRecorder; -import io.prestosql.plugin.raptor.legacy.storage.organization.JobFactory; -import io.prestosql.plugin.raptor.legacy.storage.organization.OrganizationJobFactory; -import io.prestosql.plugin.raptor.legacy.storage.organization.ShardCompactionManager; -import io.prestosql.plugin.raptor.legacy.storage.organization.ShardCompactor; -import io.prestosql.plugin.raptor.legacy.storage.organization.ShardOrganizationManager; -import io.prestosql.plugin.raptor.legacy.storage.organization.ShardOrganizer; +import io.trino.plugin.raptor.legacy.backup.BackupManager; +import io.trino.plugin.raptor.legacy.metadata.AssignmentLimiter; +import io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager; +import io.trino.plugin.raptor.legacy.metadata.DatabaseShardRecorder; +import io.trino.plugin.raptor.legacy.metadata.MetadataConfig; +import io.trino.plugin.raptor.legacy.metadata.ShardCleaner; +import io.trino.plugin.raptor.legacy.metadata.ShardCleanerConfig; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.ShardRecorder; +import io.trino.plugin.raptor.legacy.storage.organization.JobFactory; +import io.trino.plugin.raptor.legacy.storage.organization.OrganizationJobFactory; +import io.trino.plugin.raptor.legacy.storage.organization.ShardCompactionManager; +import io.trino.plugin.raptor.legacy.storage.organization.ShardCompactor; +import io.trino.plugin.raptor.legacy.storage.organization.ShardOrganizationManager; +import io.trino.plugin.raptor.legacy.storage.organization.ShardOrganizer; import static io.airlift.configuration.ConfigBinder.configBinder; import static org.weakref.jmx.guice.ExportBinder.newExporter; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StoragePageSink.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StoragePageSink.java index 92094eb822f8..fb0d268a4e1c 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StoragePageSink.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/StoragePageSink.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.raptor.legacy.storage; -import io.prestosql.plugin.raptor.legacy.metadata.ShardInfo; -import io.prestosql.spi.Page; +import io.trino.plugin.raptor.legacy.metadata.ShardInfo; +import io.trino.spi.Page; import java.util.List; import java.util.concurrent.CompletableFuture; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/CompactionSetCreator.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/CompactionSetCreator.java index 2440bbf7a9ab..728063b2adbf 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/CompactionSetCreator.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/CompactionSetCreator.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; -import io.prestosql.plugin.raptor.legacy.metadata.Table; +import io.trino.plugin.raptor.legacy.metadata.Table; import java.util.ArrayList; import java.util.Collection; @@ -24,8 +24,8 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.createOrganizationSet; -import static io.prestosql.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.getShardsByDaysBuckets; +import static io.trino.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.createOrganizationSet; +import static io.trino.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.getShardsByDaysBuckets; import static java.util.Comparator.comparing; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toCollection; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/OrganizationJob.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/OrganizationJob.java index 67321523730e..6a73bd9ec446 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/OrganizationJob.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/OrganizationJob.java @@ -14,12 +14,12 @@ package io.trino.plugin.raptor.legacy.storage.organization; import io.airlift.log.Logger; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnInfo; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.ShardInfo; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.TableColumn; -import io.prestosql.plugin.raptor.legacy.metadata.TableMetadata; +import io.trino.plugin.raptor.legacy.metadata.ColumnInfo; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.ShardInfo; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.TableColumn; +import io.trino.plugin.raptor.legacy.metadata.TableMetadata; import java.io.IOException; import java.io.UncheckedIOException; @@ -29,7 +29,7 @@ import java.util.Set; import java.util.UUID; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; import static java.util.Collections.nCopies; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/OrganizationJobFactory.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/OrganizationJobFactory.java index 924da67b0a94..97d3e2fa73dd 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/OrganizationJobFactory.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/OrganizationJobFactory.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.raptor.legacy.storage.organization; -import io.prestosql.plugin.raptor.legacy.metadata.ForMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.ForMetadata; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; import org.skife.jdbi.v2.IDBI; import javax.inject.Inject; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; import static java.util.Objects.requireNonNull; public class OrganizationJobFactory diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardCompactionManager.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardCompactionManager.java index 373289dcd2f2..3bca6baed9e4 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardCompactionManager.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardCompactionManager.java @@ -19,15 +19,15 @@ import io.airlift.log.Logger; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.plugin.raptor.legacy.metadata.ForMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.ShardMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.Table; -import io.prestosql.plugin.raptor.legacy.metadata.TableColumn; -import io.prestosql.plugin.raptor.legacy.storage.StorageManagerConfig; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.type.Type; +import io.trino.plugin.raptor.legacy.metadata.ForMetadata; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.ShardMetadata; +import io.trino.plugin.raptor.legacy.metadata.Table; +import io.trino.plugin.raptor.legacy.metadata.TableColumn; +import io.trino.plugin.raptor.legacy.storage.StorageManagerConfig; +import io.trino.spi.NodeManager; +import io.trino.spi.type.Type; import org.skife.jdbi.v2.IDBI; import javax.annotation.PostConstruct; @@ -46,10 +46,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.getOrganizationEligibleShards; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.getOrganizationEligibleShards; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newScheduledThreadPool; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardCompactor.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardCompactor.java index 70f2fc6b47a1..afc5e634ab10 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardCompactor.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardCompactor.java @@ -16,22 +16,22 @@ import com.google.common.collect.ImmutableList; import io.airlift.stats.CounterStat; import io.airlift.stats.DistributionStat; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnInfo; -import io.prestosql.plugin.raptor.legacy.metadata.ShardInfo; -import io.prestosql.plugin.raptor.legacy.storage.Row; -import io.prestosql.plugin.raptor.legacy.storage.StorageManager; -import io.prestosql.plugin.raptor.legacy.storage.StorageManagerConfig; -import io.prestosql.plugin.raptor.legacy.storage.StoragePageSink; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; +import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.raptor.legacy.metadata.ColumnInfo; +import io.trino.plugin.raptor.legacy.metadata.ShardInfo; +import io.trino.plugin.raptor.legacy.storage.Row; +import io.trino.plugin.raptor.legacy.storage.StorageManager; +import io.trino.plugin.raptor.legacy.storage.StorageManagerConfig; +import io.trino.plugin.raptor.legacy.storage.StoragePageSink; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -53,11 +53,11 @@ import static com.google.common.base.Throwables.throwIfUnchecked; import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.plugin.raptor.legacy.storage.Row.extractRow; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.function.InvocationConvention.simpleConvention; +import static io.trino.plugin.raptor.legacy.storage.Row.extractRow; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.BLOCK_POSITION; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.function.InvocationConvention.simpleConvention; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardOrganizationManager.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardOrganizationManager.java index 799b113db5ea..b4e303af4edd 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardOrganizationManager.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardOrganizationManager.java @@ -20,13 +20,13 @@ import com.google.common.collect.Maps; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.plugin.raptor.legacy.metadata.ForMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.ShardMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.Table; -import io.prestosql.plugin.raptor.legacy.storage.StorageManagerConfig; -import io.prestosql.spi.NodeManager; +import io.trino.plugin.raptor.legacy.metadata.ForMetadata; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.ShardMetadata; +import io.trino.plugin.raptor.legacy.metadata.Table; +import io.trino.plugin.raptor.legacy.storage.StorageManagerConfig; +import io.trino.spi.NodeManager; import org.skife.jdbi.v2.IDBI; import javax.annotation.PostConstruct; @@ -48,10 +48,10 @@ import static com.google.common.collect.Sets.newConcurrentHashSet; import static io.airlift.concurrent.MoreFutures.allAsList; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.createOrganizationSet; -import static io.prestosql.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.getOrganizationEligibleShards; -import static io.prestosql.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.getShardsByDaysBuckets; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; +import static io.trino.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.createOrganizationSet; +import static io.trino.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.getOrganizationEligibleShards; +import static io.trino.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.getShardsByDaysBuckets; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; import static java.lang.Math.max; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newScheduledThreadPool; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardOrganizer.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardOrganizer.java index ae22603fe890..085887551065 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardOrganizer.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardOrganizer.java @@ -16,7 +16,7 @@ import io.airlift.concurrent.ThreadPoolExecutorMBean; import io.airlift.log.Logger; import io.airlift.stats.CounterStat; -import io.prestosql.plugin.raptor.legacy.storage.StorageManagerConfig; +import io.trino.plugin.raptor.legacy.storage.StorageManagerConfig; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardOrganizerUtil.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardOrganizerUtil.java index 76b4ae0ac166..166a5463e389 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardOrganizerUtil.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/ShardOrganizerUtil.java @@ -17,11 +17,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimaps; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.ShardMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.Table; -import io.prestosql.plugin.raptor.legacy.metadata.TableColumn; -import io.prestosql.spi.type.Type; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.ShardMetadata; +import io.trino.plugin.raptor.legacy.metadata.Table; +import io.trino.plugin.raptor.legacy.metadata.TableColumn; +import io.trino.spi.type.Type; import org.skife.jdbi.v2.IDBI; import java.sql.Connection; @@ -42,10 +42,10 @@ import static com.google.common.collect.Iterables.partition; import static com.google.common.collect.Maps.uniqueIndex; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.maxColumn; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.minColumn; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; -import static io.prestosql.plugin.raptor.legacy.storage.ColumnIndexStatsUtils.jdbcType; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.maxColumn; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.minColumn; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; +import static io.trino.plugin.raptor.legacy.storage.ColumnIndexStatsUtils.jdbcType; import static java.lang.String.format; import static java.util.Collections.nCopies; import static java.util.stream.Collectors.toSet; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/TableOrganizationInfo.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/TableOrganizationInfo.java index 50c28078fb39..0b162bbdb6af 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/TableOrganizationInfo.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/TableOrganizationInfo.java @@ -20,7 +20,7 @@ import java.sql.SQLException; import java.util.OptionalLong; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.getOptionalLong; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.getOptionalLong; import static java.util.Objects.requireNonNull; public class TableOrganizationInfo diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/TemporalFunction.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/TemporalFunction.java index 8e97e6e36551..df01de026319 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/TemporalFunction.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/TemporalFunction.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.raptor.legacy.storage.organization; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import java.time.Duration; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_DAY; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_DAY; import static java.lang.Math.floorDiv; import static java.lang.Math.toIntExact; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/Tuple.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/Tuple.java index d10492f0e304..e1db17363b56 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/Tuple.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/storage/organization/Tuple.java @@ -14,7 +14,7 @@ package io.trino.plugin.raptor.legacy.storage.organization; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ColumnRangesSystemTable.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ColumnRangesSystemTable.java index b79ca7c76f74..590c29a89cb6 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ColumnRangesSystemTable.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ColumnRangesSystemTable.java @@ -14,20 +14,20 @@ package io.trino.plugin.raptor.legacy.systemtables; import com.google.common.base.VerifyException; -import io.prestosql.plugin.raptor.legacy.RaptorTableHandle; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.TableColumn; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.plugin.raptor.legacy.RaptorTableHandle; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.TableColumn; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import org.skife.jdbi.v2.IDBI; import org.skife.jdbi.v2.exceptions.DBIException; @@ -40,16 +40,16 @@ import java.util.stream.Stream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.maxColumn; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.minColumn; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.metadataError; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.maxColumn; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.minColumn; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.metadataError; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.joining; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/PageListBuilder.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/PageListBuilder.java index e9b1c322b981..76800ff382fe 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/PageListBuilder.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/PageListBuilder.java @@ -14,10 +14,10 @@ package io.trino.plugin.raptor.legacy.systemtables; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/PreparedStatementBuilder.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/PreparedStatementBuilder.java index 6c2465b7faff..c4c93892ecbb 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/PreparedStatementBuilder.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/PreparedStatementBuilder.java @@ -17,11 +17,11 @@ import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.sql.Connection; import java.sql.PreparedStatement; @@ -36,12 +36,12 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.enableStreamingResults; -import static io.prestosql.plugin.raptor.legacy.util.UuidUtil.uuidToBytes; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.enableStreamingResults; +import static io.trino.plugin.raptor.legacy.util.UuidUtil.uuidToBytes; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.sql.ResultSet.CONCUR_READ_ONLY; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ResultSetValues.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ResultSetValues.java index f87086bb5847..423d3c106f2a 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ResultSetValues.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ResultSetValues.java @@ -16,7 +16,7 @@ import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import java.sql.ResultSet; import java.sql.SQLException; @@ -28,7 +28,7 @@ import static io.airlift.slice.SizeOf.SIZE_OF_DOUBLE; import static io.airlift.slice.SizeOf.SIZE_OF_LONG; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; +import static io.trino.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Locale.ENGLISH; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ShardMetadataRecordCursor.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ShardMetadataRecordCursor.java index 563462d7e8d0..49c792bb99a8 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ShardMetadataRecordCursor.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ShardMetadataRecordCursor.java @@ -18,15 +18,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import org.skife.jdbi.v2.IDBI; import org.skife.jdbi.v2.exceptions.DBIException; @@ -43,18 +43,18 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkPositionIndex; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.SHARD_UUID_COLUMN_TYPE; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_CORRUPT_METADATA; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.maxColumn; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.minColumn; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.metadataError; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.SHARD_UUID_COLUMN_TYPE; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_CORRUPT_METADATA; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.maxColumn; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.minColumn; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.metadataError; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ShardMetadataSystemTable.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ShardMetadataSystemTable.java index d2c078c735ba..b0e918d11881 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ShardMetadataSystemTable.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ShardMetadataSystemTable.java @@ -13,19 +13,19 @@ */ package io.trino.plugin.raptor.legacy.systemtables; -import io.prestosql.plugin.raptor.legacy.metadata.ForMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.raptor.legacy.metadata.ForMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; import org.skife.jdbi.v2.IDBI; import javax.inject.Inject; -import static io.prestosql.plugin.raptor.legacy.systemtables.ShardMetadataRecordCursor.SHARD_METADATA; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.plugin.raptor.legacy.systemtables.ShardMetadataRecordCursor.SHARD_METADATA; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; import static java.util.Objects.requireNonNull; public class ShardMetadataSystemTable diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/TableMetadataSystemTable.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/TableMetadataSystemTable.java index 58b81e5bd364..2c9d617cd9d6 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/TableMetadataSystemTable.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/TableMetadataSystemTable.java @@ -17,25 +17,25 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.PeekingIterator; import io.airlift.slice.Slice; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnMetadataRow; -import io.prestosql.plugin.raptor.legacy.metadata.ForMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.TableMetadataRow; -import io.prestosql.spi.Page; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.raptor.legacy.metadata.ColumnMetadataRow; +import io.trino.plugin.raptor.legacy.metadata.ForMetadata; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.TableMetadataRow; +import io.trino.spi.Page; +import io.trino.spi.PrestoException; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.TypeManager; import org.skife.jdbi.v2.IDBI; import javax.inject.Inject; @@ -51,13 +51,13 @@ import static com.google.common.collect.Iterators.peekingIterator; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_CORRUPT_METADATA; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; -import static io.prestosql.spi.predicate.TupleDomain.extractFixedValues; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_CORRUPT_METADATA; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.spi.predicate.TupleDomain.extractFixedValues; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/TableStatsSystemTable.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/TableStatsSystemTable.java index bdd529633f81..4c2153860f4b 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/TableStatsSystemTable.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/TableStatsSystemTable.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.raptor.legacy.metadata.ForMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.TableStatsRow; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.FixedPageSource; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.raptor.legacy.metadata.ForMetadata; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.TableStatsRow; +import io.trino.spi.Page; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.FixedPageSource; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; import org.skife.jdbi.v2.IDBI; import javax.inject.Inject; @@ -37,16 +37,16 @@ import java.util.Map; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.raptor.legacy.systemtables.TableMetadataSystemTable.getColumnIndex; -import static io.prestosql.plugin.raptor.legacy.systemtables.TableMetadataSystemTable.getStringValue; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; -import static io.prestosql.spi.predicate.TupleDomain.extractFixedValues; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.plugin.raptor.legacy.systemtables.TableMetadataSystemTable.getColumnIndex; +import static io.trino.plugin.raptor.legacy.systemtables.TableMetadataSystemTable.getStringValue; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.spi.predicate.TupleDomain.extractFixedValues; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.stream.Collectors.toList; public class TableStatsSystemTable diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ValueBuffer.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ValueBuffer.java index 96223468ac62..256a49850bde 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ValueBuffer.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/systemtables/ValueBuffer.java @@ -15,7 +15,7 @@ import com.google.common.primitives.Primitives; import io.airlift.slice.Slice; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import javax.annotation.Nullable; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/ConcatPageSource.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/ConcatPageSource.java index 512b7e75c1f8..ae382c5b9169 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/ConcatPageSource.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/ConcatPageSource.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.raptor.legacy.util; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorPageSource; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorPageSource; import java.io.IOException; import java.util.Iterator; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/DaoSupplier.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/DaoSupplier.java index 90b183353bda..20141d544f6b 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/DaoSupplier.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/DaoSupplier.java @@ -16,7 +16,7 @@ import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.IDBI; -import static io.prestosql.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; +import static io.trino.plugin.raptor.legacy.util.DatabaseUtil.onDemandDao; import static java.util.Objects.requireNonNull; public class DaoSupplier diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/DatabaseUtil.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/DatabaseUtil.java index 59563e4dc4ca..54bfe8e33822 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/DatabaseUtil.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/DatabaseUtil.java @@ -14,7 +14,7 @@ package io.trino.plugin.raptor.legacy.util; import com.google.common.base.Throwables; -import io.prestosql.spi.PrestoException; +import io.trino.spi.PrestoException; import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.IDBI; import org.skife.jdbi.v2.TransactionCallback; @@ -34,7 +34,7 @@ import static com.google.common.base.Throwables.throwIfInstanceOf; import static com.google.common.reflect.Reflection.newProxy; import static com.mysql.jdbc.MysqlErrorNumbers.ER_TRANS_CACHE_FULL; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_METADATA_ERROR; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_METADATA_ERROR; import static java.sql.Types.INTEGER; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/PageBuffer.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/PageBuffer.java index bba4c708ca6f..5a9d60e3872d 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/PageBuffer.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/PageBuffer.java @@ -14,11 +14,11 @@ package io.trino.plugin.raptor.legacy.util; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.raptor.legacy.storage.StoragePageSink; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageSorter; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.type.Type; +import io.trino.plugin.raptor.legacy.storage.StoragePageSink; +import io.trino.spi.Page; +import io.trino.spi.PageSorter; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.List; diff --git a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/Types.java b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/Types.java index 80baf0102fcb..35771a149e1b 100644 --- a/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/Types.java +++ b/plugin/trino-raptor-legacy/src/main/java/io/trino/plugin/raptor/legacy/util/Types.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.raptor.legacy.util; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.Type; public final class Types { diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/RaptorBenchmarkQueryRunner.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/RaptorBenchmarkQueryRunner.java index 7c65aea2c56f..7936ab9b03b9 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/RaptorBenchmarkQueryRunner.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/RaptorBenchmarkQueryRunner.java @@ -14,18 +14,18 @@ package io.trino.plugin.raptor.legacy; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.benchmark.BenchmarkSuite; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.benchmark.BenchmarkSuite; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.LocalQueryRunner; import java.io.File; import java.io.IOException; import java.util.Map; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Objects.requireNonNull; public final class RaptorBenchmarkQueryRunner diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/RaptorQueryRunner.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/RaptorQueryRunner.java index f5586d43e151..303c45afee33 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/RaptorQueryRunner.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/RaptorQueryRunner.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.plugin.raptor.legacy.storage.StorageManagerConfig; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.SessionPropertyManager; +import io.trino.plugin.raptor.legacy.storage.StorageManagerConfig; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import org.intellij.lang.annotations.Language; @@ -32,9 +32,9 @@ import java.util.Map.Entry; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; public final class RaptorQueryRunner diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorBucketFunction.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorBucketFunction.java index 0cbeef296f56..5bbdd3fa1dcd 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorBucketFunction.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorBucketFunction.java @@ -14,18 +14,18 @@ package io.trino.plugin.raptor.legacy; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.type.Type; import org.testng.annotations.Test; -import static io.prestosql.block.BlockAssertions.createIntsBlock; -import static io.prestosql.block.BlockAssertions.createLongsBlock; -import static io.prestosql.block.BlockAssertions.createStringsBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.block.BlockAssertions.createIntsBlock; +import static io.trino.block.BlockAssertions.createLongsBlock; +import static io.trino.block.BlockAssertions.createStringsBlock; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static org.testng.Assert.assertEquals; public class TestRaptorBucketFunction diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorConnector.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorConnector.java index fa443476f150..f54237b68cd6 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorConnector.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorConnector.java @@ -19,34 +19,34 @@ import com.google.common.io.Files; import io.airlift.bootstrap.LifeCycleManager; import io.airlift.slice.Slice; -import io.prestosql.PagesIndexPageSorter; -import io.prestosql.operator.PagesIndex; -import io.prestosql.plugin.base.security.AllowAllAccessControl; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.TableColumn; -import io.prestosql.plugin.raptor.legacy.storage.StorageManager; -import io.prestosql.plugin.raptor.legacy.storage.StorageManagerConfig; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSink; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.TestingConnectorSession; -import io.prestosql.testing.TestingNodeManager; -import io.prestosql.type.InternalTypeManager; +import io.trino.PagesIndexPageSorter; +import io.trino.operator.PagesIndex; +import io.trino.plugin.base.security.AllowAllAccessControl; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.TableColumn; +import io.trino.plugin.raptor.legacy.storage.StorageManager; +import io.trino.plugin.raptor.legacy.storage.StorageManagerConfig; +import io.trino.spi.NodeManager; +import io.trino.spi.Page; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSink; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.testing.MaterializedResult; +import io.trino.testing.TestingConnectorSession; +import io.trino.testing.TestingNodeManager; +import io.trino.type.InternalTypeManager; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; import org.testng.annotations.AfterMethod; @@ -59,18 +59,18 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.operator.scalar.timestamp.VarcharToTimestampCast.castToShortTimestamp; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.TEMPORAL_COLUMN_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; -import static io.prestosql.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; -import static io.prestosql.plugin.raptor.legacy.storage.TestOrcStorageManager.createOrcStorageManager; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.util.DateTimeUtils.parseDate; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.operator.scalar.timestamp.VarcharToTimestampCast.castToShortTimestamp; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.TEMPORAL_COLUMN_PROPERTY; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; +import static io.trino.plugin.raptor.legacy.storage.TestOrcStorageManager.createOrcStorageManager; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.util.DateTimeUtils.parseDate; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorDistributedQueries.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorDistributedQueries.java index f9aee02c7998..f1e14aaa23d9 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorDistributedQueries.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorDistributedQueries.java @@ -14,14 +14,14 @@ package io.trino.plugin.raptor.legacy; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.TestTable; import org.testng.SkipException; import java.util.Optional; -import static io.prestosql.plugin.raptor.legacy.RaptorQueryRunner.createRaptorQueryRunner; +import static io.trino.plugin.raptor.legacy.RaptorQueryRunner.createRaptorQueryRunner; public class TestRaptorDistributedQueries extends AbstractTestDistributedQueries diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorDistributedQueriesBucketed.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorDistributedQueriesBucketed.java index 25326665cd4b..c3b45f8a9023 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorDistributedQueriesBucketed.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorDistributedQueriesBucketed.java @@ -14,9 +14,9 @@ package io.trino.plugin.raptor.legacy; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; -import static io.prestosql.plugin.raptor.legacy.RaptorQueryRunner.createRaptorQueryRunner; +import static io.trino.plugin.raptor.legacy.RaptorQueryRunner.createRaptorQueryRunner; public class TestRaptorDistributedQueriesBucketed extends TestRaptorDistributedQueries diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorIntegrationSmokeTest.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorIntegrationSmokeTest.java index 0c18c91569fe..b5dbbf4a374a 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorIntegrationSmokeTest.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorIntegrationSmokeTest.java @@ -17,12 +17,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.SetMultimap; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testng.services.Flaky; +import io.trino.spi.type.ArrayType; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; +import io.trino.testng.services.Flaky; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; @@ -41,13 +41,13 @@ import static io.airlift.testing.Assertions.assertGreaterThanOrEqual; import static io.airlift.testing.Assertions.assertInstanceOf; import static io.airlift.testing.Assertions.assertLessThan; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.SHARD_UUID_COLUMN_TYPE; -import static io.prestosql.plugin.raptor.legacy.RaptorQueryRunner.createRaptorQueryRunner; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.SHARD_UUID_COLUMN_TYPE; +import static io.trino.plugin.raptor.legacy.RaptorQueryRunner.createRaptorQueryRunner; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.String.format; import static java.util.Arrays.asList; import static java.util.function.Function.identity; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorIntegrationSmokeTestBucketed.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorIntegrationSmokeTestBucketed.java index 72ce6f3695fe..ee08e4e3aaae 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorIntegrationSmokeTestBucketed.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorIntegrationSmokeTestBucketed.java @@ -14,10 +14,10 @@ package io.trino.plugin.raptor.legacy; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; -import static io.prestosql.plugin.raptor.legacy.RaptorQueryRunner.createRaptorQueryRunner; +import static io.trino.plugin.raptor.legacy.RaptorQueryRunner.createRaptorQueryRunner; import static org.assertj.core.api.Assertions.assertThat; public class TestRaptorIntegrationSmokeTestBucketed diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorIntegrationSmokeTestMySql.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorIntegrationSmokeTestMySql.java index 7c6df567f0a4..5b84584e40dd 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorIntegrationSmokeTestMySql.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorIntegrationSmokeTestMySql.java @@ -14,9 +14,9 @@ package io.trino.plugin.raptor.legacy; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import org.testcontainers.containers.MySQLContainer; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -24,8 +24,8 @@ import java.io.File; import java.util.Map; -import static io.prestosql.plugin.raptor.legacy.RaptorQueryRunner.copyTables; -import static io.prestosql.plugin.raptor.legacy.RaptorQueryRunner.createSession; +import static io.trino.plugin.raptor.legacy.RaptorQueryRunner.copyTables; +import static io.trino.plugin.raptor.legacy.RaptorQueryRunner.createSession; import static java.lang.String.format; @Test diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorPlugin.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorPlugin.java index 28d85a0a77e7..e566602cff8c 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorPlugin.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorPlugin.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.Files; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import java.io.File; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/backup/TestBackupManager.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/backup/TestBackupManager.java index b1dde75bd657..96f7ccc2b4ad 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/backup/TestBackupManager.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/backup/TestBackupManager.java @@ -14,9 +14,9 @@ package io.trino.plugin.raptor.legacy.backup; import com.google.common.io.Files; -import io.prestosql.plugin.raptor.legacy.storage.BackupStats; -import io.prestosql.plugin.raptor.legacy.storage.FileStorageService; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.raptor.legacy.storage.BackupStats; +import io.trino.plugin.raptor.legacy.storage.FileStorageService; +import io.trino.spi.PrestoException; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -35,8 +35,8 @@ 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.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_CORRUPTION; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_ERROR; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_CORRUPTION; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_ERROR; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static java.util.UUID.randomUUID; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/backup/TestHttpBackupStore.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/backup/TestHttpBackupStore.java index a83ed7a0882d..6e2dec311376 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/backup/TestHttpBackupStore.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/backup/TestHttpBackupStore.java @@ -25,8 +25,8 @@ import io.airlift.jaxrs.JaxrsModule; import io.airlift.json.JsonModule; import io.airlift.node.testing.TestingNodeModule; -import io.prestosql.spi.NodeManager; -import io.prestosql.testing.TestingNodeManager; +import io.trino.spi.NodeManager; +import io.trino.testing.TestingNodeManager; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/backup/TestingHttpBackupResource.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/backup/TestingHttpBackupResource.java index e04b9762fd91..19b38daf825d 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/backup/TestingHttpBackupResource.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/backup/TestingHttpBackupResource.java @@ -15,7 +15,7 @@ import io.airlift.slice.Slices; import io.airlift.slice.XxHash64; -import io.prestosql.spi.NodeManager; +import io.trino.spi.NodeManager; import javax.annotation.concurrent.GuardedBy; import javax.inject.Inject; @@ -37,8 +37,8 @@ import java.util.Map; import java.util.UUID; -import static io.prestosql.plugin.raptor.legacy.backup.HttpBackupStore.CONTENT_XXH64; -import static io.prestosql.plugin.raptor.legacy.backup.HttpBackupStore.PRESTO_ENVIRONMENT; +import static io.trino.plugin.raptor.legacy.backup.HttpBackupStore.CONTENT_XXH64; +import static io.trino.plugin.raptor.legacy.backup.HttpBackupStore.PRESTO_ENVIRONMENT; import static java.lang.Long.parseUnsignedLong; import static java.util.Objects.requireNonNull; import static javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/ShardNode.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/ShardNode.java index 01dd801cec1c..5503ee30a6c2 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/ShardNode.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/ShardNode.java @@ -22,7 +22,7 @@ import java.util.UUID; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; +import static io.trino.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; import static java.util.Objects.requireNonNull; public class ShardNode diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestAssignmentLimiter.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestAssignmentLimiter.java index 9948d44f6297..02e0464daa7d 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestAssignmentLimiter.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestAssignmentLimiter.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableSet; import io.airlift.testing.TestingTicker; import io.airlift.units.Duration; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.PrestoException; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.PrestoException; import org.testng.annotations.Test; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_REASSIGNMENT_DELAY; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_REASSIGNMENT_THROTTLE; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_REASSIGNMENT_DELAY; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_REASSIGNMENT_THROTTLE; import static java.util.concurrent.TimeUnit.MINUTES; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestDatabaseShardManager.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestDatabaseShardManager.java index 5a2747e45c9b..50330361012a 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestDatabaseShardManager.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestDatabaseShardManager.java @@ -23,18 +23,18 @@ import io.airlift.slice.Slice; import io.airlift.testing.TestingTicker; import io.airlift.units.Duration; -import io.prestosql.client.NodeVersion; -import io.prestosql.metadata.InternalNode; -import io.prestosql.plugin.raptor.legacy.NodeSupplier; -import io.prestosql.plugin.raptor.legacy.RaptorColumnHandle; -import io.prestosql.plugin.raptor.legacy.util.DaoSupplier; -import io.prestosql.spi.Node; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.Type; +import io.trino.client.NodeVersion; +import io.trino.metadata.InternalNode; +import io.trino.plugin.raptor.legacy.NodeSupplier; +import io.trino.plugin.raptor.legacy.RaptorColumnHandle; +import io.trino.plugin.raptor.legacy.util.DaoSupplier; +import io.trino.spi.Node; +import io.trino.spi.PrestoException; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.Type; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.IDBI; @@ -70,23 +70,23 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_EXTERNAL_BATCH_ALREADY_EXISTS; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; -import static io.prestosql.plugin.raptor.legacy.storage.ShardStats.MAX_BINARY_INDEX_SIZE; -import static io.prestosql.spi.StandardErrorCode.SERVER_STARTING_UP; -import static io.prestosql.spi.StandardErrorCode.TRANSACTION_CONFLICT; -import static io.prestosql.spi.predicate.Range.greaterThan; -import static io.prestosql.spi.predicate.Range.greaterThanOrEqual; -import static io.prestosql.spi.predicate.Range.lessThan; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_EXTERNAL_BATCH_ALREADY_EXISTS; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.storage.ShardStats.MAX_BINARY_INDEX_SIZE; +import static io.trino.spi.StandardErrorCode.SERVER_STARTING_UP; +import static io.trino.spi.StandardErrorCode.TRANSACTION_CONFLICT; +import static io.trino.spi.predicate.Range.greaterThan; +import static io.trino.spi.predicate.Range.greaterThanOrEqual; +import static io.trino.spi.predicate.Range.lessThan; +import static io.trino.spi.predicate.Range.range; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.String.format; import static java.time.ZoneOffset.UTC; import static java.util.concurrent.TimeUnit.DAYS; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestMetadataDao.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestMetadataDao.java index 2488bc2fcfcc..e79409ec3b01 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestMetadataDao.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestMetadataDao.java @@ -25,7 +25,7 @@ import java.util.OptionalLong; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNull; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestRaptorMetadata.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestRaptorMetadata.java index 064c9691e488..c18a4eb774f3 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestRaptorMetadata.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestRaptorMetadata.java @@ -16,33 +16,33 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.MetadataUtil.TableMetadataBuilder; -import io.prestosql.plugin.raptor.legacy.NodeSupplier; -import io.prestosql.plugin.raptor.legacy.RaptorColumnHandle; -import io.prestosql.plugin.raptor.legacy.RaptorMetadata; -import io.prestosql.plugin.raptor.legacy.RaptorPartitioningHandle; -import io.prestosql.plugin.raptor.legacy.RaptorSessionProperties; -import io.prestosql.plugin.raptor.legacy.RaptorTableHandle; -import io.prestosql.plugin.raptor.legacy.storage.StorageManagerConfig; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorInsertTableHandle; -import io.prestosql.spi.connector.ConnectorNewTableLayout; -import io.prestosql.spi.connector.ConnectorOutputTableHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.ConnectorViewDefinition.ViewColumn; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.type.TypeManager; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.testing.TestingConnectorSession; -import io.prestosql.testing.TestingNodeManager; -import io.prestosql.type.InternalTypeManager; +import io.trino.metadata.MetadataUtil.TableMetadataBuilder; +import io.trino.plugin.raptor.legacy.NodeSupplier; +import io.trino.plugin.raptor.legacy.RaptorColumnHandle; +import io.trino.plugin.raptor.legacy.RaptorMetadata; +import io.trino.plugin.raptor.legacy.RaptorPartitioningHandle; +import io.trino.plugin.raptor.legacy.RaptorSessionProperties; +import io.trino.plugin.raptor.legacy.RaptorTableHandle; +import io.trino.plugin.raptor.legacy.storage.StorageManagerConfig; +import io.trino.spi.NodeManager; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorInsertTableHandle; +import io.trino.spi.connector.ConnectorNewTableLayout; +import io.trino.spi.connector.ConnectorOutputTableHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.ConnectorViewDefinition.ViewColumn; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.type.TypeManager; +import io.trino.spi.type.TypeOperators; +import io.trino.testing.TestingConnectorSession; +import io.trino.testing.TestingNodeManager; +import io.trino.type.InternalTypeManager; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.util.BooleanMapper; @@ -61,21 +61,21 @@ import static com.google.common.base.Ticker.systemTicker; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.BUCKETED_ON_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.BUCKET_COUNT_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.DISTRIBUTION_NAME_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.ORDERING_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.ORGANIZED_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.RaptorTableProperties.TEMPORAL_COLUMN_PROPERTY; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; -import static io.prestosql.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; -import static io.prestosql.spi.StandardErrorCode.TRANSACTION_CONFLICT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.BUCKETED_ON_PROPERTY; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.BUCKET_COUNT_PROPERTY; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.DISTRIBUTION_NAME_PROPERTY; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.ORDERING_PROPERTY; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.ORGANIZED_PROPERTY; +import static io.trino.plugin.raptor.legacy.RaptorTableProperties.TEMPORAL_COLUMN_PROPERTY; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; +import static io.trino.spi.StandardErrorCode.TRANSACTION_CONFLICT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestRaptorSplitManager.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestRaptorSplitManager.java index 1028ac606ec0..fc4f02e18291 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestRaptorSplitManager.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestRaptorSplitManager.java @@ -16,28 +16,28 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.units.Duration; -import io.prestosql.client.NodeVersion; -import io.prestosql.metadata.InternalNode; -import io.prestosql.plugin.raptor.legacy.NodeSupplier; -import io.prestosql.plugin.raptor.legacy.RaptorColumnHandle; -import io.prestosql.plugin.raptor.legacy.RaptorConnectorId; -import io.prestosql.plugin.raptor.legacy.RaptorMetadata; -import io.prestosql.plugin.raptor.legacy.RaptorSplitManager; -import io.prestosql.plugin.raptor.legacy.RaptorTableHandle; -import io.prestosql.plugin.raptor.legacy.RaptorTransactionHandle; -import io.prestosql.plugin.raptor.legacy.util.DaoSupplier; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.testing.TestingNodeManager; -import io.prestosql.type.InternalTypeManager; +import io.trino.client.NodeVersion; +import io.trino.metadata.InternalNode; +import io.trino.plugin.raptor.legacy.NodeSupplier; +import io.trino.plugin.raptor.legacy.RaptorColumnHandle; +import io.trino.plugin.raptor.legacy.RaptorConnectorId; +import io.trino.plugin.raptor.legacy.RaptorMetadata; +import io.trino.plugin.raptor.legacy.RaptorSplitManager; +import io.trino.plugin.raptor.legacy.RaptorTableHandle; +import io.trino.plugin.raptor.legacy.RaptorTransactionHandle; +import io.trino.plugin.raptor.legacy.util.DaoSupplier; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.TypeOperators; +import io.trino.testing.TestingNodeManager; +import io.trino.type.InternalTypeManager; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; import org.testng.annotations.AfterMethod; @@ -59,15 +59,15 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; -import static io.prestosql.plugin.raptor.legacy.metadata.TestDatabaseShardManager.shardInfo; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.plugin.raptor.legacy.metadata.DatabaseShardManager.shardIndexTable; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.shardInfo; +import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.lang.String.format; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestShardCleaner.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestShardCleaner.java index 3111bb6a9996..2603f1e4386a 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestShardCleaner.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestShardCleaner.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableSet; import io.airlift.testing.TestingTicker; import io.airlift.units.Duration; -import io.prestosql.plugin.raptor.legacy.backup.BackupStore; -import io.prestosql.plugin.raptor.legacy.backup.FileBackupStore; -import io.prestosql.plugin.raptor.legacy.storage.FileStorageService; -import io.prestosql.plugin.raptor.legacy.storage.StorageService; -import io.prestosql.plugin.raptor.legacy.util.DaoSupplier; -import io.prestosql.plugin.raptor.legacy.util.UuidUtil.UuidArgumentFactory; +import io.trino.plugin.raptor.legacy.backup.BackupStore; +import io.trino.plugin.raptor.legacy.backup.FileBackupStore; +import io.trino.plugin.raptor.legacy.storage.FileStorageService; +import io.trino.plugin.raptor.legacy.storage.StorageService; +import io.trino.plugin.raptor.legacy.util.DaoSupplier; +import io.trino.plugin.raptor.legacy.util.UuidUtil.UuidArgumentFactory; import org.intellij.lang.annotations.Language; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; @@ -47,9 +47,9 @@ 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.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; -import static io.prestosql.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.util.UuidUtil.uuidFromBytes; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static java.util.Arrays.asList; import static java.util.UUID.randomUUID; import static java.util.concurrent.TimeUnit.HOURS; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestShardDao.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestShardDao.java index 869e31bafaab..f154eb532ee9 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestShardDao.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestShardDao.java @@ -31,7 +31,7 @@ import java.util.concurrent.ThreadLocalRandom; import static io.airlift.testing.Assertions.assertInstanceOf; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestShardPredicate.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestShardPredicate.java index b9d2a56d5dbc..cc8e69d82c0d 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestShardPredicate.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestShardPredicate.java @@ -17,22 +17,22 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.plugin.raptor.legacy.RaptorColumnHandle; -import io.prestosql.spi.predicate.SortedRangeSet; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.raptor.legacy.RaptorColumnHandle; +import io.trino.spi.predicate.SortedRangeSet; +import io.trino.spi.predicate.TupleDomain; import org.testng.annotations.Test; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.bucketNumberColumnHandle; -import static io.prestosql.plugin.raptor.legacy.RaptorColumnHandle.shardUuidColumnHandle; -import static io.prestosql.plugin.raptor.legacy.util.UuidUtil.uuidStringToBytes; -import static io.prestosql.spi.predicate.Domain.create; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.predicate.Range.equal; -import static io.prestosql.spi.predicate.Range.greaterThanOrEqual; -import static io.prestosql.spi.predicate.TupleDomain.withColumnDomains; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.bucketNumberColumnHandle; +import static io.trino.plugin.raptor.legacy.RaptorColumnHandle.shardUuidColumnHandle; +import static io.trino.plugin.raptor.legacy.util.UuidUtil.uuidStringToBytes; +import static io.trino.spi.predicate.Domain.create; +import static io.trino.spi.predicate.Domain.singleValue; +import static io.trino.spi.predicate.Range.equal; +import static io.trino.spi.predicate.Range.greaterThanOrEqual; +import static io.trino.spi.predicate.TupleDomain.withColumnDomains; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.sql.JDBCType.VARBINARY; import static java.util.UUID.randomUUID; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestingShardDao.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestingShardDao.java index e6eace37409d..9f839ad3d6c9 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestingShardDao.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/metadata/TestingShardDao.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.raptor.legacy.metadata; -import io.prestosql.plugin.raptor.legacy.util.UuidUtil.UuidArgumentFactory; -import io.prestosql.plugin.raptor.legacy.util.UuidUtil.UuidMapperFactory; +import io.trino.plugin.raptor.legacy.util.UuidUtil.UuidArgumentFactory; +import io.trino.plugin.raptor.legacy.util.UuidUtil.UuidMapperFactory; import org.skife.jdbi.v2.sqlobject.Bind; import org.skife.jdbi.v2.sqlobject.GetGeneratedKeys; import org.skife.jdbi.v2.sqlobject.SqlQuery; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/security/TestRaptorFileBasedSecurity.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/security/TestRaptorFileBasedSecurity.java index 2c7da5f24dc3..1528327f75cc 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/security/TestRaptorFileBasedSecurity.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/security/TestRaptorFileBasedSecurity.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.Resources; -import io.prestosql.Session; -import io.prestosql.spi.security.Identity; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.spi.security.Identity; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.io.File; -import static io.prestosql.plugin.raptor.legacy.RaptorQueryRunner.createRaptorQueryRunner; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.raptor.legacy.RaptorQueryRunner.createRaptorQueryRunner; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestRaptorFileBasedSecurity { diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/security/TestRaptorReadOnlySecurity.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/security/TestRaptorReadOnlySecurity.java index 6c14460eaa73..e3574639b51a 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/security/TestRaptorReadOnlySecurity.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/security/TestRaptorReadOnlySecurity.java @@ -14,12 +14,12 @@ package io.trino.plugin.raptor.legacy.security; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.plugin.raptor.legacy.RaptorQueryRunner.createRaptorQueryRunner; +import static io.trino.plugin.raptor.legacy.RaptorQueryRunner.createRaptorQueryRunner; public class TestRaptorReadOnlySecurity { diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/InMemoryShardRecorder.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/InMemoryShardRecorder.java index acba9435a872..85fac0528dcf 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/InMemoryShardRecorder.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/InMemoryShardRecorder.java @@ -14,7 +14,7 @@ package io.trino.plugin.raptor.legacy.storage; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.raptor.legacy.metadata.ShardRecorder; +import io.trino.plugin.raptor.legacy.metadata.ShardRecorder; import java.util.ArrayList; import java.util.List; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/OrcTestingUtil.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/OrcTestingUtil.java index 5edd080f1d20..74933d1dc82a 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/OrcTestingUtil.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/OrcTestingUtil.java @@ -15,13 +15,13 @@ import com.google.common.primitives.UnsignedBytes; import io.airlift.units.DataSize; -import io.prestosql.orc.FileOrcDataSource; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcPredicate; -import io.prestosql.orc.OrcReader; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.orc.OrcRecordReader; -import io.prestosql.spi.type.Type; +import io.trino.orc.FileOrcDataSource; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcPredicate; +import io.trino.orc.OrcReader; +import io.trino.orc.OrcReaderOptions; +import io.trino.orc.OrcRecordReader; +import io.trino.spi.type.Type; import org.joda.time.DateTimeZone; import java.io.File; @@ -30,8 +30,8 @@ import java.util.List; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; -import static io.prestosql.orc.OrcReader.MAX_BATCH_SIZE; +import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext; +import static io.trino.orc.OrcReader.MAX_BATCH_SIZE; import static org.testng.Assert.assertEquals; final class OrcTestingUtil diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestBucketBalancer.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestBucketBalancer.java index cb8ac45f8687..6ceb3e0d6d33 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestBucketBalancer.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestBucketBalancer.java @@ -18,20 +18,20 @@ import com.google.common.collect.Multiset; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.client.NodeVersion; -import io.prestosql.metadata.InternalNode; -import io.prestosql.plugin.raptor.legacy.NodeSupplier; -import io.prestosql.plugin.raptor.legacy.metadata.BucketNode; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnInfo; -import io.prestosql.plugin.raptor.legacy.metadata.Distribution; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.storage.BucketBalancer.BucketAssignment; -import io.prestosql.plugin.raptor.legacy.storage.BucketBalancer.ClusterState; -import io.prestosql.spi.Node; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.testing.TestingNodeManager; -import io.prestosql.type.InternalTypeManager; +import io.trino.client.NodeVersion; +import io.trino.metadata.InternalNode; +import io.trino.plugin.raptor.legacy.NodeSupplier; +import io.trino.plugin.raptor.legacy.metadata.BucketNode; +import io.trino.plugin.raptor.legacy.metadata.ColumnInfo; +import io.trino.plugin.raptor.legacy.metadata.Distribution; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.storage.BucketBalancer.BucketAssignment; +import io.trino.plugin.raptor.legacy.storage.BucketBalancer.ClusterState; +import io.trino.spi.Node; +import io.trino.spi.type.TypeOperators; +import io.trino.testing.TestingNodeManager; +import io.trino.type.InternalTypeManager; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; import org.testng.annotations.AfterMethod; @@ -47,11 +47,11 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.testing.Assertions.assertGreaterThanOrEqual; import static io.airlift.testing.Assertions.assertLessThanOrEqual; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.raptor.legacy.metadata.Distribution.serializeColumnTypes; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; -import static io.prestosql.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.raptor.legacy.metadata.Distribution.serializeColumnTypes; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.concurrent.TimeUnit.DAYS; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestFileStorageService.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestFileStorageService.java index e3102785ad72..9c1830365783 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestFileStorageService.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestFileStorageService.java @@ -25,7 +25,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.prestosql.plugin.raptor.legacy.storage.FileStorageService.getFileSystemPath; +import static io.trino.plugin.raptor.legacy.storage.FileStorageService.getFileSystemPath; import static java.lang.String.format; import static java.util.UUID.randomUUID; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestMissingShardComparator.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestMissingShardComparator.java index 54e9df39b763..f6edb5b1b8dc 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestMissingShardComparator.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestMissingShardComparator.java @@ -15,8 +15,8 @@ import org.testng.annotations.Test; -import static io.prestosql.plugin.raptor.legacy.storage.ShardRecoveryManager.MissingShardComparator; -import static io.prestosql.plugin.raptor.legacy.storage.ShardRecoveryManager.MissingShardRunnable; +import static io.trino.plugin.raptor.legacy.storage.ShardRecoveryManager.MissingShardComparator; +import static io.trino.plugin.raptor.legacy.storage.ShardRecoveryManager.MissingShardRunnable; import static org.testng.Assert.assertEquals; public class TestMissingShardComparator diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestOrcFileRewriter.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestOrcFileRewriter.java index a8f41f605b67..954a4509fce4 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestOrcFileRewriter.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestOrcFileRewriter.java @@ -16,17 +16,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.json.JsonCodec; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcRecordReader; -import io.prestosql.plugin.raptor.legacy.storage.OrcFileRewriter.OrcFileInfo; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcRecordReader; +import io.trino.plugin.raptor.legacy.storage.OrcFileRewriter.OrcFileInfo; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeSignatureParameter; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -41,19 +41,19 @@ import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; import static io.airlift.json.JsonCodec.jsonCodec; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.raptor.legacy.storage.OrcTestingUtil.createReader; -import static io.prestosql.plugin.raptor.legacy.storage.OrcTestingUtil.fileOrcDataSource; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.StructuralTestUtil.arrayBlockOf; -import static io.prestosql.testing.StructuralTestUtil.arrayBlocksEqual; -import static io.prestosql.testing.StructuralTestUtil.mapBlockOf; -import static io.prestosql.testing.StructuralTestUtil.mapBlocksEqual; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.raptor.legacy.storage.OrcTestingUtil.createReader; +import static io.trino.plugin.raptor.legacy.storage.OrcTestingUtil.fileOrcDataSource; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.StructuralTestUtil.arrayBlockOf; +import static io.trino.testing.StructuralTestUtil.arrayBlocksEqual; +import static io.trino.testing.StructuralTestUtil.mapBlockOf; +import static io.trino.testing.StructuralTestUtil.mapBlocksEqual; import static java.nio.file.Files.readAllBytes; import static java.util.UUID.randomUUID; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestOrcStorageManager.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestOrcStorageManager.java index 366a3b0aa678..7140bd13592b 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestOrcStorageManager.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestOrcStorageManager.java @@ -19,33 +19,33 @@ import io.airlift.slice.Slice; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.orc.OrcRecordReader; -import io.prestosql.plugin.raptor.legacy.RaptorColumnHandle; -import io.prestosql.plugin.raptor.legacy.backup.BackupManager; -import io.prestosql.plugin.raptor.legacy.backup.BackupStore; -import io.prestosql.plugin.raptor.legacy.backup.FileBackupStore; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnStats; -import io.prestosql.plugin.raptor.legacy.metadata.ShardDelta; -import io.prestosql.plugin.raptor.legacy.metadata.ShardInfo; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.ShardRecorder; -import io.prestosql.plugin.raptor.legacy.storage.InMemoryShardRecorder.RecordedShard; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.SqlTimestamp; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.TestingNodeManager; -import io.prestosql.type.InternalTypeManager; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcReaderOptions; +import io.trino.orc.OrcRecordReader; +import io.trino.plugin.raptor.legacy.RaptorColumnHandle; +import io.trino.plugin.raptor.legacy.backup.BackupManager; +import io.trino.plugin.raptor.legacy.backup.BackupStore; +import io.trino.plugin.raptor.legacy.backup.FileBackupStore; +import io.trino.plugin.raptor.legacy.metadata.ColumnStats; +import io.trino.plugin.raptor.legacy.metadata.ShardDelta; +import io.trino.plugin.raptor.legacy.metadata.ShardInfo; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.ShardRecorder; +import io.trino.plugin.raptor.legacy.storage.InMemoryShardRecorder.RecordedShard; +import io.trino.spi.NodeManager; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.SqlTimestamp; +import io.trino.spi.type.SqlVarbinary; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.testing.MaterializedResult; +import io.trino.testing.TestingNodeManager; +import io.trino.type.InternalTypeManager; import org.joda.time.DateTime; import org.joda.time.Days; import org.joda.time.chrono.ISOChronology; @@ -79,25 +79,25 @@ import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.RowPagesBuilder.rowPagesBuilder; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; -import static io.prestosql.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; -import static io.prestosql.plugin.raptor.legacy.storage.OrcStorageManager.xxhash64; -import static io.prestosql.plugin.raptor.legacy.storage.OrcTestingUtil.createReader; -import static io.prestosql.plugin.raptor.legacy.storage.OrcTestingUtil.octets; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.MaterializedResult.materializeSourceDataStream; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.RowPagesBuilder.rowPagesBuilder; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; +import static io.trino.plugin.raptor.legacy.storage.OrcStorageManager.xxhash64; +import static io.trino.plugin.raptor.legacy.storage.OrcTestingUtil.createReader; +import static io.trino.plugin.raptor.legacy.storage.OrcTestingUtil.octets; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.MaterializedResult.materializeSourceDataStream; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.String.format; import static org.joda.time.DateTimeZone.UTC; import static org.testng.Assert.assertFalse; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestShardEjector.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestShardEjector.java index 8a310fa0a811..9dbd14e51be4 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestShardEjector.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestShardEjector.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.units.Duration; -import io.prestosql.client.NodeVersion; -import io.prestosql.metadata.InternalNode; -import io.prestosql.plugin.raptor.legacy.backup.BackupStore; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnInfo; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.ShardInfo; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.ShardMetadata; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.testing.TestingNodeManager; +import io.trino.client.NodeVersion; +import io.trino.metadata.InternalNode; +import io.trino.plugin.raptor.legacy.backup.BackupStore; +import io.trino.plugin.raptor.legacy.metadata.ColumnInfo; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.ShardInfo; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.ShardMetadata; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; +import io.trino.spi.predicate.TupleDomain; +import io.trino.testing.TestingNodeManager; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.IDBI; @@ -48,9 +48,9 @@ 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.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; -import static io.prestosql.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; +import static io.trino.spi.type.BigintType.BIGINT; import static java.util.UUID.randomUUID; import static java.util.concurrent.TimeUnit.HOURS; import static java.util.stream.Collectors.toSet; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestShardRecovery.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestShardRecovery.java index e0ea2dbc338c..ccfe574bd1d8 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestShardRecovery.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestShardRecovery.java @@ -16,11 +16,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.Files; import io.airlift.units.Duration; -import io.prestosql.plugin.raptor.legacy.backup.BackupStore; -import io.prestosql.plugin.raptor.legacy.backup.FileBackupStore; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.spi.PrestoException; -import io.prestosql.testing.TestingNodeManager; +import io.trino.plugin.raptor.legacy.backup.BackupStore; +import io.trino.plugin.raptor.legacy.backup.FileBackupStore; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.spi.PrestoException; +import io.trino.testing.TestingNodeManager; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.IDBI; @@ -39,10 +39,10 @@ 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.prestosql.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_CORRUPTION; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; -import static io.prestosql.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; -import static io.prestosql.plugin.raptor.legacy.storage.OrcStorageManager.xxhash64; +import static io.trino.plugin.raptor.legacy.RaptorErrorCode.RAPTOR_BACKUP_CORRUPTION; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; +import static io.trino.plugin.raptor.legacy.storage.OrcStorageManager.xxhash64; import static java.io.File.createTempFile; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.concurrent.TimeUnit.MINUTES; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestShardWriter.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestShardWriter.java index 215d18639378..5aa133b8c493 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestShardWriter.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/TestShardWriter.java @@ -16,17 +16,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.json.JsonCodec; -import io.prestosql.RowPagesBuilder; -import io.prestosql.orc.OrcDataSource; -import io.prestosql.orc.OrcRecordReader; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeSignatureParameter; +import io.trino.RowPagesBuilder; +import io.trino.orc.OrcDataSource; +import io.trino.orc.OrcRecordReader; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeSignatureParameter; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -40,19 +40,19 @@ import static io.airlift.json.JsonCodec.jsonCodec; import static io.airlift.slice.Slices.utf8Slice; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.plugin.raptor.legacy.storage.OrcTestingUtil.createReader; -import static io.prestosql.plugin.raptor.legacy.storage.OrcTestingUtil.fileOrcDataSource; -import static io.prestosql.plugin.raptor.legacy.storage.OrcTestingUtil.octets; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.StructuralTestUtil.arrayBlockOf; -import static io.prestosql.testing.StructuralTestUtil.arrayBlocksEqual; -import static io.prestosql.testing.StructuralTestUtil.mapBlockOf; -import static io.prestosql.testing.StructuralTestUtil.mapBlocksEqual; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.plugin.raptor.legacy.storage.OrcTestingUtil.createReader; +import static io.trino.plugin.raptor.legacy.storage.OrcTestingUtil.fileOrcDataSource; +import static io.trino.plugin.raptor.legacy.storage.OrcTestingUtil.octets; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.StructuralTestUtil.arrayBlockOf; +import static io.trino.testing.StructuralTestUtil.arrayBlocksEqual; +import static io.trino.testing.StructuralTestUtil.mapBlockOf; +import static io.trino.testing.StructuralTestUtil.mapBlocksEqual; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNull; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestCompactionSetCreator.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestCompactionSetCreator.java index 643fa7e03fdf..3667ca650e3d 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestCompactionSetCreator.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestCompactionSetCreator.java @@ -16,8 +16,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; -import io.prestosql.plugin.raptor.legacy.metadata.Table; -import io.prestosql.spi.type.Type; +import io.trino.plugin.raptor.legacy.metadata.Table; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.time.Duration; @@ -30,8 +30,8 @@ import java.util.UUID; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardCompactor.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardCompactor.java index fb6f7d4bb62f..2b505c0cb96c 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardCompactor.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardCompactor.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.PagesIndexPageSorter; -import io.prestosql.SequencePageBuilder; -import io.prestosql.operator.PagesIndex; -import io.prestosql.orc.OrcReaderOptions; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnInfo; -import io.prestosql.plugin.raptor.legacy.metadata.ShardInfo; -import io.prestosql.plugin.raptor.legacy.storage.OrcStorageManager; -import io.prestosql.plugin.raptor.legacy.storage.StorageManager; -import io.prestosql.plugin.raptor.legacy.storage.StoragePageSink; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; +import io.trino.PagesIndexPageSorter; +import io.trino.SequencePageBuilder; +import io.trino.operator.PagesIndex; +import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.raptor.legacy.metadata.ColumnInfo; +import io.trino.plugin.raptor.legacy.metadata.ShardInfo; +import io.trino.plugin.raptor.legacy.storage.OrcStorageManager; +import io.trino.plugin.raptor.legacy.storage.StorageManager; +import io.trino.plugin.raptor.legacy.storage.StoragePageSink; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.IDBI; @@ -54,17 +54,17 @@ import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.plugin.raptor.legacy.storage.TestOrcStorageManager.createOrcStorageManager; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_FIRST; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.MaterializedResult.materializeSourceDataStream; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.plugin.raptor.legacy.storage.TestOrcStorageManager.createOrcStorageManager; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_FIRST; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.MaterializedResult.materializeSourceDataStream; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.util.Collections.nCopies; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toSet; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardOrganizationManager.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardOrganizationManager.java index de43e8cb7ad0..3969d3792c8f 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardOrganizationManager.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardOrganizationManager.java @@ -16,9 +16,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.units.Duration; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.Table; -import io.prestosql.spi.type.Type; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.Table; +import io.trino.spi.type.Type; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.IDBI; @@ -36,15 +36,15 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; -import static io.prestosql.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; -import static io.prestosql.plugin.raptor.legacy.storage.organization.ShardOrganizationManager.createOrganizationSets; -import static io.prestosql.plugin.raptor.legacy.storage.organization.TestCompactionSetCreator.extractIndexes; -import static io.prestosql.plugin.raptor.legacy.storage.organization.TestShardOrganizer.createShardOrganizer; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; +import static io.trino.plugin.raptor.legacy.storage.organization.ShardOrganizationManager.createOrganizationSets; +import static io.trino.plugin.raptor.legacy.storage.organization.TestCompactionSetCreator.extractIndexes; +import static io.trino.plugin.raptor.legacy.storage.organization.TestShardOrganizer.createShardOrganizer; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarcharType.VARCHAR; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.stream.Collectors.toSet; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardOrganizerUtil.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardOrganizerUtil.java index 13cbe50a2661..2ee596170774 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardOrganizerUtil.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardOrganizerUtil.java @@ -17,20 +17,20 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; import com.google.common.io.Files; -import io.prestosql.plugin.raptor.legacy.RaptorMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnInfo; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnStats; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.ShardInfo; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.ShardMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.Table; -import io.prestosql.plugin.raptor.legacy.metadata.TableColumn; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.type.InternalTypeManager; +import io.trino.plugin.raptor.legacy.RaptorMetadata; +import io.trino.plugin.raptor.legacy.metadata.ColumnInfo; +import io.trino.plugin.raptor.legacy.metadata.ColumnStats; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.ShardInfo; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.ShardMetadata; +import io.trino.plugin.raptor.legacy.metadata.Table; +import io.trino.plugin.raptor.legacy.metadata.TableColumn; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.type.InternalTypeManager; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; import org.testng.annotations.AfterMethod; @@ -48,18 +48,18 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; -import static io.prestosql.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; -import static io.prestosql.plugin.raptor.legacy.metadata.TestDatabaseShardManager.shardInfo; -import static io.prestosql.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.getOrganizationEligibleShards; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; +import static io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.shardInfo; +import static io.trino.plugin.raptor.legacy.storage.organization.ShardOrganizerUtil.getOrganizationEligibleShards; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.TestingConnectorSession.SESSION; import static org.testng.Assert.assertEquals; @Test(singleThreaded = true) diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardRange.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardRange.java index 6dff8f37bbdf..869f941cd789 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardRange.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestShardRange.java @@ -14,15 +14,15 @@ package io.trino.plugin.raptor.legacy.storage.organization; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.List; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestTemporalFunction.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestTemporalFunction.java index 923b59bbbce1..536dfd2aa4f4 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestTemporalFunction.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestTemporalFunction.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.raptor.legacy.storage.organization; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import org.joda.time.DateTime; import org.testng.annotations.Test; import java.time.Duration; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.type.DateTimes.MICROSECONDS_PER_MILLISECOND; import static org.joda.time.DateTimeZone.UTC; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestTuple.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestTuple.java index 3fbe8e9909a8..344be5490c89 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestTuple.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/storage/organization/TestTuple.java @@ -14,20 +14,20 @@ package io.trino.plugin.raptor.legacy.storage.organization; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.type.Type; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.List; import static io.airlift.testing.Assertions.assertGreaterThan; import static io.airlift.testing.Assertions.assertLessThan; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.VarcharType.createVarcharType; import static org.testng.Assert.assertEquals; public class TestTuple diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/systemtables/TestShardMetadataRecordCursor.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/systemtables/TestShardMetadataRecordCursor.java index b15eab1b2eea..61a5b7903a82 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/systemtables/TestShardMetadataRecordCursor.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/systemtables/TestShardMetadataRecordCursor.java @@ -17,24 +17,24 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.plugin.raptor.legacy.RaptorMetadata; -import io.prestosql.plugin.raptor.legacy.metadata.ColumnInfo; -import io.prestosql.plugin.raptor.legacy.metadata.MetadataDao; -import io.prestosql.plugin.raptor.legacy.metadata.ShardInfo; -import io.prestosql.plugin.raptor.legacy.metadata.ShardManager; -import io.prestosql.plugin.raptor.legacy.metadata.TableColumn; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.type.InternalTypeManager; +import io.trino.plugin.raptor.legacy.RaptorMetadata; +import io.trino.plugin.raptor.legacy.metadata.ColumnInfo; +import io.trino.plugin.raptor.legacy.metadata.MetadataDao; +import io.trino.plugin.raptor.legacy.metadata.ShardInfo; +import io.trino.plugin.raptor.legacy.metadata.ShardManager; +import io.trino.plugin.raptor.legacy.metadata.TableColumn; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.testing.MaterializedRow; +import io.trino.type.InternalTypeManager; import org.joda.time.DateTime; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; @@ -51,18 +51,18 @@ import java.util.concurrent.ThreadLocalRandom; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; -import static io.prestosql.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; -import static io.prestosql.plugin.raptor.legacy.systemtables.ShardMetadataRecordCursor.SHARD_METADATA; -import static io.prestosql.spi.predicate.Range.greaterThan; -import static io.prestosql.spi.predicate.Range.lessThanOrEqual; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.MaterializedResult.DEFAULT_PRECISION; -import static io.prestosql.testing.TestingConnectorSession.SESSION; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.plugin.raptor.legacy.metadata.SchemaDaoUtil.createTablesWithRetry; +import static io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager; +import static io.trino.plugin.raptor.legacy.systemtables.ShardMetadataRecordCursor.SHARD_METADATA; +import static io.trino.spi.predicate.Range.greaterThan; +import static io.trino.spi.predicate.Range.lessThanOrEqual; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.MaterializedResult.DEFAULT_PRECISION; +import static io.trino.testing.TestingConnectorSession.SESSION; import static java.util.stream.Collectors.toList; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisColumnHandle.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisColumnHandle.java index 24d5fa12be97..205e90e6b919 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisColumnHandle.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisColumnHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnector.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnector.java index e7126153439e..e1d576934d31 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnector.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnector.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.redis; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; -import static io.prestosql.spi.transaction.IsolationLevel.READ_COMMITTED; -import static io.prestosql.spi.transaction.IsolationLevel.checkConnectorSupports; +import static io.trino.spi.transaction.IsolationLevel.READ_COMMITTED; +import static io.trino.spi.transaction.IsolationLevel.checkConnectorSupports; import static java.util.Objects.requireNonNull; /** diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnectorConfig.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnectorConfig.java index 62470a6d1b3f..01a81cecd6d0 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnectorConfig.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnectorConfig.java @@ -19,7 +19,7 @@ import io.airlift.configuration.ConfigSecuritySensitive; import io.airlift.units.Duration; import io.airlift.units.MinDuration; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnectorFactory.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnectorFactory.java index b530d255a7ba..09c4a2a8976d 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnectorFactory.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnectorFactory.java @@ -18,13 +18,13 @@ import com.google.inject.TypeLiteral; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.TypeManager; import java.util.Map; import java.util.Optional; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnectorModule.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnectorModule.java index 55a6d0608eda..3183cc899e5d 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnectorModule.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisConnectorModule.java @@ -18,9 +18,9 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisDecoderModule.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisDecoderModule.java index 2c416e985e75..530f821f5691 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisDecoderModule.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisDecoderModule.java @@ -16,21 +16,21 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.multibindings.MapBinder; -import io.prestosql.decoder.DispatchingRowDecoderFactory; -import io.prestosql.decoder.RowDecoderFactory; -import io.prestosql.decoder.avro.AvroDecoderModule; -import io.prestosql.decoder.csv.CsvRowDecoder; -import io.prestosql.decoder.csv.CsvRowDecoderFactory; -import io.prestosql.decoder.dummy.DummyRowDecoder; -import io.prestosql.decoder.dummy.DummyRowDecoderFactory; -import io.prestosql.decoder.json.JsonRowDecoder; -import io.prestosql.decoder.json.JsonRowDecoderFactory; -import io.prestosql.decoder.raw.RawRowDecoder; -import io.prestosql.decoder.raw.RawRowDecoderFactory; -import io.prestosql.plugin.redis.decoder.hash.HashRedisRowDecoder; -import io.prestosql.plugin.redis.decoder.hash.HashRedisRowDecoderFactory; -import io.prestosql.plugin.redis.decoder.zset.ZsetRedisRowDecoder; -import io.prestosql.plugin.redis.decoder.zset.ZsetRedisRowDecoderFactory; +import io.trino.decoder.DispatchingRowDecoderFactory; +import io.trino.decoder.RowDecoderFactory; +import io.trino.decoder.avro.AvroDecoderModule; +import io.trino.decoder.csv.CsvRowDecoder; +import io.trino.decoder.csv.CsvRowDecoderFactory; +import io.trino.decoder.dummy.DummyRowDecoder; +import io.trino.decoder.dummy.DummyRowDecoderFactory; +import io.trino.decoder.json.JsonRowDecoder; +import io.trino.decoder.json.JsonRowDecoderFactory; +import io.trino.decoder.raw.RawRowDecoder; +import io.trino.decoder.raw.RawRowDecoderFactory; +import io.trino.plugin.redis.decoder.hash.HashRedisRowDecoder; +import io.trino.plugin.redis.decoder.hash.HashRedisRowDecoderFactory; +import io.trino.plugin.redis.decoder.zset.ZsetRedisRowDecoder; +import io.trino.plugin.redis.decoder.zset.ZsetRedisRowDecoderFactory; import static com.google.inject.Scopes.SINGLETON; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisFieldDecoder.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisFieldDecoder.java index 2c77fb1e6b43..0501a769c6db 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisFieldDecoder.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisFieldDecoder.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.redis; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; /** * Format specific field decoder description. diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisHandleResolver.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisHandleResolver.java index 8e3e2e35fa93..a1c0e4c23712 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisHandleResolver.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisHandleResolver.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.redis; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; import static com.google.common.base.Preconditions.checkArgument; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisInternalFieldDescription.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisInternalFieldDescription.java index 36d1bcc3d942..dec8b9499c5c 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisInternalFieldDescription.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisInternalFieldDescription.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.redis; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.Type; import java.util.Map; import java.util.Optional; @@ -24,7 +24,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static java.util.Arrays.stream; import static java.util.Objects.requireNonNull; import static java.util.function.Function.identity; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisJedisManager.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisJedisManager.java index c8f55b504ee4..c7b2a5fb3526 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisJedisManager.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisJedisManager.java @@ -17,8 +17,8 @@ import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import io.airlift.log.Logger; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.NodeManager; +import io.trino.spi.HostAddress; +import io.trino.spi.NodeManager; import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPoolConfig; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisMetadata.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisMetadata.java index 46fd5715ca65..e4e51e0f0a27 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisMetadata.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisMetadata.java @@ -18,17 +18,17 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; -import io.prestosql.decoder.dummy.DummyRowDecoder; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.TableNotFoundException; +import io.trino.decoder.dummy.DummyRowDecoder; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.TableNotFoundException; import javax.annotation.Nullable; import javax.inject.Inject; @@ -41,8 +41,8 @@ import java.util.function.Supplier; import java.util.stream.Collectors; -import static io.prestosql.plugin.redis.RedisHandleResolver.convertColumnHandle; -import static io.prestosql.plugin.redis.RedisHandleResolver.convertTableHandle; +import static io.trino.plugin.redis.RedisHandleResolver.convertColumnHandle; +import static io.trino.plugin.redis.RedisHandleResolver.convertTableHandle; import static java.util.Objects.requireNonNull; /** diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisPlugin.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisPlugin.java index b707eb9f0a70..181011b0fa8c 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisPlugin.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.redis; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; import java.util.Optional; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisRecordCursor.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisRecordCursor.java index cc949db65ca1..96d7820e9b53 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisRecordCursor.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisRecordCursor.java @@ -15,12 +15,12 @@ import io.airlift.log.Logger; import io.airlift.slice.Slice; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.type.Type; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; import redis.clients.jedis.ScanParams; @@ -36,9 +36,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.decoder.FieldValueProviders.booleanValueProvider; -import static io.prestosql.decoder.FieldValueProviders.bytesValueProvider; -import static io.prestosql.decoder.FieldValueProviders.longValueProvider; +import static io.trino.decoder.FieldValueProviders.booleanValueProvider; +import static io.trino.decoder.FieldValueProviders.bytesValueProvider; +import static io.trino.decoder.FieldValueProviders.longValueProvider; import static java.lang.String.format; import static redis.clients.jedis.ScanParams.SCAN_POINTER_START; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisRecordSet.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisRecordSet.java index ea2a24bb8cea..77232ccea98d 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisRecordSet.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisRecordSet.java @@ -14,11 +14,11 @@ package io.trino.plugin.redis; import com.google.common.collect.ImmutableList; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.RowDecoder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisRecordSetProvider.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisRecordSetProvider.java index 9d54c93e10a3..ac2ecfc287ac 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisRecordSetProvider.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisRecordSetProvider.java @@ -13,15 +13,15 @@ */ package io.trino.plugin.redis; -import io.prestosql.decoder.DispatchingRowDecoderFactory; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.decoder.DispatchingRowDecoderFactory; +import io.trino.decoder.RowDecoder; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import javax.inject.Inject; @@ -29,7 +29,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.plugin.redis.RedisHandleResolver.convertSplit; +import static io.trino.plugin.redis.RedisHandleResolver.convertSplit; import static java.util.Collections.emptyMap; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisSplit.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisSplit.java index 672363355703..a294e60100b6 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisSplit.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisSplitManager.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisSplitManager.java index 7d2a1e4b58a7..334653218720 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisSplitManager.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisSplitManager.java @@ -14,15 +14,15 @@ package io.trino.plugin.redis; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import redis.clients.jedis.Jedis; import javax.inject.Inject; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTableDescriptionSupplier.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTableDescriptionSupplier.java index 8ecacadc3106..ce9a3dc9d2e1 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTableDescriptionSupplier.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTableDescriptionSupplier.java @@ -18,8 +18,8 @@ import com.google.common.collect.ImmutableMap; import io.airlift.json.JsonCodec; import io.airlift.log.Logger; -import io.prestosql.decoder.dummy.DummyRowDecoder; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.decoder.dummy.DummyRowDecoder; +import io.trino.spi.connector.SchemaTableName; import javax.inject.Inject; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTableFieldDescription.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTableFieldDescription.java index 92207929eea3..a11396b09a61 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTableFieldDescription.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTableFieldDescription.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTableHandle.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTableHandle.java index d5bfa67b40ba..7f8ef990df96 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTableHandle.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTableHandle.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; import java.util.Objects; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTransactionHandle.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTransactionHandle.java index b3383d97eefd..27e13cb026e8 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTransactionHandle.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/RedisTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.redis; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum RedisTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisFieldDecoder.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisFieldDecoder.java index b26d61da98da..fa19235706e7 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisFieldDecoder.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisFieldDecoder.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.redis.decoder.hash; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.plugin.redis.RedisFieldDecoder; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.plugin.redis.RedisFieldDecoder; public class HashRedisFieldDecoder implements RedisFieldDecoder diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisRowDecoder.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisRowDecoder.java index b29816e59170..55a3734b2d17 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisRowDecoder.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisRowDecoder.java @@ -14,10 +14,10 @@ package io.trino.plugin.redis.decoder.hash; import com.google.common.collect.ImmutableMap; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.plugin.redis.RedisFieldDecoder; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; +import io.trino.plugin.redis.RedisFieldDecoder; import java.util.HashMap; import java.util.Map; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisRowDecoderFactory.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisRowDecoderFactory.java index ade69b65b024..f39882a3ccb8 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisRowDecoderFactory.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisRowDecoderFactory.java @@ -13,10 +13,10 @@ */ package io.trino.plugin.redis.decoder.hash; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.decoder.RowDecoderFactory; -import io.prestosql.plugin.redis.RedisFieldDecoder; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.RowDecoder; +import io.trino.decoder.RowDecoderFactory; +import io.trino.plugin.redis.RedisFieldDecoder; import java.util.Map; import java.util.Set; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisValueProvider.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisValueProvider.java index c5edf0869df5..39c83133c0c3 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisValueProvider.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/HashRedisValueProvider.java @@ -14,8 +14,8 @@ package io.trino.plugin.redis.decoder.hash; import io.airlift.slice.Slice; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; import static io.airlift.slice.Slices.utf8Slice; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/ISO8601HashRedisFieldDecoder.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/ISO8601HashRedisFieldDecoder.java index 7addaee50136..5a29477efd9c 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/ISO8601HashRedisFieldDecoder.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/hash/ISO8601HashRedisFieldDecoder.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.redis.decoder.hash; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.spi.type.Type; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.spi.type.Type; import org.joda.time.DateTime; import org.joda.time.chrono.ISOChronology; import org.joda.time.format.DateTimeFormatter; @@ -23,15 +23,15 @@ import java.util.Locale; -import static io.prestosql.spi.type.DateTimeEncoding.packDateTimeWithZone; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKey; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.DateTimeEncoding.packDateTimeWithZone; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKey; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.spi.type.Timestamps.PICOSECONDS_PER_MILLISECOND; import static java.util.concurrent.TimeUnit.MILLISECONDS; class ISO8601HashRedisFieldDecoder diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/zset/ZsetRedisRowDecoder.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/zset/ZsetRedisRowDecoder.java index d4082b5284d0..63acbe6def4c 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/zset/ZsetRedisRowDecoder.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/zset/ZsetRedisRowDecoder.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.redis.decoder.zset; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.FieldValueProvider; -import io.prestosql.decoder.RowDecoder; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.FieldValueProvider; +import io.trino.decoder.RowDecoder; import java.util.Map; import java.util.Optional; diff --git a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/zset/ZsetRedisRowDecoderFactory.java b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/zset/ZsetRedisRowDecoderFactory.java index b21d4d05709a..23772be096e7 100644 --- a/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/zset/ZsetRedisRowDecoderFactory.java +++ b/plugin/trino-redis/src/main/java/io/trino/plugin/redis/decoder/zset/ZsetRedisRowDecoderFactory.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.redis.decoder.zset; -import io.prestosql.decoder.DecoderColumnHandle; -import io.prestosql.decoder.RowDecoder; -import io.prestosql.decoder.RowDecoderFactory; +import io.trino.decoder.DecoderColumnHandle; +import io.trino.decoder.RowDecoder; +import io.trino.decoder.RowDecoderFactory; import java.util.Map; import java.util.Set; diff --git a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/RedisQueryRunner.java b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/RedisQueryRunner.java index 5f0b281c86e0..99a231a53c07 100644 --- a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/RedisQueryRunner.java +++ b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/RedisQueryRunner.java @@ -18,26 +18,26 @@ import io.airlift.json.JsonCodec; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.plugin.redis.util.CodecSupplier; -import io.prestosql.plugin.redis.util.RedisServer; -import io.prestosql.plugin.redis.util.RedisTestUtils; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.TestingPrestoClient; +import io.trino.Session; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.plugin.redis.util.CodecSupplier; +import io.trino.plugin.redis.util.RedisServer; +import io.trino.plugin.redis.util.RedisTestUtils; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.spi.connector.SchemaTableName; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.TestingPrestoClient; import io.trino.tpch.TpchTable; import java.util.Map; import static io.airlift.testing.Closeables.closeAllSuppress; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.plugin.redis.util.RedisTestUtils.installRedisPlugin; -import static io.prestosql.plugin.redis.util.RedisTestUtils.loadTpchTableDescription; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.redis.util.RedisTestUtils.installRedisPlugin; +import static io.trino.plugin.redis.util.RedisTestUtils.loadTpchTableDescription; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Locale.ENGLISH; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestMinimalFunctionality.java b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestMinimalFunctionality.java index 88ae7ada5ee7..b1a421865ec8 100644 --- a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestMinimalFunctionality.java +++ b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestMinimalFunctionality.java @@ -14,16 +14,16 @@ package io.trino.plugin.redis; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.redis.util.JsonEncoder; -import io.prestosql.plugin.redis.util.RedisServer; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.BigintType; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.StandaloneQueryRunner; +import io.trino.Session; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.redis.util.JsonEncoder; +import io.trino.plugin.redis.util.RedisServer; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.BigintType; +import io.trino.testing.MaterializedResult; +import io.trino.testing.StandaloneQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; @@ -34,11 +34,11 @@ import java.util.Optional; import java.util.UUID; -import static io.prestosql.plugin.redis.util.RedisTestUtils.createEmptyTableDescription; -import static io.prestosql.plugin.redis.util.RedisTestUtils.installRedisPlugin; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.plugin.redis.util.RedisTestUtils.createEmptyTableDescription; +import static io.trino.plugin.redis.util.RedisTestUtils.installRedisPlugin; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; +import static io.trino.transaction.TransactionBuilder.transaction; import static org.testng.Assert.assertTrue; @Test(singleThreaded = true) diff --git a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisDistributed.java b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisDistributed.java index addfae9391c5..cc7e428d8611 100644 --- a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisDistributed.java +++ b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisDistributed.java @@ -14,9 +14,9 @@ package io.trino.plugin.redis; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.redis.util.RedisServer; -import io.prestosql.testing.AbstractTestQueries; -import io.prestosql.testing.QueryRunner; +import io.trino.plugin.redis.util.RedisServer; +import io.trino.testing.AbstractTestQueries; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; diff --git a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisDistributedHash.java b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisDistributedHash.java index 42ad27ebd760..27c38eb1c47a 100644 --- a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisDistributedHash.java +++ b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisDistributedHash.java @@ -14,14 +14,14 @@ package io.trino.plugin.redis; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.redis.util.RedisServer; -import io.prestosql.testing.AbstractTestQueries; -import io.prestosql.testing.QueryRunner; +import io.trino.plugin.redis.util.RedisServer; +import io.trino.testing.AbstractTestQueries; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; -import static io.prestosql.plugin.redis.RedisQueryRunner.createRedisQueryRunner; +import static io.trino.plugin.redis.RedisQueryRunner.createRedisQueryRunner; @Test public class TestRedisDistributedHash diff --git a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisIntegrationSmokeTest.java b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisIntegrationSmokeTest.java index 5c443d38abd3..d11d6cc40c85 100644 --- a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisIntegrationSmokeTest.java +++ b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisIntegrationSmokeTest.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.redis; -import io.prestosql.plugin.redis.util.RedisServer; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.QueryRunner; +import io.trino.plugin.redis.util.RedisServer; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; -import static io.prestosql.plugin.redis.RedisQueryRunner.createRedisQueryRunner; +import static io.trino.plugin.redis.RedisQueryRunner.createRedisQueryRunner; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.NATION; import static io.trino.tpch.TpchTable.ORDERS; diff --git a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisPlugin.java b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisPlugin.java index b95ac4762c3a..f7840e1c23b3 100644 --- a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisPlugin.java +++ b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisPlugin.java @@ -14,9 +14,9 @@ package io.trino.plugin.redis; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; diff --git a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestingRedisPlugin.java b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestingRedisPlugin.java index 03215608f940..3619f6d24991 100644 --- a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestingRedisPlugin.java +++ b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestingRedisPlugin.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.SchemaTableName; import java.util.Map; import java.util.Optional; diff --git a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/util/CodecSupplier.java b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/util/CodecSupplier.java index 5bd2b7dc5838..fc83cffe1338 100644 --- a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/util/CodecSupplier.java +++ b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/util/CodecSupplier.java @@ -19,9 +19,9 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeId; +import io.trino.metadata.Metadata; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeId; import java.util.function.Supplier; diff --git a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/util/RedisLoader.java b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/util/RedisLoader.java index 3ff84ec29dc6..4f9382d07529 100644 --- a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/util/RedisLoader.java +++ b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/util/RedisLoader.java @@ -14,17 +14,17 @@ package io.trino.plugin.redis.util; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.client.Column; -import io.prestosql.client.QueryData; -import io.prestosql.client.QueryStatusInfo; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.testing.AbstractTestingPrestoClient; -import io.prestosql.testing.ResultsSession; -import io.prestosql.util.DateTimeUtils; +import io.trino.Session; +import io.trino.client.Column; +import io.trino.client.QueryData; +import io.trino.client.QueryStatusInfo; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.type.TimeZoneKey; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.testing.AbstractTestingPrestoClient; +import io.trino.testing.ResultsSession; +import io.trino.util.DateTimeUtils; import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.ISODateTimeFormat; import redis.clients.jedis.Jedis; @@ -37,18 +37,18 @@ import java.util.concurrent.atomic.AtomicReference; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.operator.scalar.timestamp.VarcharToTimestampCast.castToShortTimestamp; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.util.DateTimeUtils.parseLegacyTime; +import static io.trino.operator.scalar.timestamp.VarcharToTimestampCast.castToShortTimestamp; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.util.DateTimeUtils.parseLegacyTime; import static java.util.Objects.requireNonNull; public class RedisLoader diff --git a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/util/RedisTestUtils.java b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/util/RedisTestUtils.java index dad3a1288ae9..4126b9d69931 100644 --- a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/util/RedisTestUtils.java +++ b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/util/RedisTestUtils.java @@ -17,12 +17,12 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.ByteStreams; import io.airlift.json.JsonCodec; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.plugin.redis.RedisTableDescription; -import io.prestosql.plugin.redis.TestingRedisPlugin; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.TestingPrestoClient; +import io.trino.metadata.QualifiedObjectName; +import io.trino.plugin.redis.RedisTableDescription; +import io.trino.plugin.redis.TestingRedisPlugin; +import io.trino.spi.connector.SchemaTableName; +import io.trino.testing.QueryRunner; +import io.trino.testing.TestingPrestoClient; import java.io.IOException; import java.io.InputStream; diff --git a/plugin/trino-redshift/src/main/java/io/trino/plugin/redshift/RedshiftClient.java b/plugin/trino-redshift/src/main/java/io/trino/plugin/redshift/RedshiftClient.java index 75b267474e2d..b0a1f42a65dd 100644 --- a/plugin/trino-redshift/src/main/java/io/trino/plugin/redshift/RedshiftClient.java +++ b/plugin/trino-redshift/src/main/java/io/trino/plugin/redshift/RedshiftClient.java @@ -13,18 +13,18 @@ */ package io.trino.plugin.redshift; -import io.prestosql.plugin.jdbc.BaseJdbcClient; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ColumnMapping; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.plugin.jdbc.WriteMapping; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.Type; +import io.trino.plugin.jdbc.BaseJdbcClient; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ColumnMapping; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.plugin.jdbc.WriteMapping; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.Type; import javax.inject.Inject; @@ -34,7 +34,7 @@ import java.util.Optional; import java.util.function.BiFunction; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; public class RedshiftClient diff --git a/plugin/trino-redshift/src/main/java/io/trino/plugin/redshift/RedshiftClientModule.java b/plugin/trino-redshift/src/main/java/io/trino/plugin/redshift/RedshiftClientModule.java index e48c7815cc54..38980ea8426d 100644 --- a/plugin/trino-redshift/src/main/java/io/trino/plugin/redshift/RedshiftClientModule.java +++ b/plugin/trino-redshift/src/main/java/io/trino/plugin/redshift/RedshiftClientModule.java @@ -18,12 +18,12 @@ import com.google.inject.Provides; import com.google.inject.Scopes; import com.google.inject.Singleton; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.DriverConnectionFactory; -import io.prestosql.plugin.jdbc.ForBaseJdbc; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.credential.CredentialProvider; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.DriverConnectionFactory; +import io.trino.plugin.jdbc.ForBaseJdbc; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.credential.CredentialProvider; import org.postgresql.Driver; public class RedshiftClientModule diff --git a/plugin/trino-redshift/src/main/java/io/trino/plugin/redshift/RedshiftPlugin.java b/plugin/trino-redshift/src/main/java/io/trino/plugin/redshift/RedshiftPlugin.java index 21ba54f6fddb..f3ec7ba6a2e4 100644 --- a/plugin/trino-redshift/src/main/java/io/trino/plugin/redshift/RedshiftPlugin.java +++ b/plugin/trino-redshift/src/main/java/io/trino/plugin/redshift/RedshiftPlugin.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.redshift; -import io.prestosql.plugin.jdbc.JdbcPlugin; +import io.trino.plugin.jdbc.JdbcPlugin; public class RedshiftPlugin extends JdbcPlugin diff --git a/plugin/trino-redshift/src/test/java/io/trino/plugin/redshift/TestRedshiftPlugin.java b/plugin/trino-redshift/src/test/java/io/trino/plugin/redshift/TestRedshiftPlugin.java index 30cd2c3f3d25..f5a13eae1039 100644 --- a/plugin/trino-redshift/src/test/java/io/trino/plugin/redshift/TestRedshiftPlugin.java +++ b/plugin/trino-redshift/src/test/java/io/trino/plugin/redshift/TestRedshiftPlugin.java @@ -14,9 +14,9 @@ package io.trino.plugin.redshift; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/AbstractResourceConfigurationManager.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/AbstractResourceConfigurationManager.java index a1a7b8939caa..29ea0cf7328f 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/AbstractResourceConfigurationManager.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/AbstractResourceConfigurationManager.java @@ -16,14 +16,14 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.memory.ClusterMemoryPoolManager; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.resourcegroups.QueryType; -import io.prestosql.spi.resourcegroups.ResourceGroup; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManager; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SelectionContext; +import io.trino.spi.PrestoException; +import io.trino.spi.memory.ClusterMemoryPoolManager; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.resourcegroups.QueryType; +import io.trino.spi.resourcegroups.ResourceGroup; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManager; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SelectionContext; import javax.annotation.concurrent.GuardedBy; @@ -38,7 +38,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verifyNotNull; -import static io.prestosql.spi.StandardErrorCode.INVALID_RESOURCE_GROUP; +import static io.trino.spi.StandardErrorCode.INVALID_RESOURCE_GROUP; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.function.Predicate.isEqual; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/FileResourceGroupConfigurationManager.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/FileResourceGroupConfigurationManager.java index a8ff16110b29..fc81298cacae 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/FileResourceGroupConfigurationManager.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/FileResourceGroupConfigurationManager.java @@ -21,10 +21,10 @@ import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; import io.airlift.units.Duration; -import io.prestosql.spi.memory.ClusterMemoryPoolManager; -import io.prestosql.spi.resourcegroups.ResourceGroup; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; +import io.trino.spi.memory.ClusterMemoryPoolManager; +import io.trino.spi.resourcegroups.ResourceGroup; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; import javax.inject.Inject; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/FileResourceGroupConfigurationManagerFactory.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/FileResourceGroupConfigurationManagerFactory.java index bb38a304308b..d1788b05a65e 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/FileResourceGroupConfigurationManagerFactory.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/FileResourceGroupConfigurationManagerFactory.java @@ -16,10 +16,10 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.memory.ClusterMemoryPoolManager; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManager; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerContext; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; +import io.trino.spi.memory.ClusterMemoryPoolManager; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManager; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerContext; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; import java.util.Map; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupIdTemplate.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupIdTemplate.java index dee8681ef709..d750aec25231 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupIdTemplate.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupIdTemplate.java @@ -17,7 +17,7 @@ import com.google.common.base.Joiner; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.ResourceGroupId; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupManagerPlugin.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupManagerPlugin.java index 2e42cd27e279..0f9db5017867 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupManagerPlugin.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupManagerPlugin.java @@ -14,9 +14,9 @@ package io.trino.plugin.resourcegroups; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.resourcegroups.db.DbResourceGroupConfigurationManagerFactory; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; +import io.trino.plugin.resourcegroups.db.DbResourceGroupConfigurationManagerFactory; +import io.trino.spi.Plugin; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; public class ResourceGroupManagerPlugin implements Plugin diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupSelector.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupSelector.java index a96cf2b37790..331a8cf41b71 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupSelector.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupSelector.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.resourcegroups; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; import java.util.Optional; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupSpec.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupSpec.java index ec214d0ba619..69cd80fab5ae 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupSpec.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/ResourceGroupSpec.java @@ -18,7 +18,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.spi.resourcegroups.SchedulingPolicy; +import io.trino.spi.resourcegroups.SchedulingPolicy; import java.util.HashSet; import java.util.List; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/SelectorResourceEstimate.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/SelectorResourceEstimate.java index c0a930a2605f..d92589a2c602 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/SelectorResourceEstimate.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/SelectorResourceEstimate.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.spi.session.ResourceEstimates; +import io.trino.spi.session.ResourceEstimates; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/StaticSelector.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/StaticSelector.java index 8edc72ee730f..5907d700d9ec 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/StaticSelector.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/StaticSelector.java @@ -17,9 +17,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; import java.util.HashMap; import java.util.HashSet; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbResourceGroupConfigurationManager.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbResourceGroupConfigurationManager.java index 32cecd47a196..70f82ce56995 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbResourceGroupConfigurationManager.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbResourceGroupConfigurationManager.java @@ -20,18 +20,18 @@ import io.airlift.log.Logger; import io.airlift.stats.CounterStat; import io.airlift.units.Duration; -import io.prestosql.plugin.resourcegroups.AbstractResourceConfigurationManager; -import io.prestosql.plugin.resourcegroups.ManagerSpec; -import io.prestosql.plugin.resourcegroups.ResourceGroupIdTemplate; -import io.prestosql.plugin.resourcegroups.ResourceGroupSelector; -import io.prestosql.plugin.resourcegroups.ResourceGroupSpec; -import io.prestosql.plugin.resourcegroups.SelectorSpec; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.memory.ClusterMemoryPoolManager; -import io.prestosql.spi.resourcegroups.ResourceGroup; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; +import io.trino.plugin.resourcegroups.AbstractResourceConfigurationManager; +import io.trino.plugin.resourcegroups.ManagerSpec; +import io.trino.plugin.resourcegroups.ResourceGroupIdTemplate; +import io.trino.plugin.resourcegroups.ResourceGroupSelector; +import io.trino.plugin.resourcegroups.ResourceGroupSpec; +import io.trino.plugin.resourcegroups.SelectorSpec; +import io.trino.spi.PrestoException; +import io.trino.spi.memory.ClusterMemoryPoolManager; +import io.trino.spi.resourcegroups.ResourceGroup; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; @@ -61,8 +61,8 @@ import static com.google.common.base.Preconditions.checkState; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.Duration.succinctNanos; -import static io.prestosql.spi.StandardErrorCode.CONFIGURATION_INVALID; -import static io.prestosql.spi.StandardErrorCode.CONFIGURATION_UNAVAILABLE; +import static io.trino.spi.StandardErrorCode.CONFIGURATION_INVALID; +import static io.trino.spi.StandardErrorCode.CONFIGURATION_UNAVAILABLE; import static java.util.Collections.synchronizedList; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbResourceGroupConfigurationManagerFactory.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbResourceGroupConfigurationManagerFactory.java index e0ee943cd8f3..61e3ac5ee11e 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbResourceGroupConfigurationManagerFactory.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbResourceGroupConfigurationManagerFactory.java @@ -16,12 +16,12 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.plugin.base.jmx.MBeanServerModule; -import io.prestosql.plugin.base.jmx.PrefixObjectNameGeneratorModule; -import io.prestosql.spi.memory.ClusterMemoryPoolManager; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManager; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerContext; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; +import io.trino.plugin.base.jmx.MBeanServerModule; +import io.trino.plugin.base.jmx.PrefixObjectNameGeneratorModule; +import io.trino.spi.memory.ClusterMemoryPoolManager; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManager; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerContext; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; import org.weakref.jmx.guice.MBeanModule; import java.util.Map; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbResourceGroupsModule.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbResourceGroupsModule.java index 9e08de5d4bd8..1a7a262d86d4 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbResourceGroupsModule.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbResourceGroupsModule.java @@ -16,7 +16,7 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManager; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManager; import static io.airlift.configuration.ConfigBinder.configBinder; import static org.weakref.jmx.guice.ExportBinder.newExporter; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbSourceExactMatchSelector.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbSourceExactMatchSelector.java index d9f150dab310..8009dcc38847 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbSourceExactMatchSelector.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/DbSourceExactMatchSelector.java @@ -15,11 +15,11 @@ import io.airlift.json.JsonCodec; import io.airlift.log.Logger; -import io.prestosql.plugin.resourcegroups.ResourceGroupIdTemplate; -import io.prestosql.plugin.resourcegroups.ResourceGroupSelector; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; +import io.trino.plugin.resourcegroups.ResourceGroupIdTemplate; +import io.trino.plugin.resourcegroups.ResourceGroupSelector; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; import org.jdbi.v3.core.JdbiException; import java.util.Optional; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/ResourceGroupSpecBuilder.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/ResourceGroupSpecBuilder.java index df1fbcf62fa7..0bc70653cb37 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/ResourceGroupSpecBuilder.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/ResourceGroupSpecBuilder.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.Duration; -import io.prestosql.plugin.resourcegroups.ResourceGroupNameTemplate; -import io.prestosql.plugin.resourcegroups.ResourceGroupSpec; +import io.trino.plugin.resourcegroups.ResourceGroupNameTemplate; +import io.trino.plugin.resourcegroups.ResourceGroupSpec; import org.jdbi.v3.core.mapper.RowMapper; import org.jdbi.v3.core.statement.StatementContext; diff --git a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/SelectorRecord.java b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/SelectorRecord.java index 9e6ad876f1d5..f8049a190780 100644 --- a/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/SelectorRecord.java +++ b/plugin/trino-resource-group-managers/src/main/java/io/trino/plugin/resourcegroups/db/SelectorRecord.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.json.JsonCodec; -import io.prestosql.plugin.resourcegroups.SelectorResourceEstimate; +import io.trino.plugin.resourcegroups.SelectorResourceEstimate; import org.jdbi.v3.core.mapper.RowMapper; import org.jdbi.v3.core.statement.StatementContext; diff --git a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestFileResourceGroupConfigurationManager.java b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestFileResourceGroupConfigurationManager.java index f5e22798833d..8608fd5a8d30 100644 --- a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestFileResourceGroupConfigurationManager.java +++ b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestFileResourceGroupConfigurationManager.java @@ -17,12 +17,12 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; -import io.prestosql.spi.memory.MemoryPoolInfo; -import io.prestosql.spi.resourcegroups.ResourceGroup; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; -import io.prestosql.spi.session.ResourceEstimates; +import io.trino.spi.memory.MemoryPoolInfo; +import io.trino.spi.resourcegroups.ResourceGroup; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; +import io.trino.spi.session.ResourceEstimates; import org.testng.annotations.Test; import java.time.Duration; @@ -31,12 +31,12 @@ import static com.google.common.io.Resources.getResource; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; -import static io.prestosql.plugin.resourcegroups.TestingResourceGroups.groupIdTemplate; -import static io.prestosql.plugin.resourcegroups.TestingResourceGroups.managerSpec; -import static io.prestosql.plugin.resourcegroups.TestingResourceGroups.resourceGroupSpec; -import static io.prestosql.plugin.resourcegroups.TestingResourceGroups.selectorSpec; -import static io.prestosql.spi.resourcegroups.SchedulingPolicy.WEIGHTED; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.plugin.resourcegroups.TestingResourceGroups.groupIdTemplate; +import static io.trino.plugin.resourcegroups.TestingResourceGroups.managerSpec; +import static io.trino.plugin.resourcegroups.TestingResourceGroups.resourceGroupSpec; +import static io.trino.plugin.resourcegroups.TestingResourceGroups.selectorSpec; +import static io.trino.spi.resourcegroups.SchedulingPolicy.WEIGHTED; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestResourceGroupIdTemplate.java b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestResourceGroupIdTemplate.java index fc09cc54fe62..027731f6322d 100644 --- a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestResourceGroupIdTemplate.java +++ b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestResourceGroupIdTemplate.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; -import io.prestosql.spi.session.ResourceEstimates; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; +import io.trino.spi.session.ResourceEstimates; import org.testng.annotations.Test; import java.util.Optional; diff --git a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestStaticSelector.java b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestStaticSelector.java index 345c888cfe43..0076c6d2c8f7 100644 --- a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestStaticSelector.java +++ b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestStaticSelector.java @@ -17,11 +17,11 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.plugin.resourcegroups.SelectorResourceEstimate.Range; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; -import io.prestosql.spi.session.ResourceEstimates; +import io.trino.plugin.resourcegroups.SelectorResourceEstimate.Range; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; +import io.trino.spi.session.ResourceEstimates; import org.testng.annotations.Test; import java.util.Optional; diff --git a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestingResourceGroup.java b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestingResourceGroup.java index 58f90d1101a0..8c34e745baff 100644 --- a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestingResourceGroup.java +++ b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/TestingResourceGroup.java @@ -13,9 +13,9 @@ */ package io.trino.plugin.resourcegroups; -import io.prestosql.spi.resourcegroups.ResourceGroup; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SchedulingPolicy; +import io.trino.spi.resourcegroups.ResourceGroup; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SchedulingPolicy; import java.time.Duration; diff --git a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestDbResourceGroupConfigurationManager.java b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestDbResourceGroupConfigurationManager.java index 1bf1ccafdaff..2dd648e4b6ca 100644 --- a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestDbResourceGroupConfigurationManager.java +++ b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestDbResourceGroupConfigurationManager.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; -import io.prestosql.execution.resourcegroups.InternalResourceGroup; -import io.prestosql.plugin.resourcegroups.ResourceGroupIdTemplate; -import io.prestosql.plugin.resourcegroups.ResourceGroupSelector; -import io.prestosql.plugin.resourcegroups.ResourceGroupSpec; -import io.prestosql.plugin.resourcegroups.StaticSelector; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SchedulingPolicy; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; -import io.prestosql.spi.session.ResourceEstimates; +import io.trino.execution.resourcegroups.InternalResourceGroup; +import io.trino.plugin.resourcegroups.ResourceGroupIdTemplate; +import io.trino.plugin.resourcegroups.ResourceGroupSelector; +import io.trino.plugin.resourcegroups.ResourceGroupSpec; +import io.trino.plugin.resourcegroups.StaticSelector; +import io.trino.spi.PrestoException; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SchedulingPolicy; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; +import io.trino.spi.session.ResourceEstimates; import org.jdbi.v3.core.statement.UnableToExecuteStatementException; import org.testng.annotations.Test; @@ -39,9 +39,9 @@ import java.util.regex.Pattern; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; -import static io.prestosql.execution.resourcegroups.InternalResourceGroup.DEFAULT_WEIGHT; -import static io.prestosql.spi.resourcegroups.SchedulingPolicy.FAIR; -import static io.prestosql.spi.resourcegroups.SchedulingPolicy.WEIGHTED; +import static io.trino.execution.resourcegroups.InternalResourceGroup.DEFAULT_WEIGHT; +import static io.trino.spi.resourcegroups.SchedulingPolicy.FAIR; +import static io.trino.spi.resourcegroups.SchedulingPolicy.WEIGHTED; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestDbSourceExactMatchSelector.java b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestDbSourceExactMatchSelector.java index 2c7a2b04fca2..515d28135dc4 100644 --- a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestDbSourceExactMatchSelector.java +++ b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestDbSourceExactMatchSelector.java @@ -16,19 +16,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.airlift.json.JsonCodec; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.resourcegroups.SelectionContext; -import io.prestosql.spi.resourcegroups.SelectionCriteria; -import io.prestosql.spi.session.ResourceEstimates; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.resourcegroups.SelectionContext; +import io.trino.spi.resourcegroups.SelectionCriteria; +import io.trino.spi.session.ResourceEstimates; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Optional; import java.util.concurrent.ThreadLocalRandom; -import static io.prestosql.spi.resourcegroups.QueryType.DELETE; -import static io.prestosql.spi.resourcegroups.QueryType.INSERT; -import static io.prestosql.spi.resourcegroups.QueryType.SELECT; +import static io.trino.spi.resourcegroups.QueryType.DELETE; +import static io.trino.spi.resourcegroups.QueryType.INSERT; +import static io.trino.spi.resourcegroups.QueryType.SELECT; import static org.testng.Assert.assertEquals; public class TestDbSourceExactMatchSelector diff --git a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestResourceGroupsDao.java b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestResourceGroupsDao.java index f31f65d5465a..089f4d479880 100644 --- a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestResourceGroupsDao.java +++ b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestResourceGroupsDao.java @@ -17,10 +17,10 @@ import io.airlift.json.JsonCodec; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.plugin.resourcegroups.ResourceGroupNameTemplate; -import io.prestosql.plugin.resourcegroups.SelectorResourceEstimate; -import io.prestosql.plugin.resourcegroups.SelectorResourceEstimate.Range; -import io.prestosql.spi.resourcegroups.ResourceGroupId; +import io.trino.plugin.resourcegroups.ResourceGroupNameTemplate; +import io.trino.plugin.resourcegroups.SelectorResourceEstimate; +import io.trino.plugin.resourcegroups.SelectorResourceEstimate.Range; +import io.trino.spi.resourcegroups.ResourceGroupId; import org.jdbi.v3.core.statement.UnableToExecuteStatementException; import org.testng.annotations.Test; @@ -33,10 +33,10 @@ import static io.airlift.json.JsonCodec.jsonCodec; import static io.airlift.json.JsonCodec.listJsonCodec; -import static io.prestosql.spi.resourcegroups.QueryType.DELETE; -import static io.prestosql.spi.resourcegroups.QueryType.EXPLAIN; -import static io.prestosql.spi.resourcegroups.QueryType.INSERT; -import static io.prestosql.spi.resourcegroups.QueryType.SELECT; +import static io.trino.spi.resourcegroups.QueryType.DELETE; +import static io.trino.spi.resourcegroups.QueryType.EXPLAIN; +import static io.trino.spi.resourcegroups.QueryType.INSERT; +import static io.trino.spi.resourcegroups.QueryType.SELECT; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/AbstractSessionPropertyManager.java b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/AbstractSessionPropertyManager.java index 1834528618cb..383e76c0c3f7 100644 --- a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/AbstractSessionPropertyManager.java +++ b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/AbstractSessionPropertyManager.java @@ -14,8 +14,8 @@ package io.trino.plugin.session; import com.google.common.collect.Table; -import io.prestosql.spi.session.SessionConfigurationContext; -import io.prestosql.spi.session.SessionPropertyConfigurationManager; +import io.trino.spi.session.SessionConfigurationContext; +import io.trino.spi.session.SessionPropertyConfigurationManager; import java.util.HashMap; import java.util.List; diff --git a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/SessionMatchSpec.java b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/SessionMatchSpec.java index 486b6fa36194..00e8e21baed5 100644 --- a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/SessionMatchSpec.java +++ b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/SessionMatchSpec.java @@ -19,7 +19,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.session.SessionConfigurationContext; +import io.trino.spi.session.SessionConfigurationContext; import org.jdbi.v3.core.mapper.RowMapper; import org.jdbi.v3.core.statement.StatementContext; diff --git a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/SessionPropertyConfigurationManagerPlugin.java b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/SessionPropertyConfigurationManagerPlugin.java index 253f5cc2fbd7..ff79296bd14f 100644 --- a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/SessionPropertyConfigurationManagerPlugin.java +++ b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/SessionPropertyConfigurationManagerPlugin.java @@ -14,10 +14,10 @@ package io.trino.plugin.session; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.session.db.DbSessionPropertyManagerFactory; -import io.prestosql.plugin.session.file.FileSessionPropertyManagerFactory; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.session.SessionPropertyConfigurationManagerFactory; +import io.trino.plugin.session.db.DbSessionPropertyManagerFactory; +import io.trino.plugin.session.file.FileSessionPropertyManagerFactory; +import io.trino.spi.Plugin; +import io.trino.spi.session.SessionPropertyConfigurationManagerFactory; public class SessionPropertyConfigurationManagerPlugin implements Plugin diff --git a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/DbSessionPropertyManager.java b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/DbSessionPropertyManager.java index 1ab79b2c3147..fba2b035dced 100644 --- a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/DbSessionPropertyManager.java +++ b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/DbSessionPropertyManager.java @@ -14,10 +14,10 @@ package io.trino.plugin.session.db; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.session.AbstractSessionPropertyManager; -import io.prestosql.plugin.session.SessionMatchSpec; -import io.prestosql.spi.session.SessionConfigurationContext; -import io.prestosql.spi.session.SessionPropertyConfigurationManager; +import io.trino.plugin.session.AbstractSessionPropertyManager; +import io.trino.plugin.session.SessionMatchSpec; +import io.trino.spi.session.SessionConfigurationContext; +import io.trino.spi.session.SessionPropertyConfigurationManager; import javax.inject.Inject; diff --git a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/DbSessionPropertyManagerFactory.java b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/DbSessionPropertyManagerFactory.java index 13acc358e35d..859cc77f50c8 100644 --- a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/DbSessionPropertyManagerFactory.java +++ b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/DbSessionPropertyManagerFactory.java @@ -16,10 +16,10 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.plugin.base.jmx.MBeanServerModule; -import io.prestosql.spi.resourcegroups.SessionPropertyConfigurationManagerContext; -import io.prestosql.spi.session.SessionPropertyConfigurationManager; -import io.prestosql.spi.session.SessionPropertyConfigurationManagerFactory; +import io.trino.plugin.base.jmx.MBeanServerModule; +import io.trino.spi.resourcegroups.SessionPropertyConfigurationManagerContext; +import io.trino.spi.session.SessionPropertyConfigurationManager; +import io.trino.spi.session.SessionPropertyConfigurationManagerFactory; import org.weakref.jmx.guice.MBeanModule; import java.util.Map; diff --git a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/DbSpecsProvider.java b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/DbSpecsProvider.java index 59422b9e8802..2330435a4fa7 100644 --- a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/DbSpecsProvider.java +++ b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/DbSpecsProvider.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.session.db; -import io.prestosql.plugin.session.SessionMatchSpec; +import io.trino.plugin.session.SessionMatchSpec; import java.util.List; import java.util.function.Supplier; diff --git a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/RefreshingDbSpecsProvider.java b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/RefreshingDbSpecsProvider.java index e93c3a44a810..b3794a3de677 100644 --- a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/RefreshingDbSpecsProvider.java +++ b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/RefreshingDbSpecsProvider.java @@ -17,7 +17,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; import io.airlift.stats.CounterStat; -import io.prestosql.plugin.session.SessionMatchSpec; +import io.trino.plugin.session.SessionMatchSpec; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; diff --git a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/SessionPropertiesDao.java b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/SessionPropertiesDao.java index 33e4a4ff5035..ab41562d1b05 100644 --- a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/SessionPropertiesDao.java +++ b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/db/SessionPropertiesDao.java @@ -14,7 +14,7 @@ package io.trino.plugin.session.db; import com.google.common.annotations.VisibleForTesting; -import io.prestosql.plugin.session.SessionMatchSpec; +import io.trino.plugin.session.SessionMatchSpec; import org.jdbi.v3.sqlobject.customizer.Bind; import org.jdbi.v3.sqlobject.statement.SqlQuery; import org.jdbi.v3.sqlobject.statement.SqlUpdate; @@ -22,9 +22,9 @@ import java.util.List; -import static io.prestosql.plugin.session.db.util.SessionPropertiesDaoUtil.CLIENT_TAGS_TABLE; -import static io.prestosql.plugin.session.db.util.SessionPropertiesDaoUtil.PROPERTIES_TABLE; -import static io.prestosql.plugin.session.db.util.SessionPropertiesDaoUtil.SESSION_SPECS_TABLE; +import static io.trino.plugin.session.db.util.SessionPropertiesDaoUtil.CLIENT_TAGS_TABLE; +import static io.trino.plugin.session.db.util.SessionPropertiesDaoUtil.PROPERTIES_TABLE; +import static io.trino.plugin.session.db.util.SessionPropertiesDaoUtil.SESSION_SPECS_TABLE; /** * Dao should guarantee that the list of SessionMatchSpecs is returned in increasing order of priority. i.e. if two diff --git a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/file/FileSessionPropertyManager.java b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/file/FileSessionPropertyManager.java index 027ce4b5e4c5..5891cbef0873 100644 --- a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/file/FileSessionPropertyManager.java +++ b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/file/FileSessionPropertyManager.java @@ -19,8 +19,8 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.plugin.session.AbstractSessionPropertyManager; -import io.prestosql.plugin.session.SessionMatchSpec; +import io.trino.plugin.session.AbstractSessionPropertyManager; +import io.trino.plugin.session.SessionMatchSpec; import javax.inject.Inject; diff --git a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/file/FileSessionPropertyManagerFactory.java b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/file/FileSessionPropertyManagerFactory.java index 1e88b751f133..cac58b46497b 100644 --- a/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/file/FileSessionPropertyManagerFactory.java +++ b/plugin/trino-session-property-managers/src/main/java/io/trino/plugin/session/file/FileSessionPropertyManagerFactory.java @@ -16,9 +16,9 @@ import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; -import io.prestosql.spi.resourcegroups.SessionPropertyConfigurationManagerContext; -import io.prestosql.spi.session.SessionPropertyConfigurationManager; -import io.prestosql.spi.session.SessionPropertyConfigurationManagerFactory; +import io.trino.spi.resourcegroups.SessionPropertyConfigurationManagerContext; +import io.trino.spi.session.SessionPropertyConfigurationManager; +import io.trino.spi.session.SessionPropertyConfigurationManagerFactory; import java.util.Map; diff --git a/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/AbstractTestSessionPropertyManager.java b/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/AbstractTestSessionPropertyManager.java index 580bed561383..e22deb89c0a5 100644 --- a/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/AbstractTestSessionPropertyManager.java +++ b/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/AbstractTestSessionPropertyManager.java @@ -16,9 +16,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.resourcegroups.QueryType; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.session.SessionConfigurationContext; +import io.trino.spi.resourcegroups.QueryType; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.session.SessionConfigurationContext; import org.testng.annotations.Test; import java.util.Map; diff --git a/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/db/TestDbSessionPropertyManager.java b/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/db/TestDbSessionPropertyManager.java index d8519d4774f2..46f8c113ba5c 100644 --- a/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/db/TestDbSessionPropertyManager.java +++ b/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/db/TestDbSessionPropertyManager.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.session.AbstractTestSessionPropertyManager; -import io.prestosql.plugin.session.SessionMatchSpec; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.session.SessionConfigurationContext; +import io.trino.plugin.session.AbstractTestSessionPropertyManager; +import io.trino.plugin.session.SessionMatchSpec; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.session.SessionConfigurationContext; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; diff --git a/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/db/TestDbSessionPropertyManagerIntegration.java b/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/db/TestDbSessionPropertyManagerIntegration.java index 8a7e30665012..873e1a48c123 100644 --- a/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/db/TestDbSessionPropertyManagerIntegration.java +++ b/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/db/TestDbSessionPropertyManagerIntegration.java @@ -24,19 +24,19 @@ import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.execution.QueryIdGenerator; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.resourcegroups.SessionPropertyConfigurationManagerContext; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.session.SessionPropertyConfigurationManager; -import io.prestosql.spi.session.SessionPropertyConfigurationManagerFactory; -import io.prestosql.sql.SqlPath; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.execution.QueryIdGenerator; +import io.trino.execution.QueryManagerConfig; +import io.trino.metadata.SessionPropertyManager; +import io.trino.spi.Plugin; +import io.trino.spi.resourcegroups.SessionPropertyConfigurationManagerContext; +import io.trino.spi.security.Identity; +import io.trino.spi.session.SessionPropertyConfigurationManager; +import io.trino.spi.session.SessionPropertyConfigurationManagerFactory; +import io.trino.sql.SqlPath; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; import org.jdbi.v3.core.Jdbi; import org.jdbi.v3.sqlobject.SqlObjectPlugin; import org.testng.annotations.AfterClass; @@ -50,7 +50,7 @@ import static com.google.common.collect.MoreCollectors.onlyElement; import static io.airlift.configuration.ConfigBinder.configBinder; -import static io.prestosql.testing.TestingSession.DEFAULT_TIME_ZONE_KEY; +import static io.trino.testing.TestingSession.DEFAULT_TIME_ZONE_KEY; import static java.util.Collections.emptyMap; import static java.util.Locale.ENGLISH; import static java.util.concurrent.TimeUnit.DAYS; diff --git a/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/db/TestingDbSpecsProvider.java b/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/db/TestingDbSpecsProvider.java index 8536bca44b4b..0b49d396f84f 100644 --- a/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/db/TestingDbSpecsProvider.java +++ b/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/db/TestingDbSpecsProvider.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; -import io.prestosql.plugin.session.SessionMatchSpec; +import io.trino.plugin.session.SessionMatchSpec; import javax.annotation.PreDestroy; import javax.inject.Inject; diff --git a/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/file/TestFileSessionPropertyManager.java b/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/file/TestFileSessionPropertyManager.java index 9e9bd61ffe27..e4f911644b00 100644 --- a/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/file/TestFileSessionPropertyManager.java +++ b/plugin/trino-session-property-managers/src/test/java/io/trino/plugin/session/file/TestFileSessionPropertyManager.java @@ -15,9 +15,9 @@ package io.trino.plugin.session.file; import io.airlift.testing.TempFile; -import io.prestosql.plugin.session.AbstractTestSessionPropertyManager; -import io.prestosql.plugin.session.SessionMatchSpec; -import io.prestosql.spi.session.SessionPropertyConfigurationManager; +import io.trino.plugin.session.AbstractTestSessionPropertyManager; +import io.trino.plugin.session.SessionMatchSpec; +import io.trino.spi.session.SessionPropertyConfigurationManager; import java.io.IOException; import java.nio.file.Files; @@ -25,7 +25,7 @@ import java.util.Arrays; import java.util.Map; -import static io.prestosql.plugin.session.file.FileSessionPropertyManager.CODEC; +import static io.trino.plugin.session.file.FileSessionPropertyManager.CODEC; import static org.testng.Assert.assertEquals; public class TestFileSessionPropertyManager diff --git a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementAvgBigint.java b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementAvgBigint.java index e468eb854b68..00450c3fbf45 100644 --- a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementAvgBigint.java +++ b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementAvgBigint.java @@ -13,28 +13,28 @@ */ package io.trino.plugin.sqlserver; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRule; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.Variable; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.plugin.jdbc.expression.AggregateFunctionRule; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.Variable; import java.sql.Types; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.variable; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.matching.Capture.newCapture; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.variable; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.String.format; public class ImplementAvgBigint diff --git a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerStddevPop.java b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerStddevPop.java index de68386ca1f4..4071064bb721 100644 --- a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerStddevPop.java +++ b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerStddevPop.java @@ -13,26 +13,26 @@ */ package io.trino.plugin.sqlserver; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRule; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.type.DoubleType; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.expression.AggregateFunctionRule; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.Variable; +import io.trino.spi.type.DoubleType; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.variable; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.matching.Capture.newCapture; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.variable; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.String.format; public class ImplementSqlServerStddevPop diff --git a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerStdev.java b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerStdev.java index 80ed0771e2a5..716113310b54 100644 --- a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerStdev.java +++ b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerStdev.java @@ -14,27 +14,27 @@ package io.trino.plugin.sqlserver; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRule; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.type.DoubleType; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.expression.AggregateFunctionRule; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.Variable; +import io.trino.spi.type.DoubleType; import java.util.List; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.variable; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.matching.Capture.newCapture; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.variable; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.String.format; public class ImplementSqlServerStdev diff --git a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerVariance.java b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerVariance.java index 98d4fb48cb49..317f9f41c7ec 100644 --- a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerVariance.java +++ b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerVariance.java @@ -14,27 +14,27 @@ package io.trino.plugin.sqlserver; import com.google.common.collect.ImmutableList; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRule; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.type.DoubleType; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.expression.AggregateFunctionRule; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.Variable; +import io.trino.spi.type.DoubleType; import java.util.List; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.variable; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.matching.Capture.newCapture; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.variable; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.String.format; public class ImplementSqlServerVariance diff --git a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerVariancePop.java b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerVariancePop.java index 82fb1156c367..2f59c9356b85 100644 --- a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerVariancePop.java +++ b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/ImplementSqlServerVariancePop.java @@ -13,26 +13,26 @@ */ package io.trino.plugin.sqlserver; -import io.prestosql.matching.Capture; -import io.prestosql.matching.Captures; -import io.prestosql.matching.Pattern; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRule; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.expression.Variable; -import io.prestosql.spi.type.DoubleType; +import io.trino.matching.Capture; +import io.trino.matching.Captures; +import io.trino.matching.Pattern; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.expression.AggregateFunctionRule; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.expression.Variable; +import io.trino.spi.type.DoubleType; import java.util.Optional; import static com.google.common.base.Verify.verify; -import static io.prestosql.matching.Capture.newCapture; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; -import static io.prestosql.plugin.jdbc.expression.AggregateFunctionPatterns.variable; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.matching.Capture.newCapture; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.basicAggregation; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.expressionType; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.functionName; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.singleInput; +import static io.trino.plugin.jdbc.expression.AggregateFunctionPatterns.variable; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.String.format; public class ImplementSqlServerVariancePop diff --git a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerClient.java b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerClient.java index 040189517ead..163bc67b4f34 100644 --- a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerClient.java +++ b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerClient.java @@ -18,37 +18,37 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; -import io.prestosql.plugin.jdbc.BaseJdbcClient; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ColumnMapping; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcTableHandle; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.plugin.jdbc.RemoteTableName; -import io.prestosql.plugin.jdbc.SliceWriteFunction; -import io.prestosql.plugin.jdbc.WriteMapping; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRewriter; -import io.prestosql.plugin.jdbc.expression.AggregateFunctionRule; -import io.prestosql.plugin.jdbc.expression.ImplementAvgDecimal; -import io.prestosql.plugin.jdbc.expression.ImplementAvgFloatingPoint; -import io.prestosql.plugin.jdbc.expression.ImplementCount; -import io.prestosql.plugin.jdbc.expression.ImplementCountAll; -import io.prestosql.plugin.jdbc.expression.ImplementMinMax; -import io.prestosql.plugin.jdbc.expression.ImplementSum; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.jdbc.BaseJdbcClient; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ColumnMapping; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcTableHandle; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.plugin.jdbc.RemoteTableName; +import io.trino.plugin.jdbc.SliceWriteFunction; +import io.trino.plugin.jdbc.WriteMapping; +import io.trino.plugin.jdbc.expression.AggregateFunctionRewriter; +import io.trino.plugin.jdbc.expression.AggregateFunctionRule; +import io.trino.plugin.jdbc.expression.ImplementAvgDecimal; +import io.trino.plugin.jdbc.expression.ImplementAvgFloatingPoint; +import io.trino.plugin.jdbc.expression.ImplementCount; +import io.trino.plugin.jdbc.expression.ImplementCountAll; +import io.trino.plugin.jdbc.expression.ImplementMinMax; +import io.trino.plugin.jdbc.expression.ImplementSum; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import org.jdbi.v3.core.Handle; import org.jdbi.v3.core.Jdbi; @@ -65,45 +65,45 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.Slices.wrappedBuffer; -import static io.prestosql.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; -import static io.prestosql.plugin.jdbc.PredicatePushdownController.FULL_PUSHDOWN; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.booleanColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.booleanWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.charWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.dateColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.dateWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.decimalColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.defaultCharColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.defaultVarcharColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.doubleColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.doubleWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.integerWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.realColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.timeColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.timestampColumnMappingUsingSqlTimestamp; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.tinyintColumnMapping; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; -import static io.prestosql.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; -import static io.prestosql.plugin.sqlserver.SqlServerTableProperties.DATA_COMPRESSION; -import static io.prestosql.plugin.sqlserver.SqlServerTableProperties.getDataCompression; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeType.TIME; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.plugin.jdbc.JdbcErrorCode.JDBC_ERROR; +import static io.trino.plugin.jdbc.PredicatePushdownController.DISABLE_PUSHDOWN; +import static io.trino.plugin.jdbc.PredicatePushdownController.FULL_PUSHDOWN; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.bigintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.booleanColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.booleanWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.charWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.dateColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.dateWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.decimalColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.defaultCharColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.defaultVarcharColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.doubleColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.doubleWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.integerWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.realColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.smallintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.timeColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.timestampColumnMappingUsingSqlTimestamp; +import static io.trino.plugin.jdbc.StandardColumnMappings.tinyintColumnMapping; +import static io.trino.plugin.jdbc.StandardColumnMappings.tinyintWriteFunction; +import static io.trino.plugin.jdbc.StandardColumnMappings.varcharWriteFunction; +import static io.trino.plugin.sqlserver.SqlServerTableProperties.DATA_COMPRESSION; +import static io.trino.plugin.sqlserver.SqlServerTableProperties.getDataCompression; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeType.TIME; +import static io.trino.spi.type.TimestampType.TIMESTAMP; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.lang.Math.max; import static java.lang.String.format; import static java.lang.String.join; diff --git a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerClientModule.java b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerClientModule.java index 16b1e1515010..6e6e39231fe0 100644 --- a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerClientModule.java +++ b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerClientModule.java @@ -20,17 +20,17 @@ import com.google.inject.Scopes; import com.google.inject.Singleton; import com.microsoft.sqlserver.jdbc.SQLServerDriver; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ConnectionFactory; -import io.prestosql.plugin.jdbc.DriverConnectionFactory; -import io.prestosql.plugin.jdbc.ForBaseJdbc; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.MaxDomainCompactionThreshold; -import io.prestosql.plugin.jdbc.credential.CredentialProvider; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ConnectionFactory; +import io.trino.plugin.jdbc.DriverConnectionFactory; +import io.trino.plugin.jdbc.ForBaseJdbc; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.MaxDomainCompactionThreshold; +import io.trino.plugin.jdbc.credential.CredentialProvider; import static com.google.inject.multibindings.OptionalBinder.newOptionalBinder; -import static io.prestosql.plugin.jdbc.JdbcModule.bindTablePropertiesProvider; -import static io.prestosql.plugin.sqlserver.SqlServerClient.SQL_SERVER_MAX_LIST_EXPRESSIONS; +import static io.trino.plugin.jdbc.JdbcModule.bindTablePropertiesProvider; +import static io.trino.plugin.sqlserver.SqlServerClient.SQL_SERVER_MAX_LIST_EXPRESSIONS; public class SqlServerClientModule implements Module diff --git a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerPlugin.java b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerPlugin.java index 84b854e4e810..13ab51ac3aec 100644 --- a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerPlugin.java +++ b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerPlugin.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.sqlserver; -import io.prestosql.plugin.jdbc.JdbcPlugin; +import io.trino.plugin.jdbc.JdbcPlugin; public class SqlServerPlugin extends JdbcPlugin diff --git a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerTableProperties.java b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerTableProperties.java index dc1a07e79196..440b18efb134 100644 --- a/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerTableProperties.java +++ b/plugin/trino-sqlserver/src/main/java/io/trino/plugin/sqlserver/SqlServerTableProperties.java @@ -14,14 +14,14 @@ package io.trino.plugin.sqlserver; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.jdbc.TablePropertiesProvider; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.plugin.jdbc.TablePropertiesProvider; +import io.trino.spi.session.PropertyMetadata; import java.util.List; import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.session.PropertyMetadata.enumProperty; +import static io.trino.spi.session.PropertyMetadata.enumProperty; public class SqlServerTableProperties implements TablePropertiesProvider diff --git a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/SqlServerQueryRunner.java b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/SqlServerQueryRunner.java index d333d743e45e..948f401fbd03 100644 --- a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/SqlServerQueryRunner.java +++ b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/SqlServerQueryRunner.java @@ -18,12 +18,12 @@ import com.google.common.collect.Streams; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.spi.security.Identity; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.metadata.QualifiedObjectName; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.spi.security.Identity; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import java.util.HashMap; @@ -32,9 +32,9 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTable; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTable; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Locale.ENGLISH; public final class SqlServerQueryRunner diff --git a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerClient.java b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerClient.java index cd254db9a415..4a6e40973153 100644 --- a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerClient.java +++ b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerClient.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.sqlserver; -import io.prestosql.plugin.jdbc.BaseJdbcConfig; -import io.prestosql.plugin.jdbc.ColumnMapping; -import io.prestosql.plugin.jdbc.JdbcClient; -import io.prestosql.plugin.jdbc.JdbcColumnHandle; -import io.prestosql.plugin.jdbc.JdbcExpression; -import io.prestosql.plugin.jdbc.JdbcTypeHandle; -import io.prestosql.spi.connector.AggregateFunction; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.expression.Variable; +import io.trino.plugin.jdbc.BaseJdbcConfig; +import io.trino.plugin.jdbc.ColumnMapping; +import io.trino.plugin.jdbc.JdbcClient; +import io.trino.plugin.jdbc.JdbcColumnHandle; +import io.trino.plugin.jdbc.JdbcExpression; +import io.trino.plugin.jdbc.JdbcTypeHandle; +import io.trino.spi.connector.AggregateFunction; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.expression.Variable; import org.testng.annotations.Test; import java.sql.Types; @@ -30,11 +30,11 @@ import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.testing.TestingConnectorSession.SESSION; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.testing.TestingConnectorSession.SESSION; +import static io.trino.testing.assertions.Assert.assertEquals; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerDistributedQueries.java b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerDistributedQueries.java index 0049a8feac1b..6eaeba6e0197 100644 --- a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerDistributedQueries.java +++ b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerDistributedQueries.java @@ -14,16 +14,16 @@ package io.trino.plugin.sqlserver; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestDistributedQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.AbstractTestDistributedQueries; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.TestTable; import io.trino.tpch.TpchTable; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; import java.util.Optional; -import static io.prestosql.plugin.sqlserver.SqlServerQueryRunner.createSqlServerQueryRunner; +import static io.trino.plugin.sqlserver.SqlServerQueryRunner.createSqlServerQueryRunner; @Test public class TestSqlServerDistributedQueries diff --git a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerIntegrationSmokeTest.java b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerIntegrationSmokeTest.java index 1d882e9b5b43..d01b9b139714 100644 --- a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerIntegrationSmokeTest.java +++ b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerIntegrationSmokeTest.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.TestTable; +import io.trino.Session; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.TestTable; import org.testng.annotations.AfterClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import static io.prestosql.plugin.sqlserver.DataCompression.NONE; -import static io.prestosql.plugin.sqlserver.DataCompression.PAGE; -import static io.prestosql.plugin.sqlserver.DataCompression.ROW; -import static io.prestosql.plugin.sqlserver.SqlServerQueryRunner.createSqlServerQueryRunner; -import static io.prestosql.testing.sql.TestTable.randomTableSuffix; +import static io.trino.plugin.sqlserver.DataCompression.NONE; +import static io.trino.plugin.sqlserver.DataCompression.PAGE; +import static io.trino.plugin.sqlserver.DataCompression.ROW; +import static io.trino.plugin.sqlserver.SqlServerQueryRunner.createSqlServerQueryRunner; +import static io.trino.testing.sql.TestTable.randomTableSuffix; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.NATION; import static io.trino.tpch.TpchTable.ORDERS; diff --git a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerPlugin.java b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerPlugin.java index def4b45146cd..b683528dd715 100644 --- a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerPlugin.java +++ b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerPlugin.java @@ -14,9 +14,9 @@ package io.trino.plugin.sqlserver; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; diff --git a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerTypeMapping.java b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerTypeMapping.java index 5f4f24ea40d3..add0abbe2be8 100644 --- a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerTypeMapping.java +++ b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerTypeMapping.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.datatype.CreateAsSelectDataSetup; -import io.prestosql.testing.datatype.DataSetup; -import io.prestosql.testing.datatype.SqlDataTypeTest; -import io.prestosql.testing.sql.PrestoSqlExecutor; +import io.trino.Session; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; +import io.trino.testing.datatype.CreateAsSelectDataSetup; +import io.trino.testing.datatype.DataSetup; +import io.trino.testing.datatype.SqlDataTypeTest; +import io.trino.testing.sql.PrestoSqlExecutor; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; -import static io.prestosql.plugin.sqlserver.SqlServerQueryRunner.createSqlServerQueryRunner; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; +import static io.trino.plugin.sqlserver.SqlServerQueryRunner.createSqlServerQueryRunner; +import static io.trino.spi.type.VarbinaryType.VARBINARY; public class TestSqlServerTypeMapping extends AbstractTestQueryFramework diff --git a/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/TeradataDateFunctions.java b/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/TeradataDateFunctions.java index 34a18aa64c14..08e37f680e10 100644 --- a/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/TeradataDateFunctions.java +++ b/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/TeradataDateFunctions.java @@ -15,15 +15,15 @@ import io.airlift.concurrent.ThreadLocalCache; import io.airlift.slice.Slice; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.LiteralParameters; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.LongTimestampWithTimeZone; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.function.Description; +import io.trino.spi.function.LiteralParameters; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.LongTimestampWithTimeZone; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.TimeZoneKey; import org.joda.time.DateTimeZone; import org.joda.time.chrono.ISOChronology; import org.joda.time.format.DateTimeFormatter; @@ -32,14 +32,14 @@ import static com.google.common.base.Throwables.throwIfInstanceOf; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; -import static io.prestosql.spi.type.DateTimeEncoding.unpackMillisUtc; -import static io.prestosql.spi.type.DateTimeEncoding.unpackZoneKey; -import static io.prestosql.spi.type.TimeZoneKey.MAX_TIME_ZONE_KEY; -import static io.prestosql.spi.type.TimeZoneKey.getTimeZoneKeys; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.teradata.functions.dateformat.DateFormatParser.createDateTimeFormatter; +import static io.trino.plugin.teradata.functions.dateformat.DateFormatParser.createDateTimeFormatter; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.type.DateTimeEncoding.unpackMillisUtc; +import static io.trino.spi.type.DateTimeEncoding.unpackZoneKey; +import static io.trino.spi.type.TimeZoneKey.MAX_TIME_ZONE_KEY; +import static io.trino.spi.type.TimeZoneKey.getTimeZoneKeys; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/TeradataFunctionsPlugin.java b/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/TeradataFunctionsPlugin.java index 2176882cef0a..71dcfbb1a39e 100644 --- a/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/TeradataFunctionsPlugin.java +++ b/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/TeradataFunctionsPlugin.java @@ -14,7 +14,7 @@ package io.trino.plugin.teradata.functions; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.Plugin; +import io.trino.spi.Plugin; import java.util.Set; diff --git a/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/TeradataStringFunctions.java b/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/TeradataStringFunctions.java index e61ff9cd5332..5dfcafd2645f 100644 --- a/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/TeradataStringFunctions.java +++ b/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/TeradataStringFunctions.java @@ -16,20 +16,20 @@ import com.google.common.io.BaseEncoding; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.function.Convention; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.FunctionDependency; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.PrestoException; +import io.trino.spi.function.Convention; +import io.trino.spi.function.Description; +import io.trino.spi.function.FunctionDependency; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import java.lang.invoke.MethodHandle; import static com.google.common.base.Throwables.throwIfInstanceOf; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; import static java.nio.charset.StandardCharsets.UTF_16BE; public final class TeradataStringFunctions diff --git a/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/dateformat/DateFormatParser.java b/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/dateformat/DateFormatParser.java index 585a5abd6f33..bcb4d671e74e 100644 --- a/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/dateformat/DateFormatParser.java +++ b/plugin/trino-teradata-functions/src/main/java/io/trino/plugin/teradata/functions/dateformat/DateFormatParser.java @@ -13,9 +13,8 @@ */ package io.trino.plugin.teradata.functions.dateformat; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.StandardErrorCode; -import io.prestosql.teradata.functions.DateFormat; +import io.trino.spi.PrestoException; +import io.trino.spi.StandardErrorCode; import org.antlr.v4.runtime.ANTLRInputStream; import org.antlr.v4.runtime.Token; import org.joda.time.format.DateTimeFormatter; @@ -23,7 +22,7 @@ import java.util.List; -import static io.prestosql.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; +import static io.trino.spi.StandardErrorCode.INVALID_FUNCTION_ARGUMENT; import static java.lang.String.format; public final class DateFormatParser diff --git a/plugin/trino-teradata-functions/src/test/java/io/trino/plugin/teradata/functions/TestTeradataDateFunctions.java b/plugin/trino-teradata-functions/src/test/java/io/trino/plugin/teradata/functions/TestTeradataDateFunctions.java index 3f040284c289..443fe6bc488f 100644 --- a/plugin/trino-teradata-functions/src/test/java/io/trino/plugin/teradata/functions/TestTeradataDateFunctions.java +++ b/plugin/trino-teradata-functions/src/test/java/io/trino/plugin/teradata/functions/TestTeradataDateFunctions.java @@ -13,20 +13,20 @@ */ package io.trino.plugin.teradata.functions; -import io.prestosql.Session; -import io.prestosql.operator.scalar.AbstractTestFunctions; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.SqlDate; -import io.prestosql.spi.type.TimestampType; +import io.trino.Session; +import io.trino.operator.scalar.AbstractTestFunctions; +import io.trino.spi.type.DateType; +import io.trino.spi.type.SqlDate; +import io.trino.spi.type.TimestampType; import org.joda.time.DateTime; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.time.LocalDate; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.DateTimeTestingUtils.sqlTimestampOf; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.DateTimeTestingUtils.sqlTimestampOf; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.Math.toIntExact; public class TestTeradataDateFunctions diff --git a/plugin/trino-teradata-functions/src/test/java/io/trino/plugin/teradata/functions/TestTeradataFunctions.java b/plugin/trino-teradata-functions/src/test/java/io/trino/plugin/teradata/functions/TestTeradataFunctions.java index 749b038308e8..5fd417ff5a3c 100644 --- a/plugin/trino-teradata-functions/src/test/java/io/trino/plugin/teradata/functions/TestTeradataFunctions.java +++ b/plugin/trino-teradata-functions/src/test/java/io/trino/plugin/teradata/functions/TestTeradataFunctions.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.teradata.functions; -import io.prestosql.operator.scalar.AbstractTestFunctions; +import io.trino.operator.scalar.AbstractTestFunctions; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; public class TestTeradataFunctions extends AbstractTestFunctions diff --git a/plugin/trino-teradata-functions/src/test/java/io/trino/plugin/teradata/functions/dateformat/TestDateFormatParser.java b/plugin/trino-teradata-functions/src/test/java/io/trino/plugin/teradata/functions/dateformat/TestDateFormatParser.java index 5de1ef631f9f..6d130acf7b04 100644 --- a/plugin/trino-teradata-functions/src/test/java/io/trino/plugin/teradata/functions/dateformat/TestDateFormatParser.java +++ b/plugin/trino-teradata-functions/src/test/java/io/trino/plugin/teradata/functions/dateformat/TestDateFormatParser.java @@ -13,8 +13,7 @@ */ package io.trino.plugin.teradata.functions.dateformat; -import io.prestosql.spi.PrestoException; -import io.prestosql.teradata.functions.DateFormat; +import io.trino.spi.PrestoException; import org.antlr.v4.runtime.Token; import org.joda.time.DateTime; import org.joda.time.format.DateTimeFormatter; diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftBlock.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftBlock.java index 2effa051e2f1..7542b840f873 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftBlock.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftBlock.java @@ -17,30 +17,30 @@ import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; import io.airlift.slice.Slice; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftBigint; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftBigintArray; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftBoolean; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftColumnData; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftDate; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftDouble; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftHyperLogLog; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftInteger; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftJson; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTimestamp; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftVarchar; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftBigint; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftBigintArray; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftBoolean; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftColumnData; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftDate; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftDouble; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftHyperLogLog; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftInteger; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftJson; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftTimestamp; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftVarchar; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import javax.annotation.Nullable; @@ -51,8 +51,8 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Iterables.getOnlyElement; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.spi.type.StandardTypes.HYPER_LOG_LOG; -import static io.prestosql.spi.type.StandardTypes.JSON; +import static io.trino.spi.type.StandardTypes.HYPER_LOG_LOG; +import static io.trino.spi.type.StandardTypes.JSON; @ThriftStruct public final class PrestoThriftBlock diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftColumnMetadata.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftColumnMetadata.java index 3268699cf419..eb4006ba18cb 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftColumnMetadata.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftColumnMetadata.java @@ -16,8 +16,8 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.TypeManager; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.TypeManager; import javax.annotation.Nullable; @@ -26,7 +26,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.NameValidationUtils.checkValidName; +import static io.trino.plugin.thrift.api.NameValidationUtils.checkValidName; import static java.util.Objects.requireNonNull; @ThriftStruct diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftDomain.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftDomain.java index abe088dfa855..ac4609d91dd6 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftDomain.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftDomain.java @@ -16,13 +16,13 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.valuesets.PrestoThriftValueSet; -import io.prestosql.spi.predicate.Domain; +import io.trino.plugin.thrift.api.valuesets.PrestoThriftValueSet; +import io.trino.spi.predicate.Domain; import java.util.Objects; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.thrift.api.valuesets.PrestoThriftValueSet.fromValueSet; +import static io.trino.plugin.thrift.api.valuesets.PrestoThriftValueSet.fromValueSet; import static java.util.Objects.requireNonNull; @ThriftStruct diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftHostAddress.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftHostAddress.java index 2f78e0c3c02e..e688b4b49b0a 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftHostAddress.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftHostAddress.java @@ -16,7 +16,7 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.spi.HostAddress; +import io.trino.spi.HostAddress; import java.util.Objects; diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftPageResult.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftPageResult.java index 02709c647874..32002fa56534 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftPageResult.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftPageResult.java @@ -17,11 +17,11 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -32,7 +32,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.fromRecordSetColumn; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.fromRecordSetColumn; import static java.util.Objects.requireNonNull; @ThriftStruct diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftSchemaTableName.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftSchemaTableName.java index 1f357c0a77d5..28055ee70ee4 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftSchemaTableName.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftSchemaTableName.java @@ -16,12 +16,12 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTableName; import java.util.Objects; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.plugin.thrift.api.NameValidationUtils.checkValidName; +import static io.trino.plugin.thrift.api.NameValidationUtils.checkValidName; @ThriftStruct public final class PrestoThriftSchemaTableName diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftTupleDomain.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftTupleDomain.java index 57c94c7f5c1f..1c400449e315 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftTupleDomain.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/PrestoThriftTupleDomain.java @@ -25,7 +25,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.NameValidationUtils.checkValidName; +import static io.trino.plugin.thrift.api.NameValidationUtils.checkValidName; @ThriftStruct public final class PrestoThriftTupleDomain diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftBigint.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftBigint.java index 43a95180c103..229f141abbc9 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftBigint.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftBigint.java @@ -16,11 +16,11 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -31,10 +31,10 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.bigintData; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromLongBasedBlock; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromLongBasedColumn; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.bigintData; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromLongBasedBlock; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromLongBasedColumn; +import static io.trino.spi.type.BigintType.BIGINT; /** * Elements of {@code nulls} array determine if a value for a corresponding row is null. diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftBigintArray.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftBigintArray.java index 972ff7ac72fe..f6afa4b77bf5 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftBigintArray.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftBigintArray.java @@ -16,12 +16,12 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.AbstractArrayBlock; -import io.prestosql.spi.block.ArrayBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.AbstractArrayBlock; +import io.trino.spi.block.ArrayBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -33,11 +33,11 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.bigintArrayData; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.calculateOffsets; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.sameSizeIfPresent; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.totalSize; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.bigintArrayData; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.calculateOffsets; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.sameSizeIfPresent; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.totalSize; +import static io.trino.spi.type.BigintType.BIGINT; /** * Elements of {@code nulls} array determine if a value for a corresponding row is null. diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftBoolean.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftBoolean.java index bf8882f35994..3c40a8bd2886 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftBoolean.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftBoolean.java @@ -16,10 +16,10 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.ByteArrayBlock; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.ByteArrayBlock; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -30,8 +30,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.booleanData; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.booleanData; +import static io.trino.spi.type.BooleanType.BOOLEAN; /** * Elements of {@code nulls} array determine if a value for a corresponding row is null. diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftColumnData.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftColumnData.java index f1c23a0d2c74..04474c48533a 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftColumnData.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftColumnData.java @@ -13,8 +13,8 @@ */ package io.trino.plugin.thrift.api.datatypes; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; public interface PrestoThriftColumnData { diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftDate.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftDate.java index 62b6b722495e..57862726ae2a 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftDate.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftDate.java @@ -16,11 +16,11 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.IntArrayBlock; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.IntArrayBlock; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -31,10 +31,10 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.dateData; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromIntBasedBlock; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromIntBasedColumn; -import static io.prestosql.spi.type.DateType.DATE; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.dateData; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromIntBasedBlock; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromIntBasedColumn; +import static io.trino.spi.type.DateType.DATE; /** * Elements of {@code nulls} array determine if a value for a corresponding row is null. diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftDouble.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftDouble.java index d33e6e06b2ec..5db06efffa2d 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftDouble.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftDouble.java @@ -16,10 +16,10 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -30,9 +30,9 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.booleanData; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.doubleData; -import static io.prestosql.spi.type.DoubleType.DOUBLE; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.booleanData; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.doubleData; +import static io.trino.spi.type.DoubleType.DOUBLE; import static java.lang.Double.doubleToLongBits; /** diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftHyperLogLog.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftHyperLogLog.java index 04878227da8f..30c4759ecbaa 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftHyperLogLog.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftHyperLogLog.java @@ -16,9 +16,9 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -27,9 +27,9 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.hyperLogLogData; -import static io.prestosql.plugin.thrift.api.datatypes.SliceData.fromSliceBasedBlock; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.hyperLogLogData; +import static io.trino.plugin.thrift.api.datatypes.SliceData.fromSliceBasedBlock; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; /** * Elements of {@code nulls} array determine if a value for a corresponding row is null. diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftInteger.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftInteger.java index 35c7dc8c4f27..5ed0cd86da6d 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftInteger.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftInteger.java @@ -16,11 +16,11 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.IntArrayBlock; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.IntArrayBlock; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -31,10 +31,10 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.integerData; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromIntBasedBlock; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromIntBasedColumn; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.integerData; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromIntBasedBlock; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromIntBasedColumn; +import static io.trino.spi.type.IntegerType.INTEGER; /** * Elements of {@code nulls} array determine if a value for a corresponding row is null. diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftJson.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftJson.java index 7b03f81eb6ea..12405b45013b 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftJson.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftJson.java @@ -16,9 +16,9 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -26,8 +26,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.jsonData; -import static io.prestosql.plugin.thrift.api.datatypes.SliceData.fromSliceBasedBlock; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.jsonData; +import static io.trino.plugin.thrift.api.datatypes.SliceData.fromSliceBasedBlock; /** * Elements of {@code nulls} array determine if a value for a corresponding row is null. diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftTimestamp.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftTimestamp.java index 5209a974e40a..f17d368564f1 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftTimestamp.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftTimestamp.java @@ -16,11 +16,11 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.LongArrayBlock; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.LongArrayBlock; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -31,11 +31,11 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.timestampData; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromLongBasedBlock; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromLongBasedColumn; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.timestampData; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromLongBasedBlock; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.fromLongBasedColumn; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.Timestamps.MICROSECONDS_PER_MILLISECOND; import static java.lang.Math.floorDiv; import static java.lang.Math.floorMod; import static java.lang.Math.multiplyExact; diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftTypeUtils.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftTypeUtils.java index 413753beed35..d49f7fd5c2f9 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftTypeUtils.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftTypeUtils.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.thrift.api.datatypes; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.Block; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.function.BiFunction; diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftVarchar.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftVarchar.java index 168d20507760..09fc46b7372c 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftVarchar.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/PrestoThriftVarchar.java @@ -16,10 +16,10 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import javax.annotation.Nullable; @@ -28,8 +28,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.varcharData; -import static io.prestosql.plugin.thrift.api.datatypes.SliceData.fromSliceBasedBlock; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.varcharData; +import static io.trino.plugin.thrift.api.datatypes.SliceData.fromSliceBasedBlock; /** * Elements of {@code nulls} array determine if a value for a corresponding row is null. diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/SliceData.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/SliceData.java index 25a56fbc8e5c..8133358c0016 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/SliceData.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/datatypes/SliceData.java @@ -15,10 +15,10 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.VariableWidthBlock; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.VariableWidthBlock; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -29,9 +29,9 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.calculateOffsets; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.sameSizeIfPresent; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.totalSize; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.calculateOffsets; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.sameSizeIfPresent; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftTypeUtils.totalSize; final class SliceData implements PrestoThriftColumnData diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftAllOrNoneValueSet.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftAllOrNoneValueSet.java index c0151ac2b47d..524d176bbce1 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftAllOrNoneValueSet.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftAllOrNoneValueSet.java @@ -16,7 +16,7 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.spi.predicate.AllOrNoneValueSet; +import io.trino.spi.predicate.AllOrNoneValueSet; import static com.google.common.base.MoreObjects.toStringHelper; diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftEquatableValueSet.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftEquatableValueSet.java index 903e17af02a2..15a0297e4e69 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftEquatableValueSet.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftEquatableValueSet.java @@ -16,10 +16,10 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.predicate.EquatableValueSet; -import io.prestosql.spi.predicate.EquatableValueSet.ValueEntry; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.predicate.EquatableValueSet; +import io.trino.spi.predicate.EquatableValueSet.ValueEntry; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.List; @@ -28,7 +28,7 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.fromBlock; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.fromBlock; import static java.util.Objects.requireNonNull; /** diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftRangeValueSet.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftRangeValueSet.java index 7a54005bfb71..880c1f313f81 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftRangeValueSet.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftRangeValueSet.java @@ -18,11 +18,11 @@ import io.airlift.drift.annotations.ThriftEnumValue; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.predicate.Marker; -import io.prestosql.spi.predicate.Marker.Bound; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.SortedRangeSet; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.predicate.Marker; +import io.trino.spi.predicate.Marker.Bound; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.SortedRangeSet; import javax.annotation.Nullable; @@ -33,9 +33,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.fromBlock; -import static io.prestosql.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftBound.fromBound; -import static io.prestosql.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftMarker.fromMarker; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.fromBlock; +import static io.trino.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftBound.fromBound; +import static io.trino.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftMarker.fromMarker; import static java.util.Objects.requireNonNull; /** diff --git a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftValueSet.java b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftValueSet.java index 184204e21e89..11f42c728f19 100644 --- a/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftValueSet.java +++ b/plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/valuesets/PrestoThriftValueSet.java @@ -16,10 +16,10 @@ import io.airlift.drift.annotations.ThriftConstructor; import io.airlift.drift.annotations.ThriftField; import io.airlift.drift.annotations.ThriftStruct; -import io.prestosql.spi.predicate.AllOrNoneValueSet; -import io.prestosql.spi.predicate.EquatableValueSet; -import io.prestosql.spi.predicate.SortedRangeSet; -import io.prestosql.spi.predicate.ValueSet; +import io.trino.spi.predicate.AllOrNoneValueSet; +import io.trino.spi.predicate.EquatableValueSet; +import io.trino.spi.predicate.SortedRangeSet; +import io.trino.spi.predicate.ValueSet; import javax.annotation.Nullable; @@ -28,9 +28,9 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL; -import static io.prestosql.plugin.thrift.api.valuesets.PrestoThriftAllOrNoneValueSet.fromAllOrNoneValueSet; -import static io.prestosql.plugin.thrift.api.valuesets.PrestoThriftEquatableValueSet.fromEquatableValueSet; -import static io.prestosql.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.fromSortedRangeSet; +import static io.trino.plugin.thrift.api.valuesets.PrestoThriftAllOrNoneValueSet.fromAllOrNoneValueSet; +import static io.trino.plugin.thrift.api.valuesets.PrestoThriftEquatableValueSet.fromEquatableValueSet; +import static io.trino.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.fromSortedRangeSet; @ThriftStruct public final class PrestoThriftValueSet diff --git a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/TestNameValidationUtils.java b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/TestNameValidationUtils.java index a1fa5236e067..2de62f1375f0 100644 --- a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/TestNameValidationUtils.java +++ b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/TestNameValidationUtils.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static io.prestosql.plugin.thrift.api.NameValidationUtils.checkValidName; +import static io.trino.plugin.thrift.api.NameValidationUtils.checkValidName; import static org.assertj.core.api.Assertions.assertThatThrownBy; public class TestNameValidationUtils diff --git a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/TestPrestoThriftId.java b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/TestPrestoThriftId.java index 831cbb32a206..fe327620307b 100644 --- a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/TestPrestoThriftId.java +++ b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/TestPrestoThriftId.java @@ -16,7 +16,7 @@ import com.google.common.primitives.UnsignedBytes; import org.testng.annotations.Test; -import static io.prestosql.plugin.thrift.api.PrestoThriftId.summarize; +import static io.trino.plugin.thrift.api.PrestoThriftId.summarize; import static org.testng.Assert.assertEquals; public class TestPrestoThriftId diff --git a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/TestReadWrite.java b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/TestReadWrite.java index 76d379ba323d..f68596d5555b 100644 --- a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/TestReadWrite.java +++ b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/TestReadWrite.java @@ -16,13 +16,13 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.stats.cardinality.HyperLogLog; -import io.prestosql.operator.index.PageRecordSet; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.operator.index.PageRecordSet; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -33,19 +33,19 @@ import java.util.function.Function; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.fromBlock; -import static io.prestosql.plugin.thrift.api.PrestoThriftPageResult.fromRecordSet; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.type.DateTimes.MICROSECONDS_PER_MILLISECOND; -import static io.prestosql.type.JsonType.JSON; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.fromBlock; +import static io.trino.plugin.thrift.api.PrestoThriftPageResult.fromRecordSet; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.type.DateTimes.MICROSECONDS_PER_MILLISECOND; +import static io.trino.type.JsonType.JSON; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/datatypes/TestPrestoThriftBigint.java b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/datatypes/TestPrestoThriftBigint.java index daed8caedeb9..84d5af8e9f38 100644 --- a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/datatypes/TestPrestoThriftBigint.java +++ b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/datatypes/TestPrestoThriftBigint.java @@ -13,19 +13,19 @@ */ package io.trino.plugin.thrift.api.datatypes; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; import org.testng.annotations.Test; import java.util.Arrays; import java.util.List; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.bigintData; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.integerData; -import static io.prestosql.plugin.thrift.api.datatypes.PrestoThriftBigint.fromBlock; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.bigintData; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.integerData; +import static io.trino.plugin.thrift.api.datatypes.PrestoThriftBigint.fromBlock; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.util.Collections.unmodifiableList; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/valuesets/TestPrestoThriftAllOrNoneValueSet.java b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/valuesets/TestPrestoThriftAllOrNoneValueSet.java index 3ea58126d353..cd3d47cef709 100644 --- a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/valuesets/TestPrestoThriftAllOrNoneValueSet.java +++ b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/valuesets/TestPrestoThriftAllOrNoneValueSet.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.thrift.api.valuesets; -import io.prestosql.spi.predicate.ValueSet; +import io.trino.spi.predicate.ValueSet; import org.testng.annotations.Test; -import static io.prestosql.plugin.thrift.api.valuesets.PrestoThriftValueSet.fromValueSet; -import static io.prestosql.spi.type.HyperLogLogType.HYPER_LOG_LOG; +import static io.trino.plugin.thrift.api.valuesets.PrestoThriftValueSet.fromValueSet; +import static io.trino.spi.type.HyperLogLogType.HYPER_LOG_LOG; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/valuesets/TestPrestoThriftEquatableValueSet.java b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/valuesets/TestPrestoThriftEquatableValueSet.java index 976aef9e8991..79637ae860ba 100644 --- a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/valuesets/TestPrestoThriftEquatableValueSet.java +++ b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/valuesets/TestPrestoThriftEquatableValueSet.java @@ -14,14 +14,14 @@ package io.trino.plugin.thrift.api.valuesets; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftJson; -import io.prestosql.spi.predicate.ValueSet; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftJson; +import io.trino.spi.predicate.ValueSet; import org.testng.annotations.Test; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.jsonData; -import static io.prestosql.plugin.thrift.api.valuesets.PrestoThriftValueSet.fromValueSet; -import static io.prestosql.type.JsonType.JSON; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.jsonData; +import static io.trino.plugin.thrift.api.valuesets.PrestoThriftValueSet.fromValueSet; +import static io.trino.type.JsonType.JSON; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/valuesets/TestPrestoThriftRangeValueSet.java b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/valuesets/TestPrestoThriftRangeValueSet.java index 5a50ec60a098..2a4fcba5570e 100644 --- a/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/valuesets/TestPrestoThriftRangeValueSet.java +++ b/plugin/trino-thrift-api/src/test/java/io/trino/plugin/thrift/api/valuesets/TestPrestoThriftRangeValueSet.java @@ -14,21 +14,21 @@ package io.trino.plugin.thrift.api.valuesets; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftBigint; -import io.prestosql.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftMarker; -import io.prestosql.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftRange; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.ValueSet; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftBigint; +import io.trino.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftMarker; +import io.trino.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftRange; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.ValueSet; import org.testng.annotations.Test; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.bigintData; -import static io.prestosql.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftBound.ABOVE; -import static io.prestosql.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftBound.BELOW; -import static io.prestosql.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftBound.EXACTLY; -import static io.prestosql.plugin.thrift.api.valuesets.PrestoThriftValueSet.fromValueSet; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.bigintData; +import static io.trino.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftBound.ABOVE; +import static io.trino.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftBound.BELOW; +import static io.trino.plugin.thrift.api.valuesets.PrestoThriftRangeValueSet.PrestoThriftBound.EXACTLY; +import static io.trino.plugin.thrift.api.valuesets.PrestoThriftValueSet.fromValueSet; +import static io.trino.spi.predicate.Range.range; +import static io.trino.spi.type.BigintType.BIGINT; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/plugin/trino-thrift-testing-server/src/main/java/io/trino/plugin/thrift/server/ListBasedRecordSet.java b/plugin/trino-thrift-testing-server/src/main/java/io/trino/plugin/thrift/server/ListBasedRecordSet.java index 773aece275d6..dd12d52802d3 100644 --- a/plugin/trino-thrift-testing-server/src/main/java/io/trino/plugin/thrift/server/ListBasedRecordSet.java +++ b/plugin/trino-thrift-testing-server/src/main/java/io/trino/plugin/thrift/server/ListBasedRecordSet.java @@ -15,9 +15,9 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-thrift-testing-server/src/main/java/io/trino/plugin/thrift/server/ThriftIndexedTpchService.java b/plugin/trino-thrift-testing-server/src/main/java/io/trino/plugin/thrift/server/ThriftIndexedTpchService.java index bbc9e02cdb18..4d5ccc618368 100644 --- a/plugin/trino-thrift-testing-server/src/main/java/io/trino/plugin/thrift/server/ThriftIndexedTpchService.java +++ b/plugin/trino-thrift-testing-server/src/main/java/io/trino/plugin/thrift/server/ThriftIndexedTpchService.java @@ -15,30 +15,30 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.plugin.thrift.api.PrestoThriftId; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableToken; -import io.prestosql.plugin.thrift.api.PrestoThriftPageResult; -import io.prestosql.plugin.thrift.api.PrestoThriftSchemaTableName; -import io.prestosql.plugin.thrift.api.PrestoThriftServiceException; -import io.prestosql.plugin.thrift.api.PrestoThriftSplit; -import io.prestosql.plugin.thrift.api.PrestoThriftSplitBatch; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; -import io.prestosql.split.MappedRecordSet; -import io.prestosql.testing.tpch.TpchIndexedData; -import io.prestosql.testing.tpch.TpchIndexedData.IndexedTable; -import io.prestosql.testing.tpch.TpchScaledTable; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.plugin.thrift.api.PrestoThriftId; +import io.trino.plugin.thrift.api.PrestoThriftNullableToken; +import io.trino.plugin.thrift.api.PrestoThriftPageResult; +import io.trino.plugin.thrift.api.PrestoThriftSchemaTableName; +import io.trino.plugin.thrift.api.PrestoThriftServiceException; +import io.trino.plugin.thrift.api.PrestoThriftSplit; +import io.trino.plugin.thrift.api.PrestoThriftSplitBatch; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; +import io.trino.split.MappedRecordSet; +import io.trino.testing.tpch.TpchIndexedData; +import io.trino.testing.tpch.TpchIndexedData.IndexedTable; +import io.trino.testing.tpch.TpchScaledTable; import java.util.ArrayList; import java.util.List; import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.thrift.server.SplitInfo.indexSplit; -import static io.prestosql.testing.AbstractTestIndexedQueries.INDEX_SPEC; +import static io.trino.plugin.thrift.server.SplitInfo.indexSplit; +import static io.trino.testing.AbstractTestIndexedQueries.INDEX_SPEC; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/plugin/trino-thrift-testing-server/src/main/java/io/trino/plugin/thrift/server/ThriftTpchService.java b/plugin/trino-thrift-testing-server/src/main/java/io/trino/plugin/thrift/server/ThriftTpchService.java index 609bdbc2caaa..87f3f3b2ff04 100644 --- a/plugin/trino-thrift-testing-server/src/main/java/io/trino/plugin/thrift/server/ThriftTpchService.java +++ b/plugin/trino-thrift-testing-server/src/main/java/io/trino/plugin/thrift/server/ThriftTpchService.java @@ -18,26 +18,26 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import io.airlift.json.JsonCodec; -import io.prestosql.plugin.thrift.api.PrestoThriftBlock; -import io.prestosql.plugin.thrift.api.PrestoThriftColumnMetadata; -import io.prestosql.plugin.thrift.api.PrestoThriftId; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableColumnSet; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableSchemaName; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableTableMetadata; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableToken; -import io.prestosql.plugin.thrift.api.PrestoThriftPageResult; -import io.prestosql.plugin.thrift.api.PrestoThriftSchemaTableName; -import io.prestosql.plugin.thrift.api.PrestoThriftService; -import io.prestosql.plugin.thrift.api.PrestoThriftServiceException; -import io.prestosql.plugin.thrift.api.PrestoThriftSplit; -import io.prestosql.plugin.thrift.api.PrestoThriftSplitBatch; -import io.prestosql.plugin.thrift.api.PrestoThriftTableMetadata; -import io.prestosql.plugin.thrift.api.PrestoThriftTupleDomain; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftBlock; +import io.trino.plugin.thrift.api.PrestoThriftColumnMetadata; +import io.trino.plugin.thrift.api.PrestoThriftId; +import io.trino.plugin.thrift.api.PrestoThriftNullableColumnSet; +import io.trino.plugin.thrift.api.PrestoThriftNullableSchemaName; +import io.trino.plugin.thrift.api.PrestoThriftNullableTableMetadata; +import io.trino.plugin.thrift.api.PrestoThriftNullableToken; +import io.trino.plugin.thrift.api.PrestoThriftPageResult; +import io.trino.plugin.thrift.api.PrestoThriftSchemaTableName; +import io.trino.plugin.thrift.api.PrestoThriftService; +import io.trino.plugin.thrift.api.PrestoThriftServiceException; +import io.trino.plugin.thrift.api.PrestoThriftSplit; +import io.trino.plugin.thrift.api.PrestoThriftSplitBatch; +import io.trino.plugin.thrift.api.PrestoThriftTableMetadata; +import io.trino.plugin.thrift.api.PrestoThriftTupleDomain; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import io.trino.tpch.TpchColumn; import io.trino.tpch.TpchEntity; import io.trino.tpch.TpchTable; @@ -55,11 +55,11 @@ import static com.google.common.util.concurrent.MoreExecutors.listeningDecorator; import static io.airlift.concurrent.Threads.threadsNamed; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.fromBlock; -import static io.prestosql.plugin.thrift.server.SplitInfo.normalSplit; -import static io.prestosql.plugin.tpch.TpchMetadata.getPrestoType; -import static io.prestosql.plugin.tpch.TpchRecordSet.createTpchRecordSet; -import static io.prestosql.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.fromBlock; +import static io.trino.plugin.thrift.server.SplitInfo.normalSplit; +import static io.trino.plugin.tpch.TpchMetadata.getPrestoType; +import static io.trino.plugin.tpch.TpchRecordSet.createTpchRecordSet; +import static io.trino.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; import static java.lang.Math.min; import static java.util.concurrent.Executors.newFixedThreadPool; import static java.util.stream.Collectors.toList; diff --git a/plugin/trino-thrift-testing-server/src/test/java/io/trino/plugin/thrift/server/TestListBasedRecordSet.java b/plugin/trino-thrift-testing-server/src/test/java/io/trino/plugin/thrift/server/TestListBasedRecordSet.java index a1d8ddb76828..82157658e630 100644 --- a/plugin/trino-thrift-testing-server/src/test/java/io/trino/plugin/thrift/server/TestListBasedRecordSet.java +++ b/plugin/trino-thrift-testing-server/src/test/java/io/trino/plugin/thrift/server/TestListBasedRecordSet.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slices; -import io.prestosql.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordCursor; import org.testng.annotations.Test; import java.util.Arrays; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/DefaultThriftHeaderProvider.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/DefaultThriftHeaderProvider.java index eff29cb1a215..76b8f2e40060 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/DefaultThriftHeaderProvider.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/DefaultThriftHeaderProvider.java @@ -14,7 +14,7 @@ package io.trino.plugin.thrift; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSession; import java.util.Map; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftClientModule.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftClientModule.java index 1e56a1e2bc0d..c4256c7fa54d 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftClientModule.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftClientModule.java @@ -15,11 +15,11 @@ import com.google.inject.Binder; import com.google.inject.Module; -import io.prestosql.plugin.thrift.api.PrestoThriftService; +import io.trino.plugin.thrift.api.PrestoThriftService; import static com.google.inject.Scopes.SINGLETON; import static io.airlift.drift.client.guice.DriftClientBinder.driftClientBinder; -import static io.prestosql.plugin.thrift.location.ExtendedSimpleAddressSelectorBinder.extendedSimpleAddressSelector; +import static io.trino.plugin.thrift.location.ExtendedSimpleAddressSelectorBinder.extendedSimpleAddressSelector; public class ThriftClientModule implements Module diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftColumnHandle.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftColumnHandle.java index 62eaf53200ab..ec1a9b62a0b4 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftColumnHandle.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftColumnHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.type.Type; import javax.annotation.Nullable; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnector.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnector.java index 60d884baaca6..1e3a16696255 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnector.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnector.java @@ -14,14 +14,14 @@ package io.trino.plugin.thrift; import io.airlift.bootstrap.LifeCycleManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorIndexProvider; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorIndexProvider; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.session.PropertyMetadata; +import io.trino.spi.transaction.IsolationLevel; import javax.inject.Inject; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnectorFactory.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnectorFactory.java index c56668ade6d4..7ad0b9e5d3cb 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnectorFactory.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnectorFactory.java @@ -17,13 +17,13 @@ import com.google.inject.Module; import io.airlift.bootstrap.Bootstrap; import io.airlift.drift.transport.netty.client.DriftNettyClientModule; -import io.prestosql.plugin.base.jmx.ConnectorObjectNameGeneratorModule; -import io.prestosql.plugin.base.jmx.MBeanServerModule; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.base.jmx.ConnectorObjectNameGeneratorModule; +import io.trino.plugin.base.jmx.MBeanServerModule; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.type.TypeManager; import org.weakref.jmx.guice.MBeanModule; import java.util.Map; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnectorIndex.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnectorIndex.java index 552bcf2fc130..314431083aa9 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnectorIndex.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnectorIndex.java @@ -14,11 +14,11 @@ package io.trino.plugin.thrift; import io.airlift.drift.client.DriftClient; -import io.prestosql.plugin.thrift.api.PrestoThriftService; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorIndex; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.RecordSet; +import io.trino.plugin.thrift.api.PrestoThriftService; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorIndex; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.RecordSet; import java.util.List; import java.util.Map; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnectorSplit.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnectorSplit.java index eea611b8d2c4..c9d160cc9fbb 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnectorSplit.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftConnectorSplit.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.thrift.api.PrestoThriftId; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.plugin.thrift.api.PrestoThriftId; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftErrorCode.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftErrorCode.java index ed533183a622..1ede04a28f05 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftErrorCode.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftErrorCode.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.thrift; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.ErrorCodeSupplier; -import io.prestosql.spi.ErrorType; +import io.trino.spi.ErrorCode; +import io.trino.spi.ErrorCodeSupplier; +import io.trino.spi.ErrorType; -import static io.prestosql.spi.ErrorType.EXTERNAL; +import static io.trino.spi.ErrorType.EXTERNAL; public enum ThriftErrorCode implements ErrorCodeSupplier diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftHandleResolver.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftHandleResolver.java index 156ec379b380..7cb630bdfe8c 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftHandleResolver.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftHandleResolver.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.thrift; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorIndexHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorIndexHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class ThriftHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftHeaderProvider.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftHeaderProvider.java index 3dd06c46bd46..1789fc5f7603 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftHeaderProvider.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftHeaderProvider.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.thrift; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSession; import java.util.Map; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftIndexHandle.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftIndexHandle.java index 5dd697585c2d..b36de465a01a 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftIndexHandle.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftIndexHandle.java @@ -15,11 +15,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorIndexHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorIndexHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftIndexPageSource.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftIndexPageSource.java index a80475b19ca7..07f41ea2c944 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftIndexPageSource.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftIndexPageSource.java @@ -16,19 +16,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.drift.client.DriftClient; -import io.prestosql.plugin.thrift.api.PrestoThriftId; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableToken; -import io.prestosql.plugin.thrift.api.PrestoThriftPageResult; -import io.prestosql.plugin.thrift.api.PrestoThriftSchemaTableName; -import io.prestosql.plugin.thrift.api.PrestoThriftService; -import io.prestosql.plugin.thrift.api.PrestoThriftSplit; -import io.prestosql.plugin.thrift.api.PrestoThriftSplitBatch; -import io.prestosql.plugin.thrift.api.PrestoThriftTupleDomain; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftId; +import io.trino.plugin.thrift.api.PrestoThriftNullableToken; +import io.trino.plugin.thrift.api.PrestoThriftPageResult; +import io.trino.plugin.thrift.api.PrestoThriftSchemaTableName; +import io.trino.plugin.thrift.api.PrestoThriftService; +import io.trino.plugin.thrift.api.PrestoThriftSplit; +import io.trino.plugin.thrift.api.PrestoThriftSplitBatch; +import io.trino.plugin.thrift.api.PrestoThriftTupleDomain; +import io.trino.spi.Page; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import javax.annotation.Nullable; @@ -52,9 +52,9 @@ import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.MoreFutures.toCompletableFuture; import static io.airlift.concurrent.MoreFutures.whenAnyComplete; -import static io.prestosql.plugin.thrift.api.PrestoThriftPageResult.fromRecordSet; -import static io.prestosql.plugin.thrift.util.ThriftExceptions.catchingThriftException; -import static io.prestosql.plugin.thrift.util.TupleDomainConversion.tupleDomainToThriftTupleDomain; +import static io.trino.plugin.thrift.api.PrestoThriftPageResult.fromRecordSet; +import static io.trino.plugin.thrift.util.ThriftExceptions.catchingThriftException; +import static io.trino.plugin.thrift.util.TupleDomainConversion.tupleDomainToThriftTupleDomain; import static java.lang.Math.min; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.joining; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftIndexProvider.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftIndexProvider.java index 3ea8b900f0e8..2436bcbd417a 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftIndexProvider.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftIndexProvider.java @@ -14,13 +14,13 @@ package io.trino.plugin.thrift; import io.airlift.drift.client.DriftClient; -import io.prestosql.plugin.thrift.api.PrestoThriftService; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorIndex; -import io.prestosql.spi.connector.ConnectorIndexHandle; -import io.prestosql.spi.connector.ConnectorIndexProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.plugin.thrift.api.PrestoThriftService; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorIndex; +import io.trino.spi.connector.ConnectorIndexHandle; +import io.trino.spi.connector.ConnectorIndexProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; import javax.inject.Inject; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftMetadata.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftMetadata.java index 2aefa93d0189..e8177910be18 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftMetadata.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftMetadata.java @@ -21,31 +21,31 @@ import io.airlift.drift.TException; import io.airlift.drift.client.DriftClient; import io.airlift.units.Duration; -import io.prestosql.plugin.thrift.annotations.ForMetadataRefresh; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableSchemaName; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableTableMetadata; -import io.prestosql.plugin.thrift.api.PrestoThriftSchemaTableName; -import io.prestosql.plugin.thrift.api.PrestoThriftService; -import io.prestosql.plugin.thrift.api.PrestoThriftServiceException; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.Assignment; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorResolvedIndex; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.ProjectionApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.TableNotFoundException; -import io.prestosql.spi.expression.ConnectorExpression; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.thrift.annotations.ForMetadataRefresh; +import io.trino.plugin.thrift.api.PrestoThriftNullableSchemaName; +import io.trino.plugin.thrift.api.PrestoThriftNullableTableMetadata; +import io.trino.plugin.thrift.api.PrestoThriftSchemaTableName; +import io.trino.plugin.thrift.api.PrestoThriftService; +import io.trino.plugin.thrift.api.PrestoThriftServiceException; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.Assignment; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorResolvedIndex; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.ProjectionApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.TableNotFoundException; +import io.trino.spi.expression.ConnectorExpression; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.TypeManager; import javax.inject.Inject; @@ -59,8 +59,8 @@ import static com.google.common.cache.CacheLoader.asyncReloading; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.plugin.thrift.ThriftErrorCode.THRIFT_SERVICE_INVALID_RESPONSE; -import static io.prestosql.plugin.thrift.util.ThriftExceptions.toPrestoException; +import static io.trino.plugin.thrift.ThriftErrorCode.THRIFT_SERVICE_INVALID_RESPONSE; +import static io.trino.plugin.thrift.util.ThriftExceptions.toPrestoException; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftModule.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftModule.java index e423e44d3f58..9d6ccaabecbc 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftModule.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftModule.java @@ -19,9 +19,9 @@ import com.google.inject.Scopes; import io.airlift.drift.client.ExceptionClassification; import io.airlift.drift.client.ExceptionClassification.HostStatus; -import io.prestosql.plugin.thrift.annotations.ForMetadataRefresh; -import io.prestosql.plugin.thrift.api.PrestoThriftService; -import io.prestosql.plugin.thrift.api.PrestoThriftServiceException; +import io.trino.plugin.thrift.annotations.ForMetadataRefresh; +import io.trino.plugin.thrift.api.PrestoThriftService; +import io.trino.plugin.thrift.api.PrestoThriftServiceException; import javax.inject.Singleton; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftPageSource.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftPageSource.java index 91d0a5760882..200d35540277 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftPageSource.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftPageSource.java @@ -16,15 +16,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.drift.client.DriftClient; -import io.prestosql.plugin.thrift.api.PrestoThriftId; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableToken; -import io.prestosql.plugin.thrift.api.PrestoThriftPageResult; -import io.prestosql.plugin.thrift.api.PrestoThriftService; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftId; +import io.trino.plugin.thrift.api.PrestoThriftNullableToken; +import io.trino.plugin.thrift.api.PrestoThriftPageResult; +import io.trino.plugin.thrift.api.PrestoThriftService; +import io.trino.spi.HostAddress; +import io.trino.spi.Page; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.type.Type; import java.util.List; import java.util.Map; @@ -37,7 +37,7 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.concurrent.MoreFutures.getFutureValue; import static io.airlift.concurrent.MoreFutures.toCompletableFuture; -import static io.prestosql.plugin.thrift.util.ThriftExceptions.catchingThriftException; +import static io.trino.plugin.thrift.util.ThriftExceptions.catchingThriftException; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.joining; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftPageSourceProvider.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftPageSourceProvider.java index 4e2c810f1e1f..dca1ae0d7088 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftPageSourceProvider.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftPageSourceProvider.java @@ -14,15 +14,15 @@ package io.trino.plugin.thrift; import io.airlift.drift.client.DriftClient; -import io.prestosql.plugin.thrift.api.PrestoThriftService; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.thrift.api.PrestoThriftService; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.predicate.TupleDomain; import javax.inject.Inject; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftPlugin.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftPlugin.java index 875de6b15b10..a61b901ef4f2 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftPlugin.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftPlugin.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Module; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Strings.isNullOrEmpty; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftSessionProperties.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftSessionProperties.java index 86100c892805..899edcbf26dc 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftSessionProperties.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftSessionProperties.java @@ -14,7 +14,7 @@ package io.trino.plugin.thrift; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.session.PropertyMetadata; +import io.trino.spi.session.PropertyMetadata; import javax.inject.Inject; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftSplitManager.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftSplitManager.java index 7904480b2297..55421b28f5ef 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftSplitManager.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftSplitManager.java @@ -16,25 +16,25 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.drift.client.DriftClient; -import io.prestosql.plugin.thrift.api.PrestoThriftHostAddress; -import io.prestosql.plugin.thrift.api.PrestoThriftId; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableColumnSet; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableToken; -import io.prestosql.plugin.thrift.api.PrestoThriftSchemaTableName; -import io.prestosql.plugin.thrift.api.PrestoThriftService; -import io.prestosql.plugin.thrift.api.PrestoThriftSplit; -import io.prestosql.plugin.thrift.api.PrestoThriftSplitBatch; -import io.prestosql.plugin.thrift.api.PrestoThriftTupleDomain; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; +import io.trino.plugin.thrift.api.PrestoThriftHostAddress; +import io.trino.plugin.thrift.api.PrestoThriftId; +import io.trino.plugin.thrift.api.PrestoThriftNullableColumnSet; +import io.trino.plugin.thrift.api.PrestoThriftNullableToken; +import io.trino.plugin.thrift.api.PrestoThriftSchemaTableName; +import io.trino.plugin.thrift.api.PrestoThriftService; +import io.trino.plugin.thrift.api.PrestoThriftSplit; +import io.trino.plugin.thrift.api.PrestoThriftSplitBatch; +import io.trino.plugin.thrift.api.PrestoThriftTupleDomain; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; import javax.annotation.concurrent.NotThreadSafe; import javax.inject.Inject; @@ -52,8 +52,8 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static io.airlift.concurrent.MoreFutures.toCompletableFuture; -import static io.prestosql.plugin.thrift.util.ThriftExceptions.catchingThriftException; -import static io.prestosql.plugin.thrift.util.TupleDomainConversion.tupleDomainToThriftTupleDomain; +import static io.trino.plugin.thrift.util.ThriftExceptions.catchingThriftException; +import static io.trino.plugin.thrift.util.TupleDomainConversion.tupleDomainToThriftTupleDomain; import static java.util.Objects.requireNonNull; public class ThriftSplitManager diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftTableHandle.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftTableHandle.java index 753c05c3bc44..5c1a6bbde3d2 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftTableHandle.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftTableHandle.java @@ -15,10 +15,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; import java.util.Objects; import java.util.Optional; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftTableMetadata.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftTableMetadata.java index 506006965d58..d0f161185146 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftTableMetadata.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftTableMetadata.java @@ -16,13 +16,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.thrift.api.PrestoThriftColumnMetadata; -import io.prestosql.plugin.thrift.api.PrestoThriftTableMetadata; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.TypeManager; +import io.trino.plugin.thrift.api.PrestoThriftColumnMetadata; +import io.trino.plugin.thrift.api.PrestoThriftTableMetadata; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.TypeManager; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftTransactionHandle.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftTransactionHandle.java index a0368108e980..0b3238566009 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftTransactionHandle.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/ThriftTransactionHandle.java @@ -14,7 +14,7 @@ package io.trino.plugin.thrift; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum ThriftTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/util/ThriftExceptions.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/util/ThriftExceptions.java index cf340117b809..159698229b7a 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/util/ThriftExceptions.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/util/ThriftExceptions.java @@ -17,16 +17,16 @@ import io.airlift.drift.TApplicationException; import io.airlift.drift.TException; import io.airlift.drift.protocol.TTransportException; -import io.prestosql.plugin.thrift.api.PrestoThriftServiceException; -import io.prestosql.spi.PrestoException; +import io.trino.plugin.thrift.api.PrestoThriftServiceException; +import io.trino.spi.PrestoException; import static com.google.common.util.concurrent.Futures.catchingAsync; import static com.google.common.util.concurrent.Futures.immediateFailedFuture; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; -import static io.prestosql.plugin.thrift.ThriftErrorCode.THRIFT_SERVICE_CONNECTION_ERROR; -import static io.prestosql.plugin.thrift.ThriftErrorCode.THRIFT_SERVICE_GENERIC_REMOTE_ERROR; -import static io.prestosql.plugin.thrift.ThriftErrorCode.THRIFT_SERVICE_NO_AVAILABLE_HOSTS; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.plugin.thrift.ThriftErrorCode.THRIFT_SERVICE_CONNECTION_ERROR; +import static io.trino.plugin.thrift.ThriftErrorCode.THRIFT_SERVICE_GENERIC_REMOTE_ERROR; +import static io.trino.plugin.thrift.ThriftErrorCode.THRIFT_SERVICE_NO_AVAILABLE_HOSTS; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; public final class ThriftExceptions { diff --git a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/util/TupleDomainConversion.java b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/util/TupleDomainConversion.java index f813392cc9d7..7056248fc7fc 100644 --- a/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/util/TupleDomainConversion.java +++ b/plugin/trino-thrift/src/main/java/io/trino/plugin/thrift/util/TupleDomainConversion.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.thrift.util; -import io.prestosql.plugin.thrift.ThriftColumnHandle; -import io.prestosql.plugin.thrift.api.PrestoThriftTupleDomain; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.thrift.ThriftColumnHandle; +import io.trino.plugin.thrift.api.PrestoThriftTupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.TupleDomain; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.plugin.thrift.api.PrestoThriftDomain.fromDomain; +import static io.trino.plugin.thrift.api.PrestoThriftDomain.fromDomain; public final class TupleDomainConversion { diff --git a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/TestThriftIndexPageSource.java b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/TestThriftIndexPageSource.java index dfce0bb69350..d6366958501e 100644 --- a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/TestThriftIndexPageSource.java +++ b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/TestThriftIndexPageSource.java @@ -18,24 +18,24 @@ import com.google.common.primitives.Ints; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; -import io.prestosql.plugin.thrift.api.PrestoThriftId; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableColumnSet; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableSchemaName; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableTableMetadata; -import io.prestosql.plugin.thrift.api.PrestoThriftNullableToken; -import io.prestosql.plugin.thrift.api.PrestoThriftPageResult; -import io.prestosql.plugin.thrift.api.PrestoThriftSchemaTableName; -import io.prestosql.plugin.thrift.api.PrestoThriftService; -import io.prestosql.plugin.thrift.api.PrestoThriftSplit; -import io.prestosql.plugin.thrift.api.PrestoThriftSplitBatch; -import io.prestosql.plugin.thrift.api.PrestoThriftTupleDomain; -import io.prestosql.plugin.thrift.api.datatypes.PrestoThriftInteger; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.plugin.thrift.api.PrestoThriftId; +import io.trino.plugin.thrift.api.PrestoThriftNullableColumnSet; +import io.trino.plugin.thrift.api.PrestoThriftNullableSchemaName; +import io.trino.plugin.thrift.api.PrestoThriftNullableTableMetadata; +import io.trino.plugin.thrift.api.PrestoThriftNullableToken; +import io.trino.plugin.thrift.api.PrestoThriftPageResult; +import io.trino.plugin.thrift.api.PrestoThriftSchemaTableName; +import io.trino.plugin.thrift.api.PrestoThriftService; +import io.trino.plugin.thrift.api.PrestoThriftSplit; +import io.trino.plugin.thrift.api.PrestoThriftSplitBatch; +import io.trino.plugin.thrift.api.PrestoThriftTupleDomain; +import io.trino.plugin.thrift.api.datatypes.PrestoThriftInteger; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import org.testng.annotations.Test; import java.util.ArrayList; @@ -47,8 +47,8 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.util.concurrent.Futures.immediateFuture; -import static io.prestosql.plugin.thrift.api.PrestoThriftBlock.integerData; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.plugin.thrift.api.PrestoThriftBlock.integerData; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.util.Collections.shuffle; import static java.util.concurrent.TimeUnit.SECONDS; import static org.testng.Assert.assertEquals; diff --git a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/TestThriftPlugin.java b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/TestThriftPlugin.java index ae380a51e4d9..4c51a1d41592 100644 --- a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/TestThriftPlugin.java +++ b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/TestThriftPlugin.java @@ -14,10 +14,10 @@ package io.trino.plugin.thrift; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.TestingConnectorContext; +import io.trino.spi.Plugin; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.TestingConnectorContext; import org.testng.annotations.Test; import java.util.Map; diff --git a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftDistributedQueries.java b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftDistributedQueries.java index ed4e39dcb449..71775af9d7c8 100644 --- a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftDistributedQueries.java +++ b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftDistributedQueries.java @@ -14,10 +14,10 @@ package io.trino.plugin.thrift.integration; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestQueries; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestQueries; +import io.trino.testing.QueryRunner; -import static io.prestosql.plugin.thrift.integration.ThriftQueryRunner.createThriftQueryRunner; +import static io.trino.plugin.thrift.integration.ThriftQueryRunner.createThriftQueryRunner; public class TestThriftDistributedQueries extends AbstractTestQueries diff --git a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftDistributedQueriesIndexed.java b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftDistributedQueriesIndexed.java index 9cb459ab5fe0..f51a48346500 100644 --- a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftDistributedQueriesIndexed.java +++ b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftDistributedQueriesIndexed.java @@ -14,10 +14,10 @@ package io.trino.plugin.thrift.integration; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestIndexedQueries; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestIndexedQueries; +import io.trino.testing.QueryRunner; -import static io.prestosql.plugin.thrift.integration.ThriftQueryRunner.createThriftQueryRunner; +import static io.trino.plugin.thrift.integration.ThriftQueryRunner.createThriftQueryRunner; public class TestThriftDistributedQueriesIndexed extends AbstractTestIndexedQueries diff --git a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftIntegrationSmokeTest.java b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftIntegrationSmokeTest.java index 90d35f47e0d0..f9a796195800 100644 --- a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftIntegrationSmokeTest.java +++ b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftIntegrationSmokeTest.java @@ -14,14 +14,14 @@ package io.trino.plugin.thrift.integration; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestIntegrationSmokeTest; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestIntegrationSmokeTest; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; -import static io.prestosql.plugin.thrift.integration.ThriftQueryRunner.createThriftQueryRunner; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.QueryAssertions.assertContains; +import static io.trino.plugin.thrift.integration.ThriftQueryRunner.createThriftQueryRunner; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.QueryAssertions.assertContains; public class TestThriftIntegrationSmokeTest extends AbstractTestIntegrationSmokeTest diff --git a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftProjectionPushdown.java b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftProjectionPushdown.java index 44f940785cc4..f562f336014b 100644 --- a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftProjectionPushdown.java +++ b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/TestThriftProjectionPushdown.java @@ -18,26 +18,26 @@ import com.google.common.collect.ImmutableSet; import com.google.common.io.Closer; import io.airlift.drift.server.DriftServer; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.plugin.thrift.ThriftColumnHandle; -import io.prestosql.plugin.thrift.ThriftPlugin; -import io.prestosql.plugin.thrift.ThriftTableHandle; -import io.prestosql.plugin.thrift.ThriftTransactionHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.iterative.rule.PruneTableScanColumns; -import io.prestosql.sql.planner.iterative.rule.PushProjectionIntoTableScan; -import io.prestosql.sql.planner.iterative.rule.test.BaseRuleTest; -import io.prestosql.sql.planner.plan.Assignments; -import io.prestosql.sql.tree.SymbolReference; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.TableHandle; +import io.trino.plugin.thrift.ThriftColumnHandle; +import io.trino.plugin.thrift.ThriftPlugin; +import io.trino.plugin.thrift.ThriftTableHandle; +import io.trino.plugin.thrift.ThriftTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.iterative.rule.PruneTableScanColumns; +import io.trino.sql.planner.iterative.rule.PushProjectionIntoTableScan; +import io.trino.sql.planner.iterative.rule.test.BaseRuleTest; +import io.trino.sql.planner.plan.Assignments; +import io.trino.sql.tree.SymbolReference; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -48,13 +48,13 @@ import static com.google.common.base.Predicates.equalTo; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.thrift.integration.ThriftQueryRunner.driftServerPort; -import static io.prestosql.plugin.thrift.integration.ThriftQueryRunner.startThriftServers; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.expression; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.project; -import static io.prestosql.sql.planner.assertions.PlanMatchPattern.tableScan; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.thrift.integration.ThriftQueryRunner.driftServerPort; +import static io.trino.plugin.thrift.integration.ThriftQueryRunner.startThriftServers; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; +import static io.trino.sql.planner.assertions.PlanMatchPattern.project; +import static io.trino.sql.planner.assertions.PlanMatchPattern.tableScan; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.stream.Collectors.joining; public class TestThriftProjectionPushdown diff --git a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/ThriftQueryRunner.java b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/ThriftQueryRunner.java index 5e32c8f6ce23..b1092afc07f2 100644 --- a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/ThriftQueryRunner.java +++ b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/integration/ThriftQueryRunner.java @@ -26,25 +26,25 @@ import io.airlift.drift.transport.netty.server.DriftNettyServerTransportFactory; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.SqlFunction; -import io.prestosql.plugin.thrift.ThriftPlugin; -import io.prestosql.plugin.thrift.server.ThriftIndexedTpchService; -import io.prestosql.plugin.thrift.server.ThriftTpchService; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.Plugin; -import io.prestosql.split.PageSourceManager; -import io.prestosql.split.SplitManager; -import io.prestosql.sql.planner.NodePartitioningManager; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.TestingAccessControlManager; -import io.prestosql.testing.TestingGroupProvider; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.cost.StatsCalculator; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.SqlFunction; +import io.trino.plugin.thrift.ThriftPlugin; +import io.trino.plugin.thrift.server.ThriftIndexedTpchService; +import io.trino.plugin.thrift.server.ThriftTpchService; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.Plugin; +import io.trino.split.PageSourceManager; +import io.trino.split.SplitManager; +import io.trino.sql.planner.NodePartitioningManager; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.testing.TestingAccessControlManager; +import io.trino.testing.TestingGroupProvider; +import io.trino.transaction.TransactionManager; import java.io.IOException; import java.util.ArrayList; @@ -53,7 +53,7 @@ import java.util.concurrent.locks.Lock; import static io.airlift.testing.Closeables.closeAllSuppress; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.joining; diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsColumnHandle.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsColumnHandle.java index f3b15c96ca0b..8d1655687473 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsColumnHandle.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsColumnHandle.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsConnectorFactory.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsConnectorFactory.java index cdcc391ba297..0edc3933740c 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsConnectorFactory.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsConnectorFactory.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.tpcds; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import java.util.Map; diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsHandleResolver.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsHandleResolver.java index ba284daae6f0..75fea32f3ff7 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsHandleResolver.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsHandleResolver.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.tpcds; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class TpcdsHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsMetadata.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsMetadata.java index 53384038ee0e..493101d63dd4 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsMetadata.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsMetadata.java @@ -16,26 +16,26 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.tpcds.statistics.TpcdsTableStatisticsFactory; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayout; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutResult; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.DateType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.Type; +import io.trino.plugin.tpcds.statistics.TpcdsTableStatisticsFactory; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayout; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTableLayoutResult; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.DateType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.Type; import io.trino.tpcds.Table; import io.trino.tpcds.column.Column; import io.trino.tpcds.column.ColumnType; @@ -45,9 +45,9 @@ import java.util.Optional; import java.util.Set; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.VarcharType.createVarcharType; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsNodePartitioningProvider.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsNodePartitioningProvider.java index c2b8f3fbb453..41c023496d87 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsNodePartitioningProvider.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsNodePartitioningProvider.java @@ -13,16 +13,16 @@ */ package io.trino.plugin.tpcds; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.connector.ConnectorBucketNodeMap; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.connector.ConnectorBucketNodeMap; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.type.Type; import java.util.List; import java.util.Set; @@ -30,7 +30,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.connector.ConnectorBucketNodeMap.createBucketNodeMap; +import static io.trino.spi.connector.ConnectorBucketNodeMap.createBucketNodeMap; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsPartitioningHandle.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsPartitioningHandle.java index 03e244751d23..7c3b9da3e4f9 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsPartitioningHandle.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsPartitioningHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; import java.util.Objects; diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsPlugin.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsPlugin.java index 9bd80e733fa5..a72b699e6e5a 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsPlugin.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.tpcds; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class TpcdsPlugin implements Plugin diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsRecordSet.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsRecordSet.java index 570165aa54a6..691c78fa10cd 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsRecordSet.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsRecordSet.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.DecimalParseResult; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.DecimalParseResult; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.Type; import io.trino.tpcds.Results; import io.trino.tpcds.column.Column; import io.trino.tpcds.column.ColumnType; @@ -33,9 +33,9 @@ import java.util.List; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.plugin.tpcds.TpcdsMetadata.getPrestoType; -import static io.prestosql.spi.type.Chars.trimTrailingSpaces; -import static io.prestosql.spi.type.Decimals.rescale; +import static io.trino.plugin.tpcds.TpcdsMetadata.getPrestoType; +import static io.trino.spi.type.Chars.trimTrailingSpaces; +import static io.trino.spi.type.Decimals.rescale; import static java.lang.Double.parseDouble; import static java.lang.Integer.parseInt; import static java.lang.Long.parseLong; diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsRecordSetProvider.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsRecordSetProvider.java index a0968052e165..c7213248a512 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsRecordSetProvider.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsRecordSetProvider.java @@ -14,13 +14,13 @@ package io.trino.plugin.tpcds; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; import io.trino.tpcds.Results; import io.trino.tpcds.Session; import io.trino.tpcds.Table; diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsSplit.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsSplit.java index 11975f9ce37c..ae8e538803b5 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsSplit.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsSplitManager.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsSplitManager.java index fe2a7d2d72f4..bbce9090cb20 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsSplitManager.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsSplitManager.java @@ -14,15 +14,15 @@ package io.trino.plugin.tpcds; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.FixedSplitSource; import java.util.Set; diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsTableHandle.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsTableHandle.java index 57b3ac06550b..8e590be2a437 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsTableHandle.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsTableHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableHandle; import java.util.Objects; diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsTableLayoutHandle.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsTableLayoutHandle.java index 31fb776e7281..958e55c7a01f 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsTableLayoutHandle.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsTableLayoutHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; import java.util.Objects; diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsTransactionHandle.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsTransactionHandle.java index 3b88a0da869b..f2f12bd637e8 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsTransactionHandle.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/TpcdsTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.tpcds; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum TpcdsTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/statistics/TpcdsTableStatisticsFactory.java b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/statistics/TpcdsTableStatisticsFactory.java index 88cf53ef6d89..60b833fa0ff6 100644 --- a/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/statistics/TpcdsTableStatisticsFactory.java +++ b/plugin/trino-tpcds/src/main/java/io/trino/plugin/tpcds/statistics/TpcdsTableStatisticsFactory.java @@ -15,30 +15,30 @@ package io.trino.plugin.tpcds.statistics; import io.airlift.slice.Slice; -import io.prestosql.plugin.tpcds.TpcdsColumnHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.statistics.ColumnStatistics; -import io.prestosql.spi.statistics.DoubleRange; -import io.prestosql.spi.statistics.Estimate; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.tpcds.TpcdsColumnHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.statistics.ColumnStatistics; +import io.trino.spi.statistics.DoubleRange; +import io.trino.spi.statistics.Estimate; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import io.trino.tpcds.Table; import java.time.LocalDate; import java.util.Map; import java.util.Optional; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.Decimals.isLongDecimal; -import static io.prestosql.spi.type.Decimals.isShortDecimal; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.Decimals.isLongDecimal; +import static io.trino.spi.type.Decimals.isShortDecimal; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; import static java.lang.Double.parseDouble; public class TpcdsTableStatisticsFactory diff --git a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/EstimateAssertion.java b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/EstimateAssertion.java index 84a6d296973d..1672b72da23d 100644 --- a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/EstimateAssertion.java +++ b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/EstimateAssertion.java @@ -15,7 +15,7 @@ package io.trino.plugin.tpcds; import io.airlift.slice.Slice; -import io.prestosql.spi.statistics.Estimate; +import io.trino.spi.statistics.Estimate; import java.util.Optional; diff --git a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TestTpcds.java b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TestTpcds.java index afb56de6e458..9b17d4e86292 100644 --- a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TestTpcds.java +++ b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TestTpcds.java @@ -13,17 +13,17 @@ */ package io.trino.plugin.tpcds; -import io.prestosql.Session; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; import java.math.BigDecimal; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.util.stream.Collectors.joining; import static java.util.stream.IntStream.range; diff --git a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TestTpcdsMetadata.java b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TestTpcdsMetadata.java index 079c9d5b841d..36daad9921b5 100644 --- a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TestTpcdsMetadata.java +++ b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TestTpcdsMetadata.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.tpcds; -import io.prestosql.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSession; import org.testng.annotations.Test; import static org.testng.Assert.assertFalse; diff --git a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TestTpcdsMetadataStatistics.java b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TestTpcdsMetadataStatistics.java index b11ac5fc2f64..cdf0a6a09867 100644 --- a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TestTpcdsMetadataStatistics.java +++ b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TestTpcdsMetadataStatistics.java @@ -14,14 +14,14 @@ package io.trino.plugin.tpcds; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.statistics.ColumnStatistics; -import io.prestosql.spi.statistics.DoubleRange; -import io.prestosql.spi.statistics.Estimate; -import io.prestosql.spi.statistics.TableStatistics; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.statistics.ColumnStatistics; +import io.trino.spi.statistics.DoubleRange; +import io.trino.spi.statistics.Estimate; +import io.trino.spi.statistics.TableStatistics; import io.trino.tpcds.Table; import io.trino.tpcds.column.CallCenterColumn; import io.trino.tpcds.column.WebSiteColumn; @@ -30,7 +30,7 @@ import java.util.Map; import java.util.stream.Stream; -import static io.prestosql.spi.connector.Constraint.alwaysTrue; +import static io.trino.spi.connector.Constraint.alwaysTrue; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; diff --git a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TpcdsQueryRunner.java b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TpcdsQueryRunner.java index cba98eaeb5d5..88354dd224c2 100644 --- a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TpcdsQueryRunner.java +++ b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/TpcdsQueryRunner.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.Session; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.testing.DistributedQueryRunner; import java.util.Map; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class TpcdsQueryRunner { diff --git a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/statistics/TableStatisticsRecorder.java b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/statistics/TableStatisticsRecorder.java index e8c316aa5f10..d43ec536051b 100644 --- a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/statistics/TableStatisticsRecorder.java +++ b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/statistics/TableStatisticsRecorder.java @@ -15,8 +15,8 @@ package io.trino.plugin.tpcds.statistics; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.tpcds.TpcdsRecordSet; -import io.prestosql.spi.connector.RecordCursor; +import io.trino.plugin.tpcds.TpcdsRecordSet; +import io.trino.spi.connector.RecordCursor; import io.trino.tpcds.Results; import io.trino.tpcds.Session; import io.trino.tpcds.Table; diff --git a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/statistics/TestTpcdsLocalStats.java b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/statistics/TestTpcdsLocalStats.java index b4fb03790353..2a7ef0ee84b2 100644 --- a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/statistics/TestTpcdsLocalStats.java +++ b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/statistics/TestTpcdsLocalStats.java @@ -13,22 +13,22 @@ */ package io.trino.plugin.tpcds.statistics; -import io.prestosql.Session; -import io.prestosql.plugin.tpcds.TpcdsConnectorFactory; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.statistics.StatisticsAssertion; +import io.trino.Session; +import io.trino.plugin.tpcds.TpcdsConnectorFactory; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.statistics.StatisticsAssertion; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.COLLECT_PLAN_STATISTICS_FOR_ALL_QUERIES; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.absoluteError; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.defaultTolerance; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.noError; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.relativeError; -import static io.prestosql.testing.statistics.Metrics.OUTPUT_ROW_COUNT; -import static io.prestosql.testing.statistics.Metrics.distinctValuesCount; +import static io.trino.SystemSessionProperties.COLLECT_PLAN_STATISTICS_FOR_ALL_QUERIES; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.statistics.MetricComparisonStrategies.absoluteError; +import static io.trino.testing.statistics.MetricComparisonStrategies.defaultTolerance; +import static io.trino.testing.statistics.MetricComparisonStrategies.noError; +import static io.trino.testing.statistics.MetricComparisonStrategies.relativeError; +import static io.trino.testing.statistics.Metrics.OUTPUT_ROW_COUNT; +import static io.trino.testing.statistics.Metrics.distinctValuesCount; import static java.util.Collections.emptyMap; public class TestTpcdsLocalStats diff --git a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/statistics/TpcdsStatisticsRecorder.java b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/statistics/TpcdsStatisticsRecorder.java index a9d928f0cf87..1fde83e111bc 100644 --- a/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/statistics/TpcdsStatisticsRecorder.java +++ b/plugin/trino-tpcds/src/test/java/io/trino/plugin/tpcds/statistics/TpcdsStatisticsRecorder.java @@ -17,7 +17,7 @@ import com.google.common.collect.ImmutableList; import io.trino.tpcds.Table; -import static io.prestosql.plugin.tpcds.TpcdsMetadata.schemaNameToScaleFactor; +import static io.trino.plugin.tpcds.TpcdsMetadata.schemaNameToScaleFactor; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/LazyRecordPageSource.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/LazyRecordPageSource.java index fc8d57642d77..fe19eec42742 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/LazyRecordPageSource.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/LazyRecordPageSource.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.block.LazyBlock; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.block.LazyBlock; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.List; diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchBucketFunction.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchBucketFunction.java index e94dfaf5225f..61f4966bcd49 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchBucketFunction.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchBucketFunction.java @@ -13,12 +13,12 @@ */ package io.trino.plugin.tpch; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.BucketFunction; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.BucketFunction; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.Math.toIntExact; public class TpchBucketFunction diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchColumnHandle.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchColumnHandle.java index 99607781a54c..10020e99dcb0 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchColumnHandle.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchColumnHandle.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.type.Type; import java.util.Objects; diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchConnectorFactory.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchConnectorFactory.java index bbefab35c922..f25ae4983cf8 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchConnectorFactory.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchConnectorFactory.java @@ -13,18 +13,18 @@ */ package io.trino.plugin.tpch; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.transaction.IsolationLevel; import java.util.Map; import java.util.Optional; diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchHandleResolver.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchHandleResolver.java index a00667ea3462..2eaffa0e31b9 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchHandleResolver.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchHandleResolver.java @@ -13,13 +13,13 @@ */ package io.trino.plugin.tpch; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public class TpchHandleResolver implements ConnectorHandleResolver diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchMetadata.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchMetadata.java index 35c4607b5f72..8a4b68197a49 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchMetadata.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchMetadata.java @@ -22,38 +22,38 @@ import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.plugin.tpch.statistics.ColumnStatisticsData; -import io.prestosql.plugin.tpch.statistics.StatisticsEstimator; -import io.prestosql.plugin.tpch.statistics.TableStatisticsData; -import io.prestosql.plugin.tpch.statistics.TableStatisticsDataRepository; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTablePartitioning; -import io.prestosql.spi.connector.ConnectorTableProperties; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.LocalProperty; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SchemaTablePrefix; -import io.prestosql.spi.connector.SortOrder; -import io.prestosql.spi.connector.SortingProperty; -import io.prestosql.spi.connector.TableScanRedirectApplicationResult; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.ColumnStatistics; -import io.prestosql.spi.statistics.ComputedStatistics; -import io.prestosql.spi.statistics.DoubleRange; -import io.prestosql.spi.statistics.Estimate; -import io.prestosql.spi.statistics.TableStatistics; -import io.prestosql.spi.statistics.TableStatisticsMetadata; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.plugin.tpch.statistics.ColumnStatisticsData; +import io.trino.plugin.tpch.statistics.StatisticsEstimator; +import io.trino.plugin.tpch.statistics.TableStatisticsData; +import io.trino.plugin.tpch.statistics.TableStatisticsDataRepository; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTablePartitioning; +import io.trino.spi.connector.ConnectorTableProperties; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.LocalProperty; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SchemaTablePrefix; +import io.trino.spi.connector.SortOrder; +import io.trino.spi.connector.SortingProperty; +import io.trino.spi.connector.TableScanRedirectApplicationResult; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.ColumnStatistics; +import io.trino.spi.statistics.ComputedStatistics; +import io.trino.spi.statistics.DoubleRange; +import io.trino.spi.statistics.Estimate; +import io.trino.spi.statistics.TableStatistics; +import io.trino.spi.statistics.TableStatisticsMetadata; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import io.trino.tpch.Distributions; import io.trino.tpch.LineItemColumn; import io.trino.tpch.OrderColumn; @@ -75,14 +75,14 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Maps.asMap; -import static io.prestosql.plugin.tpch.util.PredicateUtils.convertToPredicate; -import static io.prestosql.plugin.tpch.util.PredicateUtils.filterOutColumnFromPredicate; -import static io.prestosql.spi.statistics.TableStatisticType.ROW_COUNT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.VarcharType.createVarcharType; +import static io.trino.plugin.tpch.util.PredicateUtils.convertToPredicate; +import static io.trino.plugin.tpch.util.PredicateUtils.filterOutColumnFromPredicate; +import static io.trino.spi.statistics.TableStatisticType.ROW_COUNT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.VarcharType.createVarcharType; import static io.trino.tpch.OrderColumn.ORDER_STATUS; import static java.lang.String.format; import static java.util.Collections.emptyList; diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchNodePartitioningProvider.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchNodePartitioningProvider.java index 26f7d71d4881..4d439e16657b 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchNodePartitioningProvider.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchNodePartitioningProvider.java @@ -14,24 +14,24 @@ package io.trino.plugin.tpch; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.BucketFunction; -import io.prestosql.spi.connector.ConnectorBucketNodeMap; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.type.Type; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.BucketFunction; +import io.trino.spi.connector.ConnectorBucketNodeMap; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.type.Type; import java.util.List; import java.util.Set; import java.util.function.ToIntFunction; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.connector.ConnectorBucketNodeMap.createBucketNodeMap; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.connector.ConnectorBucketNodeMap.createBucketNodeMap; +import static io.trino.spi.type.BigintType.BIGINT; import static java.lang.Math.toIntExact; public class TpchNodePartitioningProvider diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchPageSourceProvider.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchPageSourceProvider.java index 3370cbc49f31..76f2de2a42b3 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchPageSourceProvider.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchPageSourceProvider.java @@ -13,14 +13,14 @@ */ package io.trino.plugin.tpch; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.predicate.TupleDomain; import java.util.List; diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchPartitioningHandle.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchPartitioningHandle.java index 9750202dea94..4643ab874dc5 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchPartitioningHandle.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchPartitioningHandle.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ConnectorPartitioningHandle; +import io.trino.spi.connector.ConnectorPartitioningHandle; import java.util.Objects; diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchPlugin.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchPlugin.java index 64906413f158..c9f07bacd722 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchPlugin.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchPlugin.java @@ -14,8 +14,8 @@ package io.trino.plugin.tpch; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; public class TpchPlugin implements Plugin diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchRecordSet.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchRecordSet.java index 3f06506debc8..41bcc7bcf582 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchRecordSet.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchRecordSet.java @@ -16,13 +16,13 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import io.trino.tpch.TpchColumn; import io.trino.tpch.TpchColumnType; import io.trino.tpch.TpchEntity; @@ -35,8 +35,8 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.plugin.tpch.TpchMetadata.getPrestoType; -import static io.prestosql.spi.StandardErrorCode.NOT_SUPPORTED; +import static io.trino.plugin.tpch.TpchMetadata.getPrestoType; +import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchRecordSetProvider.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchRecordSetProvider.java index 7bde5fac950d..a2f4c6413aca 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchRecordSetProvider.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchRecordSetProvider.java @@ -14,14 +14,14 @@ package io.trino.plugin.tpch; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.predicate.TupleDomain; import io.trino.tpch.TpchColumn; import io.trino.tpch.TpchColumnType; import io.trino.tpch.TpchEntity; @@ -29,7 +29,7 @@ import java.util.List; -import static io.prestosql.plugin.tpch.TpchRecordSet.createTpchRecordSet; +import static io.trino.plugin.tpch.TpchRecordSet.createTpchRecordSet; import static io.trino.tpch.TpchColumnTypes.IDENTIFIER; public class TpchRecordSetProvider diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchSplit.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchSplit.java index 3db65e00af39..fc899fe17c6c 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchSplit.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchSplit.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.HostAddress; -import io.prestosql.spi.connector.ConnectorSplit; +import io.trino.spi.HostAddress; +import io.trino.spi.connector.ConnectorSplit; import java.util.List; import java.util.Objects; diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchSplitManager.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchSplitManager.java index 86a5ab056f89..3859bf617719 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchSplitManager.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchSplitManager.java @@ -14,16 +14,16 @@ package io.trino.plugin.tpch; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Node; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.FixedSplitSource; +import io.trino.spi.Node; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.FixedSplitSource; import java.util.Set; diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTableHandle.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTableHandle.java index 1842465e5ecd..c3d2fb7b364e 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTableHandle.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTableHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.predicate.TupleDomain; import java.util.Objects; diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTableLayoutHandle.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTableLayoutHandle.java index e890db3d1426..972ef15c5ee0 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTableLayoutHandle.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTableLayoutHandle.java @@ -15,9 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorTableLayoutHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorTableLayoutHandle; +import io.trino.spi.predicate.TupleDomain; import java.util.Objects; diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTables.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTables.java index ef52763909b1..5a9747860c54 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTables.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTables.java @@ -14,18 +14,18 @@ package io.trino.plugin.tpch; import com.google.common.collect.AbstractIterator; -import io.prestosql.spi.Page; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.spi.Page; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import io.trino.tpch.TpchTable; import java.util.Iterator; import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.plugin.tpch.TpchRecordSet.createTpchRecordSet; +import static io.trino.plugin.tpch.TpchRecordSet.createTpchRecordSet; public final class TpchTables { diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTransactionHandle.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTransactionHandle.java index 002e0c5d6a27..26c7b47dfc55 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTransactionHandle.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/TpchTransactionHandle.java @@ -13,7 +13,7 @@ */ package io.trino.plugin.tpch; -import io.prestosql.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; public enum TpchTransactionHandle implements ConnectorTransactionHandle diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/statistics/StatisticsEstimator.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/statistics/StatisticsEstimator.java index 46725fe4de6d..922f24cf715f 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/statistics/StatisticsEstimator.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/statistics/StatisticsEstimator.java @@ -24,9 +24,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.plugin.tpch.util.Optionals.combine; -import static io.prestosql.plugin.tpch.util.Types.checkSameType; -import static io.prestosql.plugin.tpch.util.Types.checkType; +import static io.trino.plugin.tpch.util.Optionals.combine; +import static io.trino.plugin.tpch.util.Types.checkSameType; +import static io.trino.plugin.tpch.util.Types.checkType; public class StatisticsEstimator { diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/statistics/TableStatisticsDataRepository.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/statistics/TableStatisticsDataRepository.java index 57ab1a5f3eeb..786a906258d9 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/statistics/TableStatisticsDataRepository.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/statistics/TableStatisticsDataRepository.java @@ -26,7 +26,7 @@ import java.util.Optional; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.plugin.tpch.util.Optionals.withBoth; +import static io.trino.plugin.tpch.util.Optionals.withBoth; import static java.lang.String.format; public class TableStatisticsDataRepository diff --git a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/util/PredicateUtils.java b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/util/PredicateUtils.java index 25ee82ffe74c..1b41457d3a1f 100644 --- a/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/util/PredicateUtils.java +++ b/plugin/trino-tpch/src/main/java/io/trino/plugin/tpch/util/PredicateUtils.java @@ -14,10 +14,10 @@ package io.trino.plugin.tpch.util; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; import java.util.function.Predicate; diff --git a/plugin/trino-tpch/src/test/java/io/trino/plugin/tpch/EstimateAssertion.java b/plugin/trino-tpch/src/test/java/io/trino/plugin/tpch/EstimateAssertion.java index 3b2ed844dc49..ae350f0ae644 100644 --- a/plugin/trino-tpch/src/test/java/io/trino/plugin/tpch/EstimateAssertion.java +++ b/plugin/trino-tpch/src/test/java/io/trino/plugin/tpch/EstimateAssertion.java @@ -14,8 +14,8 @@ package io.trino.plugin.tpch; import io.airlift.slice.Slice; -import io.prestosql.spi.statistics.DoubleRange; -import io.prestosql.spi.statistics.Estimate; +import io.trino.spi.statistics.DoubleRange; +import io.trino.spi.statistics.Estimate; import java.util.Optional; diff --git a/plugin/trino-tpch/src/test/java/io/trino/plugin/tpch/TestTpchMetadata.java b/plugin/trino-tpch/src/test/java/io/trino/plugin/tpch/TestTpchMetadata.java index e8c5f9ba6772..150e19a0010b 100644 --- a/plugin/trino-tpch/src/test/java/io/trino/plugin/tpch/TestTpchMetadata.java +++ b/plugin/trino-tpch/src/test/java/io/trino/plugin/tpch/TestTpchMetadata.java @@ -15,19 +15,19 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.tpch.util.PredicateUtils; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.Constraint; -import io.prestosql.spi.connector.ConstraintApplicationResult; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.statistics.ColumnStatistics; -import io.prestosql.spi.statistics.DoubleRange; -import io.prestosql.spi.statistics.Estimate; -import io.prestosql.spi.statistics.TableStatistics; +import io.trino.plugin.tpch.util.PredicateUtils; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.Constraint; +import io.trino.spi.connector.ConstraintApplicationResult; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.statistics.ColumnStatistics; +import io.trino.spi.statistics.DoubleRange; +import io.trino.spi.statistics.Estimate; +import io.trino.spi.statistics.TableStatistics; import io.trino.tpch.PartColumn; import io.trino.tpch.TpchColumn; import io.trino.tpch.TpchTable; @@ -42,10 +42,10 @@ import static com.google.common.base.Preconditions.checkArgument; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.plugin.tpch.TpchMetadata.getPrestoType; -import static io.prestosql.plugin.tpch.util.PredicateUtils.filterOutColumnFromPredicate; -import static io.prestosql.spi.connector.Constraint.alwaysFalse; -import static io.prestosql.spi.connector.Constraint.alwaysTrue; +import static io.trino.plugin.tpch.TpchMetadata.getPrestoType; +import static io.trino.plugin.tpch.util.PredicateUtils.filterOutColumnFromPredicate; +import static io.trino.spi.connector.Constraint.alwaysFalse; +import static io.trino.spi.connector.Constraint.alwaysTrue; import static io.trino.tpch.CustomerColumn.MARKET_SEGMENT; import static io.trino.tpch.CustomerColumn.NAME; import static io.trino.tpch.LineItemColumn.LINE_NUMBER; diff --git a/plugin/trino-tpch/src/test/java/io/trino/plugin/tpch/statistics/TpchStatisticsRecorder.java b/plugin/trino-tpch/src/test/java/io/trino/plugin/tpch/statistics/TpchStatisticsRecorder.java index 2dc7fc3bc686..6044733d25ad 100644 --- a/plugin/trino-tpch/src/test/java/io/trino/plugin/tpch/statistics/TpchStatisticsRecorder.java +++ b/plugin/trino-tpch/src/test/java/io/trino/plugin/tpch/statistics/TpchStatisticsRecorder.java @@ -24,7 +24,7 @@ import java.util.function.Predicate; import java.util.stream.Stream; -import static io.prestosql.plugin.tpch.TpchMetadata.schemaNameToScaleFactor; +import static io.trino.plugin.tpch.TpchMetadata.schemaNameToScaleFactor; import static io.trino.tpch.OrderColumn.ORDER_STATUS; import static io.trino.tpch.TpchTable.ORDERS; import static java.lang.String.format; diff --git a/service/trino-proxy/src/main/java/io/trino/proxy/ProxyResource.java b/service/trino-proxy/src/main/java/io/trino/proxy/ProxyResource.java index 8c3a0872e045..c8a12ce26647 100644 --- a/service/trino-proxy/src/main/java/io/trino/proxy/ProxyResource.java +++ b/service/trino-proxy/src/main/java/io/trino/proxy/ProxyResource.java @@ -25,7 +25,7 @@ import io.airlift.http.client.Request; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.proxy.ProxyResponseHandler.ProxyResponse; +import io.trino.proxy.ProxyResponseHandler.ProxyResponse; import javax.annotation.PreDestroy; import javax.inject.Inject; diff --git a/service/trino-proxy/src/main/java/io/trino/proxy/ProxyResponseHandler.java b/service/trino-proxy/src/main/java/io/trino/proxy/ProxyResponseHandler.java index b860b2c39baf..76196718d57e 100644 --- a/service/trino-proxy/src/main/java/io/trino/proxy/ProxyResponseHandler.java +++ b/service/trino-proxy/src/main/java/io/trino/proxy/ProxyResponseHandler.java @@ -19,7 +19,7 @@ import io.airlift.http.client.Request; import io.airlift.http.client.Response; import io.airlift.http.client.ResponseHandler; -import io.prestosql.proxy.ProxyResponseHandler.ProxyResponse; +import io.trino.proxy.ProxyResponseHandler.ProxyResponse; import java.io.IOException; diff --git a/service/trino-proxy/src/test/java/io/trino/proxy/TestProxyServer.java b/service/trino-proxy/src/test/java/io/trino/proxy/TestProxyServer.java index 85f784bc26fc..8850cfd12d44 100644 --- a/service/trino-proxy/src/test/java/io/trino/proxy/TestProxyServer.java +++ b/service/trino-proxy/src/test/java/io/trino/proxy/TestProxyServer.java @@ -23,12 +23,12 @@ import io.airlift.json.JsonModule; import io.airlift.log.Logging; import io.airlift.node.testing.TestingNodeModule; -import io.prestosql.execution.QueryState; -import io.prestosql.jdbc.PrestoResultSet; -import io.prestosql.jdbc.PrestoStatement; -import io.prestosql.plugin.blackhole.BlackHolePlugin; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.server.testing.TestingPrestoServer; +import io.trino.execution.QueryState; +import io.trino.jdbc.PrestoResultSet; +import io.trino.jdbc.PrestoStatement; +import io.trino.plugin.blackhole.BlackHolePlugin; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.server.testing.TestingPrestoServer; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -50,7 +50,7 @@ import java.util.concurrent.atomic.AtomicReference; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.FAILED; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.US_ASCII; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/service/trino-verifier/src/main/java/io/trino/verifier/QueryRewriter.java b/service/trino-verifier/src/main/java/io/trino/verifier/QueryRewriter.java index f38b5b0392b4..c0ee94161fa2 100644 --- a/service/trino-verifier/src/main/java/io/trino/verifier/QueryRewriter.java +++ b/service/trino-verifier/src/main/java/io/trino/verifier/QueryRewriter.java @@ -19,26 +19,26 @@ import com.google.common.util.concurrent.TimeLimiter; import com.google.common.util.concurrent.UncheckedTimeoutException; import io.airlift.units.Duration; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.CreateTableAsSelect; -import io.prestosql.sql.tree.DropTable; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.Insert; -import io.prestosql.sql.tree.LikeClause; -import io.prestosql.sql.tree.Limit; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.QueryBody; -import io.prestosql.sql.tree.QuerySpecification; -import io.prestosql.sql.tree.Select; -import io.prestosql.sql.tree.SelectItem; -import io.prestosql.sql.tree.SingleColumn; -import io.prestosql.sql.tree.Statement; -import io.prestosql.sql.tree.Table; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.CreateTableAsSelect; +import io.trino.sql.tree.DropTable; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.Insert; +import io.trino.sql.tree.LikeClause; +import io.trino.sql.tree.Limit; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.QueryBody; +import io.trino.sql.tree.QuerySpecification; +import io.trino.sql.tree.Select; +import io.trino.sql.tree.SelectItem; +import io.trino.sql.tree.SingleColumn; +import io.trino.sql.tree.Statement; +import io.trino.sql.tree.Table; import java.sql.Connection; import java.sql.DriverManager; @@ -55,11 +55,11 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; -import static io.prestosql.sql.SqlFormatter.formatSql; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; -import static io.prestosql.sql.tree.LikeClause.PropertiesOption.INCLUDING; -import static io.prestosql.verifier.QueryType.READ; -import static io.prestosql.verifier.VerifyCommand.statementToQueryType; +import static io.trino.sql.SqlFormatter.formatSql; +import static io.trino.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; +import static io.trino.sql.tree.LikeClause.PropertiesOption.INCLUDING; +import static io.trino.verifier.QueryType.READ; +import static io.trino.verifier.VerifyCommand.statementToQueryType; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newSingleThreadExecutor; diff --git a/service/trino-verifier/src/main/java/io/trino/verifier/Validator.java b/service/trino-verifier/src/main/java/io/trino/verifier/Validator.java index 33fdba3740f0..949097bb6fc2 100644 --- a/service/trino-verifier/src/main/java/io/trino/verifier/Validator.java +++ b/service/trino-verifier/src/main/java/io/trino/verifier/Validator.java @@ -29,11 +29,11 @@ import com.google.common.util.concurrent.UncheckedTimeoutException; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.jdbc.PrestoConnection; -import io.prestosql.jdbc.PrestoStatement; -import io.prestosql.jdbc.QueryStats; -import io.prestosql.spi.type.SqlVarbinary; -import io.prestosql.verifier.Validator.ChangedRow.Changed; +import io.trino.jdbc.PrestoConnection; +import io.trino.jdbc.PrestoStatement; +import io.trino.jdbc.QueryStats; +import io.trino.spi.type.SqlVarbinary; +import io.trino.verifier.Validator.ChangedRow.Changed; import java.math.BigDecimal; import java.sql.Array; @@ -57,7 +57,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Strings.nullToEmpty; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.verifier.QueryResult.State; +import static io.trino.verifier.QueryResult.State; import static java.lang.Double.isFinite; import static java.lang.String.format; import static java.util.Collections.unmodifiableList; diff --git a/service/trino-verifier/src/main/java/io/trino/verifier/Verifier.java b/service/trino-verifier/src/main/java/io/trino/verifier/Verifier.java index cb87918c7cf1..00e3f9d0ba35 100644 --- a/service/trino-verifier/src/main/java/io/trino/verifier/Verifier.java +++ b/service/trino-verifier/src/main/java/io/trino/verifier/Verifier.java @@ -18,8 +18,8 @@ import io.airlift.event.client.EventClient; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.spi.ErrorCode; -import io.prestosql.spi.PrestoException; +import io.trino.spi.ErrorCode; +import io.trino.spi.PrestoException; import java.io.Closeable; import java.io.IOException; @@ -33,10 +33,10 @@ import java.util.regex.Pattern; import static com.google.common.base.Throwables.getStackTraceAsString; -import static io.prestosql.spi.StandardErrorCode.PAGE_TRANSPORT_TIMEOUT; -import static io.prestosql.spi.StandardErrorCode.REMOTE_TASK_MISMATCH; -import static io.prestosql.spi.StandardErrorCode.TOO_MANY_REQUESTS_FAILED; -import static io.prestosql.verifier.QueryResult.State.SUCCESS; +import static io.trino.spi.StandardErrorCode.PAGE_TRANSPORT_TIMEOUT; +import static io.trino.spi.StandardErrorCode.REMOTE_TASK_MISMATCH; +import static io.trino.spi.StandardErrorCode.TOO_MANY_REQUESTS_FAILED; +import static io.trino.verifier.QueryResult.State.SUCCESS; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newFixedThreadPool; diff --git a/service/trino-verifier/src/main/java/io/trino/verifier/VerifierConfig.java b/service/trino-verifier/src/main/java/io/trino/verifier/VerifierConfig.java index 22ee1d688607..d103910b0a69 100644 --- a/service/trino-verifier/src/main/java/io/trino/verifier/VerifierConfig.java +++ b/service/trino-verifier/src/main/java/io/trino/verifier/VerifierConfig.java @@ -21,8 +21,8 @@ import io.airlift.configuration.ConfigDescription; import io.airlift.configuration.LegacyConfig; import io.airlift.units.Duration; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.QualifiedName; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.QualifiedName; import org.joda.time.DateTime; import javax.annotation.Nullable; @@ -35,9 +35,9 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import static io.prestosql.verifier.QueryType.CREATE; -import static io.prestosql.verifier.QueryType.MODIFY; -import static io.prestosql.verifier.QueryType.READ; +import static io.trino.verifier.QueryType.CREATE; +import static io.trino.verifier.QueryType.MODIFY; +import static io.trino.verifier.QueryType.READ; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/service/trino-verifier/src/main/java/io/trino/verifier/VerifyCommand.java b/service/trino-verifier/src/main/java/io/trino/verifier/VerifyCommand.java index ea178a89a445..c3aa4491de35 100644 --- a/service/trino-verifier/src/main/java/io/trino/verifier/VerifyCommand.java +++ b/service/trino-verifier/src/main/java/io/trino/verifier/VerifyCommand.java @@ -26,33 +26,33 @@ import io.airlift.bootstrap.LifeCycleManager; import io.airlift.event.client.EventClient; import io.airlift.log.Logger; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.AddColumn; -import io.prestosql.sql.tree.Comment; -import io.prestosql.sql.tree.CreateMaterializedView; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.CreateTableAsSelect; -import io.prestosql.sql.tree.CreateView; -import io.prestosql.sql.tree.Delete; -import io.prestosql.sql.tree.DropColumn; -import io.prestosql.sql.tree.DropMaterializedView; -import io.prestosql.sql.tree.DropTable; -import io.prestosql.sql.tree.DropView; -import io.prestosql.sql.tree.Explain; -import io.prestosql.sql.tree.Insert; -import io.prestosql.sql.tree.RefreshMaterializedView; -import io.prestosql.sql.tree.RenameColumn; -import io.prestosql.sql.tree.RenameTable; -import io.prestosql.sql.tree.RenameView; -import io.prestosql.sql.tree.ShowCatalogs; -import io.prestosql.sql.tree.ShowColumns; -import io.prestosql.sql.tree.ShowFunctions; -import io.prestosql.sql.tree.ShowSchemas; -import io.prestosql.sql.tree.ShowSession; -import io.prestosql.sql.tree.ShowTables; -import io.prestosql.sql.tree.Statement; -import io.prestosql.verifier.QueryRewriter.QueryRewriteException; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.AddColumn; +import io.trino.sql.tree.Comment; +import io.trino.sql.tree.CreateMaterializedView; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.CreateTableAsSelect; +import io.trino.sql.tree.CreateView; +import io.trino.sql.tree.Delete; +import io.trino.sql.tree.DropColumn; +import io.trino.sql.tree.DropMaterializedView; +import io.trino.sql.tree.DropTable; +import io.trino.sql.tree.DropView; +import io.trino.sql.tree.Explain; +import io.trino.sql.tree.Insert; +import io.trino.sql.tree.RefreshMaterializedView; +import io.trino.sql.tree.RenameColumn; +import io.trino.sql.tree.RenameTable; +import io.trino.sql.tree.RenameView; +import io.trino.sql.tree.ShowCatalogs; +import io.trino.sql.tree.ShowColumns; +import io.trino.sql.tree.ShowFunctions; +import io.trino.sql.tree.ShowSchemas; +import io.trino.sql.tree.ShowSession; +import io.trino.sql.tree.ShowTables; +import io.trino.sql.tree.Statement; +import io.trino.verifier.QueryRewriter.QueryRewriteException; import org.jdbi.v3.core.ConnectionFactory; import org.jdbi.v3.core.Jdbi; import org.jdbi.v3.sqlobject.SqlObjectPlugin; @@ -86,11 +86,11 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Throwables.throwIfUnchecked; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; -import static io.prestosql.verifier.QueryType.CREATE; -import static io.prestosql.verifier.QueryType.MODIFY; -import static io.prestosql.verifier.QueryType.READ; -import static io.prestosql.verifier.VerifyCommand.VersionProvider; +import static io.trino.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE; +import static io.trino.verifier.QueryType.CREATE; +import static io.trino.verifier.QueryType.MODIFY; +import static io.trino.verifier.QueryType.READ; +import static io.trino.verifier.VerifyCommand.VersionProvider; import static java.util.concurrent.Executors.newFixedThreadPool; import static java.util.concurrent.TimeUnit.MINUTES; import static picocli.CommandLine.IVersionProvider; diff --git a/service/trino-verifier/src/test/java/io/trino/verifier/TestShadowing.java b/service/trino-verifier/src/test/java/io/trino/verifier/TestShadowing.java index 1f2300112b17..f302b8601f23 100644 --- a/service/trino-verifier/src/test/java/io/trino/verifier/TestShadowing.java +++ b/service/trino-verifier/src/test/java/io/trino/verifier/TestShadowing.java @@ -16,18 +16,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.units.Duration; -import io.prestosql.sql.parser.ParsingOptions; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.tree.CreateTable; -import io.prestosql.sql.tree.CreateTableAsSelect; -import io.prestosql.sql.tree.DropTable; -import io.prestosql.sql.tree.FunctionCall; -import io.prestosql.sql.tree.Identifier; -import io.prestosql.sql.tree.Insert; -import io.prestosql.sql.tree.LongLiteral; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.sql.tree.SingleColumn; -import io.prestosql.sql.tree.Table; +import io.trino.sql.parser.ParsingOptions; +import io.trino.sql.parser.SqlParser; +import io.trino.sql.tree.CreateTable; +import io.trino.sql.tree.CreateTableAsSelect; +import io.trino.sql.tree.DropTable; +import io.trino.sql.tree.FunctionCall; +import io.trino.sql.tree.Identifier; +import io.trino.sql.tree.Insert; +import io.trino.sql.tree.LongLiteral; +import io.trino.sql.tree.QualifiedName; +import io.trino.sql.tree.SingleColumn; +import io.trino.sql.tree.Table; import org.jdbi.v3.core.Handle; import org.jdbi.v3.core.Jdbi; import org.testng.annotations.AfterClass; @@ -35,11 +35,11 @@ import java.util.Optional; -import static io.prestosql.sql.QueryUtil.identifier; -import static io.prestosql.sql.QueryUtil.selectList; -import static io.prestosql.sql.QueryUtil.simpleQuery; -import static io.prestosql.verifier.QueryType.READ; -import static io.prestosql.verifier.VerifyCommand.statementToQueryType; +import static io.trino.sql.QueryUtil.identifier; +import static io.trino.sql.QueryUtil.selectList; +import static io.trino.sql.QueryUtil.simpleQuery; +import static io.trino.verifier.QueryType.READ; +import static io.trino.verifier.VerifyCommand.statementToQueryType; import static java.util.concurrent.TimeUnit.SECONDS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/service/trino-verifier/src/test/java/io/trino/verifier/TestValidator.java b/service/trino-verifier/src/test/java/io/trino/verifier/TestValidator.java index 709a468b721f..4d146925745f 100644 --- a/service/trino-verifier/src/test/java/io/trino/verifier/TestValidator.java +++ b/service/trino-verifier/src/test/java/io/trino/verifier/TestValidator.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static io.prestosql.verifier.Validator.precisionCompare; +import static io.trino.verifier.Validator.precisionCompare; import static java.lang.Double.NaN; import static org.testng.Assert.assertEquals; diff --git a/service/trino-verifier/src/test/java/io/trino/verifier/TestVerifierConfig.java b/service/trino-verifier/src/test/java/io/trino/verifier/TestVerifierConfig.java index 06261e76b8a1..d5fd15a10079 100644 --- a/service/trino-verifier/src/test/java/io/trino/verifier/TestVerifierConfig.java +++ b/service/trino-verifier/src/test/java/io/trino/verifier/TestVerifierConfig.java @@ -25,9 +25,9 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertFullMapping; import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; -import static io.prestosql.verifier.QueryType.CREATE; -import static io.prestosql.verifier.QueryType.MODIFY; -import static io.prestosql.verifier.QueryType.READ; +import static io.trino.verifier.QueryType.CREATE; +import static io.trino.verifier.QueryType.MODIFY; +import static io.trino.verifier.QueryType.READ; public class TestVerifierConfig { diff --git a/service/trino-verifier/src/test/java/io/trino/verifier/TestVerifierRewriteQueries.java b/service/trino-verifier/src/test/java/io/trino/verifier/TestVerifierRewriteQueries.java index 0e3bf7499cdc..f1e093d11e74 100644 --- a/service/trino-verifier/src/test/java/io/trino/verifier/TestVerifierRewriteQueries.java +++ b/service/trino-verifier/src/test/java/io/trino/verifier/TestVerifierRewriteQueries.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.units.Duration; -import io.prestosql.sql.parser.SqlParser; +import io.trino.sql.parser.SqlParser; import org.jdbi.v3.core.Handle; import org.jdbi.v3.core.Jdbi; import org.testng.annotations.AfterClass; @@ -25,7 +25,7 @@ import java.util.List; import java.util.concurrent.TimeUnit; -import static io.prestosql.verifier.VerifyCommand.rewriteQueries; +import static io.trino.verifier.VerifyCommand.rewriteQueries; import static org.testng.Assert.assertEquals; @Test(singleThreaded = true) diff --git a/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/BenchmarkDriver.java b/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/BenchmarkDriver.java index f6e0d83b3ce7..c566efa963c4 100644 --- a/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/BenchmarkDriver.java +++ b/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/BenchmarkDriver.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.net.HostAndPort; -import io.prestosql.client.ClientSession; +import io.trino.client.ClientSession; import java.io.Closeable; import java.util.HashMap; diff --git a/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/BenchmarkDriverOptions.java b/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/BenchmarkDriverOptions.java index aff83af6655a..2e89245eb316 100644 --- a/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/BenchmarkDriverOptions.java +++ b/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/BenchmarkDriverOptions.java @@ -19,7 +19,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.net.HostAndPort; import io.airlift.units.Duration; -import io.prestosql.client.ClientSession; +import io.trino.client.ClientSession; import java.net.URI; import java.net.URISyntaxException; diff --git a/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/BenchmarkQueryRunner.java b/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/BenchmarkQueryRunner.java index 1bb7b31106fb..21b467cac814 100644 --- a/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/BenchmarkQueryRunner.java +++ b/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/BenchmarkQueryRunner.java @@ -23,12 +23,12 @@ import io.airlift.http.client.Request; import io.airlift.http.client.jetty.JettyHttpClient; import io.airlift.units.Duration; -import io.prestosql.client.ClientSession; -import io.prestosql.client.PrestoHeaders; -import io.prestosql.client.QueryData; -import io.prestosql.client.QueryError; -import io.prestosql.client.StatementClient; -import io.prestosql.client.StatementStats; +import io.trino.client.ClientSession; +import io.trino.client.PrestoHeaders; +import io.trino.client.QueryData; +import io.trino.client.QueryError; +import io.trino.client.StatementClient; +import io.trino.client.StatementStats; import okhttp3.OkHttpClient; import java.io.Closeable; @@ -46,11 +46,11 @@ import static io.airlift.http.client.Request.Builder.prepareGet; import static io.airlift.http.client.StringResponseHandler.createStringResponseHandler; import static io.airlift.json.JsonCodec.jsonCodec; -import static io.prestosql.benchmark.driver.BenchmarkQueryResult.failResult; -import static io.prestosql.benchmark.driver.BenchmarkQueryResult.passResult; -import static io.prestosql.client.OkHttpUtil.setupCookieJar; -import static io.prestosql.client.OkHttpUtil.setupSocksProxy; -import static io.prestosql.client.StatementClientFactory.newStatementClient; +import static io.trino.benchmark.driver.BenchmarkQueryResult.failResult; +import static io.trino.benchmark.driver.BenchmarkQueryResult.passResult; +import static io.trino.client.OkHttpUtil.setupCookieJar; +import static io.trino.client.OkHttpUtil.setupSocksProxy; +import static io.trino.client.StatementClientFactory.newStatementClient; import static java.lang.Long.parseLong; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/PrestoBenchmarkDriver.java b/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/PrestoBenchmarkDriver.java index a94b02b207b1..9d38459f3ff7 100644 --- a/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/PrestoBenchmarkDriver.java +++ b/testing/trino-benchmark-driver/src/main/java/io/trino/benchmark/driver/PrestoBenchmarkDriver.java @@ -19,10 +19,10 @@ import io.airlift.log.Logging; import io.airlift.log.LoggingConfiguration; import io.airlift.units.Duration; -import io.prestosql.benchmark.driver.BenchmarkDriverOptions.ClientExtraCredential; -import io.prestosql.benchmark.driver.BenchmarkDriverOptions.ClientSessionProperty; -import io.prestosql.benchmark.driver.PrestoBenchmarkDriver.VersionProvider; -import io.prestosql.client.ClientSession; +import io.trino.benchmark.driver.BenchmarkDriverOptions.ClientExtraCredential; +import io.trino.benchmark.driver.BenchmarkDriverOptions.ClientSessionProperty; +import io.trino.benchmark.driver.PrestoBenchmarkDriver.VersionProvider; +import io.trino.client.ClientSession; import picocli.CommandLine; import picocli.CommandLine.Command; import picocli.CommandLine.IVersionProvider; diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractBenchmark.java index 90261c4c8c7b..0e760616e089 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractBenchmark.java @@ -21,10 +21,10 @@ import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.benchmark.FormatUtils.formatCount; -import static io.prestosql.benchmark.FormatUtils.formatCountRate; -import static io.prestosql.benchmark.FormatUtils.formatDataRate; -import static io.prestosql.benchmark.FormatUtils.formatDataSize; +import static io.trino.benchmark.FormatUtils.formatCount; +import static io.trino.benchmark.FormatUtils.formatCountRate; +import static io.trino.benchmark.FormatUtils.formatDataRate; +import static io.trino.benchmark.FormatUtils.formatDataSize; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractOperatorBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractOperatorBenchmark.java index 0b3b623b9cb6..ca06116f77dc 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractOperatorBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractOperatorBenchmark.java @@ -19,49 +19,49 @@ import io.airlift.stats.CpuTimer; import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskStateMachine; -import io.prestosql.memory.MemoryPool; -import io.prestosql.memory.QueryContext; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.Split; -import io.prestosql.metadata.TableHandle; -import io.prestosql.operator.Driver; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.FilterAndProjectOperator; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.PageSourceOperator; -import io.prestosql.operator.TaskContext; -import io.prestosql.operator.TaskStats; -import io.prestosql.operator.project.InputPageProjection; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.operator.project.PageProjection; -import io.prestosql.security.AllowAllAccessControl; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spi.type.Type; -import io.prestosql.spiller.SpillSpaceTracker; -import io.prestosql.split.SplitSource; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.SymbolAllocator; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.TypeProvider; -import io.prestosql.sql.planner.optimizations.HashGenerationOptimizer; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.sql.tree.Expression; -import io.prestosql.sql.tree.NodeRef; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.transaction.TransactionId; +import io.trino.Session; +import io.trino.execution.Lifespan; +import io.trino.execution.TaskId; +import io.trino.execution.TaskStateMachine; +import io.trino.memory.MemoryPool; +import io.trino.memory.QueryContext; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.Split; +import io.trino.metadata.TableHandle; +import io.trino.operator.Driver; +import io.trino.operator.DriverContext; +import io.trino.operator.FilterAndProjectOperator; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.OperatorFactory; +import io.trino.operator.PageSourceOperator; +import io.trino.operator.TaskContext; +import io.trino.operator.TaskStats; +import io.trino.operator.project.InputPageProjection; +import io.trino.operator.project.PageProcessor; +import io.trino.operator.project.PageProjection; +import io.trino.security.AllowAllAccessControl; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spi.type.Type; +import io.trino.spiller.SpillSpaceTracker; +import io.trino.split.SplitSource; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.SymbolAllocator; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.TypeProvider; +import io.trino.sql.planner.optimizations.HashGenerationOptimizer; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.relational.RowExpression; +import io.trino.sql.tree.Expression; +import io.trino.sql.tree.NodeRef; +import io.trino.testing.LocalQueryRunner; +import io.trino.transaction.TransactionId; import java.util.ArrayList; import java.util.Arrays; @@ -78,14 +78,14 @@ import static io.airlift.stats.CpuTimer.CpuDuration; import static io.airlift.units.DataSize.Unit.GIGABYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.SystemSessionProperties.getFilterAndProjectMinOutputPageRowCount; -import static io.prestosql.SystemSessionProperties.getFilterAndProjectMinOutputPageSize; -import static io.prestosql.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; -import static io.prestosql.spi.connector.DynamicFilter.EMPTY; -import static io.prestosql.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.relational.SqlToRowExpressionTranslator.translate; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.getFilterAndProjectMinOutputPageRowCount; +import static io.trino.SystemSessionProperties.getFilterAndProjectMinOutputPageSize; +import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; +import static io.trino.spi.connector.DynamicFilter.EMPTY; +import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.relational.SqlToRowExpressionTranslator.translate; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.NANOSECONDS; diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractSimpleOperatorBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractSimpleOperatorBenchmark.java index 5f74b2d2c95b..af0052dd06ec 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractSimpleOperatorBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractSimpleOperatorBenchmark.java @@ -14,20 +14,20 @@ package io.trino.benchmark; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.Driver; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.DriverFactory; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.TaskContext; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.NullOutputOperator.NullOutputOperatorFactory; +import io.trino.operator.Driver; +import io.trino.operator.DriverContext; +import io.trino.operator.DriverFactory; +import io.trino.operator.OperatorFactory; +import io.trino.operator.TaskContext; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.NullOutputOperator.NullOutputOperatorFactory; import java.util.ArrayList; import java.util.List; import java.util.OptionalInt; -import static io.prestosql.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; public abstract class AbstractSimpleOperatorBenchmark extends AbstractOperatorBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractSqlBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractSqlBenchmark.java index 758d0f2bc014..7fa4882b0dbd 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractSqlBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/AbstractSqlBenchmark.java @@ -13,10 +13,10 @@ */ package io.trino.benchmark; -import io.prestosql.operator.Driver; -import io.prestosql.operator.TaskContext; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.NullOutputOperator.NullOutputFactory; +import io.trino.operator.Driver; +import io.trino.operator.TaskContext; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.NullOutputOperator.NullOutputFactory; import org.intellij.lang.annotations.Language; import java.util.List; diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/ArrayAggregationBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/ArrayAggregationBenchmark.java index b57dbf776f63..9945d7dc5281 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/ArrayAggregationBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/ArrayAggregationBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class ArrayAggregationBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/ArrayComparisonBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/ArrayComparisonBenchmark.java index 1bea1240dc81..9af9cf6c2aa5 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/ArrayComparisonBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/ArrayComparisonBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public abstract class ArrayComparisonBenchmark { diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/BenchmarkQueryRunner.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/BenchmarkQueryRunner.java index 2ccce377bc0a..bbb52d36189f 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/BenchmarkQueryRunner.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/BenchmarkQueryRunner.java @@ -14,15 +14,15 @@ package io.trino.benchmark; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.testing.LocalQueryRunner; import java.util.Map; -import static io.prestosql.Session.SessionBuilder; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.Session.SessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class BenchmarkQueryRunner { diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/BenchmarkSuite.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/BenchmarkSuite.java index b9f6f0318c47..c32fd000c5a2 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/BenchmarkSuite.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/BenchmarkSuite.java @@ -16,8 +16,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.Files; import io.airlift.log.Logger; -import io.prestosql.Session; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.Session; +import io.trino.testing.LocalQueryRunner; import java.io.File; import java.io.FileOutputStream; @@ -26,7 +26,7 @@ import java.util.List; import java.util.Map; -import static io.prestosql.SystemSessionProperties.OPTIMIZE_HASH_GENERATION; +import static io.trino.SystemSessionProperties.OPTIMIZE_HASH_GENERATION; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/CastJsonParseBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/CastJsonParseBenchmark.java index 983e2a2c4e56..fb3f9b8e5dc0 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/CastJsonParseBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/CastJsonParseBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class CastJsonParseBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/CountAggregationBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/CountAggregationBenchmark.java index 6e547d66af82..8b0a868f67fc 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/CountAggregationBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/CountAggregationBenchmark.java @@ -14,19 +14,19 @@ package io.trino.benchmark; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.AggregationOperator.AggregationOperatorFactory; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.metadata.Metadata; +import io.trino.operator.AggregationOperator.AggregationOperatorFactory; +import io.trino.operator.OperatorFactory; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.tree.QualifiedName; +import io.trino.testing.LocalQueryRunner; import java.util.List; import java.util.Optional; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class CountAggregationBenchmark extends AbstractSimpleOperatorBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/CountAggregationSqlBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/CountAggregationSqlBenchmark.java index 162848f64c48..d0d750a6a1a3 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/CountAggregationSqlBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/CountAggregationSqlBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class CountAggregationSqlBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/CountWithFilterSqlBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/CountWithFilterSqlBenchmark.java index 884aeb323308..257e8acd6eba 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/CountWithFilterSqlBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/CountWithFilterSqlBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class CountWithFilterSqlBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/DoubleSumAggregationBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/DoubleSumAggregationBenchmark.java index 5a96b51c04e2..145d46c7e8cc 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/DoubleSumAggregationBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/DoubleSumAggregationBenchmark.java @@ -14,22 +14,22 @@ package io.trino.benchmark; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.AggregationOperator.AggregationOperatorFactory; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.metadata.Metadata; +import io.trino.operator.AggregationOperator.AggregationOperatorFactory; +import io.trino.operator.OperatorFactory; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.tree.QualifiedName; +import io.trino.testing.LocalQueryRunner; import java.util.List; import java.util.Optional; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; public class DoubleSumAggregationBenchmark extends AbstractSimpleOperatorBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/GroupByAggregationSqlBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/GroupByAggregationSqlBenchmark.java index 2b7572265710..f20240dec3f5 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/GroupByAggregationSqlBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/GroupByAggregationSqlBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class GroupByAggregationSqlBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/GroupBySumWithArithmeticSqlBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/GroupBySumWithArithmeticSqlBenchmark.java index 093ea0c9bb59..2a58625be5a0 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/GroupBySumWithArithmeticSqlBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/GroupBySumWithArithmeticSqlBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class GroupBySumWithArithmeticSqlBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/HandTpchQuery1.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/HandTpchQuery1.java index ca74d4e67e8a..b9f6d6e3ddcb 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/HandTpchQuery1.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/HandTpchQuery1.java @@ -16,36 +16,36 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; import io.airlift.units.DataSize; -import io.prestosql.benchmark.HandTpchQuery1.TpchQuery1Operator.TpchQuery1OperatorFactory; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.HashAggregationOperator.HashAggregationOperatorFactory; -import io.prestosql.operator.Operator; -import io.prestosql.operator.OperatorContext; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.Page; -import io.prestosql.spi.PageBuilder; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.util.DateTimeUtils; +import io.trino.benchmark.HandTpchQuery1.TpchQuery1Operator.TpchQuery1OperatorFactory; +import io.trino.metadata.Metadata; +import io.trino.operator.DriverContext; +import io.trino.operator.HashAggregationOperator.HashAggregationOperatorFactory; +import io.trino.operator.Operator; +import io.trino.operator.OperatorContext; +import io.trino.operator.OperatorFactory; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.Page; +import io.trino.spi.PageBuilder; +import io.trino.spi.block.Block; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.tree.QualifiedName; +import io.trino.testing.LocalQueryRunner; +import io.trino.util.DateTimeUtils; import java.util.List; import java.util.Optional; import static com.google.common.base.Preconditions.checkState; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; import static java.lang.Math.toIntExact; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/HandTpchQuery6.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/HandTpchQuery6.java index 3d386229053b..dc0284d1b2da 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/HandTpchQuery6.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/HandTpchQuery6.java @@ -15,36 +15,36 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.AggregationOperator.AggregationOperatorFactory; -import io.prestosql.operator.FilterAndProjectOperator; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.operator.project.InputChannels; -import io.prestosql.operator.project.PageFilter; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.operator.project.PageProjection; -import io.prestosql.operator.project.SelectedPositions; -import io.prestosql.spi.Page; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.util.DateTimeUtils; +import io.trino.metadata.Metadata; +import io.trino.operator.AggregationOperator.AggregationOperatorFactory; +import io.trino.operator.FilterAndProjectOperator; +import io.trino.operator.OperatorFactory; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.operator.project.InputChannels; +import io.trino.operator.project.PageFilter; +import io.trino.operator.project.PageProcessor; +import io.trino.operator.project.PageProjection; +import io.trino.operator.project.SelectedPositions; +import io.trino.spi.Page; +import io.trino.spi.block.Block; +import io.trino.spi.connector.ConnectorSession; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.tree.QualifiedName; +import io.trino.testing.LocalQueryRunner; +import io.trino.util.DateTimeUtils; import java.util.List; import java.util.Optional; import java.util.function.Supplier; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; -import static io.prestosql.sql.relational.Expressions.field; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.sql.relational.Expressions.field; public class HandTpchQuery6 extends AbstractSimpleOperatorBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashAggregationBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashAggregationBenchmark.java index 4221a70db5b4..332363505a68 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashAggregationBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashAggregationBenchmark.java @@ -16,24 +16,24 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; import io.airlift.units.DataSize; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.HashAggregationOperator.HashAggregationOperatorFactory; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.aggregation.InternalAggregationFunction; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.JoinCompiler; -import io.prestosql.sql.planner.plan.AggregationNode.Step; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.tree.QualifiedName; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.metadata.Metadata; +import io.trino.operator.HashAggregationOperator.HashAggregationOperatorFactory; +import io.trino.operator.OperatorFactory; +import io.trino.operator.aggregation.InternalAggregationFunction; +import io.trino.spi.type.Type; +import io.trino.sql.gen.JoinCompiler; +import io.trino.sql.planner.plan.AggregationNode.Step; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.tree.QualifiedName; +import io.trino.testing.LocalQueryRunner; import java.util.List; import java.util.Optional; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.analyzer.TypeSignatureProvider.fromTypes; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.analyzer.TypeSignatureProvider.fromTypes; public class HashAggregationBenchmark extends AbstractSimpleOperatorBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashBuildAndJoinBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashBuildAndJoinBenchmark.java index 03eef3be3513..649919e9f8fb 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashBuildAndJoinBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashBuildAndJoinBenchmark.java @@ -15,36 +15,36 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.operator.Driver; -import io.prestosql.operator.DriverFactory; -import io.prestosql.operator.HashBuilderOperator.HashBuilderOperatorFactory; -import io.prestosql.operator.JoinBridgeManager; -import io.prestosql.operator.LookupJoinOperators; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.PartitionedLookupSourceFactory; -import io.prestosql.operator.TaskContext; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spiller.SingleStreamSpillerFactory; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.NullOutputOperator.NullOutputOperatorFactory; -import io.prestosql.type.BlockTypeOperators; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.operator.Driver; +import io.trino.operator.DriverFactory; +import io.trino.operator.HashBuilderOperator.HashBuilderOperatorFactory; +import io.trino.operator.JoinBridgeManager; +import io.trino.operator.LookupJoinOperators; +import io.trino.operator.OperatorFactory; +import io.trino.operator.PagesIndex; +import io.trino.operator.PartitionedLookupSourceFactory; +import io.trino.operator.TaskContext; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spiller.SingleStreamSpillerFactory; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.NullOutputOperator.NullOutputOperatorFactory; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; import java.util.OptionalInt; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunnerHashEnabled; -import static io.prestosql.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spiller.PartitioningSpillerFactory.unsupportedPartitioningSpillerFactory; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunnerHashEnabled; +import static io.trino.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spiller.PartitioningSpillerFactory.unsupportedPartitioningSpillerFactory; +import static io.trino.testing.TestingSession.testSessionBuilder; public class HashBuildAndJoinBenchmark extends AbstractOperatorBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashBuildBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashBuildBenchmark.java index 222e1feee022..597166bb6aff 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashBuildBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashBuildBenchmark.java @@ -15,33 +15,33 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.operator.Driver; -import io.prestosql.operator.DriverFactory; -import io.prestosql.operator.HashBuilderOperator.HashBuilderOperatorFactory; -import io.prestosql.operator.JoinBridgeManager; -import io.prestosql.operator.LookupJoinOperators; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.PartitionedLookupSourceFactory; -import io.prestosql.operator.TaskContext; -import io.prestosql.operator.ValuesOperator.ValuesOperatorFactory; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spiller.SingleStreamSpillerFactory; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.NullOutputOperator.NullOutputOperatorFactory; -import io.prestosql.type.BlockTypeOperators; +import io.trino.operator.Driver; +import io.trino.operator.DriverFactory; +import io.trino.operator.HashBuilderOperator.HashBuilderOperatorFactory; +import io.trino.operator.JoinBridgeManager; +import io.trino.operator.LookupJoinOperators; +import io.trino.operator.OperatorFactory; +import io.trino.operator.PagesIndex; +import io.trino.operator.PartitionedLookupSourceFactory; +import io.trino.operator.TaskContext; +import io.trino.operator.ValuesOperator.ValuesOperatorFactory; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spiller.SingleStreamSpillerFactory; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.NullOutputOperator.NullOutputOperatorFactory; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; import java.util.OptionalInt; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.prestosql.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spiller.PartitioningSpillerFactory.unsupportedPartitioningSpillerFactory; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spiller.PartitioningSpillerFactory.unsupportedPartitioningSpillerFactory; public class HashBuildBenchmark extends AbstractOperatorBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashJoinBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashJoinBenchmark.java index bdbf72be7538..cce44a5fc48b 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashJoinBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/HashJoinBenchmark.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import io.prestosql.execution.Lifespan; -import io.prestosql.operator.Driver; -import io.prestosql.operator.DriverContext; -import io.prestosql.operator.DriverFactory; -import io.prestosql.operator.HashBuilderOperator.HashBuilderOperatorFactory; -import io.prestosql.operator.JoinBridgeManager; -import io.prestosql.operator.LookupJoinOperators; -import io.prestosql.operator.LookupSourceProvider; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.PagesIndex; -import io.prestosql.operator.PartitionedLookupSourceFactory; -import io.prestosql.operator.TaskContext; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.spiller.SingleStreamSpillerFactory; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.NullOutputOperator.NullOutputOperatorFactory; -import io.prestosql.type.BlockTypeOperators; +import io.trino.execution.Lifespan; +import io.trino.operator.Driver; +import io.trino.operator.DriverContext; +import io.trino.operator.DriverFactory; +import io.trino.operator.HashBuilderOperator.HashBuilderOperatorFactory; +import io.trino.operator.JoinBridgeManager; +import io.trino.operator.LookupJoinOperators; +import io.trino.operator.LookupSourceProvider; +import io.trino.operator.OperatorFactory; +import io.trino.operator.PagesIndex; +import io.trino.operator.PartitionedLookupSourceFactory; +import io.trino.operator.TaskContext; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeOperators; +import io.trino.spiller.SingleStreamSpillerFactory; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.NullOutputOperator.NullOutputOperatorFactory; +import io.trino.type.BlockTypeOperators; import java.util.List; import java.util.Optional; @@ -42,9 +42,9 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.prestosql.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; -import static io.prestosql.spiller.PartitioningSpillerFactory.unsupportedPartitioningSpillerFactory; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.operator.PipelineExecutionStrategy.UNGROUPED_EXECUTION; +import static io.trino.spiller.PartitioningSpillerFactory.unsupportedPartitioningSpillerFactory; public class HashJoinBenchmark extends AbstractOperatorBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/LongMaxAggregationSqlBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/LongMaxAggregationSqlBenchmark.java index 3b2d5ba843d2..45967f373599 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/LongMaxAggregationSqlBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/LongMaxAggregationSqlBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class LongMaxAggregationSqlBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/OrderByBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/OrderByBenchmark.java index 9cd662998668..a69d2a01d790 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/OrderByBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/OrderByBenchmark.java @@ -14,20 +14,20 @@ package io.trino.benchmark; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.LimitOperator.LimitOperatorFactory; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.OrderByOperator.OrderByOperatorFactory; -import io.prestosql.operator.PagesIndex; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.gen.OrderingCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.operator.LimitOperator.LimitOperatorFactory; +import io.trino.operator.OperatorFactory; +import io.trino.operator.OrderByOperator.OrderByOperatorFactory; +import io.trino.operator.PagesIndex; +import io.trino.spi.type.Type; +import io.trino.sql.gen.OrderingCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.LocalQueryRunner; import java.util.List; import java.util.Optional; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_LAST; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_LAST; public class OrderByBenchmark extends AbstractSimpleOperatorBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/PredicateFilterBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/PredicateFilterBenchmark.java index 2321cd209bb4..c5c2a6c352b6 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/PredicateFilterBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/PredicateFilterBenchmark.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; -import io.prestosql.operator.FilterAndProjectOperator; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.project.PageProcessor; -import io.prestosql.sql.gen.ExpressionCompiler; -import io.prestosql.sql.gen.PageFunctionCompiler; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.relational.RowExpression; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.operator.FilterAndProjectOperator; +import io.trino.operator.OperatorFactory; +import io.trino.operator.project.PageProcessor; +import io.trino.sql.gen.ExpressionCompiler; +import io.trino.sql.gen.PageFunctionCompiler; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.relational.RowExpression; +import io.trino.testing.LocalQueryRunner; import java.util.List; import java.util.Optional; import java.util.function.Supplier; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.prestosql.spi.function.OperatorType.LESS_THAN_OR_EQUAL; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.sql.relational.Expressions.call; -import static io.prestosql.sql.relational.Expressions.constant; -import static io.prestosql.sql.relational.Expressions.field; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.spi.function.OperatorType.LESS_THAN_OR_EQUAL; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.sql.relational.Expressions.call; +import static io.trino.sql.relational.Expressions.constant; +import static io.trino.sql.relational.Expressions.field; public class PredicateFilterBenchmark extends AbstractSimpleOperatorBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/PredicateFilterSqlBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/PredicateFilterSqlBenchmark.java index 79aaf9fac461..e96e9d3d15f8 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/PredicateFilterSqlBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/PredicateFilterSqlBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class PredicateFilterSqlBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/RawStreamingBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/RawStreamingBenchmark.java index af76e5af5111..b7dca8cb3a18 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/RawStreamingBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/RawStreamingBenchmark.java @@ -14,13 +14,13 @@ package io.trino.benchmark; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.operator.OperatorFactory; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.LocalQueryRunner; import java.util.List; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class RawStreamingBenchmark extends AbstractSimpleOperatorBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/RawStreamingSqlBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/RawStreamingSqlBenchmark.java index 8f6d20b6034d..f49e887f638b 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/RawStreamingSqlBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/RawStreamingSqlBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class RawStreamingSqlBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximateCountDistinctDoubleBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximateCountDistinctDoubleBenchmark.java index 43d36fcf5b8e..db3aa4a16937 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximateCountDistinctDoubleBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximateCountDistinctDoubleBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlApproximateCountDistinctDoubleBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximateCountDistinctLongBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximateCountDistinctLongBenchmark.java index 0db9d08c666f..b851a8c1777c 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximateCountDistinctLongBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximateCountDistinctLongBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlApproximateCountDistinctLongBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximateCountDistinctVarBinaryBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximateCountDistinctVarBinaryBenchmark.java index de85423e41ff..e67f55ef8284 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximateCountDistinctVarBinaryBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximateCountDistinctVarBinaryBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlApproximateCountDistinctVarBinaryBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximatePercentileBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximatePercentileBenchmark.java index bdeef0cc1e35..793901fbcc11 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximatePercentileBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlApproximatePercentileBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlApproximatePercentileBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlBetweenBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlBetweenBenchmark.java index 6981232c075a..21b47310e777 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlBetweenBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlBetweenBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlBetweenBenchmark extends AbstractSqlBenchmark 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 3d1e9efcb2e3..d5dbca25db61 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 @@ -14,11 +14,11 @@ package io.trino.benchmark; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.prestosql.sql.analyzer.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-benchmark/src/main/java/io/trino/benchmark/SqlDistinctMultipleFields.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlDistinctMultipleFields.java index 009329334199..286efdd0a973 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlDistinctMultipleFields.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlDistinctMultipleFields.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlDistinctMultipleFields extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlDistinctSingleField.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlDistinctSingleField.java index 52129f6207fd..38563ae896e5 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlDistinctSingleField.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlDistinctSingleField.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlDistinctSingleField extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlDoubleSumAggregationBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlDoubleSumAggregationBenchmark.java index 7deef9b3bc14..be4ee6ed5621 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlDoubleSumAggregationBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlDoubleSumAggregationBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlDoubleSumAggregationBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlHashJoinBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlHashJoinBenchmark.java index 6cc90419a045..4b818414c92b 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlHashJoinBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlHashJoinBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlHashJoinBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlInBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlInBenchmark.java index 9764002fec7a..3873092636b6 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlInBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlInBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlInBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlJoinWithPredicateBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlJoinWithPredicateBenchmark.java index ff0e9cd32f89..bf4e22059808 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlJoinWithPredicateBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlJoinWithPredicateBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlJoinWithPredicateBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlLikeBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlLikeBenchmark.java index 0857d616c19b..f260f743ed81 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlLikeBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlLikeBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlLikeBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlRegexpLikeBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlRegexpLikeBenchmark.java index 6e71f15cbe38..717407bbce4d 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlRegexpLikeBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlRegexpLikeBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlRegexpLikeBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlSemiJoinInPredicateBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlSemiJoinInPredicateBenchmark.java index c88043543186..224585cb2b87 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlSemiJoinInPredicateBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlSemiJoinInPredicateBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlSemiJoinInPredicateBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTopNBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTopNBenchmark.java index 38018b8c74a9..8982a90d7844 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTopNBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTopNBenchmark.java @@ -14,9 +14,9 @@ package io.trino.benchmark; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; import static java.lang.String.format; public class SqlTopNBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTopNRowNumberBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTopNRowNumberBenchmark.java index 7c673c25b077..1546f974f077 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTopNRowNumberBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTopNRowNumberBenchmark.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; import static java.lang.String.format; public class SqlTopNRowNumberBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTpchQuery1.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTpchQuery1.java index 2111d5955097..bf62673e0a26 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTpchQuery1.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTpchQuery1.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlTpchQuery1 extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTpchQuery6.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTpchQuery6.java index bb4887a2b266..52fce6533be9 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTpchQuery6.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTpchQuery6.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class SqlTpchQuery6 extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/StatisticsBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/StatisticsBenchmark.java index 21071929eeac..c4853a6558b9 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/StatisticsBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/StatisticsBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public abstract class StatisticsBenchmark { diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/StructuredTypesBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/StructuredTypesBenchmark.java index f7ab4b5e7a68..c9c69783bd0c 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/StructuredTypesBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/StructuredTypesBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class StructuredTypesBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/Top100Benchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/Top100Benchmark.java index afd3cc2b23c9..0f38b93c016b 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/Top100Benchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/Top100Benchmark.java @@ -14,16 +14,16 @@ package io.trino.benchmark; import com.google.common.collect.ImmutableList; -import io.prestosql.operator.OperatorFactory; -import io.prestosql.operator.TopNOperator; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.operator.OperatorFactory; +import io.trino.operator.TopNOperator; +import io.trino.spi.type.Type; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.testing.LocalQueryRunner; import java.util.List; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.prestosql.spi.connector.SortOrder.ASC_NULLS_LAST; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.spi.connector.SortOrder.ASC_NULLS_LAST; public class Top100Benchmark extends AbstractSimpleOperatorBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/Top100SqlBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/Top100SqlBenchmark.java index c569b0aae644..8bebaf0f1315 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/Top100SqlBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/Top100SqlBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class Top100SqlBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/VarBinaryMaxAggregationSqlBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/VarBinaryMaxAggregationSqlBenchmark.java index 270253c4e70a..8cd6be3df3e3 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/VarBinaryMaxAggregationSqlBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/VarBinaryMaxAggregationSqlBenchmark.java @@ -13,9 +13,9 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; public class VarBinaryMaxAggregationSqlBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchmark/src/test/java/io/trino/benchmark/BenchmarkDecimalAggregation.java b/testing/trino-benchmark/src/test/java/io/trino/benchmark/BenchmarkDecimalAggregation.java index f90a1ac41b2b..1039d564fc2b 100644 --- a/testing/trino-benchmark/src/test/java/io/trino/benchmark/BenchmarkDecimalAggregation.java +++ b/testing/trino-benchmark/src/test/java/io/trino/benchmark/BenchmarkDecimalAggregation.java @@ -13,7 +13,7 @@ */ package io.trino.benchmark; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; diff --git a/testing/trino-benchmark/src/test/java/io/trino/benchmark/BenchmarkInequalityJoin.java b/testing/trino-benchmark/src/test/java/io/trino/benchmark/BenchmarkInequalityJoin.java index b7bff1b28833..5c9ca1a1926f 100644 --- a/testing/trino-benchmark/src/test/java/io/trino/benchmark/BenchmarkInequalityJoin.java +++ b/testing/trino-benchmark/src/test/java/io/trino/benchmark/BenchmarkInequalityJoin.java @@ -13,7 +13,7 @@ */ package io.trino.benchmark; -import io.prestosql.spi.Page; +import io.trino.spi.Page; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; diff --git a/testing/trino-benchmark/src/test/java/io/trino/benchmark/MemoryLocalQueryRunner.java b/testing/trino-benchmark/src/test/java/io/trino/benchmark/MemoryLocalQueryRunner.java index 9ccd786bab55..0a58a2a2f67d 100644 --- a/testing/trino-benchmark/src/test/java/io/trino/benchmark/MemoryLocalQueryRunner.java +++ b/testing/trino-benchmark/src/test/java/io/trino/benchmark/MemoryLocalQueryRunner.java @@ -17,24 +17,24 @@ import com.google.common.collect.ImmutableMap; import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.execution.TaskId; -import io.prestosql.execution.TaskStateMachine; -import io.prestosql.memory.MemoryPool; -import io.prestosql.memory.QueryContext; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.TableHandle; -import io.prestosql.operator.Driver; -import io.prestosql.operator.TaskContext; -import io.prestosql.plugin.memory.MemoryConnectorFactory; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.spi.Page; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.memory.MemoryPoolId; -import io.prestosql.spiller.SpillSpaceTracker; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.PageConsumerOperator; +import io.trino.Session; +import io.trino.execution.TaskId; +import io.trino.execution.TaskStateMachine; +import io.trino.memory.MemoryPool; +import io.trino.memory.QueryContext; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.TableHandle; +import io.trino.operator.Driver; +import io.trino.operator.TaskContext; +import io.trino.plugin.memory.MemoryConnectorFactory; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.spi.Page; +import io.trino.spi.QueryId; +import io.trino.spi.memory.MemoryPoolId; +import io.trino.spiller.SpillSpaceTracker; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.PageConsumerOperator; import org.intellij.lang.annotations.Language; import java.util.List; @@ -43,7 +43,7 @@ import java.util.OptionalInt; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertTrue; public class MemoryLocalQueryRunner diff --git a/testing/trino-benchmark/src/test/java/io/trino/benchmark/TestBenchmarks.java b/testing/trino-benchmark/src/test/java/io/trino/benchmark/TestBenchmarks.java index b587f7bd49c9..1d61d6c08080 100644 --- a/testing/trino-benchmark/src/test/java/io/trino/benchmark/TestBenchmarks.java +++ b/testing/trino-benchmark/src/test/java/io/trino/benchmark/TestBenchmarks.java @@ -13,11 +13,11 @@ */ package io.trino.benchmark; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.Test; -import static io.prestosql.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.prestosql.benchmark.BenchmarkSuite.createBenchmarks; +import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; +import static io.trino.benchmark.BenchmarkSuite.createBenchmarks; public class TestBenchmarks { diff --git a/testing/trino-benchto-benchmarks/src/test/java/io/trino/sql/planner/AbstractCostBasedPlanTest.java b/testing/trino-benchto-benchmarks/src/test/java/io/trino/sql/planner/AbstractCostBasedPlanTest.java index 5fbaa9cee098..3f0b9597ca1a 100644 --- a/testing/trino-benchto-benchmarks/src/test/java/io/trino/sql/planner/AbstractCostBasedPlanTest.java +++ b/testing/trino-benchto-benchmarks/src/test/java/io/trino/sql/planner/AbstractCostBasedPlanTest.java @@ -16,16 +16,16 @@ import com.google.common.base.VerifyException; import com.google.common.io.Resources; -import io.prestosql.plugin.tpcds.TpcdsTableHandle; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.sql.planner.assertions.BasePlanTest; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.ExchangeNode; -import io.prestosql.sql.planner.plan.JoinNode; -import io.prestosql.sql.planner.plan.SemiJoinNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.planner.plan.ValuesNode; +import io.trino.plugin.tpcds.TpcdsTableHandle; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.sql.planner.assertions.BasePlanTest; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.ExchangeNode; +import io.trino.sql.planner.plan.JoinNode; +import io.trino.sql.planner.plan.SemiJoinNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.planner.plan.ValuesNode; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -40,10 +40,10 @@ import static com.google.common.io.Files.createParentDirs; import static com.google.common.io.Files.write; import static com.google.common.io.Resources.getResource; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; -import static io.prestosql.sql.planner.plan.JoinNode.DistributionType.REPLICATED; -import static io.prestosql.sql.planner.plan.JoinNode.Type.INNER; -import static io.prestosql.testing.DataProviders.toDataProvider; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; +import static io.trino.sql.planner.plan.JoinNode.DistributionType.REPLICATED; +import static io.trino.sql.planner.plan.JoinNode.Type.INNER; +import static io.trino.testing.DataProviders.toDataProvider; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.file.Files.isDirectory; 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 10077e13cc38..e72c878b0ab7 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,18 +15,18 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.tpcds.TpcdsConnectorFactory; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; -import io.prestosql.testing.LocalQueryRunner; +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; import java.util.stream.Stream; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; /** 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 b7ee5744faa0..a4b31a8454d2 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,20 +15,20 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session.SessionBuilder; -import io.prestosql.plugin.tpch.ColumnNaming; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; -import io.prestosql.testing.LocalQueryRunner; +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; import java.util.stream.Stream; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.plugin.tpch.TpchConnectorFactory.TPCH_COLUMN_NAMING_PROPERTY; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; +import static io.trino.plugin.tpch.TpchConnectorFactory.TPCH_COLUMN_NAMING_PROPERTY; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; /** diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/LauncherModule.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/LauncherModule.java index 36274ccf227d..89cb460d57d5 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/LauncherModule.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/LauncherModule.java @@ -16,7 +16,7 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Scopes; -import io.prestosql.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.docker.DockerFiles; public final class LauncherModule implements Module diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/EnvironmentDown.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/EnvironmentDown.java index 012c7bb25b0d..92ff8f7a73d8 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/EnvironmentDown.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/EnvironmentDown.java @@ -18,7 +18,7 @@ import java.util.concurrent.Callable; -import static io.prestosql.tests.product.launcher.env.Environments.pruneEnvironment; +import static io.trino.tests.product.launcher.env.Environments.pruneEnvironment; import static picocli.CommandLine.Command; @Command( diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/EnvironmentList.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/EnvironmentList.java index 08ced63ff8da..bc8d7f6db4dc 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/EnvironmentList.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/EnvironmentList.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Module; -import io.prestosql.tests.product.launcher.Extensions; -import io.prestosql.tests.product.launcher.LauncherModule; -import io.prestosql.tests.product.launcher.env.EnvironmentConfigFactory; -import io.prestosql.tests.product.launcher.env.EnvironmentFactory; -import io.prestosql.tests.product.launcher.env.EnvironmentModule; -import io.prestosql.tests.product.launcher.env.EnvironmentOptions; +import io.trino.tests.product.launcher.Extensions; +import io.trino.tests.product.launcher.LauncherModule; +import io.trino.tests.product.launcher.env.EnvironmentConfigFactory; +import io.trino.tests.product.launcher.env.EnvironmentFactory; +import io.trino.tests.product.launcher.env.EnvironmentModule; +import io.trino.tests.product.launcher.env.EnvironmentOptions; import picocli.CommandLine.ExitCode; import picocli.CommandLine.Option; @@ -33,7 +33,7 @@ import java.nio.charset.Charset; import java.util.concurrent.Callable; -import static io.prestosql.tests.product.launcher.cli.Commands.runCommand; +import static io.trino.tests.product.launcher.cli.Commands.runCommand; import static java.util.Objects.requireNonNull; import static picocli.CommandLine.Command; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/EnvironmentUp.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/EnvironmentUp.java index 9fab4b96d8bc..a21fa091edec 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/EnvironmentUp.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/EnvironmentUp.java @@ -16,15 +16,15 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Module; import io.airlift.log.Logger; -import io.prestosql.tests.product.launcher.Extensions; -import io.prestosql.tests.product.launcher.LauncherModule; -import io.prestosql.tests.product.launcher.docker.ContainerUtil; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentFactory; -import io.prestosql.tests.product.launcher.env.EnvironmentModule; -import io.prestosql.tests.product.launcher.env.EnvironmentOptions; +import io.trino.tests.product.launcher.Extensions; +import io.trino.tests.product.launcher.LauncherModule; +import io.trino.tests.product.launcher.docker.ContainerUtil; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentFactory; +import io.trino.tests.product.launcher.env.EnvironmentModule; +import io.trino.tests.product.launcher.env.EnvironmentOptions; import org.testcontainers.DockerClientFactory; import picocli.CommandLine.Command; import picocli.CommandLine.ExitCode; @@ -35,10 +35,10 @@ import java.util.Optional; import java.util.concurrent.Callable; -import static io.prestosql.tests.product.launcher.cli.Commands.runCommand; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.TESTS; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.isPrestoContainer; -import static io.prestosql.tests.product.launcher.env.EnvironmentListener.getStandardListeners; +import static io.trino.tests.product.launcher.cli.Commands.runCommand; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.TESTS; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.isPrestoContainer; +import static io.trino.tests.product.launcher.env.EnvironmentListener.getStandardListeners; import static java.util.Objects.requireNonNull; import static picocli.CommandLine.Mixin; import static picocli.CommandLine.Option; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/Launcher.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/Launcher.java index 174b08fb91a1..3f6126a15562 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/Launcher.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/Launcher.java @@ -14,7 +14,7 @@ package io.trino.tests.product.launcher.cli; import com.google.common.io.Resources; -import io.prestosql.tests.product.launcher.Extensions; +import io.trino.tests.product.launcher.Extensions; import picocli.CommandLine; import picocli.CommandLine.Command; import picocli.CommandLine.HelpCommand; @@ -27,10 +27,10 @@ import java.util.ListResourceBundle; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.tests.product.launcher.cli.Launcher.EnvironmentCommand; -import static io.prestosql.tests.product.launcher.cli.Launcher.SuiteCommand; -import static io.prestosql.tests.product.launcher.cli.Launcher.TestCommand; -import static io.prestosql.tests.product.launcher.cli.Launcher.VersionProvider; +import static io.trino.tests.product.launcher.cli.Launcher.EnvironmentCommand; +import static io.trino.tests.product.launcher.cli.Launcher.SuiteCommand; +import static io.trino.tests.product.launcher.cli.Launcher.TestCommand; +import static io.trino.tests.product.launcher.cli.Launcher.VersionProvider; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/SuiteDescribe.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/SuiteDescribe.java index b4f61cd3a0e3..f0646c646bd0 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/SuiteDescribe.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/SuiteDescribe.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Module; -import io.prestosql.tests.product.launcher.Extensions; -import io.prestosql.tests.product.launcher.LauncherModule; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentConfigFactory; -import io.prestosql.tests.product.launcher.env.EnvironmentModule; -import io.prestosql.tests.product.launcher.env.EnvironmentOptions; -import io.prestosql.tests.product.launcher.suite.Suite; -import io.prestosql.tests.product.launcher.suite.SuiteFactory; -import io.prestosql.tests.product.launcher.suite.SuiteModule; -import io.prestosql.tests.product.launcher.suite.SuiteTestRun; +import io.trino.tests.product.launcher.Extensions; +import io.trino.tests.product.launcher.LauncherModule; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentConfigFactory; +import io.trino.tests.product.launcher.env.EnvironmentModule; +import io.trino.tests.product.launcher.env.EnvironmentOptions; +import io.trino.tests.product.launcher.suite.Suite; +import io.trino.tests.product.launcher.suite.SuiteFactory; +import io.trino.tests.product.launcher.suite.SuiteModule; +import io.trino.tests.product.launcher.suite.SuiteTestRun; import picocli.CommandLine.Command; import picocli.CommandLine.Mixin; @@ -40,7 +40,7 @@ import java.util.Optional; import java.util.concurrent.Callable; -import static io.prestosql.tests.product.launcher.cli.Commands.runCommand; +import static io.trino.tests.product.launcher.cli.Commands.runCommand; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static picocli.CommandLine.ExitCode.OK; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/SuiteList.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/SuiteList.java index 55e59b252e0e..74bda46e5252 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/SuiteList.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/SuiteList.java @@ -16,13 +16,13 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Module; -import io.prestosql.tests.product.launcher.Extensions; -import io.prestosql.tests.product.launcher.LauncherModule; -import io.prestosql.tests.product.launcher.env.EnvironmentConfigFactory; -import io.prestosql.tests.product.launcher.env.EnvironmentModule; -import io.prestosql.tests.product.launcher.env.EnvironmentOptions; -import io.prestosql.tests.product.launcher.suite.SuiteFactory; -import io.prestosql.tests.product.launcher.suite.SuiteModule; +import io.trino.tests.product.launcher.Extensions; +import io.trino.tests.product.launcher.LauncherModule; +import io.trino.tests.product.launcher.env.EnvironmentConfigFactory; +import io.trino.tests.product.launcher.env.EnvironmentModule; +import io.trino.tests.product.launcher.env.EnvironmentOptions; +import io.trino.tests.product.launcher.suite.SuiteFactory; +import io.trino.tests.product.launcher.suite.SuiteModule; import picocli.CommandLine.Command; import picocli.CommandLine.ExitCode; import picocli.CommandLine.Option; @@ -36,7 +36,7 @@ import java.nio.charset.Charset; import java.util.concurrent.Callable; -import static io.prestosql.tests.product.launcher.cli.Commands.runCommand; +import static io.trino.tests.product.launcher.cli.Commands.runCommand; import static java.util.Objects.requireNonNull; @Command( diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/SuiteRun.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/SuiteRun.java index 61067ef1e872..f127a06ca22d 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/SuiteRun.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/SuiteRun.java @@ -19,18 +19,18 @@ import com.google.inject.Module; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.tests.product.launcher.Extensions; -import io.prestosql.tests.product.launcher.LauncherModule; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentConfigFactory; -import io.prestosql.tests.product.launcher.env.EnvironmentFactory; -import io.prestosql.tests.product.launcher.env.EnvironmentModule; -import io.prestosql.tests.product.launcher.env.EnvironmentOptions; -import io.prestosql.tests.product.launcher.suite.Suite; -import io.prestosql.tests.product.launcher.suite.SuiteFactory; -import io.prestosql.tests.product.launcher.suite.SuiteModule; -import io.prestosql.tests.product.launcher.suite.SuiteTestRun; -import io.prestosql.tests.product.launcher.util.ConsoleTable; +import io.trino.tests.product.launcher.Extensions; +import io.trino.tests.product.launcher.LauncherModule; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentConfigFactory; +import io.trino.tests.product.launcher.env.EnvironmentFactory; +import io.trino.tests.product.launcher.env.EnvironmentModule; +import io.trino.tests.product.launcher.env.EnvironmentOptions; +import io.trino.tests.product.launcher.suite.Suite; +import io.trino.tests.product.launcher.suite.SuiteFactory; +import io.trino.tests.product.launcher.suite.SuiteModule; +import io.trino.tests.product.launcher.suite.SuiteTestRun; +import io.trino.tests.product.launcher.util.ConsoleTable; import picocli.CommandLine.Command; import picocli.CommandLine.ExitCode; import picocli.CommandLine.Mixin; @@ -57,8 +57,8 @@ import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.Duration.nanosSince; import static io.airlift.units.Duration.succinctNanos; -import static io.prestosql.tests.product.launcher.cli.Commands.runCommand; -import static io.prestosql.tests.product.launcher.cli.SuiteRun.TestRunResult.HEADER; +import static io.trino.tests.product.launcher.cli.Commands.runCommand; +import static io.trino.tests.product.launcher.cli.SuiteRun.TestRunResult.HEADER; import static java.lang.Math.max; import static java.lang.String.format; import static java.lang.management.ManagementFactory.getThreadMXBean; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/TestRun.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/TestRun.java index b939dea52bff..cbde66e3d236 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/TestRun.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/cli/TestRun.java @@ -18,15 +18,15 @@ import com.google.inject.Module; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.tests.product.launcher.Extensions; -import io.prestosql.tests.product.launcher.LauncherModule; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentFactory; -import io.prestosql.tests.product.launcher.env.EnvironmentModule; -import io.prestosql.tests.product.launcher.env.EnvironmentOptions; -import io.prestosql.tests.product.launcher.testcontainers.ExistingNetwork; +import io.trino.tests.product.launcher.Extensions; +import io.trino.tests.product.launcher.LauncherModule; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentFactory; +import io.trino.tests.product.launcher.env.EnvironmentModule; +import io.trino.tests.product.launcher.env.EnvironmentOptions; +import io.trino.tests.product.launcher.testcontainers.ExistingNetwork; import net.jodah.failsafe.Failsafe; import net.jodah.failsafe.Timeout; import net.jodah.failsafe.TimeoutExceededException; @@ -46,12 +46,12 @@ import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.tests.product.launcher.cli.Commands.runCommand; -import static io.prestosql.tests.product.launcher.docker.ContainerUtil.exposePort; -import static io.prestosql.tests.product.launcher.env.DockerContainer.cleanOrCreateHostPath; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.TESTS; -import static io.prestosql.tests.product.launcher.env.EnvironmentListener.getStandardListeners; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_TEMPTO_PROFILE_CONFIG; +import static io.trino.tests.product.launcher.cli.Commands.runCommand; +import static io.trino.tests.product.launcher.docker.ContainerUtil.exposePort; +import static io.trino.tests.product.launcher.env.DockerContainer.cleanOrCreateHostPath; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.TESTS; +import static io.trino.tests.product.launcher.env.EnvironmentListener.getStandardListeners; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TEMPTO_PROFILE_CONFIG; import static java.lang.StrictMath.toIntExact; import static java.util.Objects.requireNonNull; import static org.testcontainers.containers.BindMode.READ_ONLY; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/docker/ContainerUtil.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/docker/ContainerUtil.java index 035a105805b5..3f5c1463ad9d 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/docker/ContainerUtil.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/docker/ContainerUtil.java @@ -20,8 +20,8 @@ import com.github.dockerjava.api.exception.NotFoundException; import com.github.dockerjava.api.model.Container; import com.github.dockerjava.api.model.Network; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.testcontainers.SelectedPortWaitStrategy; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.testcontainers.SelectedPortWaitStrategy; import org.testcontainers.DockerClientFactory; import org.testcontainers.containers.wait.strategy.WaitStrategy; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/Environment.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/Environment.java index 5a850c04d80a..bc9f977b1f5b 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/Environment.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/Environment.java @@ -23,8 +23,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Streams; import io.airlift.log.Logger; -import io.prestosql.tests.product.launcher.testcontainers.PrintingLogConsumer; -import io.prestosql.tests.product.launcher.util.ConsoleTable; +import io.trino.tests.product.launcher.testcontainers.PrintingLogConsumer; +import io.trino.tests.product.launcher.util.ConsoleTable; import net.jodah.failsafe.Failsafe; import net.jodah.failsafe.FailsafeExecutor; import net.jodah.failsafe.RetryPolicy; @@ -58,9 +58,9 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.tests.product.launcher.env.DockerContainer.ensurePathExists; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.TESTS; -import static io.prestosql.tests.product.launcher.env.Environments.pruneEnvironment; +import static io.trino.tests.product.launcher.env.DockerContainer.ensurePathExists; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.TESTS; +import static io.trino.tests.product.launcher.env.Environments.pruneEnvironment; import static java.lang.String.format; import static java.time.Duration.ofMinutes; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentConfig.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentConfig.java index 2f24480830ce..9efc93a57c9b 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentConfig.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentConfig.java @@ -14,11 +14,11 @@ package io.trino.tests.product.launcher.env; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.env.common.EnvironmentExtender; +import io.trino.tests.product.launcher.env.common.EnvironmentExtender; import java.util.List; -import static io.prestosql.tests.product.launcher.env.Environments.nameForConfigClass; +import static io.trino.tests.product.launcher.env.Environments.nameForConfigClass; public interface EnvironmentConfig extends EnvironmentExtender diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentConfigFactory.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentConfigFactory.java index 5d5adec4f795..b39e1f4ec288 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentConfigFactory.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentConfigFactory.java @@ -21,7 +21,7 @@ import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.tests.product.launcher.env.Environments.canonicalName; +import static io.trino.tests.product.launcher.env.Environments.canonicalName; public class EnvironmentConfigFactory { diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentFactory.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentFactory.java index a53b90044993..a054935bd03c 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentFactory.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentFactory.java @@ -21,7 +21,7 @@ import java.util.Map; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.tests.product.launcher.env.Environments.canonicalName; +import static io.trino.tests.product.launcher.env.Environments.canonicalName; import static java.util.Objects.requireNonNull; public final class EnvironmentFactory diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentListener.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentListener.java index a45f985323aa..6d51a2f5a07c 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentListener.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentListener.java @@ -15,7 +15,7 @@ import com.github.dockerjava.api.command.InspectContainerResponse; import io.airlift.log.Logger; -import io.prestosql.tests.product.launcher.util.ConsoleTable; +import io.trino.tests.product.launcher.util.ConsoleTable; import net.jodah.failsafe.Failsafe; import net.jodah.failsafe.FailsafeExecutor; import net.jodah.failsafe.Timeout; @@ -31,7 +31,7 @@ import java.util.function.Consumer; import static io.airlift.concurrent.Threads.daemonThreadsNamed; -import static io.prestosql.tests.product.launcher.env.StatisticsFetcher.Stats.HEADER; +import static io.trino.tests.product.launcher.env.StatisticsFetcher.Stats.HEADER; import static java.time.Duration.ofMinutes; import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.newCachedThreadPool; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentModule.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentModule.java index 509c457ebe42..3cdc866dea6c 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentModule.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentModule.java @@ -18,18 +18,18 @@ import com.google.inject.Provides; import com.google.inject.Singleton; import com.google.inject.multibindings.MapBinder; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberos; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberosKms; -import io.prestosql.tests.product.launcher.env.common.Kafka; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.HadoopKerberos; +import io.trino.tests.product.launcher.env.common.HadoopKerberosKms; +import io.trino.tests.product.launcher.env.common.Kafka; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import java.io.File; import static com.google.inject.Scopes.SINGLETON; import static com.google.inject.multibindings.MapBinder.newMapBinder; -import static io.prestosql.tests.product.launcher.env.Environments.nameForConfigClass; +import static io.trino.tests.product.launcher.env.Environments.nameForConfigClass; import static java.util.Objects.requireNonNull; import static java.util.Objects.requireNonNullElse; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentOptions.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentOptions.java index a2e64b0643bb..ebca978bfc8e 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentOptions.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentOptions.java @@ -15,7 +15,7 @@ import java.io.File; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; import static picocli.CommandLine.Option; public final class EnvironmentOptions diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentProvider.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentProvider.java index 84f14aa03abc..2377556da65a 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentProvider.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/EnvironmentProvider.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; -import io.prestosql.tests.product.launcher.env.common.EnvironmentExtender; +import io.trino.tests.product.launcher.env.common.EnvironmentExtender; import java.util.IdentityHashMap; import java.util.List; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/Environments.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/Environments.java index 5a3ab3685780..325ffa89d237 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/Environments.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/Environments.java @@ -17,18 +17,18 @@ import com.google.common.collect.ImmutableMap; import com.google.common.reflect.ClassPath; import io.airlift.log.Logger; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import org.testcontainers.DockerClientFactory; import java.io.IOException; import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.tests.product.launcher.docker.ContainerUtil.killContainers; -import static io.prestosql.tests.product.launcher.docker.ContainerUtil.removeNetworks; -import static io.prestosql.tests.product.launcher.env.Environment.PRODUCT_TEST_LAUNCHER_NETWORK; -import static io.prestosql.tests.product.launcher.env.Environment.PRODUCT_TEST_LAUNCHER_STARTED_LABEL_NAME; -import static io.prestosql.tests.product.launcher.env.Environment.PRODUCT_TEST_LAUNCHER_STARTED_LABEL_VALUE; +import static io.trino.tests.product.launcher.docker.ContainerUtil.killContainers; +import static io.trino.tests.product.launcher.docker.ContainerUtil.removeNetworks; +import static io.trino.tests.product.launcher.env.Environment.PRODUCT_TEST_LAUNCHER_NETWORK; +import static io.trino.tests.product.launcher.env.Environment.PRODUCT_TEST_LAUNCHER_STARTED_LABEL_NAME; +import static io.trino.tests.product.launcher.env.Environment.PRODUCT_TEST_LAUNCHER_STARTED_LABEL_VALUE; import static java.lang.reflect.Modifier.isAbstract; public final class Environments diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/StatisticsFetcher.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/StatisticsFetcher.java index fa3b3cc3cf1a..2da1c60c96ac 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/StatisticsFetcher.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/StatisticsFetcher.java @@ -30,7 +30,7 @@ import java.util.stream.Stream; import static io.airlift.units.DataSize.Unit.GIGABYTE; -import static io.prestosql.tests.product.launcher.env.StatisticsFetcher.Stats.statisticsAreEmpty; +import static io.trino.tests.product.launcher.env.StatisticsFetcher.Stats.statisticsAreEmpty; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/EnvironmentExtender.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/EnvironmentExtender.java index 85ef53a4e938..db31a7740f78 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/EnvironmentExtender.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/EnvironmentExtender.java @@ -14,7 +14,7 @@ package io.trino.tests.product.launcher.env.common; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.Environment; import java.util.List; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/Hadoop.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/Hadoop.java index 340719a4eebe..4b38ba6ff36f 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/Hadoop.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/Hadoop.java @@ -13,23 +13,23 @@ */ package io.trino.tests.product.launcher.env.common; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import org.testcontainers.containers.startupcheck.IsRunningStartupCheckStrategy; import javax.inject.Inject; import java.time.Duration; -import static io.prestosql.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.HADOOP; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_CONF_ROOT; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_HEALTH_D; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; +import static io.trino.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_CONF_ROOT; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_HEALTH_D; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; import static java.util.Objects.requireNonNull; import static org.testcontainers.containers.wait.strategy.Wait.forHealthcheck; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/HadoopKerberos.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/HadoopKerberos.java index 90ac77e99f4a..72d8d2e85454 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/HadoopKerberos.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/HadoopKerberos.java @@ -14,20 +14,20 @@ package io.trino.tests.product.launcher.env.common; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import javax.inject.Inject; import java.util.List; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.HADOOP; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.TESTS; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_CONFIG_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_TEMPTO_PROFILE_CONFIG; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.TESTS; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_CONFIG_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TEMPTO_PROFILE_CONFIG; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/HadoopKerberosKms.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/HadoopKerberosKms.java index e29d651d41f4..331e8efe7d0e 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/HadoopKerberosKms.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/HadoopKerberosKms.java @@ -14,18 +14,18 @@ package io.trino.tests.product.launcher.env.common; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; import javax.inject.Inject; import java.util.List; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.HADOOP; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.TESTS; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_TEMPTO_PROFILE_CONFIG; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.TESTS; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TEMPTO_PROFILE_CONFIG; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/Kafka.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/Kafka.java index 7df2d877c1d0..f80cf09d457d 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/Kafka.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/Kafka.java @@ -14,14 +14,14 @@ package io.trino.tests.product.launcher.env.common; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import org.testcontainers.containers.startupcheck.IsRunningStartupCheckStrategy; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; +import static io.trino.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; import static java.util.Objects.requireNonNull; import static org.testcontainers.containers.wait.strategy.Wait.forLogMessage; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/Standard.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/Standard.java index 0cdd905a7b06..01f378f9d995 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/Standard.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/Standard.java @@ -14,13 +14,13 @@ package io.trino.tests.product.launcher.env.common; import io.airlift.log.Logger; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Debug; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.ServerPackage; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Debug; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.ServerPackage; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import org.testcontainers.containers.startupcheck.IsRunningStartupCheckStrategy; import org.testcontainers.containers.wait.strategy.WaitAllStrategy; @@ -38,11 +38,11 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.tests.product.launcher.docker.ContainerUtil.exposePort; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.TESTS; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.WORKER; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.WORKER_NTH; +import static io.trino.tests.product.launcher.docker.ContainerUtil.exposePort; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.TESTS; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.WORKER; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.WORKER_NTH; import static java.lang.Integer.parseInt; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/configs/ConfigDefault.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/configs/ConfigDefault.java index 63e65d5cdbda..fa5afd11fdaf 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/configs/ConfigDefault.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/configs/ConfigDefault.java @@ -13,11 +13,11 @@ */ package io.trino.tests.product.launcher.env.configs; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentDefaults; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentDefaults; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.tests.product.launcher.env.Environments.nameForConfigClass; +import static io.trino.tests.product.launcher.env.Environments.nameForConfigClass; public class ConfigDefault implements EnvironmentConfig diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/configs/ConfigEnvBased.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/configs/ConfigEnvBased.java index 9ae9dee60803..ce0e00b66143 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/configs/ConfigEnvBased.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/configs/ConfigEnvBased.java @@ -15,17 +15,17 @@ import com.google.common.base.Splitter; import com.google.common.base.Strings; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; import javax.inject.Inject; import java.util.List; import java.util.Optional; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.HADOOP; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.PRESTO; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_HADOOP_INIT_D; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.PRESTO; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_HADOOP_INIT_D; import static java.lang.System.getenv; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/configs/ConfigHdp3.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/configs/ConfigHdp3.java index 75dacd7f5641..9b9a94f74916 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/configs/ConfigHdp3.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/configs/ConfigHdp3.java @@ -14,14 +14,14 @@ package io.trino.tests.product.launcher.env.configs; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; import javax.inject.Inject; import java.util.List; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.PRESTO; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.PRESTO; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/AbstractSinglenodeLdap.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/AbstractSinglenodeLdap.java index 64cb30a2c742..1639458d181b 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/AbstractSinglenodeLdap.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/AbstractSinglenodeLdap.java @@ -13,25 +13,25 @@ */ package io.trino.tests.product.launcher.env.environment; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.EnvironmentExtender; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.EnvironmentExtender; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import org.testcontainers.containers.startupcheck.IsRunningStartupCheckStrategy; import java.time.Duration; import java.util.List; -import static io.prestosql.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.LDAP; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.TESTS; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_CONFIG_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_TEMPTO_PROFILE_CONFIG; +import static io.trino.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.LDAP; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.TESTS; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_CONFIG_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TEMPTO_PROFILE_CONFIG; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/Multinode.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/Multinode.java index 730c61c5b0eb..a53b67760104 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/Multinode.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/Multinode.java @@ -14,28 +14,28 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Debug; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.ServerPackage; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Debug; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.ServerPackage; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; import java.io.File; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.WORKER; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_CONFIG_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_JVM_CONFIG; -import static io.prestosql.tests.product.launcher.env.common.Standard.createPrestoContainer; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.WORKER; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_CONFIG_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_JVM_CONFIG; +import static io.trino.tests.product.launcher.env.common.Standard.createPrestoContainer; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/MultinodeHiveCaching.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/MultinodeHiveCaching.java index ab424c434e1d..ae22a26f34ff 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/MultinodeHiveCaching.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/MultinodeHiveCaching.java @@ -15,27 +15,27 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Debug; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.ServerPackage; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Debug; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.ServerPackage; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; import java.io.File; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.worker; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_CONFIG_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_JVM_CONFIG; -import static io.prestosql.tests.product.launcher.env.common.Standard.createPrestoContainer; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.worker; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_CONFIG_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_JVM_CONFIG; +import static io.trino.tests.product.launcher.env.common.Standard.createPrestoContainer; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/MultinodeTls.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/MultinodeTls.java index fd1273b35200..007f5df7bb92 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/MultinodeTls.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/MultinodeTls.java @@ -14,30 +14,30 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Debug; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.ServerPackage; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Debug; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.ServerPackage; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import javax.inject.Inject; import java.io.File; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.TESTS; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.worker; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_CONFIG_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_TEMPTO_PROFILE_CONFIG; -import static io.prestosql.tests.product.launcher.env.common.Standard.createPrestoContainer; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.TESTS; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.worker; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_CONFIG_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TEMPTO_PROFILE_CONFIG; +import static io.trino.tests.product.launcher.env.common.Standard.createPrestoContainer; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/MultinodeTlsKerberos.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/MultinodeTlsKerberos.java index 33ac9327ab17..0c022cd00002 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/MultinodeTlsKerberos.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/MultinodeTlsKerberos.java @@ -14,16 +14,16 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Debug; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.ServerPackage; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberos; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Debug; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.ServerPackage; +import io.trino.tests.product.launcher.env.common.HadoopKerberos; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; @@ -31,12 +31,12 @@ import java.util.Objects; import static com.google.common.base.Verify.verify; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.worker; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_CONFIG_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Standard.createPrestoContainer; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.worker; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_CONFIG_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Standard.createPrestoContainer; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/Singlenode.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/Singlenode.java index 2ebcb93dd089..05dd39936f4d 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/Singlenode.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/Singlenode.java @@ -14,11 +14,11 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeCassandra.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeCassandra.java index 48f8117e2b4b..599baa65fb81 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeCassandra.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeCassandra.java @@ -14,22 +14,22 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import org.testcontainers.containers.startupcheck.IsRunningStartupCheckStrategy; import javax.inject.Inject; import java.time.Duration; -import static io.prestosql.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; +import static io.trino.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeHdfsImpersonation.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeHdfsImpersonation.java index 55cdc804451e..7baf7a4af01e 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeHdfsImpersonation.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeHdfsImpersonation.java @@ -14,18 +14,18 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeHdp3.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeHdp3.java index 48f3f88b8dc0..295b62f02f6c 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeHdp3.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeHdp3.java @@ -14,20 +14,20 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.HADOOP; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.TESTS; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_HADOOP_INIT_D; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_TEMPTO_PROFILE_CONFIG; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.TESTS; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_HADOOP_INIT_D; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TEMPTO_PROFILE_CONFIG; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeHiveImpersonation.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeHiveImpersonation.java index 75f9ab1b783e..e1be10d4177f 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeHiveImpersonation.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeHiveImpersonation.java @@ -14,18 +14,18 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKafka.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKafka.java index 39741157af3a..c64fcc8e1893 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKafka.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKafka.java @@ -15,17 +15,17 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.Kafka; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.Kafka; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonation.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonation.java index e23135fd25d2..454d83a300d1 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonation.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonation.java @@ -14,18 +14,18 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberos; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.HadoopKerberos; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonationCrossRealm.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonationCrossRealm.java index 014b8b728059..763601e7d365 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonationCrossRealm.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonationCrossRealm.java @@ -14,18 +14,18 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberos; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.HadoopKerberos; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonationWithDataProtection.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonationWithDataProtection.java index dd989d672ee9..9081d5b4ca10 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonationWithDataProtection.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonationWithDataProtection.java @@ -14,19 +14,19 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberos; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.HadoopKerberos; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.HADOOP; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonationWithWireEncryption.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonationWithWireEncryption.java index 534e9c82b062..d58127323913 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonationWithWireEncryption.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsImpersonationWithWireEncryption.java @@ -14,19 +14,19 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberos; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.HadoopKerberos; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.HADOOP; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsNoImpersonation.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsNoImpersonation.java index 68b7f9a05254..f35b050f3f33 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsNoImpersonation.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHdfsNoImpersonation.java @@ -14,18 +14,18 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberos; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.HadoopKerberos; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHiveImpersonation.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHiveImpersonation.java index 34b67523ca24..d7537be565db 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHiveImpersonation.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosHiveImpersonation.java @@ -14,18 +14,18 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberos; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.HadoopKerberos; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosKmsHdfsImpersonation.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosKmsHdfsImpersonation.java index 81320036e36d..480c9d01a15c 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosKmsHdfsImpersonation.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosKmsHdfsImpersonation.java @@ -14,19 +14,19 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberosKms; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.HadoopKerberosKms; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.HADOOP; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosKmsHdfsNoImpersonation.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosKmsHdfsNoImpersonation.java index 13a64d3c60ad..08aefb8e738a 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosKmsHdfsNoImpersonation.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeKerberosKmsHdfsNoImpersonation.java @@ -14,18 +14,18 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberosKms; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.HadoopKerberosKms; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_HIVE_PROPERTIES; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_PRESTO_ICEBERG_PROPERTIES; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdap.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdap.java index ddb7e01692c0..b0c039ed0e3f 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdap.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdap.java @@ -14,12 +14,12 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import javax.inject.Inject; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdapBindDn.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdapBindDn.java index 60f198758664..323cbb1ff54e 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdapBindDn.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdapBindDn.java @@ -14,12 +14,12 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import javax.inject.Inject; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdapInsecure.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdapInsecure.java index aedbf40543f5..6e72e6ab08fd 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdapInsecure.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdapInsecure.java @@ -14,13 +14,13 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import javax.inject.Inject; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdapReferrals.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdapReferrals.java index 8f1da177ce5b..4366c1b9f822 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdapReferrals.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeLdapReferrals.java @@ -14,12 +14,12 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import javax.inject.Inject; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeMysql.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeMysql.java index b3dae775cf39..b546f3ed82e7 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeMysql.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeMysql.java @@ -14,20 +14,20 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import org.testcontainers.containers.startupcheck.IsRunningStartupCheckStrategy; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; +import static io.trino.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodePostgresql.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodePostgresql.java index 4922ff2b8c8c..27957521e44a 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodePostgresql.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodePostgresql.java @@ -15,20 +15,20 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import org.testcontainers.containers.startupcheck.IsRunningStartupCheckStrategy; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; +import static io.trino.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeSparkIceberg.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeSparkIceberg.java index b592ede829d8..fcce2f414a56 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeSparkIceberg.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeSparkIceberg.java @@ -14,24 +14,24 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.Hadoop; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.Hadoop; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import org.testcontainers.containers.startupcheck.IsRunningStartupCheckStrategy; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.HADOOP; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_HADOOP_INIT_D; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; +import static io.trino.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_HADOOP_INIT_D; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeSqlserver.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeSqlserver.java index c35324dbe50a..4fea53bb59da 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeSqlserver.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/SinglenodeSqlserver.java @@ -15,20 +15,20 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; -import io.prestosql.tests.product.launcher.testcontainers.PortBinder; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.testcontainers.PortBinder; import org.testcontainers.containers.startupcheck.IsRunningStartupCheckStrategy; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; +import static io.trino.tests.product.launcher.docker.ContainerUtil.forSelectedPorts; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/TwoKerberosHives.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/TwoKerberosHives.java index 0fb7e587566f..8b7a3df3c593 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/TwoKerberosHives.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/TwoKerberosHives.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.Closer; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberos; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.HadoopKerberos; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.annotation.PreDestroy; import javax.inject.Inject; @@ -35,11 +35,11 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.HADOOP; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.CONTAINER_HADOOP_INIT_D; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.createHadoopContainer; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP; +import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_HADOOP_INIT_D; +import static io.trino.tests.product.launcher.env.common.Hadoop.createHadoopContainer; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; import static java.util.Objects.requireNonNull; import static java.util.UUID.randomUUID; import static org.testcontainers.containers.BindMode.READ_WRITE; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/TwoMixedHives.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/TwoMixedHives.java index 096921426ca1..71d470c8222f 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/TwoMixedHives.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/TwoMixedHives.java @@ -14,21 +14,21 @@ package io.trino.tests.product.launcher.env.environment; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.docker.DockerFiles; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.Environment; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.common.HadoopKerberos; -import io.prestosql.tests.product.launcher.env.common.Standard; -import io.prestosql.tests.product.launcher.env.common.TestsEnvironment; +import io.trino.tests.product.launcher.docker.DockerFiles; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.Environment; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.common.HadoopKerberos; +import io.trino.tests.product.launcher.env.common.Standard; +import io.trino.tests.product.launcher.env.common.TestsEnvironment; import javax.inject.Inject; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; -import static io.prestosql.tests.product.launcher.env.EnvironmentContainers.HADOOP; -import static io.prestosql.tests.product.launcher.env.common.Hadoop.createHadoopContainer; -import static io.prestosql.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR; +import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP; +import static io.trino.tests.product.launcher.env.common.Hadoop.createHadoopContainer; +import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_PRESTO_ETC; import static java.util.Objects.requireNonNull; import static org.testcontainers.utility.MountableFile.forHostPath; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/Suite.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/Suite.java index 10564d620982..b26c3ebe0892 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/Suite.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/Suite.java @@ -13,13 +13,13 @@ */ package io.trino.tests.product.launcher.suite; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.configs.ConfigDefault; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.configs.ConfigDefault; import java.util.List; import static com.google.common.base.MoreObjects.toStringHelper; -import static io.prestosql.tests.product.launcher.suite.Suites.nameForSuiteClass; +import static io.trino.tests.product.launcher.suite.Suites.nameForSuiteClass; public abstract class Suite { diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/SuiteModule.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/SuiteModule.java index 3ec46798449e..898f7e306f8b 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/SuiteModule.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/SuiteModule.java @@ -19,7 +19,7 @@ import static com.google.inject.Scopes.SINGLETON; import static com.google.inject.multibindings.MapBinder.newMapBinder; -import static io.prestosql.tests.product.launcher.suite.Suites.nameForSuiteClass; +import static io.trino.tests.product.launcher.suite.Suites.nameForSuiteClass; import static java.util.Objects.requireNonNull; public final class SuiteModule diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/SuiteTestRun.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/SuiteTestRun.java index 859f67393ab9..cd0c14077342 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/SuiteTestRun.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/SuiteTestRun.java @@ -18,9 +18,9 @@ import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentProvider; -import io.prestosql.tests.product.launcher.env.Environments; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentProvider; +import io.trino.tests.product.launcher.env.Environments; import java.util.List; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/Suites.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/Suites.java index 817773f8a6a2..97b51db7e912 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/Suites.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/Suites.java @@ -15,7 +15,7 @@ import com.google.common.base.CaseFormat; import com.google.common.reflect.ClassPath; -import io.prestosql.tests.product.launcher.env.Environments; +import io.trino.tests.product.launcher.env.Environments; import java.io.IOException; import java.util.List; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite1.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite1.java index 9e04b6d4619c..68ea465022c6 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite1.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite1.java @@ -14,14 +14,14 @@ package io.trino.tests.product.launcher.suite.suites; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.environment.Multinode; -import io.prestosql.tests.product.launcher.suite.Suite; -import io.prestosql.tests.product.launcher.suite.SuiteTestRun; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.environment.Multinode; +import io.trino.tests.product.launcher.suite.Suite; +import io.trino.tests.product.launcher.suite.SuiteTestRun; import java.util.List; -import static io.prestosql.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; +import static io.trino.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; public class Suite1 extends Suite diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite2.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite2.java index 47512b419197..05a446441af9 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite2.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite2.java @@ -14,17 +14,17 @@ package io.trino.tests.product.launcher.suite.suites; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.environment.Singlenode; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeHdfsImpersonation; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeKerberosHdfsImpersonation; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeKerberosHdfsNoImpersonation; -import io.prestosql.tests.product.launcher.suite.Suite; -import io.prestosql.tests.product.launcher.suite.SuiteTestRun; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.environment.Singlenode; +import io.trino.tests.product.launcher.env.environment.SinglenodeHdfsImpersonation; +import io.trino.tests.product.launcher.env.environment.SinglenodeKerberosHdfsImpersonation; +import io.trino.tests.product.launcher.env.environment.SinglenodeKerberosHdfsNoImpersonation; +import io.trino.tests.product.launcher.suite.Suite; +import io.trino.tests.product.launcher.suite.SuiteTestRun; import java.util.List; -import static io.prestosql.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; +import static io.trino.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; public class Suite2 extends Suite diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite3.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite3.java index b656ca86b1ea..3c3e16a9ac9f 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite3.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite3.java @@ -14,17 +14,17 @@ package io.trino.tests.product.launcher.suite.suites; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.environment.MultinodeTls; -import io.prestosql.tests.product.launcher.env.environment.MultinodeTlsKerberos; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeKerberosHdfsImpersonationWithDataProtection; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeKerberosHdfsImpersonationWithWireEncryption; -import io.prestosql.tests.product.launcher.suite.Suite; -import io.prestosql.tests.product.launcher.suite.SuiteTestRun; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.environment.MultinodeTls; +import io.trino.tests.product.launcher.env.environment.MultinodeTlsKerberos; +import io.trino.tests.product.launcher.env.environment.SinglenodeKerberosHdfsImpersonationWithDataProtection; +import io.trino.tests.product.launcher.env.environment.SinglenodeKerberosHdfsImpersonationWithWireEncryption; +import io.trino.tests.product.launcher.suite.Suite; +import io.trino.tests.product.launcher.suite.SuiteTestRun; import java.util.List; -import static io.prestosql.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; +import static io.trino.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; public class Suite3 extends Suite diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite5.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite5.java index b52cedc39af8..2d3b582a4173 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite5.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite5.java @@ -14,16 +14,16 @@ package io.trino.tests.product.launcher.suite.suites; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.environment.MultinodeHiveCaching; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeHiveImpersonation; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeKerberosHiveImpersonation; -import io.prestosql.tests.product.launcher.suite.Suite; -import io.prestosql.tests.product.launcher.suite.SuiteTestRun; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.environment.MultinodeHiveCaching; +import io.trino.tests.product.launcher.env.environment.SinglenodeHiveImpersonation; +import io.trino.tests.product.launcher.env.environment.SinglenodeKerberosHiveImpersonation; +import io.trino.tests.product.launcher.suite.Suite; +import io.trino.tests.product.launcher.suite.SuiteTestRun; import java.util.List; -import static io.prestosql.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; +import static io.trino.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; public class Suite5 extends Suite diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite6NonGeneric.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite6NonGeneric.java index 94d293711b3b..ca9d3ee2c66c 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite6NonGeneric.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite6NonGeneric.java @@ -14,22 +14,22 @@ package io.trino.tests.product.launcher.suite.suites; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentDefaults; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeCassandra; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeKafka; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeKerberosKmsHdfsImpersonation; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeKerberosKmsHdfsNoImpersonation; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeLdap; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeLdapInsecure; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeLdapReferrals; -import io.prestosql.tests.product.launcher.suite.Suite; -import io.prestosql.tests.product.launcher.suite.SuiteTestRun; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentDefaults; +import io.trino.tests.product.launcher.env.environment.SinglenodeCassandra; +import io.trino.tests.product.launcher.env.environment.SinglenodeKafka; +import io.trino.tests.product.launcher.env.environment.SinglenodeKerberosKmsHdfsImpersonation; +import io.trino.tests.product.launcher.env.environment.SinglenodeKerberosKmsHdfsNoImpersonation; +import io.trino.tests.product.launcher.env.environment.SinglenodeLdap; +import io.trino.tests.product.launcher.env.environment.SinglenodeLdapInsecure; +import io.trino.tests.product.launcher.env.environment.SinglenodeLdapReferrals; +import io.trino.tests.product.launcher.suite.Suite; +import io.trino.tests.product.launcher.suite.SuiteTestRun; import java.util.List; import static com.google.common.base.Verify.verify; -import static io.prestosql.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; +import static io.trino.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; public class Suite6NonGeneric extends Suite diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite7NonGeneric.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite7NonGeneric.java index 9d9a8623a40b..23513cea51dd 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite7NonGeneric.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite7NonGeneric.java @@ -14,23 +14,23 @@ package io.trino.tests.product.launcher.suite.suites; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentDefaults; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeKerberosHdfsImpersonationCrossRealm; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeLdapBindDn; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeMysql; -import io.prestosql.tests.product.launcher.env.environment.SinglenodePostgresql; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeSparkIceberg; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeSqlserver; -import io.prestosql.tests.product.launcher.env.environment.TwoKerberosHives; -import io.prestosql.tests.product.launcher.env.environment.TwoMixedHives; -import io.prestosql.tests.product.launcher.suite.Suite; -import io.prestosql.tests.product.launcher.suite.SuiteTestRun; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentDefaults; +import io.trino.tests.product.launcher.env.environment.SinglenodeKerberosHdfsImpersonationCrossRealm; +import io.trino.tests.product.launcher.env.environment.SinglenodeLdapBindDn; +import io.trino.tests.product.launcher.env.environment.SinglenodeMysql; +import io.trino.tests.product.launcher.env.environment.SinglenodePostgresql; +import io.trino.tests.product.launcher.env.environment.SinglenodeSparkIceberg; +import io.trino.tests.product.launcher.env.environment.SinglenodeSqlserver; +import io.trino.tests.product.launcher.env.environment.TwoKerberosHives; +import io.trino.tests.product.launcher.env.environment.TwoMixedHives; +import io.trino.tests.product.launcher.suite.Suite; +import io.trino.tests.product.launcher.suite.SuiteTestRun; import java.util.List; import static com.google.common.base.Verify.verify; -import static io.prestosql.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; +import static io.trino.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; public class Suite7NonGeneric extends Suite diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite8NonGeneric.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite8NonGeneric.java index 4e574563a344..22b54afabb5e 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite8NonGeneric.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite8NonGeneric.java @@ -14,16 +14,16 @@ package io.trino.tests.product.launcher.suite.suites; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.EnvironmentDefaults; -import io.prestosql.tests.product.launcher.env.environment.SinglenodeHdp3; -import io.prestosql.tests.product.launcher.suite.Suite; -import io.prestosql.tests.product.launcher.suite.SuiteTestRun; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.EnvironmentDefaults; +import io.trino.tests.product.launcher.env.environment.SinglenodeHdp3; +import io.trino.tests.product.launcher.suite.Suite; +import io.trino.tests.product.launcher.suite.SuiteTestRun; import java.util.List; import static com.google.common.base.Verify.verify; -import static io.prestosql.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; +import static io.trino.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; public class Suite8NonGeneric extends Suite diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/SuiteTpcds.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/SuiteTpcds.java index 3eb56a679420..5026cf249128 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/SuiteTpcds.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/SuiteTpcds.java @@ -14,14 +14,14 @@ package io.trino.tests.product.launcher.suite.suites; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.product.launcher.env.EnvironmentConfig; -import io.prestosql.tests.product.launcher.env.environment.Multinode; -import io.prestosql.tests.product.launcher.suite.Suite; -import io.prestosql.tests.product.launcher.suite.SuiteTestRun; +import io.trino.tests.product.launcher.env.EnvironmentConfig; +import io.trino.tests.product.launcher.env.environment.Multinode; +import io.trino.tests.product.launcher.suite.Suite; +import io.trino.tests.product.launcher.suite.SuiteTestRun; import java.util.List; -import static io.prestosql.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; +import static io.trino.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment; public class SuiteTpcds extends Suite diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/testcontainers/PortBinder.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/testcontainers/PortBinder.java index a2e66a8e4519..8ec32d79875f 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/testcontainers/PortBinder.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/testcontainers/PortBinder.java @@ -13,9 +13,9 @@ */ package io.trino.tests.product.launcher.testcontainers; -import io.prestosql.tests.product.launcher.docker.ContainerUtil; -import io.prestosql.tests.product.launcher.env.DockerContainer; -import io.prestosql.tests.product.launcher.env.EnvironmentOptions; +import io.trino.tests.product.launcher.docker.ContainerUtil; +import io.trino.tests.product.launcher.env.DockerContainer; +import io.trino.tests.product.launcher.env.EnvironmentOptions; import javax.inject.Inject; diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/util/ConsoleTable.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/util/ConsoleTable.java index 9fdacbab70e2..40fc42691f56 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/util/ConsoleTable.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/util/ConsoleTable.java @@ -23,7 +23,7 @@ import java.util.stream.IntStream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.tests.product.launcher.util.ConsoleTable.Alignment.RIGHT; +import static io.trino.tests.product.launcher.util.ConsoleTable.Alignment.RIGHT; import static java.lang.Math.max; import static java.util.Collections.nCopies; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-product-tests-launcher/src/test/java/io/trino/tests/product/launcher/env/TestEnvironments.java b/testing/trino-product-tests-launcher/src/test/java/io/trino/tests/product/launcher/env/TestEnvironments.java index 23527ae98fc0..6c845166cc66 100644 --- a/testing/trino-product-tests-launcher/src/test/java/io/trino/tests/product/launcher/env/TestEnvironments.java +++ b/testing/trino-product-tests-launcher/src/test/java/io/trino/tests/product/launcher/env/TestEnvironments.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static io.prestosql.tests.product.launcher.env.Environments.canonicalName; +import static io.trino.tests.product.launcher.env.Environments.canonicalName; import static org.assertj.core.api.Assertions.assertThat; public class TestEnvironments diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/PrestoTemptoPlugin.java b/testing/trino-product-tests/src/main/java/io/trino/tests/PrestoTemptoPlugin.java index 01c018a0bf95..68c49d771432 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/PrestoTemptoPlugin.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/PrestoTemptoPlugin.java @@ -14,7 +14,6 @@ package io.trino.tests; import com.google.common.collect.ImmutableList; -import io.prestosql.tests.hive.HiveVersionProvider; import io.trino.tempto.TemptoPlugin; import io.trino.tempto.fulfillment.RequirementFulfiller; import io.trino.tempto.fulfillment.table.TableDefinition; @@ -23,18 +22,19 @@ import io.trino.tempto.initialization.SuiteModuleProvider; import io.trino.tempto.internal.fulfillment.ldap.LdapObjectFulfiller; import io.trino.tempto.internal.fulfillment.ldap.LdapObjectModuleProvider; +import io.trino.tests.hive.HiveVersionProvider; import java.util.List; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_AVRO; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_ORC; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_PARQUET; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_RCFILE; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_TEXTFILE; -import static io.prestosql.tests.hive.TestHiveBucketedTables.BUCKETED_NATION; -import static io.prestosql.tests.hive.TestHiveBucketedTables.BUCKETED_NATION_PREPARED; -import static io.prestosql.tests.hive.TestHiveBucketedTables.BUCKETED_PARTITIONED_NATION; -import static io.prestosql.tests.hive.TestHiveBucketedTables.BUCKETED_SORTED_NATION; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_AVRO; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_ORC; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_PARQUET; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_RCFILE; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_TEXTFILE; +import static io.trino.tests.hive.TestHiveBucketedTables.BUCKETED_NATION; +import static io.trino.tests.hive.TestHiveBucketedTables.BUCKETED_NATION_PREPARED; +import static io.trino.tests.hive.TestHiveBucketedTables.BUCKETED_PARTITIONED_NATION; +import static io.trino.tests.hive.TestHiveBucketedTables.BUCKETED_SORTED_NATION; public class PrestoTemptoPlugin implements TemptoPlugin diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/TestAlterTable.java b/testing/trino-product-tests/src/main/java/io/trino/tests/TestAlterTable.java index dbe860612cc0..f399783de60c 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/TestAlterTable.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/TestAlterTable.java @@ -20,11 +20,11 @@ import io.trino.tempto.fulfillment.table.hive.tpch.ImmutableTpchTablesRequirements.ImmutableNationTable; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.ALTER_TABLE; -import static io.prestosql.tests.TestGroups.SMOKE; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.ALTER_TABLE; +import static io.trino.tests.TestGroups.SMOKE; import static java.lang.String.format; @Requires(ImmutableNationTable.class) diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/TestCreateDropView.java b/testing/trino-product-tests/src/main/java/io/trino/tests/TestCreateDropView.java index af04d935628b..fcc6c95ef7d7 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/TestCreateDropView.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/TestCreateDropView.java @@ -18,12 +18,12 @@ import io.trino.tempto.fulfillment.table.hive.tpch.ImmutableTpchTablesRequirements.ImmutableNationTable; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.CREATE_DROP_VIEW; -import static io.prestosql.tests.TestGroups.SMOKE; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.context.ContextDsl.executeWith; import static io.trino.tempto.query.QueryExecutor.query; import static io.trino.tempto.sql.SqlContexts.createViewAs; +import static io.trino.tests.TestGroups.CREATE_DROP_VIEW; +import static io.trino.tests.TestGroups.SMOKE; import static java.lang.String.format; @Requires(ImmutableNationTable.class) diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/TestCreateTable.java b/testing/trino-product-tests/src/main/java/io/trino/tests/TestCreateTable.java index ed437330a804..094c9f4508b6 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/TestCreateTable.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/TestCreateTable.java @@ -18,9 +18,9 @@ import io.trino.tempto.fulfillment.table.hive.tpch.ImmutableTpchTablesRequirements.ImmutableNationTable; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.CREATE_TABLE; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.CREATE_TABLE; import static java.lang.String.format; @Requires(ImmutableNationTable.class) diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/TestFunctions.java b/testing/trino-product-tests/src/main/java/io/trino/tests/TestFunctions.java index 681d41d2e919..ab69a256384b 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/TestFunctions.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/TestFunctions.java @@ -16,10 +16,10 @@ import io.trino.tempto.ProductTest; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.FUNCTIONS; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.TestGroups.FUNCTIONS; +import static io.trino.tests.utils.QueryExecutors.onPresto; public class TestFunctions extends ProductTest diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/TestImpersonation.java b/testing/trino-product-tests/src/main/java/io/trino/tests/TestImpersonation.java index c2106344bc7f..5f53785b0fb6 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/TestImpersonation.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/TestImpersonation.java @@ -25,10 +25,10 @@ import java.net.URISyntaxException; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.tests.TestGroups.HDFS_IMPERSONATION; -import static io.prestosql.tests.TestGroups.HDFS_NO_IMPERSONATION; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.utils.QueryExecutors.connectToPresto; +import static io.trino.tests.TestGroups.HDFS_IMPERSONATION; +import static io.trino.tests.TestGroups.HDFS_NO_IMPERSONATION; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.utils.QueryExecutors.connectToPresto; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/TestJmxConnector.java b/testing/trino-product-tests/src/main/java/io/trino/tests/TestJmxConnector.java index 2891d45685d8..a20d28126e66 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/TestJmxConnector.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/TestJmxConnector.java @@ -16,10 +16,10 @@ import io.trino.tempto.ProductTest; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.JDBC; -import static io.prestosql.tests.TestGroups.JMX_CONNECTOR; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.JDBC; +import static io.trino.tests.TestGroups.JMX_CONNECTOR; import static java.sql.JDBCType.BIGINT; import static java.sql.JDBCType.VARCHAR; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/TestSimpleQuery.java b/testing/trino-product-tests/src/main/java/io/trino/tests/TestSimpleQuery.java index e555aaf39ec7..4e1084dfe617 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/TestSimpleQuery.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/TestSimpleQuery.java @@ -24,12 +24,12 @@ import io.trino.tempto.fulfillment.table.ImmutableTableRequirement; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.SIMPLE; -import static io.prestosql.tests.TestGroups.SMOKE; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.context.ThreadLocalTestContextHolder.testContextIfSet; import static io.trino.tempto.fulfillment.table.hive.tpch.TpchTableDefinitions.NATION; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.SIMPLE; +import static io.trino.tests.TestGroups.SMOKE; import static org.assertj.core.api.Assertions.assertThat; public class TestSimpleQuery diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/TestSqlCancel.java b/testing/trino-product-tests/src/main/java/io/trino/tests/TestSqlCancel.java index 5aeb60f03f3f..9fb1dd4502f5 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/TestSqlCancel.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/TestSqlCancel.java @@ -43,9 +43,9 @@ import static io.airlift.http.client.HttpUriBuilder.uriBuilderFrom; import static io.airlift.http.client.Request.Builder.prepareDelete; import static io.airlift.http.client.ResponseHandlerUtils.propagate; -import static io.prestosql.tests.TestGroups.CANCEL_QUERY; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.CANCEL_QUERY; import static java.lang.String.format; import static java.lang.System.nanoTime; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/TestSystemConnector.java b/testing/trino-product-tests/src/main/java/io/trino/tests/TestSystemConnector.java index 3b3ed60b0c9c..5978c55859c4 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/TestSystemConnector.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/TestSystemConnector.java @@ -16,10 +16,10 @@ import io.trino.tempto.ProductTest; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.JDBC; -import static io.prestosql.tests.TestGroups.SYSTEM_CONNECTOR; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.JDBC; +import static io.trino.tests.TestGroups.SYSTEM_CONNECTOR; import static java.sql.JDBCType.ARRAY; import static java.sql.JDBCType.BIGINT; import static java.sql.JDBCType.TIMESTAMP_WITH_TIMEZONE; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/TestTls.java b/testing/trino-product-tests/src/main/java/io/trino/tests/TestTls.java index 1aca876fb06b..db9caa5c517f 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/TestTls.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/TestTls.java @@ -28,9 +28,9 @@ import java.net.URI; import java.util.List; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.TestGroups.TLS; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.TestGroups.TLS; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.stream.Collectors.toList; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/TestTwoHives.java b/testing/trino-product-tests/src/main/java/io/trino/tests/TestTwoHives.java index 0d3dda2476a2..98b33f2cc48a 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/TestTwoHives.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/TestTwoHives.java @@ -19,11 +19,11 @@ import java.util.List; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.TestGroups.TWO_HIVES; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.TestGroups.TWO_HIVES; import static java.lang.Math.pow; import static java.lang.String.format; import static java.util.stream.Collectors.joining; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/blackhole/TestBlackHoleConnector.java b/testing/trino-product-tests/src/main/java/io/trino/tests/blackhole/TestBlackHoleConnector.java index 48caf88b9c73..7be53ac7ea95 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/blackhole/TestBlackHoleConnector.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/blackhole/TestBlackHoleConnector.java @@ -18,10 +18,10 @@ import java.util.UUID; -import static io.prestosql.tests.TestGroups.BLACKHOLE_CONNECTOR; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.BLACKHOLE_CONNECTOR; import static java.lang.String.format; public class TestBlackHoleConnector diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/CassandraTpchTableDefinitions.java b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/CassandraTpchTableDefinitions.java index 44baba314216..5f5726fd4659 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/CassandraTpchTableDefinitions.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/CassandraTpchTableDefinitions.java @@ -20,8 +20,8 @@ import java.sql.JDBCType; -import static io.prestosql.tests.cassandra.TestConstants.CONNECTOR_NAME; -import static io.prestosql.tests.cassandra.TestConstants.KEY_SPACE; +import static io.trino.tests.cassandra.TestConstants.CONNECTOR_NAME; +import static io.trino.tests.cassandra.TestConstants.KEY_SPACE; import static java.sql.JDBCType.BIGINT; import static java.sql.JDBCType.DOUBLE; import static java.sql.JDBCType.VARCHAR; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/DataTypesTableDefinition.java b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/DataTypesTableDefinition.java index 340b76198adf..242000000294 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/DataTypesTableDefinition.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/DataTypesTableDefinition.java @@ -31,8 +31,8 @@ import java.util.Arrays; import java.util.UUID; -import static io.prestosql.tests.cassandra.TestConstants.CONNECTOR_NAME; -import static io.prestosql.tests.cassandra.TestConstants.KEY_SPACE; +import static io.trino.tests.cassandra.TestConstants.CONNECTOR_NAME; +import static io.trino.tests.cassandra.TestConstants.KEY_SPACE; import static java.lang.Double.parseDouble; public final class DataTypesTableDefinition diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/MultiColumnKeyTableDefinition.java b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/MultiColumnKeyTableDefinition.java index 9b1c35c0d461..34abff2bc579 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/MultiColumnKeyTableDefinition.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/MultiColumnKeyTableDefinition.java @@ -22,8 +22,8 @@ import java.time.ZoneOffset; import java.util.List; -import static io.prestosql.tests.cassandra.TestConstants.CONNECTOR_NAME; -import static io.prestosql.tests.cassandra.TestConstants.KEY_SPACE; +import static io.trino.tests.cassandra.TestConstants.CONNECTOR_NAME; +import static io.trino.tests.cassandra.TestConstants.KEY_SPACE; public final class MultiColumnKeyTableDefinition { diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestInsertIntoCassandraTable.java b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestInsertIntoCassandraTable.java index a6c89b2d85d7..97676e80c0f6 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestInsertIntoCassandraTable.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestInsertIntoCassandraTable.java @@ -28,18 +28,18 @@ import java.time.OffsetDateTime; import java.time.ZoneOffset; -import static io.prestosql.tests.TestGroups.CASSANDRA; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.cassandra.DataTypesTableDefinition.CASSANDRA_ALL_TYPES; -import static io.prestosql.tests.cassandra.TestConstants.CONNECTOR_NAME; -import static io.prestosql.tests.cassandra.TestConstants.KEY_SPACE; -import static io.prestosql.tests.utils.QueryAssertions.assertContainsEventually; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.MutableTableRequirement.State.CREATED; import static io.trino.tempto.fulfillment.table.MutableTablesState.mutableTablesState; import static io.trino.tempto.fulfillment.table.TableRequirements.mutableTable; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.CASSANDRA; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.cassandra.DataTypesTableDefinition.CASSANDRA_ALL_TYPES; +import static io.trino.tests.cassandra.TestConstants.CONNECTOR_NAME; +import static io.trino.tests.cassandra.TestConstants.KEY_SPACE; +import static io.trino.tests.utils.QueryAssertions.assertContainsEventually; import static java.lang.String.format; import static java.util.concurrent.TimeUnit.MINUTES; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestInvalidSelect.java b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestInvalidSelect.java index 326a90f43896..7a32c8187a9f 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestInvalidSelect.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestInvalidSelect.java @@ -19,14 +19,14 @@ import io.trino.tempto.configuration.Configuration; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.CASSANDRA; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.cassandra.CassandraTpchTableDefinitions.CASSANDRA_NATION; -import static io.prestosql.tests.cassandra.TestConstants.CONNECTOR_NAME; -import static io.prestosql.tests.cassandra.TestConstants.KEY_SPACE; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.CASSANDRA; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.cassandra.CassandraTpchTableDefinitions.CASSANDRA_NATION; +import static io.trino.tests.cassandra.TestConstants.CONNECTOR_NAME; +import static io.trino.tests.cassandra.TestConstants.KEY_SPACE; import static java.lang.String.format; public class TestInvalidSelect diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestSelect.java b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestSelect.java index a8687a4908d0..1da3bdd3704a 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestSelect.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestSelect.java @@ -28,21 +28,21 @@ import java.time.OffsetDateTime; import java.time.ZoneOffset; -import static io.prestosql.tests.TestGroups.CASSANDRA; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.TpchTableResults.PRESTO_NATION_RESULT; -import static io.prestosql.tests.cassandra.CassandraTpchTableDefinitions.CASSANDRA_NATION; -import static io.prestosql.tests.cassandra.CassandraTpchTableDefinitions.CASSANDRA_SUPPLIER; -import static io.prestosql.tests.cassandra.DataTypesTableDefinition.CASSANDRA_ALL_TYPES; -import static io.prestosql.tests.cassandra.TestConstants.CONNECTOR_NAME; -import static io.prestosql.tests.cassandra.TestConstants.KEY_SPACE; -import static io.prestosql.tests.utils.QueryAssertions.assertContainsEventually; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.Requirements.compose; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.CASSANDRA; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.TpchTableResults.PRESTO_NATION_RESULT; +import static io.trino.tests.cassandra.CassandraTpchTableDefinitions.CASSANDRA_NATION; +import static io.trino.tests.cassandra.CassandraTpchTableDefinitions.CASSANDRA_SUPPLIER; +import static io.trino.tests.cassandra.DataTypesTableDefinition.CASSANDRA_ALL_TYPES; +import static io.trino.tests.cassandra.TestConstants.CONNECTOR_NAME; +import static io.trino.tests.cassandra.TestConstants.KEY_SPACE; +import static io.trino.tests.utils.QueryAssertions.assertContainsEventually; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.sql.JDBCType.BIGINT; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestSelectMultiColumnKey.java b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestSelectMultiColumnKey.java index d0f322175425..7d1e5bd6cd44 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestSelectMultiColumnKey.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/cassandra/TestSelectMultiColumnKey.java @@ -20,15 +20,15 @@ import io.trino.tempto.query.QueryResult; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.CASSANDRA; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.cassandra.MultiColumnKeyTableDefinition.CASSANDRA_MULTI_COLUMN_KEY; -import static io.prestosql.tests.cassandra.TestConstants.CONNECTOR_NAME; -import static io.prestosql.tests.cassandra.TestConstants.KEY_SPACE; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; +import static io.trino.tests.TestGroups.CASSANDRA; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.cassandra.MultiColumnKeyTableDefinition.CASSANDRA_MULTI_COLUMN_KEY; +import static io.trino.tests.cassandra.TestConstants.CONNECTOR_NAME; +import static io.trino.tests.cassandra.TestConstants.KEY_SPACE; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; public class TestSelectMultiColumnKey diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/cli/TestPrestoCli.java b/testing/trino-product-tests/src/main/java/io/trino/tests/cli/TestPrestoCli.java index 878069c7f638..c1bcc402d930 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/cli/TestPrestoCli.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/cli/TestPrestoCli.java @@ -32,11 +32,11 @@ import java.util.List; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.tests.TestGroups.AUTHORIZATION; -import static io.prestosql.tests.TestGroups.CLI; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static io.trino.tempto.fulfillment.table.hive.tpch.TpchTableDefinitions.NATION; import static io.trino.tempto.process.CliProcess.trimLines; +import static io.trino.tests.TestGroups.AUTHORIZATION; +import static io.trino.tests.TestGroups.CLI; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/cli/TestPrestoLdapCli.java b/testing/trino-product-tests/src/main/java/io/trino/tests/cli/TestPrestoLdapCli.java index e4c7f8833df4..91ba9ade8861 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/cli/TestPrestoLdapCli.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/cli/TestPrestoLdapCli.java @@ -28,24 +28,24 @@ import java.io.IOException; import java.util.Arrays; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.AMERICA_ORG; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.ASIA_ORG; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.CHILD_GROUP; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.CHILD_GROUP_USER; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.DEFAULT_GROUP; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.DEFAULT_GROUP_USER; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.ORPHAN_USER; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.PARENT_GROUP; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.PARENT_GROUP_USER; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.SPECIAL_USER; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.USER_IN_MULTIPLE_GROUPS; -import static io.prestosql.tests.TestGroups.LDAP; -import static io.prestosql.tests.TestGroups.LDAP_CLI; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static io.trino.tempto.Requirements.compose; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; import static io.trino.tempto.fulfillment.table.hive.tpch.TpchTableDefinitions.NATION; import static io.trino.tempto.process.CliProcess.trimLines; +import static io.trino.tests.ImmutableLdapObjectDefinitions.AMERICA_ORG; +import static io.trino.tests.ImmutableLdapObjectDefinitions.ASIA_ORG; +import static io.trino.tests.ImmutableLdapObjectDefinitions.CHILD_GROUP; +import static io.trino.tests.ImmutableLdapObjectDefinitions.CHILD_GROUP_USER; +import static io.trino.tests.ImmutableLdapObjectDefinitions.DEFAULT_GROUP; +import static io.trino.tests.ImmutableLdapObjectDefinitions.DEFAULT_GROUP_USER; +import static io.trino.tests.ImmutableLdapObjectDefinitions.ORPHAN_USER; +import static io.trino.tests.ImmutableLdapObjectDefinitions.PARENT_GROUP; +import static io.trino.tests.ImmutableLdapObjectDefinitions.PARENT_GROUP_USER; +import static io.trino.tests.ImmutableLdapObjectDefinitions.SPECIAL_USER; +import static io.trino.tests.ImmutableLdapObjectDefinitions.USER_IN_MULTIPLE_GROUPS; +import static io.trino.tests.TestGroups.LDAP; +import static io.trino.tests.TestGroups.LDAP_CLI; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/functions/TestFunctions.java b/testing/trino-product-tests/src/main/java/io/trino/tests/functions/TestFunctions.java index 72e493d5787c..ecccdda84fb7 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/functions/TestFunctions.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/functions/TestFunctions.java @@ -16,10 +16,10 @@ import io.trino.tempto.ProductTest; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.JSON_FUNCTIONS; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.JSON_FUNCTIONS; public class TestFunctions extends ProductTest diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/functions/operators/TestComparison.java b/testing/trino-product-tests/src/main/java/io/trino/tests/functions/operators/TestComparison.java index 4a4f53c36abe..e2f38e397fad 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/functions/operators/TestComparison.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/functions/operators/TestComparison.java @@ -17,11 +17,11 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.COMPARISON; -import static io.prestosql.tests.TestGroups.QUERY_ENGINE; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.COMPARISON; +import static io.trino.tests.TestGroups.QUERY_ENGINE; import static java.lang.String.format; public class TestComparison diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/functions/operators/TestLogical.java b/testing/trino-product-tests/src/main/java/io/trino/tests/functions/operators/TestLogical.java index cbe146f09de8..233bf6e33493 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/functions/operators/TestLogical.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/functions/operators/TestLogical.java @@ -16,11 +16,11 @@ import io.trino.tempto.ProductTest; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.LOGICAL; -import static io.prestosql.tests.TestGroups.QUERY_ENGINE; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.LOGICAL; +import static io.trino.tests.TestGroups.QUERY_ENGINE; public class TestLogical extends ProductTest diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/AllSimpleTypesTableDefinitions.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/AllSimpleTypesTableDefinitions.java index 5fe9e9bcb0f9..56294391fb41 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/AllSimpleTypesTableDefinitions.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/AllSimpleTypesTableDefinitions.java @@ -19,8 +19,8 @@ import java.util.Locale; import java.util.Optional; -import static io.prestosql.tests.utils.QueryExecutors.onHive; import static io.trino.tempto.fulfillment.table.hive.InlineDataSource.createResourceDataSource; +import static io.trino.tests.utils.QueryExecutors.onHive; import static java.lang.String.format; public final class AllSimpleTypesTableDefinitions diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/HiveVersionProvider.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/HiveVersionProvider.java index 6cd3c8740ee0..f4e034b8bc95 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/HiveVersionProvider.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/HiveVersionProvider.java @@ -23,7 +23,7 @@ import java.sql.SQLException; import java.util.Optional; -import static io.prestosql.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onHive; public class HiveVersionProvider { diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAllDatatypesFromHiveConnector.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAllDatatypesFromHiveConnector.java index 579875de948b..9397b304d936 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAllDatatypesFromHiveConnector.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAllDatatypesFromHiveConnector.java @@ -31,16 +31,6 @@ import java.sql.Timestamp; import java.time.LocalDateTime; -import static io.prestosql.tests.TestGroups.JDBC; -import static io.prestosql.tests.TestGroups.SKIP_ON_CDH; -import static io.prestosql.tests.TestGroups.SMOKE; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_AVRO; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_ORC; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_PARQUET; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_RCFILE; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_TEXTFILE; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.populateDataToHiveTable; -import static io.prestosql.tests.utils.QueryExecutors.onHive; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.context.ThreadLocalTestContextHolder.testContext; @@ -48,6 +38,16 @@ import static io.trino.tempto.fulfillment.table.TableHandle.tableHandle; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.JDBC; +import static io.trino.tests.TestGroups.SKIP_ON_CDH; +import static io.trino.tests.TestGroups.SMOKE; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_AVRO; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_ORC; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_PARQUET; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_RCFILE; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_TEXTFILE; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.populateDataToHiveTable; +import static io.trino.tests.utils.QueryExecutors.onHive; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.sql.JDBCType.BIGINT; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAvroSchemaEvolution.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAvroSchemaEvolution.java index f69f40a1cc71..25c641d4a0e5 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAvroSchemaEvolution.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAvroSchemaEvolution.java @@ -19,11 +19,11 @@ import io.trino.tempto.query.QueryExecutor; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.AVRO; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.context.ThreadLocalTestContextHolder.testContext; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.AVRO; import static java.lang.String.format; public class TestAvroSchemaEvolution diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAvroSchemaUrl.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAvroSchemaUrl.java index dd6b3d09dc12..2cedc3296816 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAvroSchemaUrl.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAvroSchemaUrl.java @@ -28,12 +28,12 @@ import java.nio.file.Paths; import static com.google.common.base.Strings.isNullOrEmpty; -import static io.prestosql.tests.TestGroups.AVRO; -import static io.prestosql.tests.TestGroups.STORAGE_FORMATS; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.TestGroups.AVRO; +import static io.trino.tests.TestGroups.STORAGE_FORMATS; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static java.nio.file.Files.newInputStream; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAvroSymlinkInputFormat.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAvroSymlinkInputFormat.java index 420c69becd71..2025599f5ddb 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAvroSymlinkInputFormat.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestAvroSymlinkInputFormat.java @@ -24,12 +24,12 @@ import java.io.InputStream; import java.nio.file.Paths; -import static io.prestosql.tests.TestGroups.AVRO; -import static io.prestosql.tests.TestGroups.STORAGE_FORMATS; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.TestGroups.AVRO; +import static io.trino.tests.TestGroups.STORAGE_FORMATS; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static java.nio.file.Files.newInputStream; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestComments.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestComments.java index a73ccbf460af..d84fa5b24eec 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestComments.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestComments.java @@ -19,8 +19,8 @@ import io.trino.tempto.query.QueryResult; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.COMMENT; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.COMMENT; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestCompression.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestCompression.java index f2d04ebd2a41..489fd7b43e78 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestCompression.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestCompression.java @@ -19,14 +19,14 @@ import io.trino.tempto.configuration.Configuration; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.HIVE_COMPRESSION; -import static io.prestosql.tests.TestGroups.SKIP_ON_CDH; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; import static io.trino.tempto.fulfillment.table.hive.tpch.TpchTableDefinitions.ORDERS; +import static io.trino.tests.TestGroups.HIVE_COMPRESSION; +import static io.trino.tests.TestGroups.SKIP_ON_CDH; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static org.assertj.core.api.Assertions.assertThat; public class TestCompression diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestCreateDropSchema.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestCreateDropSchema.java index 9b70a07b7429..4b5f2f4687d4 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestCreateDropSchema.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestCreateDropSchema.java @@ -19,10 +19,10 @@ import io.trino.tempto.hadoop.hdfs.HdfsClient; import org.testng.annotations.Test; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestCsv.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestCsv.java index d6374aa080b3..47ab3c9dd76d 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestCsv.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestCsv.java @@ -13,22 +13,22 @@ */ package io.trino.tests.hive; -import io.prestosql.testng.services.Flaky; import io.trino.tempto.ProductTest; import io.trino.tempto.assertions.QueryAssert.Row; import io.trino.tempto.query.QueryResult; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.tests.TestGroups.STORAGE_FORMATS; -import static io.prestosql.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE; -import static io.prestosql.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH; -import static io.prestosql.tests.utils.QueryExecutors.onHive; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.STORAGE_FORMATS; +import static io.trino.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE; +import static io.trino.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH; +import static io.trino.tests.utils.QueryExecutors.onHive; import static java.lang.String.format; public class TestCsv diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestExternalHiveTable.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestExternalHiveTable.java index bd8208ab80cd..3a0d60596ad1 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestExternalHiveTable.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestExternalHiveTable.java @@ -22,12 +22,6 @@ import io.trino.tempto.hadoop.hdfs.HdfsClient; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.HIVE_WITH_EXTERNAL_WRITES; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_BIGINT_REGIONKEY; -import static io.prestosql.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_REGIONKEY_NUMBER_OF_LINES_PER_SPLIT; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.Requirements.compose; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; @@ -35,6 +29,12 @@ import static io.trino.tempto.fulfillment.table.TableRequirements.mutableTable; import static io.trino.tempto.fulfillment.table.hive.tpch.TpchTableDefinitions.NATION; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.HIVE_WITH_EXTERNAL_WRITES; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_BIGINT_REGIONKEY; +import static io.trino.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_REGIONKEY_NUMBER_OF_LINES_PER_SPLIT; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; public class TestExternalHiveTable diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestGrantRevoke.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestGrantRevoke.java index a16a50b1bd63..ff6d1a7a7a3e 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestGrantRevoke.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestGrantRevoke.java @@ -27,16 +27,16 @@ import java.util.Set; -import static io.prestosql.tests.TestGroups.AUTHORIZATION; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.utils.QueryExecutors.connectToPresto; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.context.ContextDsl.executeWith; import static io.trino.tempto.sql.SqlContexts.createViewAs; +import static io.trino.tests.TestGroups.AUTHORIZATION; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.utils.QueryExecutors.connectToPresto; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static java.util.stream.Collectors.toSet; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveBasicTableStatistics.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveBasicTableStatistics.java index a8bb51a146e7..3d67a010572c 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveBasicTableStatistics.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveBasicTableStatistics.java @@ -14,12 +14,12 @@ package io.trino.tests.hive; import com.google.common.primitives.Longs; -import io.prestosql.testng.services.Flaky; import io.trino.tempto.ProductTest; import io.trino.tempto.Requires; import io.trino.tempto.fulfillment.table.hive.tpch.ImmutableTpchTablesRequirements.ImmutableNationTable; import io.trino.tempto.query.QueryExecutor; import io.trino.tempto.query.QueryResult; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import java.util.List; @@ -27,12 +27,12 @@ import java.util.OptionalLong; import static com.google.common.base.Verify.verify; -import static io.prestosql.tests.TestGroups.SKIP_ON_CDH; -import static io.prestosql.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE; -import static io.prestosql.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH; -import static io.prestosql.tests.hive.util.TableLocationUtils.getTableLocation; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; +import static io.trino.tests.TestGroups.SKIP_ON_CDH; +import static io.trino.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE; +import static io.trino.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH; +import static io.trino.tests.hive.util.TableLocationUtils.getTableLocation; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static org.assertj.core.api.Assertions.assertThat; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveBucketedTables.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveBucketedTables.java index 658831a60961..4a6db64f5a89 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveBucketedTables.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveBucketedTables.java @@ -15,23 +15,18 @@ import com.google.common.collect.ImmutableList; import io.airlift.log.Logger; -import io.prestosql.testng.services.Flaky; import io.trino.tempto.Requirement; import io.trino.tempto.Requirements; import io.trino.tempto.RequirementsProvider; import io.trino.tempto.configuration.Configuration; import io.trino.tempto.fulfillment.table.MutableTableRequirement; import io.trino.tempto.fulfillment.table.hive.HiveTableDefinition; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import java.util.List; import java.util.Optional; -import static io.prestosql.tests.TestGroups.BIG_QUERY; -import static io.prestosql.tests.TpchTableResults.PRESTO_NATION_RESULT; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; -import static io.prestosql.tests.utils.TableDefinitionUtils.mutableTableInstanceOf; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.anyOf; import static io.trino.tempto.assertions.QueryAssert.assertThat; @@ -42,6 +37,11 @@ import static io.trino.tempto.fulfillment.table.hive.tpch.TpchTableDefinitions.NATION; import static io.trino.tempto.query.QueryExecutor.param; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.BIG_QUERY; +import static io.trino.tests.TpchTableResults.PRESTO_NATION_RESULT; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; +import static io.trino.tests.utils.TableDefinitionUtils.mutableTableInstanceOf; import static java.lang.String.format; import static java.lang.String.join; import static java.sql.JDBCType.VARCHAR; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveCaching.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveCaching.java index cec95d8f0c11..ec1a6d8ede42 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveCaching.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveCaching.java @@ -14,9 +14,9 @@ package io.trino.tests.hive; import io.airlift.units.Duration; -import io.prestosql.tests.hive.util.CachingTestUtils.CacheStats; import io.trino.tempto.ProductTest; import io.trino.tempto.assertions.QueryAssert.Row; +import io.trino.tests.hive.util.CachingTestUtils.CacheStats; import org.testng.annotations.Test; import java.util.Collections; @@ -24,13 +24,13 @@ import static io.airlift.testing.Assertions.assertGreaterThan; import static io.airlift.testing.Assertions.assertGreaterThanOrEqual; -import static io.prestosql.tests.TestGroups.HIVE_CACHING; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.hive.util.CachingTestUtils.getCacheStats; -import static io.prestosql.tests.utils.QueryAssertions.assertEventually; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.HIVE_CACHING; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.hive.util.CachingTestUtils.getCacheStats; +import static io.trino.tests.utils.QueryAssertions.assertEventually; import static java.util.concurrent.TimeUnit.SECONDS; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveCoercion.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveCoercion.java index 97e0b407d073..e28a641cf443 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveCoercion.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveCoercion.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.jdbc.PrestoArray; +import io.trino.jdbc.PrestoArray; import io.trino.tempto.Requirement; import io.trino.tempto.RequirementsProvider; import io.trino.tempto.Requires; @@ -48,17 +48,17 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static io.airlift.testing.Assertions.assertEqualsIgnoreOrder; -import static io.prestosql.tests.TestGroups.HIVE_COERCION; -import static io.prestosql.tests.TestGroups.JDBC; -import static io.prestosql.tests.hive.TestHiveCoercion.ColumnContext.columnContext; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.context.ThreadLocalTestContextHolder.testContext; import static io.trino.tempto.fulfillment.table.MutableTableRequirement.State.CREATED; import static io.trino.tempto.fulfillment.table.TableHandle.tableHandle; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.HIVE_COERCION; +import static io.trino.tests.TestGroups.JDBC; +import static io.trino.tests.hive.TestHiveCoercion.ColumnContext.columnContext; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static java.sql.JDBCType.ARRAY; import static java.sql.JDBCType.BIGINT; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveCreateTable.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveCreateTable.java index e4ce220f3d60..77e93f884179 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveCreateTable.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveCreateTable.java @@ -13,8 +13,8 @@ */ package io.trino.tests.hive; -import io.prestosql.testng.services.Flaky; import io.trino.tempto.ProductTest; +import io.trino.testng.services.Flaky; import org.assertj.core.api.Assertions; import org.testng.annotations.Test; @@ -23,15 +23,15 @@ import java.sql.Statement; import java.util.Optional; -import static io.prestosql.tests.TestGroups.HDP3_ONLY; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.TestGroups.STORAGE_FORMATS; -import static io.prestosql.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE; -import static io.prestosql.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.TestGroups.HDP3_ONLY; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.TestGroups.STORAGE_FORMATS; +import static io.trino.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE; +import static io.trino.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.util.Objects.requireNonNull; public class TestHiveCreateTable diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveDeltaLakeTable.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveDeltaLakeTable.java index d868c36e3e61..468c76177fe7 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveDeltaLakeTable.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveDeltaLakeTable.java @@ -15,9 +15,9 @@ import org.testng.annotations.Test; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; public class TestHiveDeltaLakeTable extends HiveProductTest diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveIgnoreAbsentPartitions.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveIgnoreAbsentPartitions.java index 58f7f4f30899..6ac2c4655106 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveIgnoreAbsentPartitions.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveIgnoreAbsentPartitions.java @@ -22,13 +22,13 @@ import io.trino.tempto.hadoop.hdfs.HdfsClient; import org.testng.annotations.Test; -import static io.prestosql.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_BIGINT_REGIONKEY; -import static io.prestosql.tests.hive.util.TableLocationUtils.getTablePath; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.MutableTableRequirement.State.LOADED; import static io.trino.tempto.fulfillment.table.TableRequirements.mutableTable; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_BIGINT_REGIONKEY; +import static io.trino.tests.hive.util.TableLocationUtils.getTablePath; import static java.lang.String.format; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveMaterializedView.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveMaterializedView.java index ec8bac82dd74..f717c9805478 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveMaterializedView.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveMaterializedView.java @@ -17,11 +17,11 @@ import io.trino.tempto.BeforeTestWithContext; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.STORAGE_FORMATS; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.TestGroups.STORAGE_FORMATS; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; public class TestHiveMaterializedView extends HiveProductTest diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveMetastoreClientFactory.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveMetastoreClientFactory.java index c47257c9eae2..12ab82bf0fea 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveMetastoreClientFactory.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveMetastoreClientFactory.java @@ -16,9 +16,9 @@ import com.google.common.net.HostAndPort; import com.google.inject.Inject; import com.google.inject.name.Named; -import io.prestosql.plugin.hive.metastore.thrift.NoHiveMetastoreAuthentication; -import io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreClient; -import io.prestosql.plugin.hive.metastore.thrift.Transport; +import io.trino.plugin.hive.metastore.thrift.NoHiveMetastoreAuthentication; +import io.trino.plugin.hive.metastore.thrift.ThriftHiveMetastoreClient; +import io.trino.plugin.hive.metastore.thrift.Transport; import org.apache.thrift.TException; import java.net.URI; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHivePartitionProcedures.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHivePartitionProcedures.java index 4db7a88ded85..58bf74f70eb3 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHivePartitionProcedures.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHivePartitionProcedures.java @@ -14,13 +14,13 @@ package io.trino.tests.hive; import com.google.inject.Inject; -import io.prestosql.testng.services.Flaky; import io.trino.tempto.ProductTest; import io.trino.tempto.assertions.QueryAssert; import io.trino.tempto.fulfillment.table.hive.HiveDataSource; import io.trino.tempto.hadoop.hdfs.HdfsClient; import io.trino.tempto.internal.hadoop.hdfs.HdfsDataSourceWriter; import io.trino.tempto.query.QueryResult; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import java.net.URISyntaxException; @@ -28,13 +28,13 @@ import java.util.stream.Collectors; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.tests.TestGroups.HIVE_PARTITIONING; -import static io.prestosql.tests.TestGroups.SMOKE; -import static io.prestosql.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE; -import static io.prestosql.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH; -import static io.prestosql.tests.hive.util.TableLocationUtils.getTablePath; import static io.trino.tempto.fulfillment.table.hive.InlineDataSource.createResourceDataSource; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.HIVE_PARTITIONING; +import static io.trino.tests.TestGroups.SMOKE; +import static io.trino.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE; +import static io.trino.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH; +import static io.trino.tests.hive.util.TableLocationUtils.getTablePath; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHivePartitionSchemaEvolution.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHivePartitionSchemaEvolution.java index 1933bd6716f8..6219a2a703d4 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHivePartitionSchemaEvolution.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHivePartitionSchemaEvolution.java @@ -15,10 +15,10 @@ import com.google.inject.name.Named; import io.airlift.log.Logger; -import io.prestosql.tests.hive.util.TemporaryHiveTable; import io.trino.tempto.BeforeTestWithContext; import io.trino.tempto.assertions.QueryAssert; import io.trino.tempto.query.QueryExecutionException; +import io.trino.tests.hive.util.TemporaryHiveTable; import org.testng.annotations.Test; import javax.inject.Inject; @@ -26,13 +26,13 @@ import java.sql.SQLException; import java.util.function.Supplier; -import static io.prestosql.tests.hive.util.TemporaryHiveTable.randomTableSuffix; -import static io.prestosql.tests.hive.util.TemporaryHiveTable.temporaryHiveTable; -import static io.prestosql.tests.utils.JdbcDriverUtils.setSessionProperty; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.hive.util.TemporaryHiveTable.randomTableSuffix; +import static io.trino.tests.hive.util.TemporaryHiveTable.temporaryHiveTable; +import static io.trino.tests.utils.JdbcDriverUtils.setSessionProperty; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; public class TestHivePartitionSchemaEvolution diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHivePartitionsTable.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHivePartitionsTable.java index 9ac01b4ebe23..366f38855d2d 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHivePartitionsTable.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHivePartitionsTable.java @@ -32,7 +32,6 @@ import java.util.Optional; import java.util.stream.IntStream; -import static io.prestosql.tests.TestGroups.HIVE_PARTITIONING; import static io.trino.tempto.Requirements.compose; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; @@ -42,6 +41,7 @@ import static io.trino.tempto.fulfillment.table.hive.InlineDataSource.createStringDataSource; import static io.trino.tempto.fulfillment.table.hive.tpch.TpchTableDefinitions.NATION; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.HIVE_PARTITIONING; import static java.lang.Math.min; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveSchema.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveSchema.java index cb4d3c66fdd3..9463fa2b56c2 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveSchema.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveSchema.java @@ -29,10 +29,10 @@ import static com.google.common.base.Strings.nullToEmpty; import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.tests.TestGroups.STORAGE_FORMATS; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.TestGroups.STORAGE_FORMATS; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.util.Objects.requireNonNull; public class TestHiveSchema diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveStorageFormats.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveStorageFormats.java index 09b40dd349fc..39d4d8b5e3a3 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveStorageFormats.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveStorageFormats.java @@ -16,13 +16,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.inject.Inject; -import io.prestosql.plugin.hive.HiveTimestampPrecision; -import io.prestosql.testng.services.Flaky; -import io.prestosql.tests.utils.JdbcDriverUtils; +import io.trino.plugin.hive.HiveTimestampPrecision; import io.trino.tempto.ProductTest; import io.trino.tempto.assertions.QueryAssert.Row; import io.trino.tempto.query.QueryExecutor.QueryParam; import io.trino.tempto.query.QueryResult; +import io.trino.testng.services.Flaky; +import io.trino.tests.utils.JdbcDriverUtils; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -42,20 +42,20 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Maps.immutableEntry; -import static io.prestosql.plugin.hive.HiveTimestampPrecision.MICROSECONDS; -import static io.prestosql.plugin.hive.HiveTimestampPrecision.MILLISECONDS; -import static io.prestosql.plugin.hive.HiveTimestampPrecision.NANOSECONDS; -import static io.prestosql.tests.TestGroups.STORAGE_FORMATS; -import static io.prestosql.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE; -import static io.prestosql.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH; -import static io.prestosql.tests.utils.JdbcDriverUtils.setSessionProperty; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; +import static io.trino.plugin.hive.HiveTimestampPrecision.MICROSECONDS; +import static io.trino.plugin.hive.HiveTimestampPrecision.MILLISECONDS; +import static io.trino.plugin.hive.HiveTimestampPrecision.NANOSECONDS; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.defaultQueryExecutor; import static io.trino.tempto.query.QueryExecutor.param; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.STORAGE_FORMATS; +import static io.trino.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE; +import static io.trino.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH; +import static io.trino.tests.utils.JdbcDriverUtils.setSessionProperty; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static java.util.Collections.nCopies; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveTableStatistics.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveTableStatistics.java index c2e17adde306..ad180e592483 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveTableStatistics.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveTableStatistics.java @@ -29,10 +29,6 @@ import java.util.List; import java.util.Objects; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_TEXTFILE; -import static io.prestosql.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_BIGINT_REGIONKEY; -import static io.prestosql.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_VARCHAR_REGIONKEY; -import static io.prestosql.tests.utils.QueryExecutors.onHive; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.anyOf; import static io.trino.tempto.assertions.QueryAssert.assertThat; @@ -40,6 +36,10 @@ import static io.trino.tempto.fulfillment.table.TableRequirements.mutableTable; import static io.trino.tempto.fulfillment.table.hive.tpch.TpchTableDefinitions.NATION; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_TEXTFILE; +import static io.trino.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_BIGINT_REGIONKEY; +import static io.trino.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_VARCHAR_REGIONKEY; +import static io.trino.tests.utils.QueryExecutors.onHive; import static java.lang.String.format; public class TestHiveTableStatistics diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveTransactionalTable.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveTransactionalTable.java index bb34bd3859a2..b111674c079f 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveTransactionalTable.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveTransactionalTable.java @@ -18,13 +18,13 @@ import com.google.inject.Inject; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreClient; -import io.prestosql.testng.services.Flaky; -import io.prestosql.tests.hive.util.TemporaryHiveTable; +import io.trino.plugin.hive.metastore.thrift.ThriftHiveMetastoreClient; import io.trino.tempto.assertions.QueryAssert; import io.trino.tempto.hadoop.hdfs.HdfsClient; import io.trino.tempto.query.QueryExecutor; import io.trino.tempto.query.QueryResult; +import io.trino.testng.services.Flaky; +import io.trino.tests.hive.util.TemporaryHiveTable; import net.jodah.failsafe.Failsafe; import net.jodah.failsafe.RetryPolicy; import org.testng.SkipException; @@ -49,21 +49,21 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.tests.TestGroups.HIVE_TRANSACTIONAL; -import static io.prestosql.tests.TestGroups.STORAGE_FORMATS; -import static io.prestosql.tests.hive.BucketingType.BUCKETED_V2; -import static io.prestosql.tests.hive.BucketingType.NONE; -import static io.prestosql.tests.hive.TestHiveTransactionalTable.CompactionMode.MAJOR; -import static io.prestosql.tests.hive.TestHiveTransactionalTable.CompactionMode.MINOR; -import static io.prestosql.tests.hive.TransactionalTableType.ACID; -import static io.prestosql.tests.hive.TransactionalTableType.INSERT_ONLY; -import static io.prestosql.tests.hive.util.TableLocationUtils.getTablePath; -import static io.prestosql.tests.hive.util.TemporaryHiveTable.randomTableSuffix; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.HIVE_TRANSACTIONAL; +import static io.trino.tests.TestGroups.STORAGE_FORMATS; +import static io.trino.tests.hive.BucketingType.BUCKETED_V2; +import static io.trino.tests.hive.BucketingType.NONE; +import static io.trino.tests.hive.TestHiveTransactionalTable.CompactionMode.MAJOR; +import static io.trino.tests.hive.TestHiveTransactionalTable.CompactionMode.MINOR; +import static io.trino.tests.hive.TransactionalTableType.ACID; +import static io.trino.tests.hive.TransactionalTableType.INSERT_ONLY; +import static io.trino.tests.hive.util.TableLocationUtils.getTablePath; +import static io.trino.tests.hive.util.TemporaryHiveTable.randomTableSuffix; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.stream.Collectors.joining; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveTransactionalTableInsert.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveTransactionalTableInsert.java index fe5fb0ea6592..e0b240e70bc2 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveTransactionalTableInsert.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveTransactionalTableInsert.java @@ -17,11 +17,11 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.HIVE_TRANSACTIONAL; -import static io.prestosql.tests.utils.QueryExecutors.onHive; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.HIVE_TRANSACTIONAL; +import static io.trino.tests.utils.QueryExecutors.onHive; import static java.util.Locale.ENGLISH; import static java.util.stream.Collectors.joining; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveViews.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveViews.java index be0a6a55d556..022c3f532813 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveViews.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveViews.java @@ -26,13 +26,13 @@ import java.time.LocalDate; import java.util.function.Consumer; -import static io.prestosql.tests.TestGroups.HIVE_VIEWS; -import static io.prestosql.tests.utils.QueryExecutors.connectToPresto; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.HIVE_VIEWS; +import static io.trino.tests.utils.QueryExecutors.connectToPresto; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveViewsLegacy.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveViewsLegacy.java index 0675b05d3049..42b1fc5472cf 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveViewsLegacy.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestHiveViewsLegacy.java @@ -26,13 +26,13 @@ import java.time.LocalDate; import java.util.function.Consumer; -import static io.prestosql.tests.TestGroups.HIVE_VIEWS; -import static io.prestosql.tests.utils.QueryExecutors.connectToPresto; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.HIVE_VIEWS; +import static io.trino.tests.utils.QueryExecutors.connectToPresto; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; @Requires({ ImmutableNationTable.class, diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestInsertIntoHiveTable.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestInsertIntoHiveTable.java index 0461876cb933..f840328f9801 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestInsertIntoHiveTable.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestInsertIntoHiveTable.java @@ -26,7 +26,6 @@ import java.sql.Timestamp; import java.time.LocalDateTime; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_TEXTFILE; import static io.trino.tempto.Requirements.compose; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; @@ -35,6 +34,7 @@ import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; import static io.trino.tempto.fulfillment.table.TableRequirements.mutableTable; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_TEXTFILE; import static java.nio.charset.StandardCharsets.UTF_8; public class TestInsertIntoHiveTable diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestParquetSymlinkInputFormat.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestParquetSymlinkInputFormat.java index e030cb7a52d0..8ee20a3129cb 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestParquetSymlinkInputFormat.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestParquetSymlinkInputFormat.java @@ -24,12 +24,12 @@ import java.nio.file.Paths; import static com.google.common.io.Resources.getResource; -import static io.prestosql.tests.TestGroups.AVRO; -import static io.prestosql.tests.TestGroups.STORAGE_FORMATS; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.TestGroups.AVRO; +import static io.trino.tests.TestGroups.STORAGE_FORMATS; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; public class TestParquetSymlinkInputFormat diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestReadUniontype.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestReadUniontype.java index 7078b4aa889f..44cdd79415d2 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestReadUniontype.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestReadUniontype.java @@ -13,7 +13,7 @@ */ package io.trino.tests.hive; -import io.prestosql.jdbc.Row; +import io.trino.jdbc.Row; import io.trino.tempto.AfterTestWithContext; import io.trino.tempto.BeforeTestWithContext; import io.trino.tempto.query.QueryResult; @@ -24,9 +24,9 @@ import java.util.Arrays; import java.util.List; -import static io.prestosql.tests.TestGroups.SMOKE; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; +import static io.trino.tests.TestGroups.SMOKE; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestRoles.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestRoles.java index 412904c0b757..c3ea5a75ed65 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestRoles.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestRoles.java @@ -30,14 +30,14 @@ import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.tests.TestGroups.AUTHORIZATION; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.TestGroups.ROLES; -import static io.prestosql.tests.utils.QueryExecutors.connectToPresto; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.anyOf; +import static io.trino.tests.TestGroups.AUTHORIZATION; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.TestGroups.ROLES; +import static io.trino.tests.utils.QueryExecutors.connectToPresto; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestSqlStandardAccessControlChecks.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestSqlStandardAccessControlChecks.java index ceacf5d20901..14ea413483b2 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestSqlStandardAccessControlChecks.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestSqlStandardAccessControlChecks.java @@ -18,11 +18,11 @@ import io.trino.tempto.query.QueryExecutor; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.AUTHORIZATION; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.utils.QueryExecutors.connectToPresto; -import static io.prestosql.tests.utils.QueryExecutors.onHive; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.TestGroups.AUTHORIZATION; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.utils.QueryExecutors.connectToPresto; +import static io.trino.tests.utils.QueryExecutors.onHive; import static java.lang.String.format; public class TestSqlStandardAccessControlChecks diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestSyncPartitionMetadata.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestSyncPartitionMetadata.java index b2ed980426e1..d405045e53ed 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestSyncPartitionMetadata.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestSyncPartitionMetadata.java @@ -15,24 +15,24 @@ import com.google.inject.Inject; import com.google.inject.name.Named; -import io.prestosql.testng.services.Flaky; import io.trino.tempto.ProductTest; import io.trino.tempto.assertions.QueryAssert; import io.trino.tempto.fulfillment.table.hive.HiveDataSource; import io.trino.tempto.hadoop.hdfs.HdfsClient; import io.trino.tempto.internal.hadoop.hdfs.HdfsDataSourceWriter; import io.trino.tempto.query.QueryResult; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.HIVE_PARTITIONING; -import static io.prestosql.tests.TestGroups.PRESTO_JDBC; -import static io.prestosql.tests.TestGroups.SMOKE; -import static io.prestosql.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE; -import static io.prestosql.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.hive.InlineDataSource.createResourceDataSource; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.HIVE_PARTITIONING; +import static io.trino.tests.TestGroups.PRESTO_JDBC; +import static io.trino.tests.TestGroups.SMOKE; +import static io.trino.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE; +import static io.trino.tests.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestTextFileHiveTable.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestTextFileHiveTable.java index b46e40debebe..68daab0ed07c 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestTextFileHiveTable.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/TestTextFileHiveTable.java @@ -24,11 +24,11 @@ import java.io.InputStream; -import static io.prestosql.tests.utils.QueryExecutors.onHive; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/util/TableLocationUtils.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/util/TableLocationUtils.java index 133568935792..3e40a69a658c 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/util/TableLocationUtils.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/util/TableLocationUtils.java @@ -19,7 +19,7 @@ import java.util.regex.Pattern; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; +import static io.trino.tests.utils.QueryExecutors.onPresto; import static java.lang.String.format; public final class TableLocationUtils diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/util/TemporaryHiveTable.java b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/util/TemporaryHiveTable.java index 05b2e0847663..14cf94e9e04b 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/hive/util/TemporaryHiveTable.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/hive/util/TemporaryHiveTable.java @@ -15,7 +15,7 @@ import java.security.SecureRandom; -import static io.prestosql.tests.utils.QueryExecutors.onHive; +import static io.trino.tests.utils.QueryExecutors.onHive; import static java.lang.Character.MAX_RADIX; import static java.lang.Math.abs; import static java.lang.Math.min; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/iceberg/TestIcebergCreateTable.java b/testing/trino-product-tests/src/main/java/io/trino/tests/iceberg/TestIcebergCreateTable.java index 013d24b22d82..a2b94c2f42b4 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/iceberg/TestIcebergCreateTable.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/iceberg/TestIcebergCreateTable.java @@ -13,18 +13,18 @@ */ package io.trino.tests.iceberg; -import io.prestosql.testng.services.Flaky; import io.trino.tempto.AfterTestWithContext; import io.trino.tempto.BeforeTestWithContext; import io.trino.tempto.ProductTest; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.ICEBERG; -import static io.prestosql.tests.TestGroups.STORAGE_FORMATS; -import static io.prestosql.tests.hive.util.TemporaryHiveTable.randomTableSuffix; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.TestGroups.ICEBERG; +import static io.trino.tests.TestGroups.STORAGE_FORMATS; +import static io.trino.tests.hive.util.TemporaryHiveTable.randomTableSuffix; +import static io.trino.tests.utils.QueryExecutors.onPresto; public class TestIcebergCreateTable extends ProductTest diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/iceberg/TestSparkCompatibility.java b/testing/trino-product-tests/src/main/java/io/trino/tests/iceberg/TestSparkCompatibility.java index f1df625998ae..c3cbd8047a8f 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/iceberg/TestSparkCompatibility.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/iceberg/TestSparkCompatibility.java @@ -20,13 +20,13 @@ import java.sql.Date; import java.sql.Timestamp; -import static io.prestosql.tests.TestGroups.ICEBERG; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; -import static io.prestosql.tests.utils.QueryExecutors.onSpark; import static io.trino.tempto.assertions.QueryAssert.Row; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.TestGroups.ICEBERG; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.utils.QueryExecutors.onPresto; +import static io.trino.tests.utils.QueryExecutors.onSpark; import static java.lang.String.format; public class TestSparkCompatibility diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/BaseLdapJdbcTest.java b/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/BaseLdapJdbcTest.java index 1d21a66f4c27..ddc04522b0ed 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/BaseLdapJdbcTest.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/BaseLdapJdbcTest.java @@ -30,15 +30,15 @@ import java.util.Arrays; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.AMERICA_ORG; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.ASIA_ORG; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.CHILD_GROUP; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.CHILD_GROUP_USER; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.DEFAULT_GROUP; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.DEFAULT_GROUP_USER; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.ORPHAN_USER; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.PARENT_GROUP; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.PARENT_GROUP_USER; +import static io.trino.tests.ImmutableLdapObjectDefinitions.AMERICA_ORG; +import static io.trino.tests.ImmutableLdapObjectDefinitions.ASIA_ORG; +import static io.trino.tests.ImmutableLdapObjectDefinitions.CHILD_GROUP; +import static io.trino.tests.ImmutableLdapObjectDefinitions.CHILD_GROUP_USER; +import static io.trino.tests.ImmutableLdapObjectDefinitions.DEFAULT_GROUP; +import static io.trino.tests.ImmutableLdapObjectDefinitions.DEFAULT_GROUP_USER; +import static io.trino.tests.ImmutableLdapObjectDefinitions.ORPHAN_USER; +import static io.trino.tests.ImmutableLdapObjectDefinitions.PARENT_GROUP; +import static io.trino.tests.ImmutableLdapObjectDefinitions.PARENT_GROUP_USER; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/TestJdbc.java b/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/TestJdbc.java index 35954fe1eb82..b3eba51f54df 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/TestJdbc.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/TestJdbc.java @@ -13,7 +13,7 @@ */ package io.trino.tests.jdbc; -import io.prestosql.jdbc.PrestoConnection; +import io.trino.jdbc.PrestoConnection; import io.trino.tempto.ProductTest; import io.trino.tempto.Requirement; import io.trino.tempto.RequirementsProvider; @@ -29,11 +29,6 @@ import java.sql.SQLException; import java.sql.Statement; -import static io.prestosql.tests.TestGroups.JDBC; -import static io.prestosql.tests.TpchTableResults.PRESTO_NATION_RESULT; -import static io.prestosql.tests.utils.JdbcDriverUtils.getSessionProperty; -import static io.prestosql.tests.utils.JdbcDriverUtils.resetSessionProperty; -import static io.prestosql.tests.utils.JdbcDriverUtils.setSessionProperty; import static io.trino.tempto.Requirements.compose; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; @@ -45,6 +40,11 @@ import static io.trino.tempto.internal.convention.SqlResultDescriptor.sqlResultDescriptorForResource; import static io.trino.tempto.query.QueryExecutor.defaultQueryExecutor; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.JDBC; +import static io.trino.tests.TpchTableResults.PRESTO_NATION_RESULT; +import static io.trino.tests.utils.JdbcDriverUtils.getSessionProperty; +import static io.trino.tests.utils.JdbcDriverUtils.resetSessionProperty; +import static io.trino.tests.utils.JdbcDriverUtils.setSessionProperty; import static java.util.Locale.CHINESE; import static org.assertj.core.api.Assertions.assertThat; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/TestLdapPrestoJdbc.java b/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/TestLdapPrestoJdbc.java index 5b879c00db51..c558ab8a0f28 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/TestLdapPrestoJdbc.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/TestLdapPrestoJdbc.java @@ -22,14 +22,14 @@ import java.sql.SQLException; import java.sql.Statement; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.CHILD_GROUP_USER; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.ORPHAN_USER; -import static io.prestosql.tests.ImmutableLdapObjectDefinitions.PARENT_GROUP_USER; -import static io.prestosql.tests.TestGroups.LDAP; -import static io.prestosql.tests.TestGroups.PRESTO_JDBC; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.TpchTableResults.PRESTO_NATION_RESULT; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.ImmutableLdapObjectDefinitions.CHILD_GROUP_USER; +import static io.trino.tests.ImmutableLdapObjectDefinitions.ORPHAN_USER; +import static io.trino.tests.ImmutableLdapObjectDefinitions.PARENT_GROUP_USER; +import static io.trino.tests.TestGroups.LDAP; +import static io.trino.tests.TestGroups.PRESTO_JDBC; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.TpchTableResults.PRESTO_NATION_RESULT; import static java.lang.String.format; import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/TestPreparedStatements.java b/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/TestPreparedStatements.java index bd9da5ebdde6..ffbb30fb1d49 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/TestPreparedStatements.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/jdbc/TestPreparedStatements.java @@ -29,8 +29,6 @@ import java.sql.Statement; import java.sql.Timestamp; -import static io.prestosql.tests.TestGroups.JDBC; -import static io.prestosql.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_TEXTFILE; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.MutableTableRequirement.State.CREATED; @@ -40,6 +38,8 @@ import static io.trino.tempto.query.QueryExecutor.defaultQueryExecutor; import static io.trino.tempto.query.QueryExecutor.param; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.JDBC; +import static io.trino.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_TEXTFILE; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static java.sql.JDBCType.BIGINT; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaAvroReadsSmokeTest.java b/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaAvroReadsSmokeTest.java index 74de9e27eb52..d0553ea4f0e7 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaAvroReadsSmokeTest.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaAvroReadsSmokeTest.java @@ -37,13 +37,13 @@ import java.io.UncheckedIOException; import java.util.Map; -import static io.prestosql.tests.TestGroups.KAFKA; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; import static io.trino.tempto.fulfillment.table.kafka.KafkaMessageContentsBuilder.contentsBuilder; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.KAFKA; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static java.lang.String.format; public class TestKafkaAvroReadsSmokeTest diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaAvroWritesSmokeTest.java b/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaAvroWritesSmokeTest.java index e51b64472a64..cbd402a8f9fe 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaAvroWritesSmokeTest.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaAvroWritesSmokeTest.java @@ -23,12 +23,12 @@ import io.trino.tempto.fulfillment.table.kafka.ListKafkaDataSource; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.KAFKA; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.KAFKA; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static java.lang.String.format; public class TestKafkaAvroWritesSmokeTest diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaPushdownSmokeTest.java b/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaPushdownSmokeTest.java index 332c6ed4c7f4..f822eb7da83e 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaPushdownSmokeTest.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaPushdownSmokeTest.java @@ -28,13 +28,13 @@ import java.util.stream.Collectors; import java.util.stream.LongStream; -import static io.prestosql.tests.TestGroups.KAFKA; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; import static io.trino.tempto.fulfillment.table.kafka.KafkaMessageContentsBuilder.contentsBuilder; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.KAFKA; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static java.lang.String.format; public class TestKafkaPushdownSmokeTest diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaReadsSmokeTest.java b/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaReadsSmokeTest.java index 8eb8643265cc..14b3bf370dfb 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaReadsSmokeTest.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaReadsSmokeTest.java @@ -32,13 +32,13 @@ import java.time.LocalDateTime; import java.time.LocalTime; -import static io.prestosql.tests.TestGroups.KAFKA; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; import static io.trino.tempto.fulfillment.table.kafka.KafkaMessageContentsBuilder.contentsBuilder; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.KAFKA; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static java.lang.Double.doubleToRawLongBits; import static java.lang.Float.floatToIntBits; import static java.lang.String.format; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaWritesSmokeTest.java b/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaWritesSmokeTest.java index 42164e3cfda6..30349cb68ff9 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaWritesSmokeTest.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/kafka/TestKafkaWritesSmokeTest.java @@ -30,12 +30,12 @@ import java.time.LocalDateTime; import java.time.LocalTime; -import static io.prestosql.tests.TestGroups.KAFKA; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.KAFKA; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; import static java.lang.String.format; public class TestKafkaWritesSmokeTest diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/mysql/TestCreateTableAsSelect.java b/testing/trino-product-tests/src/main/java/io/trino/tests/mysql/TestCreateTableAsSelect.java index ebc0343cea42..fc43580320a4 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/mysql/TestCreateTableAsSelect.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/mysql/TestCreateTableAsSelect.java @@ -19,12 +19,12 @@ import io.trino.tempto.query.QueryResult; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.MYSQL; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.utils.QueryExecutors.onMySql; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.MYSQL; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.utils.QueryExecutors.onMySql; import static java.lang.String.format; public class TestCreateTableAsSelect diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/SqlServerDataTypesTableDefinition.java b/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/SqlServerDataTypesTableDefinition.java index 551f829cfb31..9ec5bf5a37fd 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/SqlServerDataTypesTableDefinition.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/SqlServerDataTypesTableDefinition.java @@ -22,7 +22,7 @@ import java.util.Collections; import java.util.List; -import static io.prestosql.tests.sqlserver.TestConstants.CONNECTOR_NAME; +import static io.trino.tests.sqlserver.TestConstants.CONNECTOR_NAME; import static java.util.Collections.nCopies; public final class SqlServerDataTypesTableDefinition diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/SqlServerTpchTableDefinitions.java b/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/SqlServerTpchTableDefinitions.java index c888bf4a01e7..5508d262cebf 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/SqlServerTpchTableDefinitions.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/SqlServerTpchTableDefinitions.java @@ -16,7 +16,7 @@ import io.trino.tempto.fulfillment.table.jdbc.RelationalTableDefinition; import io.trino.tempto.fulfillment.table.jdbc.tpch.JdbcTpchTableDefinitions; -import static io.prestosql.tests.sqlserver.TestConstants.CONNECTOR_NAME; +import static io.trino.tests.sqlserver.TestConstants.CONNECTOR_NAME; public final class SqlServerTpchTableDefinitions { diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/TestInsert.java b/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/TestInsert.java index a75d3b6e8284..5479b3b1dfbd 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/TestInsert.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/TestInsert.java @@ -24,15 +24,15 @@ import java.sql.Date; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.TestGroups.SQL_SERVER; -import static io.prestosql.tests.sqlserver.SqlServerDataTypesTableDefinition.SQLSERVER_INSERT; -import static io.prestosql.tests.sqlserver.TestConstants.KEY_SPACE; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; -import static io.prestosql.tests.utils.QueryExecutors.onSqlServer; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.TestGroups.SQL_SERVER; +import static io.trino.tests.sqlserver.SqlServerDataTypesTableDefinition.SQLSERVER_INSERT; +import static io.trino.tests.sqlserver.TestConstants.KEY_SPACE; +import static io.trino.tests.utils.QueryExecutors.onPresto; +import static io.trino.tests.utils.QueryExecutors.onSqlServer; import static java.lang.String.format; public class TestInsert diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/TestInvalidSelect.java b/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/TestInvalidSelect.java index 79507d49f68a..52e5c2bb2ef3 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/TestInvalidSelect.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/TestInvalidSelect.java @@ -19,14 +19,14 @@ import io.trino.tempto.configuration.Configuration; import org.testng.annotations.Test; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.TestGroups.SQL_SERVER; -import static io.prestosql.tests.sqlserver.SqlServerTpchTableDefinitions.NATION; -import static io.prestosql.tests.sqlserver.TestConstants.CONNECTOR_NAME; -import static io.prestosql.tests.sqlserver.TestConstants.KEY_SPACE; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; import static io.trino.tempto.query.QueryExecutor.query; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.TestGroups.SQL_SERVER; +import static io.trino.tests.sqlserver.SqlServerTpchTableDefinitions.NATION; +import static io.trino.tests.sqlserver.TestConstants.CONNECTOR_NAME; +import static io.trino.tests.sqlserver.TestConstants.KEY_SPACE; import static java.lang.String.format; public class TestInvalidSelect diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/TestSelect.java b/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/TestSelect.java index 24134385e26d..ae27a0d3fdcf 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/TestSelect.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/sqlserver/TestSelect.java @@ -26,19 +26,19 @@ import java.sql.Date; import java.sql.Timestamp; -import static io.prestosql.tests.TestGroups.PROFILE_SPECIFIC_TESTS; -import static io.prestosql.tests.TestGroups.SQL_SERVER; -import static io.prestosql.tests.TpchTableResults.PRESTO_NATION_RESULT; -import static io.prestosql.tests.sqlserver.SqlServerDataTypesTableDefinition.SQLSERVER_ALL_TYPES; -import static io.prestosql.tests.sqlserver.SqlServerTpchTableDefinitions.NATION; -import static io.prestosql.tests.sqlserver.TestConstants.CONNECTOR_NAME; -import static io.prestosql.tests.sqlserver.TestConstants.KEY_SPACE; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; -import static io.prestosql.tests.utils.QueryExecutors.onSqlServer; import static io.trino.tempto.Requirements.compose; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tempto.fulfillment.table.TableRequirements.immutableTable; +import static io.trino.tests.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.TestGroups.SQL_SERVER; +import static io.trino.tests.TpchTableResults.PRESTO_NATION_RESULT; +import static io.trino.tests.sqlserver.SqlServerDataTypesTableDefinition.SQLSERVER_ALL_TYPES; +import static io.trino.tests.sqlserver.SqlServerTpchTableDefinitions.NATION; +import static io.trino.tests.sqlserver.TestConstants.CONNECTOR_NAME; +import static io.trino.tests.sqlserver.TestConstants.KEY_SPACE; +import static io.trino.tests.utils.QueryExecutors.onPresto; +import static io.trino.tests.utils.QueryExecutors.onSqlServer; import static java.lang.String.format; import static java.sql.JDBCType.BIGINT; import static java.sql.JDBCType.CHAR; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/teradata/TestTeradataFunctions.java b/testing/trino-product-tests/src/main/java/io/trino/tests/teradata/TestTeradataFunctions.java index 4b53164676fb..465b61589c23 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/teradata/TestTeradataFunctions.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/teradata/TestTeradataFunctions.java @@ -20,10 +20,10 @@ import java.sql.Timestamp; import java.time.LocalDateTime; -import static io.prestosql.tests.TestGroups.FUNCTIONS; -import static io.prestosql.tests.utils.QueryExecutors.onPresto; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; +import static io.trino.tests.TestGroups.FUNCTIONS; +import static io.trino.tests.utils.QueryExecutors.onPresto; public class TestTeradataFunctions extends ProductTest diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/utils/JdbcDriverUtils.java b/testing/trino-product-tests/src/main/java/io/trino/tests/utils/JdbcDriverUtils.java index 6a2894277b34..c4c893a94e11 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/utils/JdbcDriverUtils.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/utils/JdbcDriverUtils.java @@ -13,7 +13,7 @@ */ package io.trino.tests.utils; -import io.prestosql.jdbc.PrestoConnection; +import io.trino.jdbc.PrestoConnection; import java.sql.Connection; import java.sql.ResultSet; diff --git a/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/JdbcDriverCapabilities.java b/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/JdbcDriverCapabilities.java index 8f945996abb8..0f82db0ab84d 100644 --- a/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/JdbcDriverCapabilities.java +++ b/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/JdbcDriverCapabilities.java @@ -13,7 +13,7 @@ */ package io.trino; -import io.prestosql.jdbc.PrestoDriver; +import io.trino.jdbc.PrestoDriver; import java.util.Optional; diff --git a/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/TestJdbcCompatibility.java b/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/TestJdbcCompatibility.java index e446a8965500..987bfe518f45 100644 --- a/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/TestJdbcCompatibility.java +++ b/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/TestJdbcCompatibility.java @@ -16,8 +16,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.log.Logging; -import io.prestosql.plugin.mongodb.MongoPlugin; -import io.prestosql.server.testing.TestingPrestoServer; +import io.trino.plugin.mongodb.MongoPlugin; +import io.trino.server.testing.TestingPrestoServer; import org.testng.SkipException; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -41,14 +41,14 @@ import java.util.function.Consumer; import static com.google.common.base.Strings.repeat; -import static io.prestosql.JdbcDriverCapabilities.correctlyReportsTimestampWithTimeZone; -import static io.prestosql.JdbcDriverCapabilities.driverVersion; -import static io.prestosql.JdbcDriverCapabilities.hasBrokenParametricTimestampWithTimeZoneSupport; -import static io.prestosql.JdbcDriverCapabilities.supportsParametricTimestamp; -import static io.prestosql.JdbcDriverCapabilities.supportsParametricTimestampWithTimeZone; -import static io.prestosql.JdbcDriverCapabilities.supportsSessionPropertiesViaConnectionUri; -import static io.prestosql.JdbcDriverCapabilities.supportsTimestampObjectRepresentationInCollections; -import static io.prestosql.JdbcDriverCapabilities.testedVersion; +import static io.trino.JdbcDriverCapabilities.correctlyReportsTimestampWithTimeZone; +import static io.trino.JdbcDriverCapabilities.driverVersion; +import static io.trino.JdbcDriverCapabilities.hasBrokenParametricTimestampWithTimeZoneSupport; +import static io.trino.JdbcDriverCapabilities.supportsParametricTimestamp; +import static io.trino.JdbcDriverCapabilities.supportsParametricTimestampWithTimeZone; +import static io.trino.JdbcDriverCapabilities.supportsSessionPropertiesViaConnectionUri; +import static io.trino.JdbcDriverCapabilities.supportsTimestampObjectRepresentationInCollections; +import static io.trino.JdbcDriverCapabilities.testedVersion; import static java.lang.String.format; import static java.sql.Types.ARRAY; import static java.sql.Types.JAVA_OBJECT; diff --git a/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/TestJdbcResultSetCompatibilityOldDriver.java b/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/TestJdbcResultSetCompatibilityOldDriver.java index 607eb36136c4..2fed45221141 100644 --- a/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/TestJdbcResultSetCompatibilityOldDriver.java +++ b/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/TestJdbcResultSetCompatibilityOldDriver.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logging; -import io.prestosql.jdbc.TestJdbcResultSet; -import io.prestosql.server.testing.TestingPrestoServer; +import io.trino.jdbc.TestJdbcResultSet; +import io.trino.server.testing.TestingPrestoServer; import org.testng.SkipException; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; @@ -25,11 +25,11 @@ import java.lang.reflect.Method; import java.util.Optional; -import static io.prestosql.JdbcDriverCapabilities.hasBrokenParametricTimeSupport; -import static io.prestosql.JdbcDriverCapabilities.hasBrokenParametricTimestampWithTimeZoneSupport; -import static io.prestosql.JdbcDriverCapabilities.hasBrokenTimeWithTimeZoneSupport; -import static io.prestosql.JdbcDriverCapabilities.testedVersion; -import static io.prestosql.TestingServerUtils.setTestingServer; +import static io.trino.JdbcDriverCapabilities.hasBrokenParametricTimeSupport; +import static io.trino.JdbcDriverCapabilities.hasBrokenParametricTimestampWithTimeZoneSupport; +import static io.trino.JdbcDriverCapabilities.hasBrokenTimeWithTimeZoneSupport; +import static io.trino.JdbcDriverCapabilities.testedVersion; +import static io.trino.TestingServerUtils.setTestingServer; import static org.assertj.core.api.Assertions.assertThat; // We need to keep @Test(singleThreaded = true) even though current version of superclass does not require it. diff --git a/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/TestingServerUtils.java b/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/TestingServerUtils.java index c767ef23301f..60a9a6de6df1 100644 --- a/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/TestingServerUtils.java +++ b/testing/trino-test-jdbc-compatibility-old-driver/src/test/java/io/trino/TestingServerUtils.java @@ -13,7 +13,7 @@ */ package io.trino; -import io.prestosql.server.testing.TestingPrestoServer; +import io.trino.server.testing.TestingPrestoServer; import java.lang.reflect.Field; diff --git a/testing/trino-test-jdbc-compatibility-old-server/src/test/java/io/trino/TestJdbcResultSetCompatibilityOldServer.java b/testing/trino-test-jdbc-compatibility-old-server/src/test/java/io/trino/TestJdbcResultSetCompatibilityOldServer.java index 7fdc77bb4e30..8376c3cdcf60 100644 --- a/testing/trino-test-jdbc-compatibility-old-server/src/test/java/io/trino/TestJdbcResultSetCompatibilityOldServer.java +++ b/testing/trino-test-jdbc-compatibility-old-server/src/test/java/io/trino/TestJdbcResultSetCompatibilityOldServer.java @@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.Resources; -import io.prestosql.jdbc.BaseTestJdbcResultSet; +import io.trino.jdbc.BaseTestJdbcResultSet; import org.testcontainers.containers.PrestoContainer; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -32,7 +32,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Throwables.getStackTraceAsString; -import static io.prestosql.testing.DataProviders.toDataProvider; +import static io.trino.testing.DataProviders.toDataProvider; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestAggregations.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestAggregations.java index ff3c811d946c..5541d77ea434 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestAggregations.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestAggregations.java @@ -14,14 +14,14 @@ package io.trino.testing; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.spi.type.TimeZoneKey; +import io.trino.Session; +import io.trino.spi.type.TimeZoneKey; import org.testng.annotations.Test; import java.util.List; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestDistributedQueries.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestDistributedQueries.java index 2ae2ad6bb138..96cf4360c4f8 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestDistributedQueries.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestDistributedQueries.java @@ -18,13 +18,13 @@ import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.UncheckedTimeoutException; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryManager; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.testing.sql.TestTable; -import io.prestosql.testng.services.Flaky; +import io.trino.Session; +import io.trino.dispatcher.DispatchManager; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryManager; +import io.trino.server.BasicQueryInfo; +import io.trino.testing.sql.TestTable; +import io.trino.testng.services.Flaky; import org.intellij.lang.annotations.Language; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -39,16 +39,16 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.connector.informationschema.InformationSchemaTable.INFORMATION_SCHEMA; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.DataProviders.toDataProvider; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.QueryAssertions.assertContains; -import static io.prestosql.testing.QueryAssertions.getPrestoExceptionCause; -import static io.prestosql.testing.TestingSession.TESTING_CATALOG; -import static io.prestosql.testing.assertions.Assert.assertEquals; -import static io.prestosql.testing.assertions.Assert.assertEventually; -import static io.prestosql.testing.sql.TestTable.randomTableSuffix; +import static io.trino.connector.informationschema.InformationSchemaTable.INFORMATION_SCHEMA; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.DataProviders.toDataProvider; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.QueryAssertions.assertContains; +import static io.trino.testing.QueryAssertions.getPrestoExceptionCause; +import static io.trino.testing.TestingSession.TESTING_CATALOG; +import static io.trino.testing.assertions.Assert.assertEquals; +import static io.trino.testing.assertions.Assert.assertEventually; +import static io.trino.testing.sql.TestTable.randomTableSuffix; import static java.lang.String.format; import static java.lang.Thread.currentThread; import static java.util.Locale.ENGLISH; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestIndexedQueries.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestIndexedQueries.java index 14252ace0431..c9c3e192252d 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestIndexedQueries.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestIndexedQueries.java @@ -14,9 +14,9 @@ package io.trino.testing; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.tpch.TpchMetadata; -import io.prestosql.testing.tpch.TpchIndexSpec; -import io.prestosql.testing.tpch.TpchIndexSpec.Builder; +import io.trino.plugin.tpch.TpchMetadata; +import io.trino.testing.tpch.TpchIndexSpec; +import io.trino.testing.tpch.TpchIndexSpec.Builder; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; 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 64a7f4a54314..db514efde477 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,19 +13,19 @@ */ package io.trino.testing; -import io.prestosql.Session; -import io.prestosql.sql.analyzer.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; import java.util.stream.Stream; -import static io.prestosql.SystemSessionProperties.IGNORE_STATS_CALCULATOR_FAILURES; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.DataProviders.toDataProvider; -import static io.prestosql.testing.QueryAssertions.assertContains; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.SystemSessionProperties.IGNORE_STATS_CALCULATOR_FAILURES; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.DataProviders.toDataProvider; +import static io.trino.testing.QueryAssertions.assertContains; +import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.String.join; import static java.util.Collections.nCopies; import static org.assertj.core.api.Assertions.assertThat; 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 0df94bbf13b0..1bf2a754dea5 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,19 +14,19 @@ package io.trino.testing; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.spi.type.Decimals; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.tests.QueryTemplate; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.spi.type.Decimals; +import io.trino.sql.analyzer.FeaturesConfig; +import io.trino.tests.QueryTemplate; import org.testng.annotations.Test; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; -import static io.prestosql.tests.QueryTemplate.parameter; -import static io.prestosql.tests.QueryTemplate.queryTemplate; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.tests.QueryTemplate.parameter; +import static io.trino.tests.QueryTemplate.queryTemplate; import static java.lang.String.format; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestOrderByQueries.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestOrderByQueries.java index 5583ea4fc6c7..ab3b8cc925c7 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestOrderByQueries.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestOrderByQueries.java @@ -13,15 +13,15 @@ */ package io.trino.testing; -import io.prestosql.Session; +import io.trino.Session; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.DISTRIBUTED_SORT; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; -import static io.prestosql.tests.QueryTemplate.parameter; -import static io.prestosql.tests.QueryTemplate.queryTemplate; +import static io.trino.SystemSessionProperties.DISTRIBUTED_SORT; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; +import static io.trino.tests.QueryTemplate.parameter; +import static io.trino.tests.QueryTemplate.queryTemplate; public abstract class AbstractTestOrderByQueries extends AbstractTestQueryFramework diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueries.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueries.java index 0be70da171eb..06be299758be 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueries.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueries.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.metadata.FunctionListBuilder; -import io.prestosql.metadata.SqlFunction; -import io.prestosql.spi.session.PropertyMetadata; -import io.prestosql.tests.QueryTemplate; +import io.trino.metadata.FunctionListBuilder; +import io.trino.metadata.SqlFunction; +import io.trino.spi.session.PropertyMetadata; +import io.trino.tests.QueryTemplate; import io.trino.tpch.TpchTable; import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics; import org.testng.annotations.DataProvider; @@ -29,17 +29,17 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.connector.informationschema.InformationSchemaTable.INFORMATION_SCHEMA; -import static io.prestosql.operator.scalar.ApplyFunction.APPLY_FUNCTION; -import static io.prestosql.operator.scalar.InvokeFunction.INVOKE_FUNCTION; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.QueryAssertions.assertContains; -import static io.prestosql.testing.StatefulSleepingSum.STATEFUL_SLEEPING_SUM; -import static io.prestosql.testing.assertions.Assert.assertEquals; -import static io.prestosql.tests.QueryTemplate.parameter; -import static io.prestosql.tests.QueryTemplate.queryTemplate; +import static io.trino.connector.informationschema.InformationSchemaTable.INFORMATION_SCHEMA; +import static io.trino.operator.scalar.ApplyFunction.APPLY_FUNCTION; +import static io.trino.operator.scalar.InvokeFunction.INVOKE_FUNCTION; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.QueryAssertions.assertContains; +import static io.trino.testing.StatefulSleepingSum.STATEFUL_SLEEPING_SUM; +import static io.trino.testing.assertions.Assert.assertEquals; +import static io.trino.tests.QueryTemplate.parameter; +import static io.trino.tests.QueryTemplate.queryTemplate; import static java.lang.String.format; import static java.util.stream.Collectors.joining; import static java.util.stream.IntStream.range; 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 c90f57ea3647..73906ec21e80 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,39 +18,39 @@ import com.google.common.collect.MoreCollectors; import com.google.errorprone.annotations.CanIgnoreReturnValue; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.cost.CostCalculator; -import io.prestosql.cost.CostCalculatorUsingExchanges; -import io.prestosql.cost.CostCalculatorWithEstimatedExchanges; -import io.prestosql.cost.CostComparator; -import io.prestosql.cost.TaskCountEstimator; -import io.prestosql.execution.QueryManagerConfig; -import io.prestosql.execution.TaskManagerConfig; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.Metadata; -import io.prestosql.operator.OperatorStats; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeOperators; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.prestosql.sql.analyzer.QueryExplainer; -import io.prestosql.sql.parser.SqlParser; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.PlanFragmenter; -import io.prestosql.sql.planner.PlanOptimizers; -import io.prestosql.sql.planner.RuleStatsRecorder; -import io.prestosql.sql.planner.TypeAnalyzer; -import io.prestosql.sql.planner.optimizations.PlanNodeSearcher; -import io.prestosql.sql.planner.optimizations.PlanOptimizer; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.planner.plan.PlanNodeId; -import io.prestosql.sql.planner.plan.ProjectNode; -import io.prestosql.sql.planner.plan.TableScanNode; -import io.prestosql.sql.query.QueryAssertions.QueryAssert; -import io.prestosql.sql.tree.ExplainType; -import io.prestosql.testing.TestingAccessControlManager.TestingPrivilege; -import io.prestosql.util.AutoCloseableCloser; +import io.trino.Session; +import io.trino.cost.CostCalculator; +import io.trino.cost.CostCalculatorUsingExchanges; +import io.trino.cost.CostCalculatorWithEstimatedExchanges; +import io.trino.cost.CostComparator; +import io.trino.cost.TaskCountEstimator; +import io.trino.execution.QueryManagerConfig; +import io.trino.execution.TaskManagerConfig; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.Metadata; +import io.trino.operator.OperatorStats; +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; +import io.trino.sql.planner.PlanFragmenter; +import io.trino.sql.planner.PlanOptimizers; +import io.trino.sql.planner.RuleStatsRecorder; +import io.trino.sql.planner.TypeAnalyzer; +import io.trino.sql.planner.optimizations.PlanNodeSearcher; +import io.trino.sql.planner.optimizations.PlanOptimizer; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.planner.plan.PlanNodeId; +import io.trino.sql.planner.plan.ProjectNode; +import io.trino.sql.planner.plan.TableScanNode; +import io.trino.sql.query.QueryAssertions.QueryAssert; +import io.trino.sql.tree.ExplainType; +import io.trino.testing.TestingAccessControlManager.TestingPrivilege; +import io.trino.util.AutoCloseableCloser; import org.assertj.core.api.AssertProvider; import org.intellij.lang.annotations.Language; import org.testng.SkipException; @@ -67,11 +67,11 @@ 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.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.sql.ParsingUtil.createParsingOptions; -import static io.prestosql.sql.SqlFormatter.formatSql; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; +import static io.trino.sql.ParsingUtil.createParsingOptions; +import static io.trino.sql.SqlFormatter.formatSql; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.util.Collections.emptyList; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestWindowQueries.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestWindowQueries.java index 5f0ea36f8d73..66c50fb6b187 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestWindowQueries.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestWindowQueries.java @@ -14,17 +14,17 @@ package io.trino.testing; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.VarcharType; import org.testng.annotations.Test; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; -import static io.prestosql.testing.StructuralTestUtil.mapType; -import static io.prestosql.testing.assertions.Assert.assertEquals; +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.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.testing.StructuralTestUtil.mapType; +import static io.trino.testing.assertions.Assert.assertEquals; public abstract class AbstractTestWindowQueries extends AbstractTestQueryFramework diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestingPrestoClient.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestingPrestoClient.java index c563a40ee382..ae2879eb99d9 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestingPrestoClient.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestingPrestoClient.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableMap; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.client.ClientSelectedRole; -import io.prestosql.client.ClientSession; -import io.prestosql.client.Column; -import io.prestosql.client.QueryError; -import io.prestosql.client.QueryStatusInfo; -import io.prestosql.client.StatementClient; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.MetadataUtil; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.QualifiedTablePrefix; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.session.ResourceEstimates; -import io.prestosql.spi.type.Type; +import io.trino.Session; +import io.trino.client.ClientSelectedRole; +import io.trino.client.ClientSession; +import io.trino.client.Column; +import io.trino.client.QueryError; +import io.trino.client.QueryStatusInfo; +import io.trino.client.StatementClient; +import io.trino.connector.CatalogName; +import io.trino.metadata.MetadataUtil; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.QualifiedTablePrefix; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.QueryId; +import io.trino.spi.session.ResourceEstimates; +import io.trino.spi.type.Type; import okhttp3.OkHttpClient; import org.intellij.lang.annotations.Language; @@ -45,11 +45,11 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static io.prestosql.client.StatementClientFactory.newStatementClient; -import static io.prestosql.spi.session.ResourceEstimates.CPU_TIME; -import static io.prestosql.spi.session.ResourceEstimates.EXECUTION_TIME; -import static io.prestosql.spi.session.ResourceEstimates.PEAK_MEMORY; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.client.StatementClientFactory.newStatementClient; +import static io.trino.spi.session.ResourceEstimates.CPU_TIME; +import static io.trino.spi.session.ResourceEstimates.EXECUTION_TIME; +import static io.trino.spi.session.ResourceEstimates.PEAK_MEMORY; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.util.Objects.requireNonNull; public abstract class AbstractTestingPrestoClient diff --git a/testing/trino-testing/src/main/java/io/trino/testing/CountingMockConnector.java b/testing/trino-testing/src/main/java/io/trino/testing/CountingMockConnector.java index 34fd6769e176..dd88b38f4260 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/CountingMockConnector.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/CountingMockConnector.java @@ -14,12 +14,12 @@ package io.trino.testing; import com.google.common.collect.ImmutableList; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.RoleGrant; +import io.trino.connector.MockConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.RoleGrant; import java.util.List; import java.util.Objects; @@ -33,8 +33,8 @@ import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.connector.MockConnectorFactory.Builder.defaultGetColumns; -import static io.prestosql.spi.security.PrincipalType.USER; +import static io.trino.connector.MockConnectorFactory.Builder.defaultGetColumns; +import static io.trino.spi.security.PrincipalType.USER; public class CountingMockConnector { diff --git a/testing/trino-testing/src/main/java/io/trino/testing/CreateHll.java b/testing/trino-testing/src/main/java/io/trino/testing/CreateHll.java index d34f5c9111ad..f347494de04a 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/CreateHll.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/CreateHll.java @@ -15,9 +15,9 @@ import io.airlift.slice.Slice; import io.airlift.stats.cardinality.HyperLogLog; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; public final class CreateHll { diff --git a/testing/trino-testing/src/main/java/io/trino/testing/CustomAdd.java b/testing/trino-testing/src/main/java/io/trino/testing/CustomAdd.java index 0dd863213dd2..5de4b72594f5 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/CustomAdd.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/CustomAdd.java @@ -13,9 +13,9 @@ */ package io.trino.testing; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; public final class CustomAdd { diff --git a/testing/trino-testing/src/main/java/io/trino/testing/CustomRank.java b/testing/trino-testing/src/main/java/io/trino/testing/CustomRank.java index a596d9ffb79f..5cc543dc404b 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/CustomRank.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/CustomRank.java @@ -13,11 +13,11 @@ */ package io.trino.testing; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.RankingWindowFunction; -import io.prestosql.spi.function.WindowFunctionSignature; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.RankingWindowFunction; +import io.trino.spi.function.WindowFunctionSignature; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BigintType.BIGINT; @WindowFunctionSignature(name = "custom_rank", returnType = "bigint") public class CustomRank diff --git a/testing/trino-testing/src/main/java/io/trino/testing/CustomSum.java b/testing/trino-testing/src/main/java/io/trino/testing/CustomSum.java index dd0492108371..2df5a890a727 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/CustomSum.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/CustomSum.java @@ -13,16 +13,16 @@ */ package io.trino.testing; -import io.prestosql.operator.aggregation.state.NullableLongState; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.AggregationState; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.operator.aggregation.state.NullableLongState; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.AggregationState; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.StandardTypes; @AggregationFunction("custom_sum") public final class CustomSum diff --git a/testing/trino-testing/src/main/java/io/trino/testing/DistributedQueryRunner.java b/testing/trino-testing/src/main/java/io/trino/testing/DistributedQueryRunner.java index cb44d04dee6a..a5e9432e274c 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/DistributedQueryRunner.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/DistributedQueryRunner.java @@ -21,29 +21,29 @@ import io.airlift.log.Logger; import io.airlift.testing.Assertions; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.Session.SessionBuilder; -import io.prestosql.connector.CatalogName; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.execution.QueryManager; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.AllNodes; -import io.prestosql.metadata.Catalog; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.metadata.SqlFunction; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.security.SystemAccessControl; -import io.prestosql.split.PageSourceManager; -import io.prestosql.split.SplitManager; -import io.prestosql.sql.planner.NodePartitioningManager; -import io.prestosql.sql.planner.Plan; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.Session.SessionBuilder; +import io.trino.connector.CatalogName; +import io.trino.cost.StatsCalculator; +import io.trino.execution.QueryManager; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.AllNodes; +import io.trino.metadata.Catalog; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.SessionPropertyManager; +import io.trino.metadata.SqlFunction; +import io.trino.server.BasicQueryInfo; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.Plugin; +import io.trino.spi.QueryId; +import io.trino.spi.security.SystemAccessControl; +import io.trino.split.PageSourceManager; +import io.trino.split.SplitManager; +import io.trino.sql.planner.NodePartitioningManager; +import io.trino.sql.planner.Plan; +import io.trino.transaction.TransactionManager; import org.intellij.lang.annotations.Language; import java.io.IOException; @@ -65,10 +65,10 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.inject.util.Modules.EMPTY_MODULE; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.testing.AbstractTestQueries.TEST_CATALOG_PROPERTIES; -import static io.prestosql.testing.AbstractTestQueries.TEST_SYSTEM_PROPERTIES; -import static io.prestosql.testing.TestingSession.TESTING_CATALOG; -import static io.prestosql.testing.TestingSession.createBogusTestingCatalog; +import static io.trino.testing.AbstractTestQueries.TEST_CATALOG_PROPERTIES; +import static io.trino.testing.AbstractTestQueries.TEST_SYSTEM_PROPERTIES; +import static io.trino.testing.TestingSession.TESTING_CATALOG; +import static io.trino.testing.TestingSession.createBogusTestingCatalog; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/H2QueryRunner.java b/testing/trino-testing/src/main/java/io/trino/testing/H2QueryRunner.java index 77142f1cf2c0..6b76e2350322 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/H2QueryRunner.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/H2QueryRunner.java @@ -14,21 +14,21 @@ package io.trino.testing; import com.google.common.base.Joiner; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchMetadata; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.Session; +import io.trino.plugin.tpch.TpchMetadata; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import io.trino.tpch.TpchTable; import org.intellij.lang.annotations.Language; import org.jdbi.v3.core.Handle; @@ -60,29 +60,29 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Lists.newArrayList; import static io.airlift.slice.Slices.utf8Slice; -import static io.prestosql.operator.scalar.JsonFunctions.jsonParse; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.plugin.tpch.TpchRecordSet.createTpchRecordSet; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.operator.scalar.JsonFunctions.jsonParse; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.plugin.tpch.TpchRecordSet.createTpchRecordSet; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE; +import static io.trino.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; import static io.trino.tpch.TpchTable.CUSTOMER; import static io.trino.tpch.TpchTable.LINE_ITEM; import static io.trino.tpch.TpchTable.NATION; import static io.trino.tpch.TpchTable.ORDERS; import static io.trino.tpch.TpchTable.PART; import static io.trino.tpch.TpchTable.REGION; +import static io.trino.type.JsonType.JSON; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.Math.toIntExact; import static java.lang.String.format; import static java.util.Collections.nCopies; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/PlanDeterminismChecker.java b/testing/trino-testing/src/main/java/io/trino/testing/PlanDeterminismChecker.java index 1668e52e4289..cb5196fcf9c3 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/PlanDeterminismChecker.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/PlanDeterminismChecker.java @@ -13,15 +13,15 @@ */ package io.trino.testing; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.planprinter.PlanPrinter; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.planprinter.PlanPrinter; import java.util.function.Function; import java.util.stream.IntStream; -import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; +import static io.trino.sql.planner.LogicalPlanner.Stage.OPTIMIZED_AND_VALIDATED; import static org.testng.Assert.assertEquals; public class PlanDeterminismChecker diff --git a/testing/trino-testing/src/main/java/io/trino/testing/QueryAssertions.java b/testing/trino-testing/src/main/java/io/trino/testing/QueryAssertions.java index 003ab50bdfe3..36e0e5d08bf8 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/QueryAssertions.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/QueryAssertions.java @@ -21,13 +21,13 @@ import com.google.common.collect.Multisets; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.spi.PrestoException; -import io.prestosql.sql.parser.ParsingException; -import io.prestosql.sql.planner.Plan; -import io.prestosql.testing.QueryRunner.MaterializedResultWithPlan; +import io.trino.Session; +import io.trino.execution.warnings.WarningCollector; +import io.trino.metadata.QualifiedObjectName; +import io.trino.spi.PrestoException; +import io.trino.sql.parser.ParsingException; +import io.trino.sql.planner.Plan; +import io.trino.testing.QueryRunner.MaterializedResultWithPlan; import io.trino.tpch.TpchTable; import org.intellij.lang.annotations.Language; @@ -38,7 +38,7 @@ import java.util.function.Supplier; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.testing.assertions.Assert.assertEventually; +import static io.trino.testing.assertions.Assert.assertEventually; import static java.lang.String.format; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/ResultWithQueryId.java b/testing/trino-testing/src/main/java/io/trino/testing/ResultWithQueryId.java index 0fd123bed590..25cfe8b99d1a 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/ResultWithQueryId.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/ResultWithQueryId.java @@ -13,7 +13,7 @@ */ package io.trino.testing; -import io.prestosql.spi.QueryId; +import io.trino.spi.QueryId; public class ResultWithQueryId { diff --git a/testing/trino-testing/src/main/java/io/trino/testing/ResultsSession.java b/testing/trino-testing/src/main/java/io/trino/testing/ResultsSession.java index 17ed0d06b453..c191763816d4 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/ResultsSession.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/ResultsSession.java @@ -13,9 +13,9 @@ */ package io.trino.testing; -import io.prestosql.client.QueryData; -import io.prestosql.client.QueryStatusInfo; -import io.prestosql.client.Warning; +import io.trino.client.QueryData; +import io.trino.client.QueryStatusInfo; +import io.trino.client.Warning; import java.util.List; import java.util.Map; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/StandaloneQueryRunner.java b/testing/trino-testing/src/main/java/io/trino/testing/StandaloneQueryRunner.java index f048e20d1ed0..3ba776c335ec 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/StandaloneQueryRunner.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/StandaloneQueryRunner.java @@ -14,21 +14,21 @@ package io.trino.testing; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.cost.StatsCalculator; -import io.prestosql.metadata.AllNodes; -import io.prestosql.metadata.InternalNode; -import io.prestosql.metadata.Metadata; -import io.prestosql.metadata.QualifiedObjectName; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.metadata.SqlFunction; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.Plugin; -import io.prestosql.split.PageSourceManager; -import io.prestosql.split.SplitManager; -import io.prestosql.sql.planner.NodePartitioningManager; -import io.prestosql.transaction.TransactionManager; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.cost.StatsCalculator; +import io.trino.metadata.AllNodes; +import io.trino.metadata.InternalNode; +import io.trino.metadata.Metadata; +import io.trino.metadata.QualifiedObjectName; +import io.trino.metadata.SessionPropertyManager; +import io.trino.metadata.SqlFunction; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.Plugin; +import io.trino.split.PageSourceManager; +import io.trino.split.SplitManager; +import io.trino.sql.planner.NodePartitioningManager; +import io.trino.transaction.TransactionManager; import org.intellij.lang.annotations.Language; import java.io.IOException; @@ -40,8 +40,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; import static io.airlift.testing.Closeables.closeAll; -import static io.prestosql.testing.AbstractTestQueries.TEST_CATALOG_PROPERTIES; -import static io.prestosql.testing.AbstractTestQueries.TEST_SYSTEM_PROPERTIES; +import static io.trino.testing.AbstractTestQueries.TEST_CATALOG_PROPERTIES; +import static io.trino.testing.AbstractTestQueries.TEST_SYSTEM_PROPERTIES; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/StatefulSleepingSum.java b/testing/trino-testing/src/main/java/io/trino/testing/StatefulSleepingSum.java index eac000f6e747..5255201a3a9d 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/StatefulSleepingSum.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/StatefulSleepingSum.java @@ -14,27 +14,27 @@ package io.trino.testing; import com.google.common.collect.ImmutableList; -import io.prestosql.metadata.FunctionArgumentDefinition; -import io.prestosql.metadata.FunctionBinding; -import io.prestosql.metadata.FunctionMetadata; -import io.prestosql.metadata.Signature; -import io.prestosql.metadata.SqlScalarFunction; -import io.prestosql.operator.scalar.ChoicesScalarFunctionImplementation; -import io.prestosql.operator.scalar.ScalarFunctionImplementation; +import io.trino.metadata.FunctionArgumentDefinition; +import io.trino.metadata.FunctionBinding; +import io.trino.metadata.FunctionMetadata; +import io.trino.metadata.Signature; +import io.trino.metadata.SqlScalarFunction; +import io.trino.operator.scalar.ChoicesScalarFunctionImplementation; +import io.trino.operator.scalar.ScalarFunctionImplementation; import java.util.Optional; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.atomic.AtomicInteger; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.metadata.FunctionKind.SCALAR; -import static io.prestosql.metadata.Signature.typeVariable; -import static io.prestosql.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; -import static io.prestosql.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.util.Reflection.constructorMethodHandle; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.metadata.FunctionKind.SCALAR; +import static io.trino.metadata.Signature.typeVariable; +import static io.trino.spi.function.InvocationConvention.InvocationArgumentConvention.NEVER_NULL; +import static io.trino.spi.function.InvocationConvention.InvocationReturnConvention.FAIL_ON_NULL; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.util.Reflection.constructorMethodHandle; +import static io.trino.util.Reflection.methodHandle; import static java.util.Collections.nCopies; public class StatefulSleepingSum diff --git a/testing/trino-testing/src/main/java/io/trino/testing/StructuralTestUtil.java b/testing/trino-testing/src/main/java/io/trino/testing/StructuralTestUtil.java index ecda8785ec83..1d4c7e8479f9 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/StructuralTestUtil.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/StructuralTestUtil.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; -import io.prestosql.metadata.Metadata; -import io.prestosql.spi.block.Block; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.Decimals; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.TypeSignatureParameter; -import io.prestosql.type.BlockTypeOperators; -import io.prestosql.type.BlockTypeOperators.BlockPositionEqual; +import io.trino.metadata.Metadata; +import io.trino.spi.block.Block; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.Decimals; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.StandardTypes; +import io.trino.spi.type.Type; +import io.trino.spi.type.TypeSignatureParameter; +import io.trino.type.BlockTypeOperators; +import io.trino.type.BlockTypeOperators.BlockPositionEqual; import java.math.BigDecimal; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.metadata.MetadataManager.createTestMetadataManager; -import static io.prestosql.util.StructuralTestUtil.appendToBlockBuilder; +import static io.trino.metadata.MetadataManager.createTestMetadataManager; +import static io.trino.util.StructuralTestUtil.appendToBlockBuilder; public final class StructuralTestUtil { diff --git a/testing/trino-testing/src/main/java/io/trino/testing/TestingPrestoClient.java b/testing/trino-testing/src/main/java/io/trino/testing/TestingPrestoClient.java index 7f93e7bf0682..f52fdd0e1990 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/TestingPrestoClient.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/TestingPrestoClient.java @@ -14,28 +14,28 @@ package io.trino.testing; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.client.IntervalDayTime; -import io.prestosql.client.IntervalYearMonth; -import io.prestosql.client.QueryData; -import io.prestosql.client.QueryStatusInfo; -import io.prestosql.client.Row; -import io.prestosql.client.RowField; -import io.prestosql.client.Warning; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.type.ArrayType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.MapType; -import io.prestosql.spi.type.RowType; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; -import io.prestosql.type.SqlIntervalDayTime; -import io.prestosql.type.SqlIntervalYearMonth; +import io.trino.Session; +import io.trino.client.IntervalDayTime; +import io.trino.client.IntervalYearMonth; +import io.trino.client.QueryData; +import io.trino.client.QueryStatusInfo; +import io.trino.client.Row; +import io.trino.client.RowField; +import io.trino.client.Warning; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.type.ArrayType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.MapType; +import io.trino.spi.type.RowType; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; +import io.trino.type.SqlIntervalDayTime; +import io.trino.type.SqlIntervalYearMonth; import java.math.BigDecimal; import java.time.LocalDate; @@ -57,22 +57,22 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.IntegerType.INTEGER; -import static io.prestosql.spi.type.RealType.REAL; -import static io.prestosql.spi.type.SmallintType.SMALLINT; -import static io.prestosql.spi.type.TinyintType.TINYINT; -import static io.prestosql.spi.type.VarbinaryType.VARBINARY; -import static io.prestosql.testing.MaterializedResult.DEFAULT_PRECISION; -import static io.prestosql.type.IntervalDayTimeType.INTERVAL_DAY_TIME; -import static io.prestosql.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; -import static io.prestosql.type.IpAddressType.IPADDRESS; -import static io.prestosql.type.JsonType.JSON; -import static io.prestosql.type.UuidType.UUID; -import static io.prestosql.util.MoreLists.mappedCopy; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.IntegerType.INTEGER; +import static io.trino.spi.type.RealType.REAL; +import static io.trino.spi.type.SmallintType.SMALLINT; +import static io.trino.spi.type.TinyintType.TINYINT; +import static io.trino.spi.type.VarbinaryType.VARBINARY; +import static io.trino.testing.MaterializedResult.DEFAULT_PRECISION; +import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; +import static io.trino.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; +import static io.trino.type.IpAddressType.IPADDRESS; +import static io.trino.type.JsonType.JSON; +import static io.trino.type.UuidType.UUID; +import static io.trino.util.MoreLists.mappedCopy; import static java.time.temporal.ChronoField.NANO_OF_SECOND; import static java.util.stream.Collectors.toList; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/TestingProcedures.java b/testing/trino-testing/src/main/java/io/trino/testing/TestingProcedures.java index 0a7f3f761e0a..e5ae14130230 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/TestingProcedures.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/TestingProcedures.java @@ -14,12 +14,12 @@ package io.trino.testing; import com.google.common.collect.ImmutableList; -import io.prestosql.annotation.UsedByGeneratedCode; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.procedure.Procedure; -import io.prestosql.spi.procedure.Procedure.Argument; -import io.prestosql.spi.type.ArrayType; +import io.trino.annotation.UsedByGeneratedCode; +import io.trino.spi.PrestoException; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.procedure.Procedure; +import io.trino.spi.procedure.Procedure.Argument; +import io.trino.spi.type.ArrayType; import java.lang.invoke.MethodHandle; import java.lang.reflect.Method; @@ -27,12 +27,12 @@ import java.util.List; import static com.google.common.base.Preconditions.checkArgument; -import static io.prestosql.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.util.Reflection.methodHandle; +import static io.trino.spi.StandardErrorCode.INVALID_PROCEDURE_ARGUMENT; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.BooleanType.BOOLEAN; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.util.Reflection.methodHandle; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/TestingSessionContext.java b/testing/trino-testing/src/main/java/io/trino/testing/TestingSessionContext.java index eb6f75c37100..e0ed24178d0d 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/TestingSessionContext.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/TestingSessionContext.java @@ -14,12 +14,12 @@ package io.trino.testing; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.server.SessionContext; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.session.ResourceEstimates; -import io.prestosql.transaction.TransactionId; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.server.SessionContext; +import io.trino.spi.security.Identity; +import io.trino.spi.session.ResourceEstimates; +import io.trino.transaction.TransactionId; import java.util.Map; import java.util.Optional; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/datatype/CreateAndInsertDataSetup.java b/testing/trino-testing/src/main/java/io/trino/testing/datatype/CreateAndInsertDataSetup.java index e63f67c60774..ee83d45d73ae 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/datatype/CreateAndInsertDataSetup.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/datatype/CreateAndInsertDataSetup.java @@ -13,8 +13,8 @@ */ package io.trino.testing.datatype; -import io.prestosql.testing.sql.SqlExecutor; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.sql.SqlExecutor; +import io.trino.testing.sql.TestTable; import java.util.List; import java.util.stream.IntStream; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/datatype/CreateAndPrestoInsertDataSetup.java b/testing/trino-testing/src/main/java/io/trino/testing/datatype/CreateAndPrestoInsertDataSetup.java index 0c3091af926e..6a4870734940 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/datatype/CreateAndPrestoInsertDataSetup.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/datatype/CreateAndPrestoInsertDataSetup.java @@ -13,9 +13,9 @@ */ package io.trino.testing.datatype; -import io.prestosql.testing.sql.PrestoSqlExecutor; -import io.prestosql.testing.sql.SqlExecutor; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.sql.PrestoSqlExecutor; +import io.trino.testing.sql.SqlExecutor; +import io.trino.testing.sql.TestTable; import java.util.List; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/datatype/CreateAsSelectDataSetup.java b/testing/trino-testing/src/main/java/io/trino/testing/datatype/CreateAsSelectDataSetup.java index cf9d8e90c34e..7f88777712ff 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/datatype/CreateAsSelectDataSetup.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/datatype/CreateAsSelectDataSetup.java @@ -13,8 +13,8 @@ */ package io.trino.testing.datatype; -import io.prestosql.testing.sql.SqlExecutor; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.sql.SqlExecutor; +import io.trino.testing.sql.TestTable; import java.util.List; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataSetup.java b/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataSetup.java index 96427b979955..5198e2f83eba 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataSetup.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataSetup.java @@ -13,7 +13,7 @@ */ package io.trino.testing.datatype; -import io.prestosql.testing.sql.TestTable; +import io.trino.testing.sql.TestTable; import java.util.List; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataType.java b/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataType.java index 36d8b1f3db36..3e5a582245b1 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataType.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataType.java @@ -13,17 +13,17 @@ */ package io.trino.testing.datatype; -import io.prestosql.spi.type.BigintType; -import io.prestosql.spi.type.BooleanType; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DoubleType; -import io.prestosql.spi.type.IntegerType; -import io.prestosql.spi.type.RealType; -import io.prestosql.spi.type.SmallintType; -import io.prestosql.spi.type.TinyintType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarbinaryType; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.BigintType; +import io.trino.spi.type.BooleanType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DoubleType; +import io.trino.spi.type.IntegerType; +import io.trino.spi.type.RealType; +import io.trino.spi.type.SmallintType; +import io.trino.spi.type.TinyintType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarbinaryType; +import io.trino.spi.type.VarcharType; import java.math.BigDecimal; import java.time.LocalDate; @@ -37,17 +37,17 @@ import java.util.function.Function; import static com.google.common.io.BaseEncoding.base16; -import static io.prestosql.spi.type.CharType.createCharType; -import static io.prestosql.spi.type.Chars.padSpaces; -import static io.prestosql.spi.type.DateType.DATE; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.TimeType.createTimeType; -import static io.prestosql.spi.type.TimeWithTimeZoneType.createTimeWithTimeZoneType; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; -import static io.prestosql.spi.type.TimestampType.createTimestampType; -import static io.prestosql.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; -import static io.prestosql.spi.type.VarcharType.createUnboundedVarcharType; -import static io.prestosql.type.JsonType.JSON; +import static io.trino.spi.type.CharType.createCharType; +import static io.trino.spi.type.Chars.padSpaces; +import static io.trino.spi.type.DateType.DATE; +import static io.trino.spi.type.DecimalType.createDecimalType; +import static io.trino.spi.type.TimeType.createTimeType; +import static io.trino.spi.type.TimeWithTimeZoneType.createTimeWithTimeZoneType; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.spi.type.TimestampType.createTimestampType; +import static io.trino.spi.type.TimestampWithTimeZoneType.createTimestampWithTimeZoneType; +import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; +import static io.trino.type.JsonType.JSON; import static java.lang.String.format; import static java.math.RoundingMode.UNNECESSARY; import static java.time.temporal.ChronoField.NANO_OF_SECOND; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataTypeTest.java b/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataTypeTest.java index b30c5d34b091..5f03c4da19c8 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataTypeTest.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataTypeTest.java @@ -14,11 +14,11 @@ package io.trino.testing.datatype; import io.airlift.log.Logger; -import io.prestosql.Session; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.TestTable; +import io.trino.Session; +import io.trino.spi.type.Type; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.TestTable; import java.util.ArrayList; import java.util.List; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataTypeTestToSqlDataTypeTestConverter.java b/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataTypeTestToSqlDataTypeTestConverter.java index 72e0aac3c972..75ed13fc4e84 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataTypeTestToSqlDataTypeTestConverter.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/datatype/DataTypeTestToSqlDataTypeTestConverter.java @@ -13,14 +13,14 @@ */ package io.trino.testing.datatype; -import io.prestosql.spi.type.CharType; -import io.prestosql.spi.type.DecimalType; -import io.prestosql.spi.type.TimeType; -import io.prestosql.spi.type.TimeWithTimeZoneType; -import io.prestosql.spi.type.TimestampType; -import io.prestosql.spi.type.TimestampWithTimeZoneType; -import io.prestosql.spi.type.Type; -import io.prestosql.spi.type.VarcharType; +import io.trino.spi.type.CharType; +import io.trino.spi.type.DecimalType; +import io.trino.spi.type.TimeType; +import io.trino.spi.type.TimeWithTimeZoneType; +import io.trino.spi.type.TimestampType; +import io.trino.spi.type.TimestampWithTimeZoneType; +import io.trino.spi.type.Type; +import io.trino.spi.type.VarcharType; import java.lang.reflect.Field; import java.lang.reflect.Modifier; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/datatype/SqlDataTypeTest.java b/testing/trino-testing/src/main/java/io/trino/testing/datatype/SqlDataTypeTest.java index b8bfc5b38346..15ec905e1cad 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/datatype/SqlDataTypeTest.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/datatype/SqlDataTypeTest.java @@ -13,13 +13,13 @@ */ package io.trino.testing.datatype; -import io.prestosql.Session; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.sql.query.QueryAssertions.QueryAssert; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.sql.TestTable; +import io.trino.Session; +import io.trino.spi.type.Type; +import io.trino.sql.query.QueryAssertions; +import io.trino.sql.query.QueryAssertions.QueryAssert; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.testing.sql.TestTable; import java.util.ArrayList; import java.util.List; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/sql/PrestoSqlExecutor.java b/testing/trino-testing/src/main/java/io/trino/testing/sql/PrestoSqlExecutor.java index b9ac762281af..2822908660f4 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/sql/PrestoSqlExecutor.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/sql/PrestoSqlExecutor.java @@ -13,8 +13,8 @@ */ package io.trino.testing.sql; -import io.prestosql.Session; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.testing.QueryRunner; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/statistics/Metric.java b/testing/trino-testing/src/main/java/io/trino/testing/statistics/Metric.java index 4c2bd1c8e614..e51bee4560a8 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/statistics/Metric.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/statistics/Metric.java @@ -13,7 +13,7 @@ */ package io.trino.testing.statistics; -import io.prestosql.cost.PlanNodeStatsEstimate; +import io.trino.cost.PlanNodeStatsEstimate; import java.util.OptionalDouble; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/statistics/MetricComparator.java b/testing/trino-testing/src/main/java/io/trino/testing/statistics/MetricComparator.java index c67b81679a00..a23663e58325 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/statistics/MetricComparator.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/statistics/MetricComparator.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.execution.warnings.WarningCollector; -import io.prestosql.sql.planner.Plan; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.plan.OutputNode; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.execution.warnings.WarningCollector; +import io.trino.sql.planner.Plan; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.plan.OutputNode; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; import java.util.List; import java.util.OptionalDouble; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.transaction.TransactionBuilder.transaction; +import static io.trino.transaction.TransactionBuilder.transaction; import static java.lang.String.format; import static java.util.stream.Collectors.joining; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/statistics/MetricComparison.java b/testing/trino-testing/src/main/java/io/trino/testing/statistics/MetricComparison.java index 26b1c1ccc394..a2dcabbaef38 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/statistics/MetricComparison.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/statistics/MetricComparison.java @@ -16,9 +16,9 @@ import java.util.OptionalDouble; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.testing.statistics.MetricComparison.Result.DIFFER; -import static io.prestosql.testing.statistics.MetricComparison.Result.MATCH; -import static io.prestosql.testing.statistics.MetricComparison.Result.NO_ESTIMATE; +import static io.trino.testing.statistics.MetricComparison.Result.DIFFER; +import static io.trino.testing.statistics.MetricComparison.Result.MATCH; +import static io.trino.testing.statistics.MetricComparison.Result.NO_ESTIMATE; import static java.lang.String.format; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/statistics/Metrics.java b/testing/trino-testing/src/main/java/io/trino/testing/statistics/Metrics.java index 9451f158901d..dabbd8731107 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/statistics/Metrics.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/statistics/Metrics.java @@ -13,8 +13,8 @@ */ package io.trino.testing.statistics; -import io.prestosql.cost.PlanNodeStatsEstimate; -import io.prestosql.cost.SymbolStatsEstimate; +import io.trino.cost.PlanNodeStatsEstimate; +import io.trino.cost.SymbolStatsEstimate; import java.util.Optional; import java.util.OptionalDouble; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/statistics/StatisticsAssertion.java b/testing/trino-testing/src/main/java/io/trino/testing/statistics/StatisticsAssertion.java index 31b4450b2005..42c590dba309 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/statistics/StatisticsAssertion.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/statistics/StatisticsAssertion.java @@ -14,7 +14,7 @@ package io.trino.testing.statistics; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import java.util.ArrayList; @@ -23,14 +23,14 @@ import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.testing.statistics.MetricComparator.getMetricComparisons; -import static io.prestosql.testing.statistics.MetricComparison.Result.MATCH; -import static io.prestosql.testing.statistics.MetricComparison.Result.NO_ESTIMATE; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.noError; -import static io.prestosql.testing.statistics.Metrics.distinctValuesCount; -import static io.prestosql.testing.statistics.Metrics.highValue; -import static io.prestosql.testing.statistics.Metrics.lowValue; -import static io.prestosql.testing.statistics.Metrics.nullsFraction; +import static io.trino.testing.statistics.MetricComparator.getMetricComparisons; +import static io.trino.testing.statistics.MetricComparison.Result.MATCH; +import static io.trino.testing.statistics.MetricComparison.Result.NO_ESTIMATE; +import static io.trino.testing.statistics.MetricComparisonStrategies.noError; +import static io.trino.testing.statistics.Metrics.distinctValuesCount; +import static io.trino.testing.statistics.Metrics.highValue; +import static io.trino.testing.statistics.Metrics.lowValue; +import static io.trino.testing.statistics.Metrics.nullsFraction; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertSame; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/statistics/StatsContext.java b/testing/trino-testing/src/main/java/io/trino/testing/statistics/StatsContext.java index 789b11f6d8a2..3ffc54607bbf 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/statistics/StatsContext.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/statistics/StatsContext.java @@ -14,9 +14,9 @@ package io.trino.testing.statistics; import com.google.common.collect.ImmutableMap; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.Symbol; -import io.prestosql.sql.planner.TypeProvider; +import io.trino.spi.type.Type; +import io.trino.sql.planner.Symbol; +import io.trino.sql.planner.TypeProvider; import java.util.Map; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/tpch/AppendingRecordSet.java b/testing/trino-testing/src/main/java/io/trino/testing/tpch/AppendingRecordSet.java index 31a330067b9c..4526c244a64e 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/tpch/AppendingRecordSet.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/tpch/AppendingRecordSet.java @@ -16,9 +16,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.primitives.Primitives; import io.airlift.slice.Slice; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.ArrayList; import java.util.List; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/tpch/ConcatRecordSet.java b/testing/trino-testing/src/main/java/io/trino/testing/tpch/ConcatRecordSet.java index 4173315eaca7..188705d442de 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/tpch/ConcatRecordSet.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/tpch/ConcatRecordSet.java @@ -14,9 +14,9 @@ package io.trino.testing.tpch; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.Iterator; import java.util.List; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/tpch/ExampleSystemTable.java b/testing/trino-testing/src/main/java/io/trino/testing/tpch/ExampleSystemTable.java index 7d70b45cb147..e8d0a4ae5188 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/tpch/ExampleSystemTable.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/tpch/ExampleSystemTable.java @@ -13,19 +13,19 @@ */ package io.trino.testing.tpch; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableMetadata; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.InMemoryRecordSet; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.predicate.TupleDomain; - -import static io.prestosql.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; -import static io.prestosql.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableMetadata; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.InMemoryRecordSet; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.predicate.TupleDomain; + +import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder; +import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR; +import static io.trino.spi.type.VarcharType.VARCHAR; public class ExampleSystemTable implements SystemTable diff --git a/testing/trino-testing/src/main/java/io/trino/testing/tpch/IndexedTpchConnectorFactory.java b/testing/trino-testing/src/main/java/io/trino/testing/tpch/IndexedTpchConnectorFactory.java index f91499f7d8e4..87fae76ed187 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/tpch/IndexedTpchConnectorFactory.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/tpch/IndexedTpchConnectorFactory.java @@ -14,23 +14,23 @@ package io.trino.testing.tpch; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.tpch.TpchNodePartitioningProvider; -import io.prestosql.plugin.tpch.TpchRecordSetProvider; -import io.prestosql.plugin.tpch.TpchSplitManager; -import io.prestosql.plugin.tpch.TpchTransactionHandle; -import io.prestosql.spi.NodeManager; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorIndexProvider; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorNodePartitioningProvider; -import io.prestosql.spi.connector.ConnectorRecordSetProvider; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.SystemTable; -import io.prestosql.spi.transaction.IsolationLevel; +import io.trino.plugin.tpch.TpchNodePartitioningProvider; +import io.trino.plugin.tpch.TpchRecordSetProvider; +import io.trino.plugin.tpch.TpchSplitManager; +import io.trino.plugin.tpch.TpchTransactionHandle; +import io.trino.spi.NodeManager; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorIndexProvider; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorNodePartitioningProvider; +import io.trino.spi.connector.ConnectorRecordSetProvider; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.SystemTable; +import io.trino.spi.transaction.IsolationLevel; import java.util.Map; import java.util.Set; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/tpch/IndexedTpchPlugin.java b/testing/trino-testing/src/main/java/io/trino/testing/tpch/IndexedTpchPlugin.java index 195ea3f39b2b..9a1dd45a2b15 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/tpch/IndexedTpchPlugin.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/tpch/IndexedTpchPlugin.java @@ -14,8 +14,8 @@ package io.trino.testing.tpch; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/tpch/MaterializedTupleRecordSet.java b/testing/trino-testing/src/main/java/io/trino/testing/tpch/MaterializedTupleRecordSet.java index 15ce259d76b4..71ce38190170 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/tpch/MaterializedTupleRecordSet.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/tpch/MaterializedTupleRecordSet.java @@ -16,9 +16,9 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.type.Type; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.type.Type; import java.util.Iterator; import java.util.List; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchConnectorIndex.java b/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchConnectorIndex.java index 38f3666ab86a..96b26e221ca9 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchConnectorIndex.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchConnectorIndex.java @@ -13,11 +13,11 @@ */ package io.trino.testing.tpch; -import io.prestosql.spi.connector.ConnectorIndex; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.RecordPageSource; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.testing.tpch.TpchIndexedData.IndexedTable; +import io.trino.spi.connector.ConnectorIndex; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.RecordPageSource; +import io.trino.spi.connector.RecordSet; +import io.trino.testing.tpch.TpchIndexedData.IndexedTable; import java.util.function.Function; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexHandle.java b/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexHandle.java index 64f3e7917ea6..1496eb0fc9ca 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexHandle.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexHandle.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorIndexHandle; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorIndexHandle; +import io.trino.spi.predicate.TupleDomain; import java.util.Set; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexHandleResolver.java b/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexHandleResolver.java index 5f5493090ed9..fb371b56cd24 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexHandleResolver.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexHandleResolver.java @@ -13,8 +13,8 @@ */ package io.trino.testing.tpch; -import io.prestosql.plugin.tpch.TpchHandleResolver; -import io.prestosql.spi.connector.ConnectorIndexHandle; +import io.trino.plugin.tpch.TpchHandleResolver; +import io.trino.spi.connector.ConnectorIndexHandle; public class TpchIndexHandleResolver extends TpchHandleResolver diff --git a/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexMetadata.java b/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexMetadata.java index b365d5616a23..9be9a19c6e5e 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexMetadata.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexMetadata.java @@ -16,21 +16,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.plugin.tpch.TpchMetadata; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorResolvedIndex; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; +import io.trino.plugin.tpch.TpchMetadata; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorResolvedIndex; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; -import static io.prestosql.testing.tpch.TpchIndexProvider.handleToNames; +import static io.trino.testing.tpch.TpchIndexProvider.handleToNames; import static java.util.Objects.requireNonNull; public class TpchIndexMetadata diff --git a/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexProvider.java b/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexProvider.java index 8230173b641a..47054349c976 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexProvider.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexProvider.java @@ -14,18 +14,18 @@ package io.trino.testing.tpch; import com.google.common.collect.ImmutableList; -import io.prestosql.plugin.tpch.TpchColumnHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.ConnectorIndex; -import io.prestosql.spi.connector.ConnectorIndexHandle; -import io.prestosql.spi.connector.ConnectorIndexProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.predicate.NullableValue; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; -import io.prestosql.split.MappedRecordSet; +import io.trino.plugin.tpch.TpchColumnHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.ConnectorIndex; +import io.trino.spi.connector.ConnectorIndexHandle; +import io.trino.spi.connector.ConnectorIndexProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.predicate.NullableValue; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; +import io.trino.split.MappedRecordSet; import java.util.ArrayList; import java.util.List; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexedData.java b/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexedData.java index 4a2cb4af51ab..9f1cddc9ffa3 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexedData.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/tpch/TpchIndexedData.java @@ -21,15 +21,15 @@ import com.google.common.collect.ListMultimap; import com.google.common.collect.Lists; import io.airlift.slice.Slice; -import io.prestosql.plugin.tpch.TpchMetadata; -import io.prestosql.plugin.tpch.TpchRecordSetProvider; -import io.prestosql.plugin.tpch.TpchTableHandle; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.RecordCursor; -import io.prestosql.spi.connector.RecordSet; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.type.Type; +import io.trino.plugin.tpch.TpchMetadata; +import io.trino.plugin.tpch.TpchRecordSetProvider; +import io.trino.plugin.tpch.TpchTableHandle; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.RecordCursor; +import io.trino.spi.connector.RecordSet; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.type.Type; import io.trino.tpch.TpchTable; import java.util.ArrayList; diff --git a/testing/trino-testing/src/test/java/io/trino/testing/TestH2QueryRunner.java b/testing/trino-testing/src/test/java/io/trino/testing/TestH2QueryRunner.java index 297ec817a2a5..2ed5f3aa1f55 100644 --- a/testing/trino-testing/src/test/java/io/trino/testing/TestH2QueryRunner.java +++ b/testing/trino-testing/src/test/java/io/trino/testing/TestH2QueryRunner.java @@ -23,8 +23,8 @@ import java.time.format.DateTimeFormatter; import static com.google.common.base.Preconditions.checkState; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.type.TimestampType.TIMESTAMP_MILLIS; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; import static org.testng.Assert.assertEquals; public class TestH2QueryRunner diff --git a/testing/trino-testing/src/test/java/io/trino/testing/datatype/TestDataType.java b/testing/trino-testing/src/test/java/io/trino/testing/datatype/TestDataType.java index fec3c3de750f..82e49a25e285 100644 --- a/testing/trino-testing/src/test/java/io/trino/testing/datatype/TestDataType.java +++ b/testing/trino-testing/src/test/java/io/trino/testing/datatype/TestDataType.java @@ -17,7 +17,7 @@ import java.time.LocalTime; -import static io.prestosql.testing.datatype.DataType.timeDataType; +import static io.trino.testing.datatype.DataType.timeDataType; import static org.testng.Assert.assertEquals; public class TestDataType diff --git a/testing/trino-testng-services/src/main/java/io/trino/testng/services/FlakyAnnotationVerifier.java b/testing/trino-testng-services/src/main/java/io/trino/testng/services/FlakyAnnotationVerifier.java index 908aaba5cdc3..c669fede3183 100644 --- a/testing/trino-testng-services/src/main/java/io/trino/testng/services/FlakyAnnotationVerifier.java +++ b/testing/trino-testng-services/src/main/java/io/trino/testng/services/FlakyAnnotationVerifier.java @@ -28,7 +28,7 @@ import static com.google.common.base.Throwables.getStackTraceAsString; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.testng.services.Listeners.reportListenerFailure; +import static io.trino.testng.services.Listeners.reportListenerFailure; import static java.lang.String.format; import static java.util.stream.Collectors.joining; diff --git a/testing/trino-testng-services/src/main/java/io/trino/testng/services/LogTestDurationListener.java b/testing/trino-testng-services/src/main/java/io/trino/testng/services/LogTestDurationListener.java index 3f70b2652c57..2baf2bba5334 100644 --- a/testing/trino-testng-services/src/main/java/io/trino/testng/services/LogTestDurationListener.java +++ b/testing/trino-testng-services/src/main/java/io/trino/testng/services/LogTestDurationListener.java @@ -40,7 +40,7 @@ import static com.google.common.base.Throwables.getStackTraceAsString; import static io.airlift.concurrent.Threads.daemonThreadsNamed; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.testng.services.Listeners.reportListenerFailure; +import static io.trino.testng.services.Listeners.reportListenerFailure; import static java.lang.String.format; import static java.lang.management.ManagementFactory.getThreadMXBean; import static java.util.stream.Collectors.joining; diff --git a/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportIllNamedTest.java b/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportIllNamedTest.java index a91d596a6529..5e77fdf27cc2 100644 --- a/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportIllNamedTest.java +++ b/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportIllNamedTest.java @@ -17,8 +17,8 @@ import org.testng.ITestClass; import static com.google.common.base.Throwables.getStackTraceAsString; -import static io.prestosql.testng.services.Listeners.reportListenerFailure; -import static io.prestosql.testng.services.ReportUnannotatedMethods.isTemptoClass; +import static io.trino.testng.services.Listeners.reportListenerFailure; +import static io.trino.testng.services.ReportUnannotatedMethods.isTemptoClass; public class ReportIllNamedTest implements IClassListener diff --git a/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportMultiThreadedBeforeOrAfterMethod.java b/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportMultiThreadedBeforeOrAfterMethod.java index b16bc0ba0682..0d5ad0f11cd7 100644 --- a/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportMultiThreadedBeforeOrAfterMethod.java +++ b/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportMultiThreadedBeforeOrAfterMethod.java @@ -25,7 +25,7 @@ import java.lang.reflect.Method; import static com.google.common.base.Throwables.getStackTraceAsString; -import static io.prestosql.testng.services.Listeners.reportListenerFailure; +import static io.trino.testng.services.Listeners.reportListenerFailure; import static java.lang.String.format; public class ReportMultiThreadedBeforeOrAfterMethod diff --git a/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportOrphanedExecutors.java b/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportOrphanedExecutors.java index 8a75bc183952..84ea1658d2fe 100644 --- a/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportOrphanedExecutors.java +++ b/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportOrphanedExecutors.java @@ -26,7 +26,7 @@ import static com.google.common.base.Throwables.getStackTraceAsString; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.testng.services.Listeners.reportListenerFailure; +import static io.trino.testng.services.Listeners.reportListenerFailure; import static java.lang.String.format; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.RetentionPolicy.RUNTIME; diff --git a/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportUnannotatedMethods.java b/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportUnannotatedMethods.java index 55bbfd90ba4b..2fb72f136b34 100644 --- a/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportUnannotatedMethods.java +++ b/testing/trino-testng-services/src/main/java/io/trino/testng/services/ReportUnannotatedMethods.java @@ -28,7 +28,7 @@ import static com.google.common.base.Throwables.getStackTraceAsString; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.testng.services.Listeners.reportListenerFailure; +import static io.trino.testng.services.Listeners.reportListenerFailure; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; import static java.util.stream.Collectors.joining; diff --git a/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestFlakyAnnotationVerifier.java b/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestFlakyAnnotationVerifier.java index 60f8df13877e..d86aa8a43d3c 100644 --- a/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestFlakyAnnotationVerifier.java +++ b/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestFlakyAnnotationVerifier.java @@ -17,7 +17,7 @@ import java.lang.reflect.Method; -import static io.prestosql.testng.services.FlakyAnnotationVerifier.findMethodsWithFlakyAndNoTestAnnotation; +import static io.trino.testng.services.FlakyAnnotationVerifier.findMethodsWithFlakyAndNoTestAnnotation; import static org.assertj.core.api.Assertions.assertThat; public class TestFlakyAnnotationVerifier diff --git a/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestFlakyTestRetryAnalyzer.java b/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestFlakyTestRetryAnalyzer.java index fe006847e19e..9d0071be868b 100644 --- a/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestFlakyTestRetryAnalyzer.java +++ b/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestFlakyTestRetryAnalyzer.java @@ -16,7 +16,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import static io.prestosql.testng.services.FlakyTestRetryAnalyzer.ALLOWED_RETRIES_COUNT; +import static io.trino.testng.services.FlakyTestRetryAnalyzer.ALLOWED_RETRIES_COUNT; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestReportMultiThreadedBeforeOrAfterMethod.java b/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestReportMultiThreadedBeforeOrAfterMethod.java index 4069f76631b8..b5b5e61408ee 100644 --- a/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestReportMultiThreadedBeforeOrAfterMethod.java +++ b/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestReportMultiThreadedBeforeOrAfterMethod.java @@ -16,7 +16,7 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -import static io.prestosql.testng.services.ReportMultiThreadedBeforeOrAfterMethod.reportMultiThreadedBeforeOrAfterMethod; +import static io.trino.testng.services.ReportMultiThreadedBeforeOrAfterMethod.reportMultiThreadedBeforeOrAfterMethod; import static org.assertj.core.api.Assertions.assertThatThrownBy; public class TestReportMultiThreadedBeforeOrAfterMethod diff --git a/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestReportUnannotatedMethods.java b/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestReportUnannotatedMethods.java index 983d4c416c4e..5b133f83f905 100644 --- a/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestReportUnannotatedMethods.java +++ b/testing/trino-testng-services/src/test/java/io/trino/testng/services/TestReportUnannotatedMethods.java @@ -22,8 +22,8 @@ import java.lang.reflect.Method; -import static io.prestosql.testng.services.ReportUnannotatedMethods.findUnannotatedTestMethods; -import static io.prestosql.testng.services.ReportUnannotatedMethods.isTemptoClass; +import static io.trino.testng.services.ReportUnannotatedMethods.findUnannotatedTestMethods; +import static io.trino.testng.services.ReportUnannotatedMethods.isTemptoClass; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/testing/trino-tests/src/test/java/io/trino/connector/informationschema/BenchmarkInformationSchema.java b/testing/trino-tests/src/test/java/io/trino/connector/informationschema/BenchmarkInformationSchema.java index 1394ae393da0..5a88cb7cce97 100644 --- a/testing/trino-tests/src/test/java/io/trino/connector/informationschema/BenchmarkInformationSchema.java +++ b/testing/trino-tests/src/test/java/io/trino/connector/informationschema/BenchmarkInformationSchema.java @@ -15,15 +15,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.connector.MockConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.SchemaTableName; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -49,7 +49,7 @@ import java.util.stream.IntStream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Benchmark) diff --git a/testing/trino-tests/src/test/java/io/trino/connector/system/runtime/TestKillQuery.java b/testing/trino-tests/src/test/java/io/trino/connector/system/runtime/TestKillQuery.java index 37fa354efb40..65db8bba9759 100644 --- a/testing/trino-tests/src/test/java/io/trino/connector/system/runtime/TestKillQuery.java +++ b/testing/trino-tests/src/test/java/io/trino/connector/system/runtime/TestKillQuery.java @@ -13,12 +13,12 @@ */ package io.trino.connector.system.runtime; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.spi.security.Identity; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.spi.security.Identity; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -31,9 +31,9 @@ import static com.google.common.collect.MoreCollectors.toOptional; import static io.airlift.concurrent.Threads.threadsNamed; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.KILL_QUERY; -import static io.prestosql.testing.TestingAccessControlManager.privilege; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.KILL_QUERY; +import static io.trino.testing.TestingAccessControlManager.privilege; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.UUID.randomUUID; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/testing/trino-tests/src/test/java/io/trino/connector/system/runtime/TestSystemConnector.java b/testing/trino-tests/src/test/java/io/trino/connector/system/runtime/TestSystemConnector.java index 68302008f06b..81925cec1b7e 100644 --- a/testing/trino-tests/src/test/java/io/trino/connector/system/runtime/TestSystemConnector.java +++ b/testing/trino-tests/src/test/java/io/trino/connector/system/runtime/TestSystemConnector.java @@ -18,17 +18,17 @@ import com.google.common.collect.Iterables; import com.google.common.util.concurrent.SettableFuture; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ColumnMetadata; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.connector.MockConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ColumnMetadata; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.SchemaTableName; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -45,9 +45,9 @@ import static com.google.common.collect.MoreCollectors.toOptional; import static io.airlift.concurrent.Threads.threadsNamed; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.concurrent.TimeUnit.SECONDS; import static org.assertj.core.api.Assertions.assertThat; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/DeprecatedFunctionsPlugin.java b/testing/trino-tests/src/test/java/io/trino/execution/DeprecatedFunctionsPlugin.java index 608a70f7515b..eb43159105ad 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/DeprecatedFunctionsPlugin.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/DeprecatedFunctionsPlugin.java @@ -14,11 +14,11 @@ package io.trino.execution; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.StandardTypes; +import io.trino.spi.Plugin; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.StandardTypes; import java.util.Set; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/EventsAwaitingQueries.java b/testing/trino-tests/src/test/java/io/trino/execution/EventsAwaitingQueries.java index 5edeacf86c35..688d96d20540 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/EventsAwaitingQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/EventsAwaitingQueries.java @@ -13,9 +13,9 @@ */ package io.trino.execution; -import io.prestosql.Session; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import java.time.Duration; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/EventsCollector.java b/testing/trino-tests/src/test/java/io/trino/execution/EventsCollector.java index 80b6d4aaa036..82887e58c47b 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/EventsCollector.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/EventsCollector.java @@ -14,9 +14,9 @@ package io.trino.execution; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.eventlistener.QueryCompletedEvent; -import io.prestosql.spi.eventlistener.QueryCreatedEvent; -import io.prestosql.spi.eventlistener.SplitCompletedEvent; +import io.trino.spi.eventlistener.QueryCompletedEvent; +import io.trino.spi.eventlistener.QueryCreatedEvent; +import io.trino.spi.eventlistener.SplitCompletedEvent; import java.util.List; import java.util.concurrent.CountDownLatch; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestBeginQuery.java b/testing/trino-tests/src/test/java/io/trino/execution/TestBeginQuery.java index 0badbb89ca4a..e791e81a7e89 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestBeginQuery.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestBeginQuery.java @@ -15,34 +15,34 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.EmptyPageSource; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.transaction.IsolationLevel; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.TestingHandleResolver; -import io.prestosql.testing.TestingMetadata; -import io.prestosql.testing.TestingPageSinkProvider; -import io.prestosql.testing.TestingSplitManager; -import io.prestosql.testing.TestingTransactionHandle; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.EmptyPageSource; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.transaction.IsolationLevel; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; +import io.trino.testing.TestingHandleResolver; +import io.trino.testing.TestingMetadata; +import io.trino.testing.TestingPageSinkProvider; +import io.trino.testing.TestingSplitManager; +import io.trino.testing.TestingTransactionHandle; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; @@ -52,7 +52,7 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Objects.requireNonNull; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestCompletedEventWarnings.java b/testing/trino-tests/src/test/java/io/trino/execution/TestCompletedEventWarnings.java index 5fee26f02392..7f4ccd6e6bed 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestCompletedEventWarnings.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestCompletedEventWarnings.java @@ -14,15 +14,15 @@ package io.trino.execution; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session.SessionBuilder; -import io.prestosql.execution.TestEventListenerPlugin.TestingEventListenerPlugin; -import io.prestosql.execution.warnings.WarningCollectorConfig; -import io.prestosql.spi.PrestoWarning; -import io.prestosql.spi.WarningCode; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.TestingWarningCollector; -import io.prestosql.testing.TestingWarningCollectorConfig; +import io.trino.Session.SessionBuilder; +import io.trino.execution.TestEventListenerPlugin.TestingEventListenerPlugin; +import io.trino.execution.warnings.WarningCollectorConfig; +import io.trino.spi.PrestoWarning; +import io.trino.spi.WarningCode; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; +import io.trino.testing.TestingWarningCollector; +import io.trino.testing.TestingWarningCollectorConfig; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; @@ -35,7 +35,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.fail; @Test(singleThreaded = true) diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestConnectorEventListener.java b/testing/trino-tests/src/test/java/io/trino/execution/TestConnectorEventListener.java index 73322bec1575..a7a9fe6f6ba9 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestConnectorEventListener.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestConnectorEventListener.java @@ -14,18 +14,18 @@ package io.trino.execution; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.connector.MockConnectorFactory; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.testing.DistributedQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.time.Duration; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.assertj.core.api.Assertions.assertThat; @Test(singleThreaded = true) 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 5e79408ab416..f58d204a4f0e 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 @@ -15,43 +15,43 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.plugin.memory.MemoryPlugin; -import io.prestosql.plugin.tpcds.TpcdsPlugin; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ColumnHandle; -import io.prestosql.spi.connector.Connector; -import io.prestosql.spi.connector.ConnectorContext; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorHandleResolver; -import io.prestosql.spi.connector.ConnectorMetadata; -import io.prestosql.spi.connector.ConnectorPageSinkProvider; -import io.prestosql.spi.connector.ConnectorPageSource; -import io.prestosql.spi.connector.ConnectorPageSourceProvider; -import io.prestosql.spi.connector.ConnectorPartitionHandle; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.connector.ConnectorSplit; -import io.prestosql.spi.connector.ConnectorSplitManager; -import io.prestosql.spi.connector.ConnectorSplitSource; -import io.prestosql.spi.connector.ConnectorTableHandle; -import io.prestosql.spi.connector.ConnectorTransactionHandle; -import io.prestosql.spi.connector.DynamicFilter; -import io.prestosql.spi.connector.EmptyPageSource; -import io.prestosql.spi.predicate.Domain; -import io.prestosql.spi.predicate.Range; -import io.prestosql.spi.predicate.TupleDomain; -import io.prestosql.spi.predicate.ValueSet; -import io.prestosql.spi.transaction.IsolationLevel; -import io.prestosql.split.EmptySplit; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.TestingHandleResolver; -import io.prestosql.testing.TestingMetadata; -import io.prestosql.testing.TestingPageSinkProvider; -import io.prestosql.testing.TestingTransactionHandle; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.plugin.memory.MemoryPlugin; +import io.trino.plugin.tpcds.TpcdsPlugin; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ColumnHandle; +import io.trino.spi.connector.Connector; +import io.trino.spi.connector.ConnectorContext; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorHandleResolver; +import io.trino.spi.connector.ConnectorMetadata; +import io.trino.spi.connector.ConnectorPageSinkProvider; +import io.trino.spi.connector.ConnectorPageSource; +import io.trino.spi.connector.ConnectorPageSourceProvider; +import io.trino.spi.connector.ConnectorPartitionHandle; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.connector.ConnectorSplit; +import io.trino.spi.connector.ConnectorSplitManager; +import io.trino.spi.connector.ConnectorSplitSource; +import io.trino.spi.connector.ConnectorTableHandle; +import io.trino.spi.connector.ConnectorTransactionHandle; +import io.trino.spi.connector.DynamicFilter; +import io.trino.spi.connector.EmptyPageSource; +import io.trino.spi.predicate.Domain; +import io.trino.spi.predicate.Range; +import io.trino.spi.predicate.TupleDomain; +import io.trino.spi.predicate.ValueSet; +import io.trino.spi.transaction.IsolationLevel; +import io.trino.split.EmptySplit; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; +import io.trino.testing.TestingHandleResolver; +import io.trino.testing.TestingMetadata; +import io.trino.testing.TestingPageSinkProvider; +import io.trino.testing.TestingTransactionHandle; import org.intellij.lang.annotations.Language; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -63,17 +63,17 @@ import java.util.stream.LongStream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.SystemSessionProperties.TASK_CONCURRENCY; -import static io.prestosql.spi.predicate.Domain.multipleValues; -import static io.prestosql.spi.predicate.Domain.singleValue; -import static io.prestosql.spi.predicate.Range.range; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.PARTITIONED; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; +import static io.trino.SystemSessionProperties.TASK_CONCURRENCY; +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.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 java.util.Objects.requireNonNull; import static java.util.concurrent.CompletableFuture.completedFuture; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestDeprecatedFunctionWarning.java b/testing/trino-tests/src/test/java/io/trino/execution/TestDeprecatedFunctionWarning.java index 1d16ab186507..ae3bafecdbcf 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestDeprecatedFunctionWarning.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestDeprecatedFunctionWarning.java @@ -15,25 +15,25 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.client.Warning; -import io.prestosql.operator.aggregation.state.LongAndDoubleState; -import io.prestosql.operator.window.RankFunction; -import io.prestosql.spi.WarningCode; -import io.prestosql.spi.block.BlockBuilder; -import io.prestosql.spi.connector.StandardWarningCode; -import io.prestosql.spi.function.AggregationFunction; -import io.prestosql.spi.function.CombineFunction; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.InputFunction; -import io.prestosql.spi.function.OutputFunction; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlNullable; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.function.TypeParameter; -import io.prestosql.spi.function.WindowFunctionSignature; -import io.prestosql.spi.type.StandardTypes; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.client.Warning; +import io.trino.operator.aggregation.state.LongAndDoubleState; +import io.trino.operator.window.RankFunction; +import io.trino.spi.WarningCode; +import io.trino.spi.block.BlockBuilder; +import io.trino.spi.connector.StandardWarningCode; +import io.trino.spi.function.AggregationFunction; +import io.trino.spi.function.CombineFunction; +import io.trino.spi.function.Description; +import io.trino.spi.function.InputFunction; +import io.trino.spi.function.OutputFunction; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlNullable; +import io.trino.spi.function.SqlType; +import io.trino.spi.function.TypeParameter; +import io.trino.spi.function.WindowFunctionSignature; +import io.trino.spi.type.StandardTypes; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -43,10 +43,10 @@ import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.execution.TestQueryRunnerUtil.createQueryRunner; -import static io.prestosql.metadata.FunctionExtractor.extractFunctions; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.execution.TestQueryRunnerUtil.createQueryRunner; +import static io.trino.metadata.FunctionExtractor.extractFunctions; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.fail; public class TestDeprecatedFunctionWarning diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerBasic.java b/testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerBasic.java index 93a2fb86b391..18996380d087 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerBasic.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerBasic.java @@ -15,27 +15,27 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.execution.EventsCollector.EventFilters; -import io.prestosql.execution.TestEventListenerPlugin.TestingEventListenerPlugin; -import io.prestosql.plugin.resourcegroups.ResourceGroupManagerPlugin; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.eventlistener.ColumnInfo; -import io.prestosql.spi.eventlistener.QueryCompletedEvent; -import io.prestosql.spi.eventlistener.QueryCreatedEvent; -import io.prestosql.spi.eventlistener.QueryFailureInfo; -import io.prestosql.spi.eventlistener.QueryStatistics; -import io.prestosql.spi.eventlistener.RoutineInfo; -import io.prestosql.spi.eventlistener.TableInfo; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.connector.MockConnectorFactory; +import io.trino.execution.EventsCollector.EventFilters; +import io.trino.execution.TestEventListenerPlugin.TestingEventListenerPlugin; +import io.trino.plugin.resourcegroups.ResourceGroupManagerPlugin; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.spi.Plugin; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.eventlistener.ColumnInfo; +import io.trino.spi.eventlistener.QueryCompletedEvent; +import io.trino.spi.eventlistener.QueryCreatedEvent; +import io.trino.spi.eventlistener.QueryFailureInfo; +import io.trino.spi.eventlistener.QueryStatistics; +import io.trino.spi.eventlistener.RoutineInfo; +import io.trino.spi.eventlistener.TableInfo; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; @@ -48,8 +48,8 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.collect.MoreCollectors.toOptional; import static com.google.common.util.concurrent.MoreExecutors.shutdownAndAwaitTermination; -import static io.prestosql.execution.TestQueues.createResourceGroupId; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.execution.TestQueues.createResourceGroupId; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.UUID.randomUUID; import static org.assertj.core.api.Assertions.assertThat; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerPlugin.java b/testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerPlugin.java index 6337f57b34b1..f9195a628b03 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerPlugin.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerPlugin.java @@ -14,9 +14,9 @@ package io.trino.execution; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.eventlistener.EventListenerFactory; +import io.trino.spi.Plugin; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.eventlistener.EventListenerFactory; import java.util.Map; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerWithSplits.java b/testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerWithSplits.java index d1f84d567f91..0689be7407ee 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerWithSplits.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerWithSplits.java @@ -16,23 +16,23 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.execution.TestEventListenerPlugin.TestingEventListenerPlugin; -import io.prestosql.plugin.resourcegroups.ResourceGroupManagerPlugin; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.eventlistener.QueryCompletedEvent; -import io.prestosql.spi.eventlistener.QueryCreatedEvent; -import io.prestosql.spi.eventlistener.QueryStatistics; -import io.prestosql.spi.eventlistener.SplitCompletedEvent; -import io.prestosql.spi.resourcegroups.QueryType; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.connector.MockConnectorFactory; +import io.trino.execution.TestEventListenerPlugin.TestingEventListenerPlugin; +import io.trino.plugin.resourcegroups.ResourceGroupManagerPlugin; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.spi.Plugin; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.eventlistener.QueryCompletedEvent; +import io.trino.spi.eventlistener.QueryCreatedEvent; +import io.trino.spi.eventlistener.QueryStatistics; +import io.trino.spi.eventlistener.SplitCompletedEvent; +import io.trino.spi.resourcegroups.QueryType; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; @@ -42,8 +42,8 @@ import java.util.Set; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.execution.TestQueues.createResourceGroupId; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.execution.TestQueues.createResourceGroupId; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.stream.Collectors.toSet; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestExecutionJmxMetrics.java b/testing/trino-tests/src/test/java/io/trino/execution/TestExecutionJmxMetrics.java index 821e49c72de5..798cf78871ae 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestExecutionJmxMetrics.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestExecutionJmxMetrics.java @@ -14,25 +14,25 @@ package io.trino.execution; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.execution.resourcegroups.InternalResourceGroupManager; -import io.prestosql.plugin.resourcegroups.ResourceGroupManagerPlugin; -import io.prestosql.server.PrefixObjectNameGeneratorModule; -import io.prestosql.spi.QueryId; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.Session; +import io.trino.execution.resourcegroups.InternalResourceGroupManager; +import io.trino.plugin.resourcegroups.ResourceGroupManagerPlugin; +import io.trino.server.PrefixObjectNameGeneratorModule; +import io.trino.spi.QueryId; +import io.trino.testing.DistributedQueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.testng.annotations.Test; import javax.management.MBeanServer; import javax.management.ObjectName; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.execution.TestQueryRunnerUtil.cancelQuery; -import static io.prestosql.execution.TestQueryRunnerUtil.createQuery; -import static io.prestosql.execution.TestQueryRunnerUtil.waitForQueryState; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.execution.TestQueryRunnerUtil.cancelQuery; +import static io.trino.execution.TestQueryRunnerUtil.createQuery; +import static io.trino.execution.TestQueryRunnerUtil.waitForQueryState; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertEquals; public class TestExecutionJmxMetrics diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestFinalQueryInfo.java b/testing/trino-tests/src/test/java/io/trino/execution/TestFinalQueryInfo.java index ddcb587c388d..b604aef49580 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestFinalQueryInfo.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestFinalQueryInfo.java @@ -17,12 +17,12 @@ import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.SettableFuture; import io.airlift.units.Duration; -import io.prestosql.Session; -import io.prestosql.client.ClientSession; -import io.prestosql.client.StatementClient; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.spi.QueryId; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.client.ClientSession; +import io.trino.client.StatementClient; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.spi.QueryId; +import io.trino.testing.DistributedQueryRunner; import okhttp3.OkHttpClient; import org.testng.annotations.Test; @@ -31,8 +31,8 @@ import java.util.Optional; import static io.airlift.concurrent.MoreFutures.tryGetFutureValue; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.client.StatementClientFactory.newStatementClient; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.client.StatementClientFactory.newStatementClient; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.SECONDS; import static org.testng.Assert.assertTrue; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestFlushingStageState.java b/testing/trino-tests/src/test/java/io/trino/execution/TestFlushingStageState.java index c1c4e744fab6..034aeb57ffeb 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestFlushingStageState.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestFlushingStageState.java @@ -15,20 +15,20 @@ import com.google.common.collect.ImmutableMap; import io.airlift.units.Duration; -import io.prestosql.spi.QueryId; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.spi.QueryId; +import io.trino.testing.DistributedQueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.execution.StageState.CANCELED; -import static io.prestosql.execution.StageState.FLUSHING; -import static io.prestosql.execution.TestQueryRunnerUtil.createQuery; -import static io.prestosql.execution.TestQueryRunnerUtil.waitForQueryState; -import static io.prestosql.testing.assertions.Assert.assertEventually; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.execution.StageState.CANCELED; +import static io.trino.execution.StageState.FLUSHING; +import static io.trino.execution.TestQueryRunnerUtil.createQuery; +import static io.trino.execution.TestQueryRunnerUtil.waitForQueryState; +import static io.trino.testing.assertions.Assert.assertEventually; import static java.util.concurrent.TimeUnit.SECONDS; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestGrantOnSchema.java b/testing/trino-tests/src/test/java/io/trino/execution/TestGrantOnSchema.java index e5a1f223c1cb..9002f189c88c 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestGrantOnSchema.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestGrantOnSchema.java @@ -14,18 +14,18 @@ package io.trino.execution; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.connector.Grants; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.connector.MockConnectorPlugin; -import io.prestosql.connector.MutableGrants; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.testing.DataProviders; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.connector.Grants; +import io.trino.connector.MockConnectorFactory; +import io.trino.connector.MockConnectorPlugin; +import io.trino.connector.MutableGrants; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.sql.query.QueryAssertions; +import io.trino.testing.DataProviders; +import io.trino.testing.DistributedQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; @@ -33,9 +33,9 @@ import java.util.EnumSet; -import static io.prestosql.common.Randoms.randomUsername; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.common.Randoms.randomUsername; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestGrantOnTable.java b/testing/trino-tests/src/test/java/io/trino/execution/TestGrantOnTable.java index 79d11a6cd0c8..4a3a5c48133a 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestGrantOnTable.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestGrantOnTable.java @@ -14,19 +14,19 @@ package io.trino.execution; import com.google.common.collect.ImmutableList; -import io.prestosql.Session; -import io.prestosql.connector.Grants; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.connector.MockConnectorPlugin; -import io.prestosql.connector.MockConnectorTableHandle; -import io.prestosql.connector.MutableGrants; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.testing.DataProviders; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.connector.Grants; +import io.trino.connector.MockConnectorFactory; +import io.trino.connector.MockConnectorPlugin; +import io.trino.connector.MockConnectorTableHandle; +import io.trino.connector.MutableGrants; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.sql.query.QueryAssertions; +import io.trino.testing.DataProviders; +import io.trino.testing.DistributedQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; @@ -34,9 +34,9 @@ import java.util.EnumSet; -import static io.prestosql.common.Randoms.randomUsername; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.common.Randoms.randomUsername; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestQueryRunnerUtil.java b/testing/trino-tests/src/test/java/io/trino/execution/TestQueryRunnerUtil.java index 9775badd72b1..ef9452e48019 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestQueryRunnerUtil.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestQueryRunnerUtil.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.protocol.Slug; -import io.prestosql.spi.QueryId; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.TestingSessionContext; +import io.trino.Session; +import io.trino.dispatcher.DispatchManager; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.server.BasicQueryInfo; +import io.trino.server.protocol.Slug; +import io.trino.spi.QueryId; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.TestingSessionContext; import java.util.Map; import java.util.Set; import static io.airlift.concurrent.MoreFutures.getFutureValue; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.concurrent.TimeUnit.MILLISECONDS; public final class TestQueryRunnerUtil diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestQueues.java b/testing/trino-tests/src/test/java/io/trino/execution/TestQueues.java index 7108da35b955..d7bbdb31f11d 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestQueues.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestQueues.java @@ -17,14 +17,14 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.plugin.resourcegroups.ResourceGroupManagerPlugin; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.spi.session.ResourceEstimates; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.Session; +import io.trino.dispatcher.DispatchManager; +import io.trino.plugin.resourcegroups.ResourceGroupManagerPlugin; +import io.trino.spi.QueryId; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.spi.session.ResourceEstimates; +import io.trino.testing.DistributedQueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.testng.annotations.Test; import java.util.Optional; @@ -32,17 +32,17 @@ import static io.airlift.units.DataSize.Unit.MEGABYTE; import static io.airlift.units.DataSize.Unit.TERABYTE; -import static io.prestosql.SystemSessionProperties.HASH_PARTITION_COUNT; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.FINISHED; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.execution.TestQueryRunnerUtil.cancelQuery; -import static io.prestosql.execution.TestQueryRunnerUtil.createQuery; -import static io.prestosql.execution.TestQueryRunnerUtil.createQueryRunner; -import static io.prestosql.execution.TestQueryRunnerUtil.waitForQueryState; -import static io.prestosql.spi.StandardErrorCode.QUERY_REJECTED; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.HASH_PARTITION_COUNT; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.FINISHED; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.execution.TestQueryRunnerUtil.cancelQuery; +import static io.trino.execution.TestQueryRunnerUtil.createQuery; +import static io.trino.execution.TestQueryRunnerUtil.createQueryRunner; +import static io.trino.execution.TestQueryRunnerUtil.waitForQueryState; +import static io.trino.spi.StandardErrorCode.QUERY_REJECTED; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.Arrays.asList; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestRevokeOnSchema.java b/testing/trino-tests/src/test/java/io/trino/execution/TestRevokeOnSchema.java index 0c9f608a5c2b..f249033717d1 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestRevokeOnSchema.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestRevokeOnSchema.java @@ -15,16 +15,16 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.connector.Grants; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.connector.MockConnectorPlugin; -import io.prestosql.connector.MutableGrants; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.connector.Grants; +import io.trino.connector.MockConnectorFactory; +import io.trino.connector.MockConnectorPlugin; +import io.trino.connector.MutableGrants; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.sql.query.QueryAssertions; +import io.trino.testing.DistributedQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; @@ -32,9 +32,9 @@ import java.util.EnumSet; -import static io.prestosql.common.Randoms.randomUsername; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.common.Randoms.randomUsername; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestRevokeOnTable.java b/testing/trino-tests/src/test/java/io/trino/execution/TestRevokeOnTable.java index 860d0a228415..361c3905851d 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestRevokeOnTable.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestRevokeOnTable.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.connector.Grants; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.connector.MockConnectorPlugin; -import io.prestosql.connector.MockConnectorTableHandle; -import io.prestosql.connector.MutableGrants; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.spi.security.Identity; -import io.prestosql.spi.security.PrestoPrincipal; -import io.prestosql.spi.security.Privilege; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.connector.Grants; +import io.trino.connector.MockConnectorFactory; +import io.trino.connector.MockConnectorPlugin; +import io.trino.connector.MockConnectorTableHandle; +import io.trino.connector.MutableGrants; +import io.trino.spi.connector.SchemaTableName; +import io.trino.spi.security.Identity; +import io.trino.spi.security.PrestoPrincipal; +import io.trino.spi.security.Privilege; +import io.trino.sql.query.QueryAssertions; +import io.trino.testing.DistributedQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; @@ -34,9 +34,9 @@ import java.util.EnumSet; -import static io.prestosql.common.Randoms.randomUsername; -import static io.prestosql.spi.security.PrincipalType.USER; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.common.Randoms.randomUsername; +import static io.trino.spi.security.PrincipalType.USER; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestTry.java b/testing/trino-tests/src/test/java/io/trino/execution/TestTry.java index 2fbaf23142d5..ffab58778e11 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestTry.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestTry.java @@ -13,9 +13,9 @@ */ package io.trino.execution; -import io.prestosql.plugin.memory.MemoryQueryRunner; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; +import io.trino.plugin.memory.MemoryQueryRunner; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestWarnings.java b/testing/trino-tests/src/test/java/io/trino/execution/TestWarnings.java index c1dec5499e3a..47269a85cecc 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestWarnings.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestWarnings.java @@ -15,10 +15,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.client.Warning; -import io.prestosql.spi.WarningCode; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.client.Warning; +import io.trino.spi.WarningCode; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -28,9 +28,9 @@ import java.util.Set; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.execution.TestQueryRunnerUtil.createQueryRunner; -import static io.prestosql.spi.connector.StandardWarningCode.TOO_MANY_STAGES; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.execution.TestQueryRunnerUtil.createQueryRunner; +import static io.trino.spi.connector.StandardWarningCode.TOO_MANY_STAGES; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.fail; public class TestWarnings diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestingEventListener.java b/testing/trino-tests/src/test/java/io/trino/execution/TestingEventListener.java index b3a3ba4ff946..3a3514cedbc0 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestingEventListener.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestingEventListener.java @@ -13,10 +13,10 @@ */ package io.trino.execution; -import io.prestosql.spi.eventlistener.EventListener; -import io.prestosql.spi.eventlistener.QueryCompletedEvent; -import io.prestosql.spi.eventlistener.QueryCreatedEvent; -import io.prestosql.spi.eventlistener.SplitCompletedEvent; +import io.trino.spi.eventlistener.EventListener; +import io.trino.spi.eventlistener.QueryCompletedEvent; +import io.trino.spi.eventlistener.QueryCreatedEvent; +import io.trino.spi.eventlistener.SplitCompletedEvent; class TestingEventListener implements EventListener diff --git a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/TestResourceGroupIntegration.java b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/TestResourceGroupIntegration.java index 6a6d53cce964..afe848876ad7 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/TestResourceGroupIntegration.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/TestResourceGroupIntegration.java @@ -14,18 +14,18 @@ package io.trino.execution.resourcegroups; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.resourcegroups.ResourceGroupManagerPlugin; -import io.prestosql.server.ResourceGroupInfo; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.plugin.resourcegroups.ResourceGroupManagerPlugin; +import io.trino.server.ResourceGroupInfo; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.testing.DistributedQueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.testng.annotations.Test; import java.util.List; import static io.airlift.testing.Assertions.assertLessThan; import static io.airlift.units.Duration.nanosSince; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.concurrent.TimeUnit.SECONDS; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2ResourceGroupConfigurationManagerFactory.java b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2ResourceGroupConfigurationManagerFactory.java index 59fa11c466e5..108f826b71f6 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2ResourceGroupConfigurationManagerFactory.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2ResourceGroupConfigurationManagerFactory.java @@ -17,12 +17,12 @@ import io.airlift.bootstrap.Bootstrap; import io.airlift.json.JsonModule; import io.airlift.node.NodeModule; -import io.prestosql.plugin.resourcegroups.db.DbResourceGroupConfigurationManager; -import io.prestosql.spi.classloader.ThreadContextClassLoader; -import io.prestosql.spi.memory.ClusterMemoryPoolManager; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManager; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerContext; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; +import io.trino.plugin.resourcegroups.db.DbResourceGroupConfigurationManager; +import io.trino.spi.classloader.ThreadContextClassLoader; +import io.trino.spi.memory.ClusterMemoryPoolManager; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManager; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerContext; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; import java.util.Map; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2ResourceGroupManagerPlugin.java b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2ResourceGroupManagerPlugin.java index 43bd192da9be..6504154b0638 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2ResourceGroupManagerPlugin.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2ResourceGroupManagerPlugin.java @@ -14,8 +14,8 @@ package io.trino.execution.resourcegroups.db; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; +import io.trino.spi.Plugin; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerFactory; public class H2ResourceGroupManagerPlugin implements Plugin diff --git a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2ResourceGroupsModule.java b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2ResourceGroupsModule.java index 37000455f083..188be9bfa59a 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2ResourceGroupsModule.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2ResourceGroupsModule.java @@ -17,13 +17,13 @@ import com.google.inject.Module; import com.google.inject.Provides; import com.google.inject.Scopes; -import io.prestosql.plugin.resourcegroups.db.DbResourceGroupConfig; -import io.prestosql.plugin.resourcegroups.db.DbResourceGroupConfigurationManager; -import io.prestosql.plugin.resourcegroups.db.ForEnvironment; -import io.prestosql.plugin.resourcegroups.db.H2DaoProvider; -import io.prestosql.plugin.resourcegroups.db.ResourceGroupsDao; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManager; -import io.prestosql.spi.resourcegroups.ResourceGroupConfigurationManagerContext; +import io.trino.plugin.resourcegroups.db.DbResourceGroupConfig; +import io.trino.plugin.resourcegroups.db.DbResourceGroupConfigurationManager; +import io.trino.plugin.resourcegroups.db.ForEnvironment; +import io.trino.plugin.resourcegroups.db.H2DaoProvider; +import io.trino.plugin.resourcegroups.db.ResourceGroupsDao; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManager; +import io.trino.spi.resourcegroups.ResourceGroupConfigurationManagerContext; import javax.inject.Singleton; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2TestUtil.java b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2TestUtil.java index 61b58f37e0a5..fc068951a1d5 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2TestUtil.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/H2TestUtil.java @@ -17,29 +17,29 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.json.JsonCodec; -import io.prestosql.Session; -import io.prestosql.execution.QueryManager; -import io.prestosql.execution.QueryState; -import io.prestosql.plugin.resourcegroups.ResourceGroupSelector; -import io.prestosql.plugin.resourcegroups.db.DbResourceGroupConfig; -import io.prestosql.plugin.resourcegroups.db.DbResourceGroupConfigurationManager; -import io.prestosql.plugin.resourcegroups.db.H2DaoProvider; -import io.prestosql.plugin.resourcegroups.db.H2ResourceGroupsDao; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.PrestoException; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.execution.QueryManager; +import io.trino.execution.QueryState; +import io.trino.plugin.resourcegroups.ResourceGroupSelector; +import io.trino.plugin.resourcegroups.db.DbResourceGroupConfig; +import io.trino.plugin.resourcegroups.db.DbResourceGroupConfigurationManager; +import io.trino.plugin.resourcegroups.db.H2DaoProvider; +import io.trino.plugin.resourcegroups.db.H2ResourceGroupsDao; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.spi.Plugin; +import io.trino.spi.PrestoException; +import io.trino.testing.DistributedQueryRunner; import java.util.List; import java.util.Random; import java.util.Set; import static io.airlift.json.JsonCodec.listJsonCodec; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.execution.QueryState.TERMINAL_QUERY_STATES; -import static io.prestosql.spi.StandardErrorCode.CONFIGURATION_INVALID; -import static io.prestosql.spi.resourcegroups.QueryType.EXPLAIN; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.execution.QueryState.TERMINAL_QUERY_STATES; +import static io.trino.spi.StandardErrorCode.CONFIGURATION_INVALID; +import static io.trino.spi.resourcegroups.QueryType.EXPLAIN; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.concurrent.TimeUnit.MILLISECONDS; final class H2TestUtil diff --git a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/TestEnvironments.java b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/TestEnvironments.java index 9b83cb395192..8080528025fd 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/TestEnvironments.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/TestEnvironments.java @@ -13,21 +13,21 @@ */ package io.trino.execution.resourcegroups.db; -import io.prestosql.plugin.resourcegroups.db.H2ResourceGroupsDao; -import io.prestosql.spi.QueryId; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.plugin.resourcegroups.db.H2ResourceGroupsDao; +import io.trino.spi.QueryId; +import io.trino.testing.DistributedQueryRunner; import org.testng.annotations.Test; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.execution.TestQueryRunnerUtil.createQuery; -import static io.prestosql.execution.TestQueryRunnerUtil.waitForQueryState; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.TEST_ENVIRONMENT; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.TEST_ENVIRONMENT_2; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.adhocSession; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.createQueryRunner; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.getDao; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.getDbConfigUrl; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.execution.TestQueryRunnerUtil.createQuery; +import static io.trino.execution.TestQueryRunnerUtil.waitForQueryState; +import static io.trino.execution.resourcegroups.db.H2TestUtil.TEST_ENVIRONMENT; +import static io.trino.execution.resourcegroups.db.H2TestUtil.TEST_ENVIRONMENT_2; +import static io.trino.execution.resourcegroups.db.H2TestUtil.adhocSession; +import static io.trino.execution.resourcegroups.db.H2TestUtil.createQueryRunner; +import static io.trino.execution.resourcegroups.db.H2TestUtil.getDao; +import static io.trino.execution.resourcegroups.db.H2TestUtil.getDbConfigUrl; @Test(singleThreaded = true) public class TestEnvironments diff --git a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/TestQueuesDb.java b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/TestQueuesDb.java index e92f351a31c8..01716ba9b489 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/TestQueuesDb.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/TestQueuesDb.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.Session; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.execution.QueryManager; -import io.prestosql.execution.resourcegroups.InternalResourceGroupManager; -import io.prestosql.plugin.resourcegroups.db.DbResourceGroupConfigurationManager; -import io.prestosql.plugin.resourcegroups.db.H2ResourceGroupsDao; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.ResourceGroupInfo; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.resourcegroups.ResourceGroupId; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; +import io.trino.Session; +import io.trino.dispatcher.DispatchManager; +import io.trino.execution.QueryManager; +import io.trino.execution.resourcegroups.InternalResourceGroupManager; +import io.trino.plugin.resourcegroups.db.DbResourceGroupConfigurationManager; +import io.trino.plugin.resourcegroups.db.H2ResourceGroupsDao; +import io.trino.server.BasicQueryInfo; +import io.trino.server.ResourceGroupInfo; +import io.trino.spi.QueryId; +import io.trino.spi.resourcegroups.ResourceGroupId; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -36,30 +36,30 @@ import java.util.concurrent.TimeUnit; import static io.airlift.testing.Assertions.assertContains; -import static io.prestosql.SystemSessionProperties.QUERY_MAX_EXECUTION_TIME; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.FINISHED; -import static io.prestosql.execution.QueryState.QUEUED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.execution.TestQueryRunnerUtil.cancelQuery; -import static io.prestosql.execution.TestQueryRunnerUtil.createQuery; -import static io.prestosql.execution.TestQueryRunnerUtil.waitForQueryState; -import static io.prestosql.execution.TestQueues.createResourceGroupId; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.TEST_ENVIRONMENT; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.adhocSession; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.createQueryRunner; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.dashboardSession; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.getDao; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.getDbConfigUrl; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.getSelectors; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.rejectingSession; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.waitForCompleteQueryCount; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.waitForRunningQueryCount; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_TIME_LIMIT; -import static io.prestosql.spi.StandardErrorCode.INVALID_RESOURCE_GROUP; -import static io.prestosql.spi.StandardErrorCode.QUERY_QUEUE_FULL; -import static io.prestosql.spi.StandardErrorCode.QUERY_REJECTED; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.QUERY_MAX_EXECUTION_TIME; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.FINISHED; +import static io.trino.execution.QueryState.QUEUED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.execution.TestQueryRunnerUtil.cancelQuery; +import static io.trino.execution.TestQueryRunnerUtil.createQuery; +import static io.trino.execution.TestQueryRunnerUtil.waitForQueryState; +import static io.trino.execution.TestQueues.createResourceGroupId; +import static io.trino.execution.resourcegroups.db.H2TestUtil.TEST_ENVIRONMENT; +import static io.trino.execution.resourcegroups.db.H2TestUtil.adhocSession; +import static io.trino.execution.resourcegroups.db.H2TestUtil.createQueryRunner; +import static io.trino.execution.resourcegroups.db.H2TestUtil.dashboardSession; +import static io.trino.execution.resourcegroups.db.H2TestUtil.getDao; +import static io.trino.execution.resourcegroups.db.H2TestUtil.getDbConfigUrl; +import static io.trino.execution.resourcegroups.db.H2TestUtil.getSelectors; +import static io.trino.execution.resourcegroups.db.H2TestUtil.rejectingSession; +import static io.trino.execution.resourcegroups.db.H2TestUtil.waitForCompleteQueryCount; +import static io.trino.execution.resourcegroups.db.H2TestUtil.waitForRunningQueryCount; +import static io.trino.spi.StandardErrorCode.EXCEEDED_TIME_LIMIT; +import static io.trino.spi.StandardErrorCode.INVALID_RESOURCE_GROUP; +import static io.trino.spi.StandardErrorCode.QUERY_QUEUE_FULL; +import static io.trino.spi.StandardErrorCode.QUERY_REJECTED; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/TestResourceGroupDbIntegration.java b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/TestResourceGroupDbIntegration.java index d95efb71fbd5..80b757d0543b 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/TestResourceGroupDbIntegration.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/resourcegroups/db/TestResourceGroupDbIntegration.java @@ -13,11 +13,11 @@ */ package io.trino.execution.resourcegroups.db; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.testing.DistributedQueryRunner; import org.testng.annotations.Test; -import static io.prestosql.execution.resourcegroups.TestResourceGroupIntegration.waitForGlobalResourceGroup; -import static io.prestosql.execution.resourcegroups.db.H2TestUtil.getSimpleQueryRunner; +import static io.trino.execution.resourcegroups.TestResourceGroupIntegration.waitForGlobalResourceGroup; +import static io.trino.execution.resourcegroups.db.H2TestUtil.getSimpleQueryRunner; public class TestResourceGroupDbIntegration { diff --git a/testing/trino-tests/src/test/java/io/trino/memory/TestClusterMemoryLeakDetector.java b/testing/trino-tests/src/test/java/io/trino/memory/TestClusterMemoryLeakDetector.java index 11e6cc085b96..6bffe0475d89 100644 --- a/testing/trino-tests/src/test/java/io/trino/memory/TestClusterMemoryLeakDetector.java +++ b/testing/trino-tests/src/test/java/io/trino/memory/TestClusterMemoryLeakDetector.java @@ -18,11 +18,11 @@ import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.execution.QueryState; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.BasicQueryStats; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.resourcegroups.ResourceGroupId; +import io.trino.execution.QueryState; +import io.trino.server.BasicQueryInfo; +import io.trino.server.BasicQueryStats; +import io.trino.spi.QueryId; +import io.trino.spi.resourcegroups.ResourceGroupId; import org.joda.time.DateTime; import org.testng.annotations.Test; @@ -30,11 +30,11 @@ import java.util.Optional; import java.util.OptionalDouble; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.QueryState.FINISHED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; -import static io.prestosql.operator.BlockedReason.WAITING_FOR_MEMORY; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.QueryState.FINISHED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.operator.BlockedReason.WAITING_FOR_MEMORY; import static org.testng.Assert.assertEquals; @Test diff --git a/testing/trino-tests/src/test/java/io/trino/memory/TestMemoryManager.java b/testing/trino-tests/src/test/java/io/trino/memory/TestMemoryManager.java index abf1e53aa19d..e4847f991ec9 100644 --- a/testing/trino-tests/src/test/java/io/trino/memory/TestMemoryManager.java +++ b/testing/trino-tests/src/test/java/io/trino/memory/TestMemoryManager.java @@ -14,14 +14,14 @@ package io.trino.memory; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.BasicQueryStats; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.spi.QueryId; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.Session; +import io.trino.server.BasicQueryInfo; +import io.trino.server.BasicQueryStats; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.spi.QueryId; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -35,13 +35,13 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; -import static io.prestosql.SystemSessionProperties.RESOURCE_OVERCOMMIT; -import static io.prestosql.execution.QueryState.FINISHED; -import static io.prestosql.memory.LocalMemoryManager.GENERAL_POOL; -import static io.prestosql.memory.LocalMemoryManager.RESERVED_POOL; -import static io.prestosql.operator.BlockedReason.WAITING_FOR_MEMORY; -import static io.prestosql.spi.StandardErrorCode.CLUSTER_OUT_OF_MEMORY; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.RESOURCE_OVERCOMMIT; +import static io.trino.execution.QueryState.FINISHED; +import static io.trino.memory.LocalMemoryManager.GENERAL_POOL; +import static io.trino.memory.LocalMemoryManager.RESERVED_POOL; +import static io.trino.operator.BlockedReason.WAITING_FOR_MEMORY; +import static io.trino.spi.StandardErrorCode.CLUSTER_OUT_OF_MEMORY; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-tests/src/test/java/io/trino/memory/TestMemorySessionProperties.java b/testing/trino-tests/src/test/java/io/trino/memory/TestMemorySessionProperties.java index 5af3083ed689..a138385449ea 100644 --- a/testing/trino-tests/src/test/java/io/trino/memory/TestMemorySessionProperties.java +++ b/testing/trino-tests/src/test/java/io/trino/memory/TestMemorySessionProperties.java @@ -13,14 +13,14 @@ */ package io.trino.memory; -import io.prestosql.Session; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.Session; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.QUERY_MAX_MEMORY_PER_NODE; -import static io.prestosql.SystemSessionProperties.QUERY_MAX_TOTAL_MEMORY_PER_NODE; +import static io.trino.SystemSessionProperties.QUERY_MAX_MEMORY_PER_NODE; +import static io.trino.SystemSessionProperties.QUERY_MAX_TOTAL_MEMORY_PER_NODE; import static org.testng.Assert.fail; public class TestMemorySessionProperties diff --git a/testing/trino-tests/src/test/java/io/trino/security/TestAccessControl.java b/testing/trino-tests/src/test/java/io/trino/security/TestAccessControl.java index 4e604e74109f..f995e76f328a 100644 --- a/testing/trino-tests/src/test/java/io/trino/security/TestAccessControl.java +++ b/testing/trino-tests/src/test/java/io/trino/security/TestAccessControl.java @@ -17,38 +17,38 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.testing.Assertions; -import io.prestosql.Session; -import io.prestosql.plugin.blackhole.BlackHolePlugin; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.spi.security.Identity; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.TestingSession; +import io.trino.Session; +import io.trino.plugin.blackhole.BlackHolePlugin; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.spi.security.Identity; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; +import io.trino.testing.TestingSession; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.QUERY_MAX_MEMORY; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.ADD_COLUMN; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_VIEW; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_VIEW_WITH_SELECT_COLUMNS; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.DELETE_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_COLUMN; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.EXECUTE_FUNCTION; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.EXECUTE_QUERY; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.GRANT_EXECUTE_FUNCTION; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.INSERT_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_COLUMN; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SELECT_COLUMN; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SET_SESSION; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SET_USER; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_COLUMNS; -import static io.prestosql.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_CREATE_TABLE; -import static io.prestosql.testing.TestingAccessControlManager.privilege; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.sql.TestTable.randomTableSuffix; +import static io.trino.SystemSessionProperties.QUERY_MAX_MEMORY; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.ADD_COLUMN; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_VIEW; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_VIEW_WITH_SELECT_COLUMNS; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.DELETE_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_COLUMN; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.EXECUTE_FUNCTION; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.EXECUTE_QUERY; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.GRANT_EXECUTE_FUNCTION; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.INSERT_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_COLUMN; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_TABLE; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SELECT_COLUMN; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SET_SESSION; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SET_USER; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_COLUMNS; +import static io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_CREATE_TABLE; +import static io.trino.testing.TestingAccessControlManager.privilege; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.sql.TestTable.randomTableSuffix; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/AbstractQueryAssertionsTest.java b/testing/trino-tests/src/test/java/io/trino/tests/AbstractQueryAssertionsTest.java index 6b2f757afc6f..9343be8e6e42 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/AbstractQueryAssertionsTest.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/AbstractQueryAssertionsTest.java @@ -14,15 +14,15 @@ package io.trino.tests; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.jdbc.JdbcPlugin; -import io.prestosql.plugin.jdbc.TestingH2JdbcModule; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.sql.planner.plan.AggregationNode; -import io.prestosql.sql.planner.plan.FilterNode; -import io.prestosql.sql.query.QueryAssertions.QueryAssert; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.plugin.jdbc.JdbcPlugin; +import io.trino.plugin.jdbc.TestingH2JdbcModule; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.sql.planner.plan.AggregationNode; +import io.trino.sql.planner.plan.FilterNode; +import io.trino.sql.query.QueryAssertions.QueryAssert; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; import java.sql.Connection; @@ -32,10 +32,10 @@ import java.util.List; import java.util.Map; -import static io.prestosql.plugin.jdbc.JdbcMetadataSessionProperties.AGGREGATION_PUSHDOWN_ENABLED; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.QueryAssertions.copyTpchTables; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.jdbc.JdbcMetadataSessionProperties.AGGREGATION_PUSHDOWN_ENABLED; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.QueryAssertions.copyTpchTables; +import static io.trino.testing.TestingSession.testSessionBuilder; import static io.trino.tpch.TpchTable.NATION; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; 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 36ae38b37de5..a849c8df6e74 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 @@ -23,15 +23,15 @@ import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; import com.google.common.collect.Ordering; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.spi.type.TimeZoneKey; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.MaterializedRow; -import io.prestosql.testing.assertions.Assert; -import io.prestosql.type.SqlIntervalDayTime; -import io.prestosql.type.SqlIntervalYearMonth; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.spi.type.TimeZoneKey; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.MaterializedRow; +import io.trino.testing.assertions.Assert; +import io.trino.type.SqlIntervalDayTime; +import io.trino.type.SqlIntervalYearMonth; import org.intellij.lang.annotations.Language; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -54,23 +54,23 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.SystemSessionProperties.IGNORE_DOWNSTREAM_PREFERENCES; -import static io.prestosql.spi.type.BigintType.BIGINT; -import static io.prestosql.spi.type.BooleanType.BOOLEAN; -import static io.prestosql.spi.type.DecimalType.createDecimalType; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.sql.tree.ExplainType.Type.DISTRIBUTED; -import static io.prestosql.sql.tree.ExplainType.Type.IO; -import static io.prestosql.sql.tree.ExplainType.Type.LOGICAL; -import static io.prestosql.testing.DataProviders.toDataProvider; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.QueryAssertions.assertContains; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; -import static io.prestosql.testing.TestingSession.TESTING_CATALOG; -import static io.prestosql.tests.QueryTemplate.parameter; -import static io.prestosql.tests.QueryTemplate.queryTemplate; -import static io.prestosql.type.UnknownType.UNKNOWN; +import static io.trino.SystemSessionProperties.IGNORE_DOWNSTREAM_PREFERENCES; +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.tree.ExplainType.Type.DISTRIBUTED; +import static io.trino.sql.tree.ExplainType.Type.IO; +import static io.trino.sql.tree.ExplainType.Type.LOGICAL; +import static io.trino.testing.DataProviders.toDataProvider; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.QueryAssertions.assertContains; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.testing.TestingSession.TESTING_CATALOG; +import static io.trino.tests.QueryTemplate.parameter; +import static io.trino.tests.QueryTemplate.queryTemplate; +import static io.trino.type.UnknownType.UNKNOWN; import static java.lang.String.format; import static java.util.Collections.nCopies; import static java.util.stream.Collectors.joining; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestAggregations.java b/testing/trino-tests/src/test/java/io/trino/tests/TestAggregations.java index e3828bf74133..78ac26686179 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestAggregations.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestAggregations.java @@ -13,9 +13,9 @@ */ package io.trino.tests; -import io.prestosql.testing.AbstractTestAggregations; -import io.prestosql.testing.QueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.testing.AbstractTestAggregations; +import io.trino.testing.QueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; public class TestAggregations extends AbstractTestAggregations 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 d7d46087f843..d1802af6754f 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 @@ -14,16 +14,16 @@ package io.trino.tests; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.DICTIONARY_AGGREGATION; -import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +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 extends AbstractTestQueryFramework 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 724b5af02500..d9de38c1f1e1 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 @@ -13,17 +13,17 @@ */ package io.trino.tests; -import io.prestosql.Session; -import io.prestosql.plugin.memory.MemoryQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.plugin.memory.MemoryQueryRunner; +import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; import java.time.ZonedDateTime; -import static io.prestosql.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.prestosql.testing.sql.TestTable.randomTableSuffix; +import static io.trino.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; +import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; +import static io.trino.testing.sql.TestTable.randomTableSuffix; import static org.assertj.core.api.Assertions.assertThat; public class TestDistributedEngineOnlyQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedQueriesIndexed.java b/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedQueriesIndexed.java index 884b7e912452..4ab66e660024 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedQueriesIndexed.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedQueriesIndexed.java @@ -13,13 +13,13 @@ */ package io.trino.tests; -import io.prestosql.Session; -import io.prestosql.testing.AbstractTestIndexedQueries; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.tpch.IndexedTpchPlugin; +import io.trino.Session; +import io.trino.testing.AbstractTestIndexedQueries; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.tpch.IndexedTpchPlugin; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestDistributedQueriesIndexed extends AbstractTestIndexedQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedQueriesNoHashGeneration.java b/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedQueriesNoHashGeneration.java index 43b95efad281..e05076d031f1 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedQueriesNoHashGeneration.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedQueriesNoHashGeneration.java @@ -13,9 +13,9 @@ */ package io.trino.tests; -import io.prestosql.testing.AbstractTestQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.testing.AbstractTestQueries; +import io.trino.testing.QueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; public class TestDistributedQueriesNoHashGeneration extends AbstractTestQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedQueryAssertions.java b/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedQueryAssertions.java index 4a84fac2761f..6175d6d03bd6 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedQueryAssertions.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedQueryAssertions.java @@ -13,8 +13,8 @@ */ package io.trino.tests; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; import static io.airlift.testing.Closeables.closeAllSuppress; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedSpilledQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedSpilledQueries.java index 1a500e37484f..df7b9ea5c2db 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedSpilledQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedSpilledQueries.java @@ -14,16 +14,16 @@ package io.trino.tests; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.SystemSessionProperties; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.AbstractTestQueries; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.SystemSessionProperties; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.AbstractTestQueries; +import io.trino.testing.DistributedQueryRunner; import java.nio.file.Paths; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestDistributedSpilledQueries extends AbstractTestQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestGracefulShutdown.java b/testing/trino-tests/src/test/java/io/trino/tests/TestGracefulShutdown.java index 758876eb36fe..9ca0a2bcb3c8 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestGracefulShutdown.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestGracefulShutdown.java @@ -18,12 +18,12 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; -import io.prestosql.Session; -import io.prestosql.execution.TaskManager; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.server.testing.TestingPrestoServer.TestShutdownAction; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.execution.TaskManager; +import io.trino.server.BasicQueryInfo; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.server.testing.TestingPrestoServer.TestShutdownAction; +import io.trino.testing.DistributedQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -32,9 +32,9 @@ import java.util.List; import java.util.Map; -import static io.prestosql.execution.QueryState.FINISHED; -import static io.prestosql.memory.TestMemoryManager.createQueryRunner; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.execution.QueryState.FINISHED; +import static io.trino.memory.TestMemoryManager.createQueryRunner; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestInformationSchemaConnector.java b/testing/trino-tests/src/test/java/io/trino/tests/TestInformationSchemaConnector.java index 343204d7ebae..9ede07fcd826 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestInformationSchemaConnector.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestInformationSchemaConnector.java @@ -14,15 +14,15 @@ package io.trino.tests; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.CountingMockConnector; -import io.prestosql.testing.CountingMockConnector.MetadataCallsCount; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.CountingMockConnector; +import io.trino.testing.CountingMockConnector.MetadataCallsCount; +import io.trino.testing.DistributedQueryRunner; import org.testng.annotations.Test; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertEquals; @Test(singleThreaded = true) diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestJoinQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestJoinQueries.java index d44cfd4efee3..043a3f47e456 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestJoinQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestJoinQueries.java @@ -13,10 +13,10 @@ */ package io.trino.tests; -import io.prestosql.execution.DynamicFilterConfig; -import io.prestosql.testing.AbstractTestJoinQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.execution.DynamicFilterConfig; +import io.trino.testing.AbstractTestJoinQueries; +import io.trino.testing.QueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.testng.annotations.Test; import static com.google.common.base.Verify.verify; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestJoinQueriesWithoutDynamicFiltering.java b/testing/trino-tests/src/test/java/io/trino/tests/TestJoinQueriesWithoutDynamicFiltering.java index d0c64abe3fc7..2e9395003afa 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestJoinQueriesWithoutDynamicFiltering.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestJoinQueriesWithoutDynamicFiltering.java @@ -14,9 +14,9 @@ package io.trino.tests; import com.google.common.collect.ImmutableMap; -import io.prestosql.testing.AbstractTestJoinQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.testing.AbstractTestJoinQueries; +import io.trino.testing.QueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.testng.annotations.Test; /** 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 9de3b307a7fa..23a7e2261b3d 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 @@ -13,21 +13,21 @@ */ package io.trino.tests; -import io.prestosql.Session; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryManager; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.ResultWithQueryId; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.Session; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryManager; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.testing.ResultWithQueryId; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.prestosql.SystemSessionProperties.LATE_MATERIALIZATION; -import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.prestosql.testing.QueryAssertions.assertEqualsIgnoreOrder; +import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; +import static io.trino.SystemSessionProperties.LATE_MATERIALIZATION; +import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; +import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static org.testng.Assert.assertTrue; public class TestLateMaterializationQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestLocalEngineOnlyQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestLocalEngineOnlyQueries.java index d799dd5d8b69..a4c17e93f3ba 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestLocalEngineOnlyQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestLocalEngineOnlyQueries.java @@ -13,7 +13,7 @@ */ package io.trino.tests; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.QueryRunner; public class TestLocalEngineOnlyQueries extends AbstractTestEngineOnlyQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestLocalQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestLocalQueries.java index dbe92ebdddb3..73b6ff8f8967 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestLocalQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestLocalQueries.java @@ -14,23 +14,23 @@ package io.trino.tests; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.testing.AbstractTestQueries; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.metadata.SessionPropertyManager; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.testing.AbstractTestQueries; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.PUSH_PARTIAL_AGGREGATION_THROUGH_JOIN; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.spi.type.DoubleType.DOUBLE; -import static io.prestosql.spi.type.VarcharType.VARCHAR; -import static io.prestosql.testing.MaterializedResult.resultBuilder; -import static io.prestosql.testing.TestingSession.TESTING_CATALOG; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.assertions.Assert.assertEquals; +import static io.trino.SystemSessionProperties.PUSH_PARTIAL_AGGREGATION_THROUGH_JOIN; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.spi.type.DoubleType.DOUBLE; +import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.testing.MaterializedResult.resultBuilder; +import static io.trino.testing.TestingSession.TESTING_CATALOG; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.assertions.Assert.assertEquals; public class TestLocalQueries extends AbstractTestQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestLocalQueryAssertions.java b/testing/trino-tests/src/test/java/io/trino/tests/TestLocalQueryAssertions.java index 2e566449a2ac..b67a610ac20b 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestLocalQueryAssertions.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestLocalQueryAssertions.java @@ -13,9 +13,9 @@ */ package io.trino.tests; -import io.prestosql.Session; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.QueryRunner; +import io.trino.Session; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.QueryRunner; import org.testng.annotations.Test; import static io.airlift.testing.Closeables.closeAllSuppress; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestMetadataManager.java b/testing/trino-tests/src/test/java/io/trino/tests/TestMetadataManager.java index 760d77edc1b8..67107ebd8d64 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestMetadataManager.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestMetadataManager.java @@ -15,22 +15,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.prestosql.connector.MockConnectorFactory; -import io.prestosql.connector.MockConnectorTableHandle; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.metadata.MetadataManager; -import io.prestosql.metadata.QualifiedTablePrefix; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.protocol.Slug; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.QueryId; -import io.prestosql.spi.connector.ConnectorFactory; -import io.prestosql.spi.connector.ConnectorViewDefinition; -import io.prestosql.spi.connector.SchemaTableName; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.TestingSessionContext; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; -import io.prestosql.transaction.TransactionBuilder; +import io.trino.connector.MockConnectorFactory; +import io.trino.connector.MockConnectorTableHandle; +import io.trino.dispatcher.DispatchManager; +import io.trino.metadata.MetadataManager; +import io.trino.metadata.QualifiedTablePrefix; +import io.trino.server.BasicQueryInfo; +import io.trino.server.protocol.Slug; +import io.trino.spi.Plugin; +import io.trino.spi.QueryId; +import io.trino.spi.connector.ConnectorFactory; +import io.trino.spi.connector.ConnectorViewDefinition; +import io.trino.spi.connector.SchemaTableName; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.TestingSessionContext; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.transaction.TransactionBuilder; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -39,10 +39,10 @@ import java.util.List; import java.util.Optional; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.spi.type.BigintType.BIGINT; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.spi.type.BigintType.BIGINT; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestMinWorkerRequirement.java b/testing/trino-tests/src/test/java/io/trino/tests/TestMinWorkerRequirement.java index 0c37ff3293c3..e4368de88cc0 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestMinWorkerRequirement.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestMinWorkerRequirement.java @@ -17,18 +17,18 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; -import io.prestosql.Session; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryManager; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.ResultWithQueryId; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.Session; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryManager; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.ResultWithQueryId; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.REQUIRED_WORKERS_COUNT; -import static io.prestosql.SystemSessionProperties.REQUIRED_WORKERS_MAX_WAIT_TIME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SystemSessionProperties.REQUIRED_WORKERS_COUNT; +import static io.trino.SystemSessionProperties.REQUIRED_WORKERS_MAX_WAIT_TIME; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.concurrent.Executors.newFixedThreadPool; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestOptimizeMixedDistinctAggregations.java b/testing/trino-tests/src/test/java/io/trino/tests/TestOptimizeMixedDistinctAggregations.java index 8fb0fbc05c79..e700aca33cfc 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestOptimizeMixedDistinctAggregations.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestOptimizeMixedDistinctAggregations.java @@ -13,9 +13,9 @@ */ package io.trino.tests; -import io.prestosql.testing.AbstractTestAggregations; -import io.prestosql.testing.QueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.testing.AbstractTestAggregations; +import io.trino.testing.QueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; public class TestOptimizeMixedDistinctAggregations extends AbstractTestAggregations diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestOrderByQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestOrderByQueries.java index ba99ded60925..50ef82729fb1 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestOrderByQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestOrderByQueries.java @@ -13,9 +13,9 @@ */ package io.trino.tests; -import io.prestosql.testing.AbstractTestOrderByQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.testing.AbstractTestOrderByQueries; +import io.trino.testing.QueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; public class TestOrderByQueries extends AbstractTestOrderByQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestProcedureCall.java b/testing/trino-tests/src/test/java/io/trino/tests/TestProcedureCall.java index d8fcfb1e3d4c..1abce56e53d0 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestProcedureCall.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestProcedureCall.java @@ -13,15 +13,15 @@ */ package io.trino.tests; -import io.prestosql.Session; -import io.prestosql.connector.CatalogName; -import io.prestosql.metadata.ProcedureRegistry; -import io.prestosql.server.testing.TestingPrestoServer; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.ProcedureTester; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.TestingProcedures; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.Session; +import io.trino.connector.CatalogName; +import io.trino.metadata.ProcedureRegistry; +import io.trino.server.testing.TestingPrestoServer; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.ProcedureTester; +import io.trino.testing.QueryRunner; +import io.trino.testing.TestingProcedures; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -29,8 +29,8 @@ import java.util.List; -import static io.prestosql.testing.TestingSession.TESTING_CATALOG; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.TESTING_CATALOG; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static java.util.Arrays.asList; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestProcedureCreation.java b/testing/trino-tests/src/test/java/io/trino/tests/TestProcedureCreation.java index 7869cec5e38a..a32e65a0ab13 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestProcedureCreation.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestProcedureCreation.java @@ -14,14 +14,14 @@ package io.trino.tests; import com.google.common.collect.ImmutableList; -import io.prestosql.spi.connector.ConnectorSession; -import io.prestosql.spi.procedure.Procedure; +import io.trino.spi.connector.ConnectorSession; +import io.trino.spi.procedure.Procedure; import org.testng.annotations.Test; import java.util.List; -import static io.prestosql.spi.block.MethodHandleUtil.methodHandle; -import static io.prestosql.spi.type.VarcharType.VARCHAR; +import static io.trino.spi.block.MethodHandleUtil.methodHandle; +import static io.trino.spi.type.VarcharType.VARCHAR; import static org.assertj.core.api.Assertions.assertThatThrownBy; @Test(singleThreaded = true) diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestQueryManager.java b/testing/trino-tests/src/test/java/io/trino/tests/TestQueryManager.java index 2dfd817a90ab..ab2ee7423e1d 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestQueryManager.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestQueryManager.java @@ -13,34 +13,34 @@ */ package io.trino.tests; -import io.prestosql.Session; -import io.prestosql.client.ClientCapabilities; -import io.prestosql.dispatcher.DispatchManager; -import io.prestosql.execution.QueryInfo; -import io.prestosql.execution.QueryManager; -import io.prestosql.execution.QueryState; -import io.prestosql.server.BasicQueryInfo; -import io.prestosql.server.protocol.Slug; -import io.prestosql.spi.PrestoException; -import io.prestosql.spi.QueryId; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.TestingSessionContext; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.Session; +import io.trino.client.ClientCapabilities; +import io.trino.dispatcher.DispatchManager; +import io.trino.execution.QueryInfo; +import io.trino.execution.QueryManager; +import io.trino.execution.QueryState; +import io.trino.server.BasicQueryInfo; +import io.trino.server.protocol.Slug; +import io.trino.spi.PrestoException; +import io.trino.spi.QueryId; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.TestingSessionContext; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import static com.google.common.collect.ImmutableSet.toImmutableSet; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.execution.QueryState.FAILED; -import static io.prestosql.execution.QueryState.RUNNING; -import static io.prestosql.execution.TestQueryRunnerUtil.createQuery; -import static io.prestosql.execution.TestQueryRunnerUtil.waitForQueryState; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_CPU_LIMIT; -import static io.prestosql.spi.StandardErrorCode.EXCEEDED_SCAN_LIMIT; -import static io.prestosql.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.execution.QueryState.FAILED; +import static io.trino.execution.QueryState.RUNNING; +import static io.trino.execution.TestQueryRunnerUtil.createQuery; +import static io.trino.execution.TestQueryRunnerUtil.waitForQueryState; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.spi.StandardErrorCode.EXCEEDED_CPU_LIMIT; +import static io.trino.spi.StandardErrorCode.EXCEEDED_SCAN_LIMIT; +import static io.trino.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR; +import static io.trino.testing.TestingSession.testSessionBuilder; import static java.util.Arrays.stream; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestQueryPlanDeterminism.java b/testing/trino-tests/src/test/java/io/trino/tests/TestQueryPlanDeterminism.java index 09a7944c7fd9..2e903321dc3a 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestQueryPlanDeterminism.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestQueryPlanDeterminism.java @@ -14,16 +14,16 @@ package io.trino.tests; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.metadata.SessionPropertyManager; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.AbstractTestQueries; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.PlanDeterminismChecker; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testing.TestingAccessControlManager.TestingPrivilege; +import io.trino.Session; +import io.trino.metadata.SessionPropertyManager; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.spi.type.Type; +import io.trino.testing.AbstractTestQueries; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.MaterializedResult; +import io.trino.testing.PlanDeterminismChecker; +import io.trino.testing.QueryRunner; +import io.trino.testing.TestingAccessControlManager.TestingPrivilege; import org.intellij.lang.annotations.Language; import org.testng.SkipException; import org.testng.annotations.AfterClass; @@ -32,9 +32,9 @@ import java.util.List; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.TESTING_CATALOG; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingSession.TESTING_CATALOG; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestQueryPlanDeterminism extends AbstractTestQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestQuerySerializationFailures.java b/testing/trino-tests/src/test/java/io/trino/tests/TestQuerySerializationFailures.java index 9141c8e32522..b764d491e726 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestQuerySerializationFailures.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestQuerySerializationFailures.java @@ -15,21 +15,21 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import io.prestosql.spi.Plugin; -import io.prestosql.spi.function.Description; -import io.prestosql.spi.function.ScalarFunction; -import io.prestosql.spi.function.SqlType; -import io.prestosql.spi.type.Type; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; -import io.prestosql.testng.services.Flaky; +import io.trino.spi.Plugin; +import io.trino.spi.function.Description; +import io.trino.spi.function.ScalarFunction; +import io.trino.spi.function.SqlType; +import io.trino.spi.type.Type; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import java.util.Set; -import static io.prestosql.spi.type.StandardTypes.BOOLEAN; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.type.StandardTypes.BOOLEAN; +import static io.trino.testing.TestingSession.testSessionBuilder; public class TestQuerySerializationFailures extends AbstractTestQueryFramework 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 d84f3c82dc1a..8be9e020faa6 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,12 +16,12 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.Files; import io.airlift.units.DataSize; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.spiller.NodeSpillConfig; -import io.prestosql.sql.analyzer.FeaturesConfig; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.QueryRunner; +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; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -30,7 +30,7 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.TestingSession.testSessionBuilder; @Test(singleThreaded = true) public class TestQuerySpillLimits diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledAggregations.java b/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledAggregations.java index 3520f703915e..9ef632b0b6ba 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledAggregations.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledAggregations.java @@ -13,8 +13,8 @@ */ package io.trino.tests; -import io.prestosql.testing.AbstractTestAggregations; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestAggregations; +import io.trino.testing.QueryRunner; public class TestSpilledAggregations extends AbstractTestAggregations diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledJoinQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledJoinQueries.java index 35b0f4694327..3ff5de5bbc93 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledJoinQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledJoinQueries.java @@ -13,8 +13,8 @@ */ package io.trino.tests; -import io.prestosql.testing.AbstractTestJoinQueries; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestJoinQueries; +import io.trino.testing.QueryRunner; public class TestSpilledJoinQueries extends AbstractTestJoinQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledOrderByQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledOrderByQueries.java index c561ba8f7c1b..bf2212d84abe 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledOrderByQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledOrderByQueries.java @@ -13,8 +13,8 @@ */ package io.trino.tests; -import io.prestosql.testing.AbstractTestOrderByQueries; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestOrderByQueries; +import io.trino.testing.QueryRunner; public class TestSpilledOrderByQueries extends AbstractTestOrderByQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledWindowQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledWindowQueries.java index 20b829676175..18e53f5a3b76 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledWindowQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestSpilledWindowQueries.java @@ -13,8 +13,8 @@ */ package io.trino.tests; -import io.prestosql.testing.AbstractTestWindowQueries; -import io.prestosql.testing.QueryRunner; +import io.trino.testing.AbstractTestWindowQueries; +import io.trino.testing.QueryRunner; public class TestSpilledWindowQueries extends AbstractTestWindowQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestTablesample.java b/testing/trino-tests/src/test/java/io/trino/tests/TestTablesample.java index e4d8e1e9910e..4ea70e28266b 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestTablesample.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestTablesample.java @@ -15,17 +15,17 @@ import com.google.common.collect.ImmutableMap; import io.airlift.testing.Closeables; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.sql.query.QueryAssertions; -import io.prestosql.testing.LocalQueryRunner; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.sql.query.QueryAssertions; +import io.trino.testing.LocalQueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.SessionTestUtils.TEST_SESSION; -import static io.prestosql.spi.StandardErrorCode.INVALID_ARGUMENTS; -import static io.prestosql.spi.StandardErrorCode.TYPE_MISMATCH; -import static io.prestosql.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; +import static io.trino.SessionTestUtils.TEST_SESSION; +import static io.trino.spi.StandardErrorCode.INVALID_ARGUMENTS; +import static io.trino.spi.StandardErrorCode.TYPE_MISMATCH; +import static io.trino.testing.assertions.PrestoExceptionAssert.assertPrestoExceptionThrownBy; import static org.assertj.core.api.Assertions.assertThat; public class TestTablesample diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestTpchDistributedQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestTpchDistributedQueries.java index 66296a3b3b62..b8193d9afe23 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestTpchDistributedQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestTpchDistributedQueries.java @@ -18,24 +18,24 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonCodecFactory; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.Session; -import io.prestosql.spi.connector.CatalogSchemaTableName; -import io.prestosql.spi.type.Type; -import io.prestosql.sql.planner.planprinter.IoPlanPrinter; -import io.prestosql.sql.planner.planprinter.IoPlanPrinter.EstimatedStatsAndCost; -import io.prestosql.testing.AbstractTestQueries; -import io.prestosql.testing.MaterializedResult; -import io.prestosql.testing.QueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; -import io.prestosql.type.TypeDeserializer; +import io.trino.Session; +import io.trino.spi.connector.CatalogSchemaTableName; +import io.trino.spi.type.Type; +import io.trino.sql.planner.planprinter.IoPlanPrinter; +import io.trino.sql.planner.planprinter.IoPlanPrinter.EstimatedStatsAndCost; +import io.trino.testing.AbstractTestQueries; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.type.TypeDeserializer; import org.testng.annotations.Test; import java.util.Optional; import static com.google.common.collect.Iterables.getOnlyElement; -import static io.prestosql.spi.predicate.Marker.Bound.EXACTLY; -import static io.prestosql.spi.type.VarcharType.createVarcharType; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.spi.predicate.Marker.Bound.EXACTLY; +import static io.trino.spi.type.VarcharType.createVarcharType; +import static io.trino.testing.TestingSession.testSessionBuilder; import static org.testng.Assert.assertEquals; public class TestTpchDistributedQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestTpchDistributedStats.java b/testing/trino-tests/src/test/java/io/trino/tests/TestTpchDistributedStats.java index aadd4e0475be..dbd189ef9dd9 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestTpchDistributedStats.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestTpchDistributedStats.java @@ -14,24 +14,24 @@ package io.trino.tests; import com.google.common.collect.ImmutableMap; -import io.prestosql.plugin.tpch.ColumnNaming; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.statistics.StatisticsAssertion; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.plugin.tpch.ColumnNaming; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.statistics.StatisticsAssertion; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import io.trino.tpch.TpchTable; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.COLLECT_PLAN_STATISTICS_FOR_ALL_QUERIES; -import static io.prestosql.SystemSessionProperties.PREFER_PARTIAL_AGGREGATION; -import static io.prestosql.plugin.tpch.TpchConnectorFactory.TPCH_COLUMN_NAMING_PROPERTY; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.absoluteError; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.defaultTolerance; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.noError; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.relativeError; -import static io.prestosql.testing.statistics.Metrics.OUTPUT_ROW_COUNT; -import static io.prestosql.testing.statistics.Metrics.distinctValuesCount; +import static io.trino.SystemSessionProperties.COLLECT_PLAN_STATISTICS_FOR_ALL_QUERIES; +import static io.trino.SystemSessionProperties.PREFER_PARTIAL_AGGREGATION; +import static io.trino.plugin.tpch.TpchConnectorFactory.TPCH_COLUMN_NAMING_PROPERTY; +import static io.trino.testing.statistics.MetricComparisonStrategies.absoluteError; +import static io.trino.testing.statistics.MetricComparisonStrategies.defaultTolerance; +import static io.trino.testing.statistics.MetricComparisonStrategies.noError; +import static io.trino.testing.statistics.MetricComparisonStrategies.relativeError; +import static io.trino.testing.statistics.Metrics.OUTPUT_ROW_COUNT; +import static io.trino.testing.statistics.Metrics.distinctValuesCount; public class TestTpchDistributedStats { diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestTpchLocalStats.java b/testing/trino-tests/src/test/java/io/trino/tests/TestTpchLocalStats.java index 29d580dbb208..3249ee94f037 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestTpchLocalStats.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestTpchLocalStats.java @@ -14,29 +14,29 @@ package io.trino.tests; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.ColumnNaming; -import io.prestosql.plugin.tpch.TpchConnectorFactory; -import io.prestosql.testing.LocalQueryRunner; -import io.prestosql.testing.statistics.StatisticsAssertion; +import io.trino.Session; +import io.trino.plugin.tpch.ColumnNaming; +import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.testing.LocalQueryRunner; +import io.trino.testing.statistics.StatisticsAssertion; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.prestosql.SystemSessionProperties.COLLECT_PLAN_STATISTICS_FOR_ALL_QUERIES; -import static io.prestosql.SystemSessionProperties.PREFER_PARTIAL_AGGREGATION; -import static io.prestosql.plugin.tpch.TpchConnectorFactory.TPCH_COLUMN_NAMING_PROPERTY; -import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; -import static io.prestosql.testing.TestingSession.testSessionBuilder; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.absoluteError; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.defaultTolerance; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.noError; -import static io.prestosql.testing.statistics.MetricComparisonStrategies.relativeError; -import static io.prestosql.testing.statistics.Metrics.OUTPUT_ROW_COUNT; -import static io.prestosql.testing.statistics.Metrics.distinctValuesCount; -import static io.prestosql.testing.statistics.Metrics.highValue; -import static io.prestosql.testing.statistics.Metrics.lowValue; -import static io.prestosql.testing.statistics.Metrics.nullsFraction; +import static io.trino.SystemSessionProperties.COLLECT_PLAN_STATISTICS_FOR_ALL_QUERIES; +import static io.trino.SystemSessionProperties.PREFER_PARTIAL_AGGREGATION; +import static io.trino.plugin.tpch.TpchConnectorFactory.TPCH_COLUMN_NAMING_PROPERTY; +import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static io.trino.testing.TestingSession.testSessionBuilder; +import static io.trino.testing.statistics.MetricComparisonStrategies.absoluteError; +import static io.trino.testing.statistics.MetricComparisonStrategies.defaultTolerance; +import static io.trino.testing.statistics.MetricComparisonStrategies.noError; +import static io.trino.testing.statistics.MetricComparisonStrategies.relativeError; +import static io.trino.testing.statistics.Metrics.OUTPUT_ROW_COUNT; +import static io.trino.testing.statistics.Metrics.distinctValuesCount; +import static io.trino.testing.statistics.Metrics.highValue; +import static io.trino.testing.statistics.Metrics.lowValue; +import static io.trino.testing.statistics.Metrics.nullsFraction; public class TestTpchLocalStats { diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestTpchTableScanRedirection.java b/testing/trino-tests/src/test/java/io/trino/tests/TestTpchTableScanRedirection.java index 802eb7feee8b..224da0825bf2 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestTpchTableScanRedirection.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestTpchTableScanRedirection.java @@ -13,11 +13,11 @@ */ package io.trino.tests; -import io.prestosql.plugin.memory.MemoryPlugin; -import io.prestosql.testing.AbstractTestQueryFramework; -import io.prestosql.testing.DistributedQueryRunner; -import io.prestosql.testing.QueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.plugin.memory.MemoryPlugin; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.DistributedQueryRunner; +import io.trino.testing.QueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestWindowQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestWindowQueries.java index ab31bbf2abdf..599dac3a702e 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestWindowQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestWindowQueries.java @@ -13,9 +13,9 @@ */ package io.trino.tests; -import io.prestosql.testing.AbstractTestWindowQueries; -import io.prestosql.testing.QueryRunner; -import io.prestosql.tests.tpch.TpchQueryRunnerBuilder; +import io.trino.testing.AbstractTestWindowQueries; +import io.trino.testing.QueryRunner; +import io.trino.tests.tpch.TpchQueryRunnerBuilder; public class TestWindowQueries extends AbstractTestWindowQueries diff --git a/testing/trino-tests/src/test/java/io/trino/tests/tpch/TpchQueryRunner.java b/testing/trino-tests/src/test/java/io/trino/tests/tpch/TpchQueryRunner.java index 4365bfa61e0e..6438a71ad728 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/tpch/TpchQueryRunner.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/tpch/TpchQueryRunner.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.testing.DistributedQueryRunner; public final class TpchQueryRunner { diff --git a/testing/trino-tests/src/test/java/io/trino/tests/tpch/TpchQueryRunnerBuilder.java b/testing/trino-tests/src/test/java/io/trino/tests/tpch/TpchQueryRunnerBuilder.java index 4405b5f10c3a..61c3c0e0737c 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/tpch/TpchQueryRunnerBuilder.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/tpch/TpchQueryRunnerBuilder.java @@ -14,18 +14,18 @@ package io.trino.tests.tpch; import com.google.common.collect.ImmutableMap; -import io.prestosql.Session; -import io.prestosql.plugin.tpch.TpchPlugin; -import io.prestosql.testing.DistributedQueryRunner; +import io.trino.Session; +import io.trino.plugin.tpch.TpchPlugin; +import io.trino.testing.DistributedQueryRunner; import java.util.Optional; import java.util.function.Function; -import static io.prestosql.plugin.tpch.TpchConnectorFactory.TPCH_MAX_ROWS_PER_PAGE_PROPERTY; -import static io.prestosql.plugin.tpch.TpchConnectorFactory.TPCH_PRODUCE_PAGES; -import static io.prestosql.plugin.tpch.TpchConnectorFactory.TPCH_TABLE_SCAN_REDIRECTION_CATALOG; -import static io.prestosql.plugin.tpch.TpchConnectorFactory.TPCH_TABLE_SCAN_REDIRECTION_SCHEMA; -import static io.prestosql.testing.TestingSession.testSessionBuilder; +import static io.trino.plugin.tpch.TpchConnectorFactory.TPCH_MAX_ROWS_PER_PAGE_PROPERTY; +import static io.trino.plugin.tpch.TpchConnectorFactory.TPCH_PRODUCE_PAGES; +import static io.trino.plugin.tpch.TpchConnectorFactory.TPCH_TABLE_SCAN_REDIRECTION_CATALOG; +import static io.trino.plugin.tpch.TpchConnectorFactory.TPCH_TABLE_SCAN_REDIRECTION_SCHEMA; +import static io.trino.testing.TestingSession.testSessionBuilder; public final class TpchQueryRunnerBuilder extends DistributedQueryRunner.Builder